diff options
author | Madhusudanarao Amara <madhusudanarao.amara@intel.corp-partner.google.com> | 2021-03-25 23:27:25 +0530 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-03-31 21:18:51 +0000 |
commit | e1aade50d6e4bae6cb338705afe78e51934492c0 (patch) | |
tree | 05e7cd255e844cd3bd3f2ff129592496e442317c /common/usb_pd_alt_mode_dfp.c | |
parent | 50f3ba5687d9ad6b4939610cfb61a0dda1337d4c (diff) | |
download | chrome-ec-e1aade50d6e4bae6cb338705afe78e51934492c0.tar.gz |
TCPMv2: Enter safe mode before entering TBT/USB4 mode for the cable.
Before sending Enter Mode/Enter USB to the cable plug (SOP' and SOP'')
the usb mux and retimer should be configured to safe mode
BUG=b:183781477
BRANCH=None
TEST=TBT/USB4 device enumerates fine on coldboot, warmboot and hotplug
with MBR and passive cables.
Change-Id: Ia8fe95d9183f7febdb118bca51ea9a137870832c
Signed-off-by: Madhusudanarao Amara <madhusudanarao.amara@intel.corp-partner.google.com>
Signed-off-by: Ayushee Shah <ayushee.shah@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2786883
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
Diffstat (limited to 'common/usb_pd_alt_mode_dfp.c')
-rw-r--r-- | common/usb_pd_alt_mode_dfp.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/common/usb_pd_alt_mode_dfp.c b/common/usb_pd_alt_mode_dfp.c index c671616da6..700af4ea25 100644 --- a/common/usb_pd_alt_mode_dfp.c +++ b/common/usb_pd_alt_mode_dfp.c @@ -962,13 +962,18 @@ int enter_tbt_compat_mode(int port, enum tcpm_transmit_type sop, VDO_CMDT(CMDT_INIT) | VDO_SVDM_VERS(pd_get_vdo_ver(port, enter_mode_sop)); + /* + * Enter safe mode before sending Enter mode SOP/SOP'/SOP'' + * Ref: Tiger Lake Platform PD Controller Interface Requirements for + * Integrated USB C, section A.1.2 TBT as DFP. + */ + usb_mux_set_safe_mode(port); + /* For TBT3 Cable Enter Mode Command, number of Objects is 1 */ if ((sop == TCPC_TX_SOP_PRIME) || (sop == TCPC_TX_SOP_PRIME_PRIME)) return 1; - usb_mux_set_safe_mode(port); - dev_mode_resp.raw_value = pd_get_tbt_mode_vdo(port, TCPC_TX_SOP); cable_mode_resp.raw_value = pd_get_tbt_mode_vdo(port, TCPC_TX_SOP_PRIME); |