From 1c6f4618b6e2123cf78e3e0a9ab69d39b194e2a8 Mon Sep 17 00:00:00 2001 From: Kapil Porwal Date: Tue, 24 Mar 2026 14:41:58 +0530 Subject: [PATCH] mb/google/bluey: Allow charger behind DAM To support chargers connected through a Debug Accessory Mode (DAM) cable, the PMIC must be configured to allow legacy charging paths even when a debug accessory is detected. Update the charging initialization to clear the suspend bit in the SCHG_TYPE_C_SUSPEND_LEGACY_CHARGERS register. This ensures the SMB2360 can correctly negotiate and draw power when a DAM cable is in use. BUG=none TEST=Verify SMB2360 charging configuration on Google/Quartz. Change-Id: I8d22abf92f4e8967efbe2ee3320c4a1461d6ef88 Signed-off-by: Kapil Porwal Reviewed-on: https://review.coreboot.org/c/coreboot/+/91832 Reviewed-by: Subrata Banik Tested-by: build bot (Jenkins) Reviewed-by: Jayvik Desai --- src/mainboard/google/bluey/charging.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mainboard/google/bluey/charging.c b/src/mainboard/google/bluey/charging.c index e567b68575..c8b1126a42 100644 --- a/src/mainboard/google/bluey/charging.c +++ b/src/mainboard/google/bluey/charging.c @@ -25,6 +25,9 @@ #define SCHG_TYPE_C_TYPE_C_DEBUG_ACCESS_SRC_CFG 0x2B4C #define SMB1_SCHG_TYPE_C_TYPE_C_DEBUG_ACCESS_SRC_CFG \ ((SMB1_SLAVE_ID << 16) | SCHG_TYPE_C_TYPE_C_DEBUG_ACCESS_SRC_CFG) +#define SCHG_TYPE_C_SUSPEND_LEGACY_CHARGERS 0x2B90 +#define SMB1_SCHG_TYPE_C_SUSPEND_LEGACY_CHARGERS \ +((SMB1_SLAVE_ID << 16) | SCHG_TYPE_C_SUSPEND_LEGACY_CHARGERS) #define SCHG_CHGR_CHARGING_FCC 0x260A #define SMB1_CHGR_CHARGING_FCC ((SMB1_SLAVE_ID << 16) | SCHG_CHGR_CHARGING_FCC) #define SMB2_CHGR_CHARGING_FCC ((SMB2_SLAVE_ID << 16) | SCHG_CHGR_CHARGING_FCC) @@ -33,6 +36,7 @@ #define FCC_DISABLE 0x8c #define EN_DEBUG_ACCESS_SNK 0x1B #define EN_DEBUG_ACCESS_SRC 0x01 +#define EN_SWITCHER_DAM_500 0x05 #define PMC8380F_SLAVE_ID 0x05 #define GPIO07_MODE_CTL 0x8E40 @@ -234,6 +238,7 @@ void configure_debug_access_port(void) printk(BIOS_INFO, "Enable support of source and sink modes for debug access port\n"); spmi_write8(SMB1_SCHG_TYPE_C_TYPE_C_DEBUG_ACCESS_SRC_CFG, EN_DEBUG_ACCESS_SRC); spmi_write8(SMB1_SCHG_TYPE_C_TYPE_C_DEBUG_ACCESS_SNK_CFG, EN_DEBUG_ACCESS_SNK); + spmi_write8(SMB1_SCHG_TYPE_C_SUSPEND_LEGACY_CHARGERS, EN_SWITCHER_DAM_500); } /*