From 29ca9c8bfa4a5178765d9f69589bffac1a7449ab Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Wed, 3 Sep 2025 11:09:12 +0530 Subject: [PATCH] mb/google/bluey: Disable charging during normal boot This commit adds a call to disable_slow_battery_charging() in the lb_add_boot_mode function. The logic ensures that charging is disabled if the system is booting in a normal mode, where neither the LB_BOOT_MODE_LOW_BATTERY nor LB_BOOT_MODE_OFFMODE_CHARGING flags are set. This prevents unintended charging by the AP firmware when the device is not in a low-battery state or booting from off-mode charging to avoid battery unmanaged health related problem. TEST=Able to build and boot google/quenbi. Change-Id: I648dc72a35ad2773f803792248fa87351333828f Signed-off-by: Subrata Banik Reviewed-on: https://review.coreboot.org/c/coreboot/+/89023 Reviewed-by: Kapil Porwal Tested-by: build bot (Jenkins) --- src/mainboard/google/bluey/mainboard.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mainboard/google/bluey/mainboard.c b/src/mainboard/google/bluey/mainboard.c index 6d2f705a41..58035a3290 100644 --- a/src/mainboard/google/bluey/mainboard.c +++ b/src/mainboard/google/bluey/mainboard.c @@ -25,6 +25,10 @@ void lb_add_boot_mode(struct lb_header *header) if (google_chromeec_is_below_critical_threshold()) mode->boot_mode = LB_BOOT_MODE_LOW_BATTERY; + + /* Booting into normal mode hence disable charging */ + if (mode->boot_mode == LB_BOOT_MODE_NORMAL) + disable_slow_battery_charging(); } bool mainboard_needs_pcie_init(void)