From 14a10f746d2e4ae195a14fbcf9c0a2fb57d42239 Mon Sep 17 00:00:00 2001 From: madhusudanarao amara Date: Wed, 29 Jul 2020 02:00:15 +0530 Subject: bb_retimer: Bypass safe mode configuration in retimer BUG=b:161327513 BRANCH=none TEST=Type-C dock multiple hot plug enumerated successfully as SS device. TBT dock enumeration is successful. USB4 dock enumeration is successful. DP Type-C cable plug-in worked fine. Signed-off-by: madhusudanarao amara Change-Id: Ie4a48dbdfc6904408f11d19b77b5afecf88d4fbe Signed-off-by: Divya Sasidharan Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2324812 Reviewed-by: Vijay P Hiremath Reviewed-by: Keith Short Commit-Queue: Keith Short --- driver/retimer/bb_retimer.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'driver/retimer') diff --git a/driver/retimer/bb_retimer.c b/driver/retimer/bb_retimer.c index 9dcdbc1caa..64ffa2b4dd 100644 --- a/driver/retimer/bb_retimer.c +++ b/driver/retimer/bb_retimer.c @@ -320,7 +320,21 @@ static int retimer_set_state(const struct usb_mux *me, mux_state_t mux_state) uint32_t set_retimer_con = 0; uint8_t dp_pin_mode; int port = me->usb_port; - + /* + * TODO(b/161327513): Remove this once we have final fix for + * the Type-C MFD degradation issue. + * In alternate mode, mux changes states as USB->Safe->DP Alt Mode. + * As EC programs retimer into safe mode independent of virtual mux, + * the super speed lanes are terminated while IOM is in the process + * of establishing the super speed link, which causes a fallback to + * USB 2.0 enumeration through PCH. By removing the Safe mode in retimer + * Super Speed lanes are available to virtual mux and would not + * interrupt the enumeration process and then entering safe. + * From the protocol analyser traces the safe mode is still achieved + * with virtual mux Safe mode settings. + */ + if (mux_state & USB_PD_MUX_SAFE_MODE) + return 0; /* * Bit 0: DATA_CONNECTION_PRESENT * 0 - No connection present -- cgit v1.2.1