| # Copyright 2021 The ChromiumOS Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| if PLATFORM_EC |
| |
| config PLATFORM_EC_CONSOLE_CMD_SCRATCHPAD |
| bool "Console Command: scratchpad" |
| help |
| Enable the scratchpad console command. The scratchpad register |
| maintain its contents across a software-requested warm reset. The |
| command is used to set or get the scratchpad. |
| |
| config PLATFORM_EC_CONSOLE_CMD_SYSINFO |
| bool "Console Command: sysinfo" |
| default y |
| help |
| Enable the sysinfo console command, which shows statistics |
| about the current image copy running, reset flags, etc. |
| |
| config PLATFORM_EC_HIBERNATE |
| bool "Support system hibernating" |
| default y |
| help |
| Enable system hibernation. |
| The type of hibernation supported must be selected. |
| |
| choice PLATFORM_EC_HIBERNATE_TYPE |
| prompt "Choose a hibernate type" |
| default PLATFORM_EC_HIBERNATE_PSL if DT_HAS_NUVOTON_NPCX_POWER_PSL_ENABLED && SOC_FAMILY_NPCX |
| default PLATFORM_EC_HIBERNATE_VCI if DT_HAS_CROS_EC_HIBERNATE_VCI_PIN_ENABLED |
| default PLATFORM_EC_HIBERNATE_WAKE_PINS if DT_HAS_CROS_EC_HIBERNATE_WAKE_PINS_ENABLED |
| default PLATFORM_EC_HIBERNATE_Z5 if DT_HAS_CROS_EC_HIBERNATE_Z5_ENABLED |
| help |
| Select the type of hibernation supported. Either |
| PLATFORM_EC_HIBERNATE_PSL (for power switch logic support) or |
| PLATFORM_EC_HIBERNATE_WAKE_PINS (using wake pins) are |
| supported. |
| |
| config PLATFORM_EC_HIBERNATE_PSL |
| bool "System hibernating with PSL (Power Switch Logic) mechanism" |
| depends on DT_HAS_NUVOTON_NPCX_POWER_PSL_ENABLED |
| depends on SOC_FAMILY_NPCX |
| help |
| Use PSL (Power Switch Logic) for hibernating. It turns off VCC power |
| rail for ultra-low power consumption and uses PSL inputs rely on VSBY |
| power rail to wake up ec and the whole system. |
| |
| config PLATFORM_EC_HIBERNATE_VCI |
| bool "System hibernating with VCI mechanism" |
| depends on SOC_FAMILY_MICROCHIP_MEC |
| help |
| Use VCI (VBAT-Powered Control Interface) for hibernating. It turns off |
| VTR power rail for ultra-low power consumption and uses VCI inputs which |
| rely on VBAT power rail to wake up ec and the whole system. |
| |
| config PLATFORM_EC_HIBERNATE_WAKE_PINS |
| bool "System hibernating with wake-source pins" |
| depends on DT_HAS_CROS_EC_HIBERNATE_WAKE_PINS_ENABLED |
| help |
| Use wake source pins for hibernating. It turns off VCC power |
| rail for ultra-low power consumption and uses a low power |
| power rail. Changes on wake source pins will wake up the EC. |
| |
| config PLATFORM_EC_HIBERNATE_Z5 |
| bool "Hibernate to Z5 driver" |
| depends on DT_HAS_CROS_EC_HIBERNATE_Z5_ENABLED |
| help |
| Enable support for putting the board into the Z5 power state |
| using an EC controlled GPIO. |
| |
| endchoice # PLATFORM_EC_HIBERNATE_TYPE |
| |
| config HIBERNATE_Z5_INIT_PRIORITY |
| int "Hibernate Z5 init priority" |
| default 50 |
| depends on PLATFORM_EC_HIBERNATE_Z5 |
| help |
| Hibernate Z5 initialization priority. This should be a lower priority |
| (higher value) than CONFIG_GPIO_INIT_PRIORITY. |
| |
| config PLATFORM_EC_HIBERNATE_DELAY_SEC |
| int "Delay in seconds from AP power off to hibernate" |
| depends on PLATFORM_EC_HIBERNATE |
| default 3600 |
| help |
| This value is the delay in seconds from when the AP enters G3 |
| to when the system is hibernated. |
| |
| config PLATFORM_EC_SYSTEM_PRE_INIT_PRIORITY |
| int "System pre-initialization priority" |
| default 20 |
| range 0 99 |
| help |
| This defines the initialization priority for the CROS |
| system_pre_init() function. system_pre_init() reads chip level reset |
| cause and stores it into the system reset flags. All drivers, except |
| those critical to determining the reset type, should be initialized at |
| lower priority so that the system reset flags are valid. |
| |
| config PLATFORM_EC_FW_RESET_VECTOR |
| bool "Firmware Reset Vector chip specific retrieval" |
| default y if SOC_FAMILY_ITE_EC |
| help |
| This defines if there is a chip specific machanism for |
| retrieving the firmware reset vector. The function that |
| needs to be provided is system_get_fw_reset_vector that |
| will return the address of the reset vector. |
| |
| config PLATFORM_EC_SYSTEM_SAFE_MODE |
| bool "Enable System Safe Mode" |
| default n |
| depends on (CPU_CORTEX_M || ARCH_POSIX) |
| help |
| This enables system safe mode for retrieving system state after |
| a panic occurs. System safe mode only runs briefly after a panic. |
| |
| config PLATFORM_EC_SYSTEM_SAFE_MODE_TIMEOUT_MSEC |
| int "System safe mode timeout" |
| default 4000 |
| depends on PLATFORM_EC_SYSTEM_SAFE_MODE |
| help |
| Safe mode will force a system reset after this timeout. The system may |
| reset sooner if all safe mode tasks are completed before the timeout. |
| |
| config PLATFORM_EC_SYSTEM_SAFE_MODE_PRINT_STACK |
| bool "Print stack to log after panic" |
| default y |
| depends on PLATFORM_EC_SYSTEM_SAFE_MODE |
| help |
| Prints the stack of the faulting thread to the console buffer in |
| system safe mode. |
| |
| config PLATFORM_EC_HOST_COMMAND_MEMORY_DUMP |
| bool "Enable Memory Dump Host Commands" |
| select THREAD_STACK_INFO |
| help |
| Enables fetching a memory dump using host commands. This is useful when |
| debugging panics. May not dump all memory, e.g. sensitive memory will |
| not be dumped. |
| |
| endif # PLATFORM_EC |