usb: typec: intel_pmc_mux: Do not configure SBU and HSL Orientation in Alternate modes

According to the PMC Type C Subsystem (TCSS) Mux programming guide rev
0.7, bits 4 and 5 are reserved in Alternate modes.
SBU Orientation and HSL Orientation needs to be configured only during
initial cable detection in USB connect flow based on device property of
"sbu-orientation" and "hsl-orientation".
Configuring these reserved bits in the Alternate modes may result in delay
in display link training or some unexpected behaviour.
So do not configure them while issuing Alternate Mode requests.

Fixes: ff4a30d5e243 ("usb: typec: mux: intel_pmc_mux: Support for static SBU/HSL orientation")
Signed-off-by: Utkarsh Patel <utkarsh.h.patel@intel.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20200907142152.35678-3-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by Utkarsh Patel and committed by Greg Kroah-Hartman 7c6bbdf0 294955fd

Changed files
-8
drivers
usb
typec
-8
drivers/usb/typec/mux/intel_pmc_mux.c
··· 61 61 62 62 #define PMC_USB_ALTMODE_ORI_SHIFT 1 63 63 #define PMC_USB_ALTMODE_UFP_SHIFT 3 64 - #define PMC_USB_ALTMODE_ORI_AUX_SHIFT 4 65 - #define PMC_USB_ALTMODE_ORI_HSL_SHIFT 5 66 64 67 65 /* DP specific Mode Data bits */ 68 66 #define PMC_USB_ALTMODE_DP_MODE_SHIFT 8 ··· 176 178 req.mode_data = (port->orientation - 1) << PMC_USB_ALTMODE_ORI_SHIFT; 177 179 req.mode_data |= (port->role - 1) << PMC_USB_ALTMODE_UFP_SHIFT; 178 180 179 - req.mode_data |= sbu_orientation(port) << PMC_USB_ALTMODE_ORI_AUX_SHIFT; 180 - req.mode_data |= hsl_orientation(port) << PMC_USB_ALTMODE_ORI_HSL_SHIFT; 181 - 182 181 req.mode_data |= (state->mode - TYPEC_STATE_MODAL) << 183 182 PMC_USB_ALTMODE_DP_MODE_SHIFT; 184 183 ··· 202 207 203 208 req.mode_data = (port->orientation - 1) << PMC_USB_ALTMODE_ORI_SHIFT; 204 209 req.mode_data |= (port->role - 1) << PMC_USB_ALTMODE_UFP_SHIFT; 205 - 206 - req.mode_data |= sbu_orientation(port) << PMC_USB_ALTMODE_ORI_AUX_SHIFT; 207 - req.mode_data |= hsl_orientation(port) << PMC_USB_ALTMODE_ORI_HSL_SHIFT; 208 210 209 211 if (TBT_ADAPTER(data->device_mode) == TBT_ADAPTER_TBT3) 210 212 req.mode_data |= PMC_USB_ALTMODE_TBT_TYPE;