summaryrefslogtreecommitdiff
path: root/driver/retimer/bb_retimer.c
diff options
context:
space:
mode:
authorAyushee <ayushee.shah@intel.com>2020-05-26 11:47:09 -0700
committerCommit Bot <commit-bot@chromium.org>2020-05-27 02:04:44 +0000
commitd47f66468e4f84fbc3c56cd2f82611190e8dc093 (patch)
tree658a98cd061a240e05c596ea110236dcea0a087e /driver/retimer/bb_retimer.c
parent0a421bbfb5d2d3457310f419c80976b8c87c7464 (diff)
downloadchrome-ec-d47f66468e4f84fbc3c56cd2f82611190e8dc093.tar.gz
BB retimer: Set 'active/passive' bit for USB mode
For DFP, if the mux state is USB/DP/Thunderbolt-comp/USB4 Active/Passive bit should be set according to the Discover mode SOP' response. Ref: Burnside Bridge spec Table 13: Connection state register. BUG=b:152544514 BRANCH=None TEST=Checked with volteer, able to set Active/Passive bit according to the type of cable connected Signed-off-by: Ayushee <ayushee.shah@intel.com> Change-Id: I7fe2c28f72d95d792d8f2ea0b8f74a21e2b5f2b7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2216554 Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'driver/retimer/bb_retimer.c')
-rw-r--r--driver/retimer/bb_retimer.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/driver/retimer/bb_retimer.c b/driver/retimer/bb_retimer.c
index 54a9030405..74422ad489 100644
--- a/driver/retimer/bb_retimer.c
+++ b/driver/retimer/bb_retimer.c
@@ -22,7 +22,8 @@
| USB_PD_MUX_TBT_COMPAT_ENABLED \
| USB_PD_MUX_USB4_ENABLED)
-#define BB_RETIMER_MUX_DATA_ALT_MODE (USB_PD_MUX_DP_ENABLED \
+#define BB_RETIMER_MUX_USB_ALT_MODE (USB_PD_MUX_USB_ENABLED\
+ | USB_PD_MUX_DP_ENABLED \
| USB_PD_MUX_TBT_COMPAT_ENABLED \
| USB_PD_MUX_USB4_ENABLED)
@@ -156,10 +157,10 @@ static void retimer_set_state_dfp(int port, mux_state_t mux_state,
* 0 - Passive cable
* 1 - Active cable
*
- * If Alternate mode is DP/Thunderbolt_compat/USB4, ACTIVE/PASIVE is
+ * If the mode is USB/DP/Thunderbolt_compat/USB4, ACTIVE/PASIVE is
* set according to Discover mode SOP' response.
*/
- if ((mux_state & BB_RETIMER_MUX_DATA_ALT_MODE) &&
+ if ((mux_state & BB_RETIMER_MUX_USB_ALT_MODE) &&
(cable_type == IDH_PTYPE_ACABLE))
*set_retimer_con |= BB_RETIMER_ACTIVE_PASSIVE;