summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAyushee <ayushee.shah@intel.com>2020-07-29 12:05:49 -0700
committerCommit Bot <commit-bot@chromium.org>2020-07-31 09:43:57 +0000
commit8b69e28a9063dab47074e301c23f9f1bac5e6a66 (patch)
treea1cb55b2e4f4ebbb511c248fa6db77cde46251e2
parentd986075dc3c41748556170dd3ef3b67adb64578b (diff)
downloadchrome-ec-8b69e28a9063dab47074e301c23f9f1bac5e6a66.tar.gz
BB retimer: Set USB3 speed only when USB mode is enabled
This commit sets USB3 speed (Bit 6) only if the mux state is set to USB_PD_MUX_USB_ENABLED BUG=b:152544514 BRANCH=None TEST=Abe to clear bit 6 when DP dock enters in Safe mode. Signed-off-by: Ayushee <ayushee.shah@intel.com> Change-Id: I1955e22fccb1f86d38f063f614f789d67394de5b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2329152 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Keith Short <keithshort@chromium.org>
-rw-r--r--driver/retimer/bb_retimer.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/driver/retimer/bb_retimer.c b/driver/retimer/bb_retimer.c
index b815bf1de4..f0785d1dce 100644
--- a/driver/retimer/bb_retimer.c
+++ b/driver/retimer/bb_retimer.c
@@ -340,16 +340,17 @@ static int retimer_set_state(const struct usb_mux *me, mux_state_t mux_state)
* 0 - No USB3.1 Connection
* 1 - USB3.1 connection
*/
- if (mux_state & USB_PD_MUX_USB_ENABLED)
+ if (mux_state & USB_PD_MUX_USB_ENABLED) {
set_retimer_con |= BB_RETIMER_USB_3_CONNECTION;
- /*
- * Bit 6: USB3_Speed
- * 0 – USB3 is limited to Gen1
- * 1 – USB3 Gen1/Gen2 supported
- */
- if (is_cable_speed_gen2_capable(port))
- set_retimer_con |= BB_RETIMER_USB_3_SPEED;
+ /*
+ * Bit 6: USB3_Speed
+ * 0 – USB3 is limited to Gen1
+ * 1 – USB3 Gen1/Gen2 supported
+ */
+ if (is_cable_speed_gen2_capable(port))
+ set_retimer_con |= BB_RETIMER_USB_3_SPEED;
+ }
/*
* Bit 8: DP_CONNECTION