diff options
Diffstat (limited to 'common/usbc/usb_tc_drp_acc_trysrc_sm.c')
-rw-r--r-- | common/usbc/usb_tc_drp_acc_trysrc_sm.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/common/usbc/usb_tc_drp_acc_trysrc_sm.c b/common/usbc/usb_tc_drp_acc_trysrc_sm.c index b8e3fc712b..3fa9528699 100644 --- a/common/usbc/usb_tc_drp_acc_trysrc_sm.c +++ b/common/usbc/usb_tc_drp_acc_trysrc_sm.c @@ -700,9 +700,11 @@ __maybe_unused static void tc_enable_try_src(int en) } /* - * Exit all modes due to a detach event + * Exit all modes due to a detach event or hard reset + * * Note: this skips the ExitMode VDM steps in the PE because it is assumed the - * partner is not present to receive them, and the PE will no longer be running. + * partner is not present to receive them, and the PE will no longer be running, + * or we've forced an abrupt mode exit through a hard reset. */ static void tc_set_modes_exit(int port) { @@ -1304,6 +1306,13 @@ static bool tc_perform_src_hard_reset(int port) /* Set role to DFP */ tc_set_data_role(port, PD_ROLE_DFP); + /* + * USB PD Rev 3.0 Ver 2.0 6.8.3.2: "A Hard Reset Shall cause + * all Active Modes to be exited by both Port Partners and any + * Cable Plugs" + */ + tc_set_modes_exit(port); + tc[port].ps_reset_state = PS_STATE1; pd_timer_enable(port, TC_TIMER_TIMEOUT, PD_T_SRC_RECOVER); return false; @@ -1349,6 +1358,13 @@ static bool tc_perform_snk_hard_reset(int port) tc_set_data_role(port, PD_ROLE_UFP); /* + * USB PD Rev 3.0 Ver 2.0 6.8.3.2: "A Hard Reset Shall cause + * all Active Modes to be exited by both Port Partners and any + * Cable Plugs" + */ + tc_set_modes_exit(port); + + /* * When VCONN is supported, the Hard Reset Shall cause * the Port with the Rd resistor asserted to turn off * VCONN. |