aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUtkarsh Patel <[email protected]>2020-11-13 12:24:58 -0800
committerGreg Kroah-Hartman <[email protected]>2020-11-18 12:53:45 +0100
commitc4f81392d5a6833a63ec5809e8bc5c2d0da565d8 (patch)
treeaabfdb1b857a71ad521544f3b21ab54b2c2cd743
parent5384cffd7bce4652271c80ca081f5d39118e4923 (diff)
usb: typec: intel_pmc_mux: Configure Thunderbolt cable generation bits
Thunderbolt cable generation bits received as a part of Thunderbolt 3 cable discover mode VDO needs to be configured for Thunderbolt rounded and non-rounded cable support in the Thunderbolt alternate mode. Signed-off-by: Utkarsh Patel <[email protected]> Reviewed-by: Heikki Krogerus <[email protected]> -- Changes in v2: - No change. -- Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/usb/typec/mux/intel_pmc_mux.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/typec/mux/intel_pmc_mux.c b/drivers/usb/typec/mux/intel_pmc_mux.c
index d7f63b74c6b1..aa3211f1c4c3 100644
--- a/drivers/usb/typec/mux/intel_pmc_mux.c
+++ b/drivers/usb/typec/mux/intel_pmc_mux.c
@@ -256,6 +256,7 @@ static int
pmc_usb_mux_tbt(struct pmc_usb_port *port, struct typec_mux_state *state)
{
struct typec_thunderbolt_data *data = state->data;
+ u8 cable_rounded = TBT_CABLE_ROUNDED_SUPPORT(data->cable_mode);
u8 cable_speed = TBT_CABLE_SPEED(data->cable_mode);
struct altmode_req req = { };
@@ -284,6 +285,8 @@ pmc_usb_mux_tbt(struct pmc_usb_port *port, struct typec_mux_state *state)
req.mode_data |= PMC_USB_ALTMODE_CABLE_SPD(cable_speed);
+ req.mode_data |= PMC_USB_ALTMODE_TBT_GEN(cable_rounded);
+
return pmc_usb_command(port, (void *)&req, sizeof(req));
}