summaryrefslogtreecommitdiff
path: root/common/usbc/tbt_alt_mode.c
diff options
context:
space:
mode:
authorAyushee Shah <ayushee.shah@intel.com>2021-01-21 20:50:06 -0800
committerCommit Bot <commit-bot@chromium.org>2021-02-11 20:41:23 +0000
commit9c95c05d6d44f50ec11f7a249bb8755de071e0e1 (patch)
treead6fda73af1823d63183b9c3ee429537159f6f35 /common/usbc/tbt_alt_mode.c
parenta56c816a329d4c78d54518c16f995bcf21d4a714 (diff)
downloadchrome-ec-9c95c05d6d44f50ec11f7a249bb8755de071e0e1.tar.gz
TCPMv2: Update exit mode sequence
On exit mode request - Instead to entering safe mode -> USB mode, this CL updates the sequence to - 1. Set Mux, retimer to disconnect 2. Send exit mode to cable/port-partner 3. Set mux and retimer to USB mode BUG=b:173459141 BRANCH=None TEST=Able to re-enter into alternate mode with AP driver approach Change-Id: I6f8f2d4523736100057de4425b3df64b90858e70 Signed-off-by: Ayushee Shah <ayushee.shah@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2643523 Reviewed-by: Divya S Sasidharan <divya.s.sasidharan@intel.com> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Diffstat (limited to 'common/usbc/tbt_alt_mode.c')
-rw-r--r--common/usbc/tbt_alt_mode.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/common/usbc/tbt_alt_mode.c b/common/usbc/tbt_alt_mode.c
index 72a633c451..793de4c778 100644
--- a/common/usbc/tbt_alt_mode.c
+++ b/common/usbc/tbt_alt_mode.c
@@ -488,7 +488,8 @@ int tbt_setup_next_vdm(int port, int vdo_count, uint32_t *vdm,
if (!(modep && modep->opos))
return -1;
- usb_mux_set_safe_mode(port);
+ usb_mux_set_safe_mode_exit(port);
+
vdm[0] = VDO(USB_VID_INTEL, 1, CMD_EXIT_MODE) |
VDO_OPOS(modep->opos) |
VDO_CMDT(CMDT_INIT) |
@@ -502,7 +503,8 @@ int tbt_setup_next_vdm(int port, int vdo_count, uint32_t *vdm,
if (!(modep && modep->opos))
return -1;
- usb_mux_set_safe_mode(port);
+ usb_mux_set_safe_mode_exit(port);
+
vdm[0] = VDO(USB_VID_INTEL, 1, CMD_EXIT_MODE) |
VDO_OPOS(modep->opos) |
VDO_CMDT(CMDT_INIT) |
@@ -517,7 +519,8 @@ int tbt_setup_next_vdm(int port, int vdo_count, uint32_t *vdm,
if (!(modep && modep->opos))
return -1;
- usb_mux_set_safe_mode(port);
+ usb_mux_set_safe_mode_exit(port);
+
vdm[0] = VDO(USB_VID_INTEL, 1, CMD_EXIT_MODE) |
VDO_OPOS(modep->opos) |
VDO_CMDT(CMDT_INIT) |