coreboot/src/soc/intel/common
Subrata Banik e5cc73cb94 soc/intel/common: Add low battery shutdown function
This commit adds a `do_low_battery_poweroff()` function to handle
platform power off due to critically low battery levels.

This provides a standardized way to handle low battery shutdowns across
platforms.

Additionally, the delay to the `do_low_battery_poweroff()` function,
allowing time for the low battery indicator to be displayed before
powering off. The delay is configurable through the
`PLATFORM_LOW_BATTERY_SHUTDOWN_DELAY_SEC` Kconfig option.

Finally, a low battery indicator event is logged using `elog`
before the delay.

This functionality (elog and delay) is enabled when the
`PLATFORM_HAS_LOW_BATTERY_INDICATOR` Kconfig option is selected.

BUG=b:339673254
TEST=Able to build and boot google/brox.

Change-Id: I92e9003c70c2608770972f1a302f954ebdf17bc4
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86361
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-02-15 19:00:24 +00:00
..
acpi soc/intel: Move USB wake methods to a common ASL file 2023-10-04 15:29:32 +00:00
basecode soc/intel/common: Apply Intel recommendation for early ramtop caching 2024-11-11 11:41:36 +00:00
block soc/intel/cmn/pmc: Add support for early power off 2025-02-15 18:59:20 +00:00
pch soc/intel/cmn/pch: Consolidate eSPI.h into IA common code 2024-07-18 06:01:14 +00:00
fsp_reset.c soc/intel: Correct return type of fsp_get_pch_reset_status() 2024-10-01 21:34:49 +00:00
hda_verb.c azalia: Get rid of "return {-1,0} 2024-08-11 17:10:08 +00:00
hda_verb.h
Kconfig.common soc/inte/{adl,mtl}: Move ASPM helper functions to common 2025-01-02 14:58:33 +00:00
Makefile.mk soc/intel: Rename Makefiles from .inc to .mk 2024-01-24 10:02:22 +00:00
mma.c soc/intel/common/mma: Use C99 flexible arrays 2023-08-01 12:51:46 +00:00
mma.h
nhlt.c
reset.c soc/intel/common: Add low battery shutdown function 2025-02-15 19:00:24 +00:00
reset.h soc/intel/common: Add low battery shutdown function 2025-02-15 19:00:24 +00:00
smbios.c tree: Remove unused <smbios.h> 2024-08-10 03:34:42 +00:00
smbios.h soc/intel: Add max memory speed into dimm info 2023-06-15 15:08:12 +00:00
tco.h soc/intel: Unify the definition of TCO registers 2024-01-30 13:28:39 +00:00
tpm_tis.c drivers/tpm: Move tis_plat_irq_status to cr50 driver 2023-07-06 16:16:43 +00:00
vbt.c
vbt.h