mainboard/google/bluey: Enable charging debug access in common path

The charging debug access port was previously only configured during
slow battery charging. Move this configuration into a dedicated
function, configure_charging_debug_access(), and call it within the
common mainboard_init() path.

This ensures the debug access port is consistently configured during
mainboard initialization, following the same pattern as parallel
charging.

BUG=b:488143407
TEST=Build Bluey/Quartz

Change-Id: Idacffd61834e0700619b240dfe362f3be90badb9
Signed-off-by: Jayvik Desai <jayvik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91505
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
This commit is contained in:
Jayvik Desai 2026-03-02 14:42:04 +05:30 committed by Subrata Banik
commit fb2e8b5e1e
3 changed files with 14 additions and 3 deletions

View file

@ -57,6 +57,7 @@ void setup_chromeos_gpios(void);
bool is_off_mode(void);
void configure_parallel_charging(void);
void configure_parallel_charging_late(void);
void configure_charging_debug_access(void);
void enable_slow_battery_charging(void);
void disable_slow_battery_charging(void);
void launch_charger_applet(void);

View file

@ -139,6 +139,18 @@ void configure_parallel_charging(void)
spmi_write8(SPMI_ADDR(PMC8380F_SLAVE_ID, GPIO09_MODE_CTL), MODE_OUTPUT);
}
/*
* Enable SMB1 charging debug access port.
*/
void configure_charging_debug_access(void)
{
if (!CONFIG(HAVE_CHARGING_DEBUG_ACCESS_PORT))
return;
printk(BIOS_INFO, "Enable charging debug access port support\n");
spmi_write8(SMB1_SCHG_TYPE_C_TYPE_C_DEBUG_ACCESS_SNK_CFG, EN_DEBUG_ACCESS_SNK);
}
/*
* Late configuration for parallel charging.
*/
@ -161,9 +173,6 @@ void enable_slow_battery_charging(void)
spmi_write8(SMB2_CHGR_MAX_FCC_CFG, FCC_1A_STEP_50MA);
spmi_write8(SMB1_CHGR_CHRG_EN_CMD, CHRG_ENABLE);
spmi_write8(SMB2_CHGR_CHRG_EN_CMD, CHRG_ENABLE);
if (CONFIG(HAVE_CHARGING_DEBUG_ACCESS_PORT))
spmi_write8(SMB1_SCHG_TYPE_C_TYPE_C_DEBUG_ACCESS_SNK_CFG, EN_DEBUG_ACCESS_SNK);
}
/*

View file

@ -161,6 +161,7 @@ static void trigger_critical_battery_shutdown(void)
static void mainboard_init(struct device *dev)
{
configure_parallel_charging();
configure_charging_debug_access();
display_startup();