diff options
author | Ayushee Shah <ayushee.shah@intel.com> | 2021-02-25 17:17:47 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-03-16 21:32:46 +0000 |
commit | 657c9f952da217d18e55fb139e5e59f3cd58c670 (patch) | |
tree | e84eaf8fd87505d6ba347061a6f1d25986adfd4f /common/usbc/usb_pd_dpm.c | |
parent | d49b7129f4cc10446cb8a4c6eebb2f87027d508a (diff) | |
download | chrome-ec-657c9f952da217d18e55fb139e5e59f3cd58c670.tar.gz |
USB4: Reset mux, retimer and USB4 SM on exit mode request
When exiting out of USB4 mode, reset the USB4 state machine and
set the retimer and the mux to disconnect state followed by
USB mode.
BUG=b:181286325
BRANCH=None
TEST=Able to re-enter into USB4 mode on warm reboot
Signed-off-by: Ayushee Shah <ayushee.shah@intel.com>
Change-Id: Icdc520aa221a9276466fafb885a6d86e893b7284
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2727628
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Diffstat (limited to 'common/usbc/usb_pd_dpm.c')
-rw-r--r-- | common/usbc/usb_pd_dpm.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/common/usbc/usb_pd_dpm.c b/common/usbc/usb_pd_dpm.c index 7e7c002721..10748e67d5 100644 --- a/common/usbc/usb_pd_dpm.c +++ b/common/usbc/usb_pd_dpm.c @@ -355,6 +355,11 @@ static void dpm_attempt_mode_exit(int port) int vdo_count = 0; enum tcpm_transmit_type tx_type = TCPC_TX_SOP; + if (IS_ENABLED(CONFIG_USB_PD_USB4) && + enter_usb_entry_is_done(port)) { + CPRINTS("C%d: USB4 teardown", port); + usb4_exit_mode_request(port); + } if (IS_ENABLED(CONFIG_USB_PD_TBT_COMPAT_MODE) && tbt_is_active(port)) { /* |