From 623c0972fd4f031fd0aefbb14669c847e2a944fe Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Thu, 5 Feb 2026 12:48:45 +0530 Subject: [PATCH] lib: Add support for off-mode charging indicator Introduce CONFIG_PLATFORM_HAS_OFF_MODE_CHARGING_INDICATOR to support rendering a dedicated splash screen when a device is in an off-mode charging state. This provides visual feedback to the user when a device autoboots upon power cable insertion instead of performing a full OS boot. Changes: - Add Kconfig options for enabling the indicator and specifying the logo path. - Update Makefile.mk to include the off-mode charging BMP file in CBFS when the feature is enabled. - Depend on BMP_LOGO infrastructure for asset rendering. BUG=b:473480933 TEST=Able to build google/fatcat. Change-Id: Ib09de15ca3526bf5b10f7404dc58032d63c01e6d Signed-off-by: Subrata Banik Reviewed-on: https://review.coreboot.org/c/coreboot/+/91105 Tested-by: build bot (Jenkins) Reviewed-by: Kapil Porwal --- src/lib/Kconfig | 17 +++++++++++++++++ src/lib/Makefile.mk | 2 ++ 2 files changed, 19 insertions(+) diff --git a/src/lib/Kconfig b/src/lib/Kconfig index 0c8fc454ff..d70374d758 100644 --- a/src/lib/Kconfig +++ b/src/lib/Kconfig @@ -270,6 +270,23 @@ config SPLASH_SCREEN_FOOTER_LOGO_PATH depends on SPLASH_SCREEN_FOOTER default "3rdparty/blobs/mainboard/\$(MAINBOARDDIR)/logo.bmp" +config PLATFORM_HAS_OFF_MODE_CHARGING_INDICATOR + bool "Display off-mode charging indicator" + default n + depends on BMP_LOGO + help + Enable an off-mode charging splash screen to notify the user that + the device is charging. This prevents user confusion when a + device autoboots into a charging state upon the + insertion of a power cable, rather than performing a full OS boot. + + This feature requires a functional display and depends on the + BMP_LOGO infrastructure to render the charging assets. + +config PLATFORM_OFF_MODE_CHARGING_INDICATOR_LOGO_PATH + string "Path to off-mode charging logo file" + default "3rdparty/blobs/mainboard/\$(MAINBOARDDIR)/off_mode_charging.bmp" + endmenu config HAVE_EARLY_POWEROFF_SUPPORT diff --git a/src/lib/Makefile.mk b/src/lib/Makefile.mk index d7cf8455b1..0405cbeb5b 100644 --- a/src/lib/Makefile.mk +++ b/src/lib/Makefile.mk @@ -449,3 +449,5 @@ $(eval $(call add_bmp_logo_file_to_cbfs,CONFIG_PLATFORM_HAS_LOW_BATTERY_INDICATO low_battery.bmp,CONFIG_PLATFORM_LOW_BATTERY_INDICATOR_LOGO_PATH)) $(eval $(call add_bmp_logo_file_to_cbfs,CONFIG_SPLASH_SCREEN_FOOTER, \ footer_logo.bmp,CONFIG_SPLASH_SCREEN_FOOTER_LOGO_PATH)) +$(eval $(call add_bmp_logo_file_to_cbfs,CONFIG_PLATFORM_HAS_OFF_MODE_CHARGING_INDICATOR, \ + off_mode_charging.bmp,CONFIG_PLATFORM_OFF_MODE_CHARGING_INDICATOR_LOGO_PATH))