| # Copyright 2022 The ChromiumOS Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| config AP_POWER_CONTROL |
| bool |
| default y if PLATFORM_EC_POWERSEQ || (AP_PWRSEQ && !EMUL_AP_PWRSEQ_DRIVER) |
| help |
| Whether the EC has control over AP power states. |
| |
| This is automatically enabled if an implementation of AP power |
| sequencing is enabled. |
| |
| menuconfig PLATFORM_EC_BOOT_AP_POWER_REQUIREMENTS |
| bool "Power requirements to boot AP" |
| default y |
| help |
| Power thresholds for AP boot. |
| If one of the following conditions is met, EC boots AP: |
| 1. Battery charge >= CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON. |
| 2. AC power >= CONFIG_CHARGER_MIN_POWER_MW_FOR_POWER_ON. |
| 3. Battery charge >= CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON_WITH_AC |
| and |
| AC power >= CONFIG_CHARGER_MIN_POWER_MW_FOR_POWER_ON_WITH_BATT. |
| |
| if PLATFORM_EC_BOOT_AP_POWER_REQUIREMENTS |
| |
| config PLATFORM_EC_POWER_BUTTON_INIT_TIMEOUT |
| int "Timeout before power button task gives up starting system" |
| depends on HAS_TASK_POWERBTN |
| # The PD Controller needs more time to get current power contract |
| default 4 if PLATFORM_EC_USB_PD_CONTROLLER |
| default 1 |
| help |
| Sets the maximum time, in seconds, before the power button |
| task stops waiting for conditions to be OK to start |
| the system. If the timeout is reached, the AP is |
| not started, and the power task's state is set to idle. |
| |
| config PLATFORM_EC_CHARGER_MIN_BAT_PCT_FOR_POWER_ON |
| int "Minimal battery level to boot AP without AC" |
| depends on PLATFORM_EC_BATTERY |
| default 3 |
| help |
| Sets the minimum battery capacity, as a percentage, needed to boot |
| the AP when AC power is not supplied. |
| |
| config PLATFORM_EC_CHARGER_MIN_BAT_PCT_FOR_POWER_ON_WITH_AC |
| int "Minimal battery level to boot AP with AC" |
| depends on PLATFORM_EC_BATTERY && PLATFORM_EC_CHARGE_MANAGER |
| default 1 |
| help |
| Sets the minimum battery capacity, as a percentage, needed to boot |
| the AP when AC power is supplied. The AC power supplied must also |
| be greater than CONFIG_CHARGER_MIN_POWER_MW_FOR_POWER_ON_WITH_BATT. |
| |
| config PLATFORM_EC_CHARGER_MIN_POWER_MW_FOR_POWER_ON_WITH_BATT |
| int "Minimal AC power to boot AP with battery" |
| depends on PLATFORM_EC_BATTERY && PLATFORM_EC_CHARGE_MANAGER |
| default 15000 |
| help |
| Sets the minimum power, in milliwatts, supplied by an external |
| charger required to boot the AP when the battery capacity is also |
| above CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON_WITH_AC. |
| |
| config PLATFORM_EC_CHARGER_MIN_POWER_MW_FOR_POWER_ON |
| int "Minimal AC power to boot AP without battery" |
| depends on PLATFORM_EC_CHARGE_MANAGER |
| default 15000 |
| help |
| Sets the minimum power, in milliwatts, supplied by an external |
| charger requires to boot the AP when no battery is present or |
| under dead battery conditions. If the AP requires greater than |
| 15W to boot, check the |
| CONFIG_PLATFORM_EC_CHARGER_LIMIT_POWER_THRESH_CHG_MW setting. |
| |
| endif # PLATFORM_EC_BOOT_AP_POWER_REQUIREMENTS |