diff options
-rw-r--r-- | common/usb_pd_protocol.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c index 7eb6ece81f..af623fbcbe 100644 --- a/common/usb_pd_protocol.c +++ b/common/usb_pd_protocol.c @@ -1853,13 +1853,18 @@ static void pd_partner_port_reset(int port) (RESET_FLAG_BROWNOUT | RESET_FLAG_POWER_ON)) return; + /* + * Clear the active contract bit before we apply Rp in case we + * intentionally brown out because we cut off our only power supply. + */ + pd_set_saved_active(port, 0); + /* Provide Rp for 200 msec. or until we no longer have VBUS. */ tcpm_set_cc(port, TYPEC_CC_RP); timeout = get_time().val + 200 * MSEC; while (get_time().val < timeout && pd_is_vbus_present(port)) msleep(10); - pd_set_saved_active(port, 0); } #endif /* CONFIG_USB_PD_DUAL_ROLE */ |