From 968c60c0d934f16c9961a4417545762aaf85ac67 Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Tue, 17 Feb 2026 00:33:35 +0530 Subject: [PATCH] mb/google/bluey: Check for battery presence in off-mode charging Verify that a battery is actually present before setting the boot mode to LB_BOOT_MODE_OFFMODE_CHARGING. This prevents the system from incorrectly entering a charging state when running on AC power without a battery connected. TEST=Build and boot on bluey with and without battery present. Verify boot mode transitions correctly. Change-Id: I67098bc06b34c25429daf516f3891c50930209fe Signed-off-by: Subrata Banik Reviewed-on: https://review.coreboot.org/c/coreboot/+/91290 Tested-by: build bot (Jenkins) Reviewed-by: Kapil Porwal --- src/mainboard/google/bluey/romstage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mainboard/google/bluey/romstage.c b/src/mainboard/google/bluey/romstage.c index a357f6d3d5..a3806668b7 100644 --- a/src/mainboard/google/bluey/romstage.c +++ b/src/mainboard/google/bluey/romstage.c @@ -40,7 +40,7 @@ static enum boot_mode_t set_boot_mode(void) enum boot_mode_t boot_mode_new; - if (is_off_mode()) { + if (is_off_mode() && google_chromeec_is_battery_present()) { boot_mode_new = LB_BOOT_MODE_OFFMODE_CHARGING; } else if (google_chromeec_is_below_critical_threshold()) { if (google_chromeec_is_charger_present())