summaryrefslogtreecommitdiff
path: root/common/usb_pd_policy.c
diff options
context:
space:
mode:
authorAyushee Shah <ayushee.shah@intel.com>2020-12-09 16:15:08 -0800
committerCommit Bot <commit-bot@chromium.org>2020-12-16 21:12:30 +0000
commit397999bf301d88e04d65a9c2c1bbee1c074405a5 (patch)
tree4367fcaf20c7a6914d19c63c848b74c28138e3be /common/usb_pd_policy.c
parent13975210ee624e3cfec2802d83fde06f7834cf2d (diff)
downloadchrome-ec-397999bf301d88e04d65a9c2c1bbee1c074405a5.tar.gz
TBT: Enter Thunderbolt mode if the cable response timesout
If the passive superspeed cable doesn't support Intel SVID, then the Thunderbolt cable speed should be set to Passive Gen 2 cable. Ref: USB Type-C Cable and Connector Specification, Fig F-1. This commit, checks if the cable is superspeed before returning the thunderbolt cable speed and sets the overridable maximum speed supported by the board to TBT_SS_TBT_GEN3. BUG=b:172364575 BRANCH=None TEST=Tested on Voxel, able to enter Thunderbolt mode if the cable fails to respond to Discover SVID SOP' Signed-off-by: Ayushee Shah <ayushee.shah@intel.com> Change-Id: Ib5137670c08cbe17166f5a90241ddbcb77e059f7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2582988 Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'common/usb_pd_policy.c')
-rw-r--r--common/usb_pd_policy.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/usb_pd_policy.c b/common/usb_pd_policy.c
index 5ad4188e54..b480981a2d 100644
--- a/common/usb_pd_policy.c
+++ b/common/usb_pd_policy.c
@@ -487,7 +487,8 @@ static int process_am_discover_ident_sop_prime(int port, int cnt,
* Disable Thunderbolt-compatible mode if the cable does not support
* superspeed.
*/
- if (is_tbt_compat_enabled(port) && !is_tbt_cable_superspeed(port))
+ if (is_tbt_compat_enabled(port) &&
+ get_tbt_cable_speed(port) < TBT_SS_U31_GEN1)
disable_tbt_compat_mode(port);
return dfp_discover_svids(payload);