diff options
Diffstat (limited to 'board/kukui')
-rw-r--r-- | board/kukui/gpio.inc | 2 | ||||
-rw-r--r-- | board/kukui/usb_pd_policy.c | 20 |
2 files changed, 19 insertions, 3 deletions
diff --git a/board/kukui/gpio.inc b/board/kukui/gpio.inc index 1c090eea42..4986e878a2 100644 --- a/board/kukui/gpio.inc +++ b/board/kukui/gpio.inc @@ -105,7 +105,7 @@ GPIO(BOOTBLOCK_MUX_OE, PIN(C, 4), GPIO_ODR_HIGH) GPIO(USB_ID, PIN(A, 13), GPIO_ODR_HIGH) #elif BOARD_REV >= 2 GPIO(EN_PP3300_POGO, PIN(A, 13), GPIO_OUT_LOW) -GPIO(EN_POGO_CHARGE_L, PIN(B, 6), GPIO_OUT_LOW) +GPIO(EN_POGO_CHARGE_L, PIN(B, 6), GPIO_OUT_HIGH) GPIO(EN_USBC_CHARGE_L, PIN(C, 7), GPIO_OUT_LOW) GPIO(EN_PP5000_USBC, PIN(D, 2), GPIO_OUT_LOW) #endif diff --git a/board/kukui/usb_pd_policy.c b/board/kukui/usb_pd_policy.c index 42b0ce7e03..38354dc148 100644 --- a/board/kukui/usb_pd_policy.c +++ b/board/kukui/usb_pd_policy.c @@ -52,7 +52,6 @@ void pd_transition_voltage(int idx) { /* No-operation: we are always 5V */ } - static uint8_t vbus_en; int board_vbus_source_enabled(int port) @@ -68,6 +67,12 @@ int pd_set_power_supply_ready(int port) vbus_en = 1; charger_enable_otg_power(1); +#if BOARD_REV >= 2 + /* TODO(b:123268580): Implement POGO discharge logic. */ + gpio_set_level(GPIO_EN_USBC_CHARGE_L, 1); + gpio_set_level(GPIO_EN_PP5000_USBC, 1); +#endif + /* notify host of power info change */ pd_send_host_event(PD_EVENT_POWER_CHANGE); @@ -86,6 +91,18 @@ void pd_power_supply_reset(int port) if (prev_en) pd_set_vbus_discharge(port, 1); +#if BOARD_REV >= 2 + /* + * TODO(b:123268580): Implement POGO discharge logic. + * + * Turn off source path and POGO path before asserting + * EN_USB_CHARGE_L. + */ + gpio_set_level(GPIO_EN_PP5000_USBC, 0); + gpio_set_level(GPIO_EN_POGO_CHARGE_L, 1); + gpio_set_level(GPIO_EN_USBC_CHARGE_L, 0); +#endif + /* notify host of power info change */ pd_send_host_event(PD_EVENT_POWER_CHANGE); } @@ -405,4 +422,3 @@ const struct svdm_amode_fx supported_modes[] = { }; const int supported_modes_cnt = ARRAY_SIZE(supported_modes); #endif /* CONFIG_USB_PD_ALT_MODE_DFP */ - |