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 <kapilporwal@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/91832 Reviewed-by: Subrata Banik <subratabanik@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jayvik Desai <jayvik@google.com>
This commit is contained in:
parent
94dd3f3bba
commit
1c6f4618b6
1 changed files with 5 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue