From 9a86b9f729fa265185e95ea73a5394b72f6b353e Mon Sep 17 00:00:00 2001 From: Hari L Date: Tue, 10 Mar 2026 17:23:12 +0530 Subject: [PATCH] mb/google/bluey: Integrate ADSP load and LPASS bring-up into charging flow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Load ADSP firmware and then bring up LPASS/Q6 during the Bluey charging sequence. This ensures ADSP‑dependent fast charging works reliably. TEST: - Built and booted image.serial.bin on X1P42100. - Verified ADSP DTB and firmware load over UART. - Verified Q6 and LPASS init during cold boot. - Verified charging flow: device entered charging mode, battery current (~3550 mA) reported, and CRD RED LED glowed. Change-Id: I6a1326f4271c5121cd7284d64b2912505b2a93a2 Signed-off-by: Hari L Reviewed-on: https://review.coreboot.org/c/coreboot/+/91564 Reviewed-by: Kapil Porwal Reviewed-by: Jayvik Desai Reviewed-by: Subrata Banik Tested-by: build bot (Jenkins) --- src/mainboard/google/bluey/board.h | 1 + src/mainboard/google/bluey/charging.c | 18 ++++++++++++++++++ src/mainboard/google/bluey/mainboard.c | 3 +-- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/mainboard/google/bluey/board.h b/src/mainboard/google/bluey/board.h index 04ef0ca3c1..b7084a30d5 100644 --- a/src/mainboard/google/bluey/board.h +++ b/src/mainboard/google/bluey/board.h @@ -65,5 +65,6 @@ void configure_debug_access_port(void); void enable_slow_battery_charging(void); void disable_slow_battery_charging(void); void launch_charger_applet(void); +void enable_fast_battery_charging(void); #endif /* MAINBOARD_GOOGLE_BLUEY_BOARD_H */ diff --git a/src/mainboard/google/bluey/charging.c b/src/mainboard/google/bluey/charging.c index c8b1126a42..a499ca5888 100644 --- a/src/mainboard/google/bluey/charging.c +++ b/src/mainboard/google/bluey/charging.c @@ -5,6 +5,8 @@ #include #include #include +#include +#include #include #include #include @@ -276,3 +278,19 @@ void disable_slow_battery_charging(void) spmi_write8(SMB1_CHGR_MAX_FCC_CFG, FCC_DISABLE); spmi_write8(SMB2_CHGR_MAX_FCC_CFG, FCC_DISABLE); } + +/* + * Enable fast battery charging with ADSP support. + * + * This function loads ADSP firmware and configures fast charging. + */ +void enable_fast_battery_charging(void) +{ + /* Load ADSP firmware first */ + adsp_fw_load(); + + /* Bring up LPASS/QDSP6 (ADSP) for ADSP-dependent charging support */ + if (lpass_bring_up() != CB_SUCCESS) { + printk(BIOS_ERR, "LPASS bring-up failed; skipping fast charging.\n"); + } +} diff --git a/src/mainboard/google/bluey/mainboard.c b/src/mainboard/google/bluey/mainboard.c index 1b9b9955a2..306fefafe9 100644 --- a/src/mainboard/google/bluey/mainboard.c +++ b/src/mainboard/google/bluey/mainboard.c @@ -188,8 +188,7 @@ static void trigger_critical_battery_shutdown(void) */ static void handle_low_power_charging_boot(void) { - /* TODO: enable fast charging */ - enable_slow_battery_charging(); + enable_fast_battery_charging(); /* * Disable the lightbar for Low-Battery or Off-Mode charging sequences.