mb/google/bluey: Signal ADSP to skip Type-C port resets during boot

During certain boot sequences, such as low-battery or off-mode charging,
automatic USB Type-C port resets initiated by the ADSP can cause
unnecessary power fluctuations or connectivity drops.

Implement adsp_skip_port_reset(), which toggles the SKIP_PORT_RESET bit
in the PMIC_PD_NEGOTIATION_FLAG register. This bit informs the ADSP
firmware to bypass its default port reset logic. Use this during
low-power charging initialization to ensure a more stable boot process.

BUG=b:436391478
TEST=Verify no unexpected port resets occur during Google/Quartz boot.

Change-Id: I215a1806799a10355dd36b483f8d441f615f5258
Signed-off-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91666
Reviewed-by: Jayvik Desai <jayvik@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Kapil Porwal 2026-03-16 16:08:46 +05:30 committed by Subrata Banik
commit 710df33471

View file

@ -40,6 +40,9 @@
#define EN_DEBUG_ACCESS_SRC 0x01
#define EN_SWITCHER_DAM_500 0x05
#define PMIC_PD_NEGOTIATION_FLAG 0x7E7C
#define SKIP_PORT_RESET 0x08
#define PMC8380F_SLAVE_ID 0x05
#define GPIO07_MODE_CTL 0x8E40
#define GPIO07_DIG_OUT_SOURCE_CTL 0x8E44
@ -279,6 +282,16 @@ void disable_slow_battery_charging(void)
spmi_write8(SMB2_CHGR_MAX_FCC_CFG, FCC_DISABLE);
}
/*
* Instruct ADSP to skip type-c port resets
*/
static void adsp_skip_port_reset(void)
{
uint8_t flags = (uint8_t)spmi_read8(PMIC_PD_NEGOTIATION_FLAG);
spmi_write8(PMIC_PD_NEGOTIATION_FLAG, flags | SKIP_PORT_RESET);
printk(BIOS_INFO, "Configured ADSP to avoid port resets\n");
}
/*
* Enable fast battery charging with ADSP support.
*
@ -286,6 +299,8 @@ void disable_slow_battery_charging(void)
*/
void enable_fast_battery_charging(void)
{
adsp_skip_port_reset();
/* Load ADSP firmware first */
adsp_fw_load();