diff options
author | Ayushee <ayushee.shah@intel.com> | 2020-10-08 16:28:35 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-10-14 20:33:10 +0000 |
commit | 913b68e8e43d5700e3432148b33428e1e1ce0d79 (patch) | |
tree | 425c5caf498b167ac1b8c0cf9cf57c21c18d4633 /include/usb_tbt_alt_mode.h | |
parent | c7c8840bae1d3e833655a2b09b6deb5a47db680b (diff) | |
download | chrome-ec-913b68e8e43d5700e3432148b33428e1e1ce0d79.tar.gz |
TBT:Add support for exit mode SOP'/SOP'' on chipset transition
When chipset is transitioning to a new state or on sysjump, the EC
re-negotiates to enter an alternate mode on booting up.
This commit adds support for exiting Thunderbolt mode for SOP' and SOP''
for active cable on chipset transition and also moves all the alternate
mode exit rotines to their respective files.
It also delays deleting the SVID data until after the EXIT_MODE message
has ACKed and avoids pd_dfp_exit_mode() from changing the alternate
mode's internal states.
This commit also makes sure that the mux is set to safe state before
exiting the alternate mode and it is reconfigured according to the
port's current data role on receiving ACK/NAK from the cable/port
partner.
BUG=b:151169925, b:159717794
BRANCH=none
TEST=On reboot, able to exit and re-enter into DisplayPort mode,
Thunderbolt mode with passive cable and thunderbolt mode with
active cable.
Change-Id: If1e48e9f31cd678e23fe89bd3494551b5d1a78f1
Signed-off-by: Ayushee <ayushee.shah@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2415082
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'include/usb_tbt_alt_mode.h')
-rw-r--r-- | include/usb_tbt_alt_mode.h | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/include/usb_tbt_alt_mode.h b/include/usb_tbt_alt_mode.h index fb3aadb481..11ad95f673 100644 --- a/include/usb_tbt_alt_mode.h +++ b/include/usb_tbt_alt_mode.h @@ -23,10 +23,15 @@ void tbt_init(int port); /* - * Returns True if Thunderbolt mode is in active state + * Sets exit_mode and retry_done bits to true + */ +void tbt_exit_mode_request(void); + +/* + * Returns True if Thunderbolt mode is not in inactive state * * @param port USB-C port number - * @return True if Thunderbolt mode is in active state + * @return True if Thunderbolt mode is not in inactive state * False otherwise */ bool tbt_is_active(int port); @@ -53,14 +58,6 @@ void intel_vdm_acked(int port, enum tcpm_transmit_type type, int vdo_count, void intel_vdm_naked(int port, enum tcpm_transmit_type type, uint8_t vdm_cmd); /* - * Reset the Thunderbolt mode VDM state for the specified port, as when exiting - * Thunderbolt mode. - * - * @param port USB-C port number - */ -void tbt_teardown(int port); - -/* * Construct the next Thunderbolt VDM that should be sent. * * @param port USB-C port number |