Fixes for the Intel PMC mux driver
Subsystems (4)
Heikki Krogerus
maintainercover Fixes for the Intel PMC mux driver
Hi,
Here are two of fixes from Utkarsh. Both deal with alternate mode issues. Let me know if you want anything to be changed.
Sorry again about the wrong list. I send these first accidentally to [email protected]
thanks,
Utkarsh Patel (2):
usb: typec: intel_pmc_mux: Do not configure Altmode HPD High
usb: typec: intel_pmc_mux: Do not configure SBU and HSL Orientation in
Alternate modes
drivers/usb/typec/mux/intel_pmc_mux.c | 12 ------------ 1 file changed, 12 deletions(-)
Signature · 1 line
2.28.0
Heikki Krogerus
maintainerPATCH 1/2 usb: typec: intel_pmc_mux: Do not configure Altmode HPD High
From: Utkarsh Patel <[email protected]>
According to the PMC Type C Subsystem (TCSS) Mux programming guide rev 0.7, bit 14 is reserved in Alternate mode.
In DP Alternate Mode state, if the HPD_STATE (bit 7) field in the status update command VDO is set to HPD_HIGH, HPD is configured via separate HPD mode request after configuring DP Alternate mode request. Configuring reserved bit may show unexpected behaviour.
So do not configure them while issuing the Alternate Mode request.
--- drivers/usb/typec/mux/intel_pmc_mux.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/usb/typec/mux/intel_pmc_mux.c +0 -4
@@ -68,7 +68,6 @@ enum {#define PMC_USB_ALTMODE_DP_MODE_SHIFT 8/* TBT specific Mode Data bits */ -#define PMC_USB_ALTMODE_HPD_HIGH BIT(14)#define PMC_USB_ALTMODE_TBT_TYPE BIT(17)#define PMC_USB_ALTMODE_CABLE_TYPE BIT(18)#define PMC_USB_ALTMODE_ACTIVE_LINK BIT(20)
@@ -185,9 +184,6 @@ pmc_usb_mux_dp(struct pmc_usb_port *port, struct typec_mux_state *state) req.mode_data |= (state->mode -TYPEC_STATE_MODAL ) <<PMC_USB_ALTMODE_DP_MODE_SHIFT ; -if (data->status &DP_STATUS_HPD_STATE ) - req.mode_data |=PMC_USB_ALTMODE_HPD_HIGH ; - ret =pmc_usb_command (port, (void *)&req,sizeof (req));if (ret)return ret;
Signature · 1 line
2.28.0
Heikki Krogerus
maintainerPATCH 2/2 usb: typec: intel_pmc_mux: Do not configure SBU and HSL Orientation in Alternate modes
In reply to Heikki KrogerusFrom: Utkarsh Patel <[email protected]>
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.
--- drivers/usb/typec/mux/intel_pmc_mux.c | 8 -------- 1 file changed, 8 deletions(-)
drivers/usb/typec/mux/intel_pmc_mux.c +0 -8
@@ -61,8 +61,6 @@ enum {#define PMC_USB_ALTMODE_ORI_SHIFT 1#define PMC_USB_ALTMODE_UFP_SHIFT 3 -#define PMC_USB_ALTMODE_ORI_AUX_SHIFT 4 -#define PMC_USB_ALTMODE_ORI_HSL_SHIFT 5/* DP specific Mode Data bits */ #define PMC_USB_ALTMODE_DP_MODE_SHIFT 8
@@ -178,9 +176,6 @@ pmc_usb_mux_dp(struct pmc_usb_port *port, struct typec_mux_state *state) req.mode_data = (port->orientation -1 ) <<PMC_USB_ALTMODE_ORI_SHIFT ; req.mode_data |= (port->role -1 ) <<PMC_USB_ALTMODE_UFP_SHIFT ; - req.mode_data |=sbu_orientation (port) <<PMC_USB_ALTMODE_ORI_AUX_SHIFT ; - req.mode_data |=hsl_orientation (port) <<PMC_USB_ALTMODE_ORI_HSL_SHIFT ; - req.mode_data |= (state->mode -TYPEC_STATE_MODAL ) <<PMC_USB_ALTMODE_DP_MODE_SHIFT ;
@@ -208,9 +203,6 @@ pmc_usb_mux_tbt(struct pmc_usb_port *port, struct typec_mux_state *state) req.mode_data = (port->orientation -1 ) <<PMC_USB_ALTMODE_ORI_SHIFT ; req.mode_data |= (port->role -1 ) <<PMC_USB_ALTMODE_UFP_SHIFT ; - req.mode_data |=sbu_orientation (port) <<PMC_USB_ALTMODE_ORI_AUX_SHIFT ; - req.mode_data |=hsl_orientation (port) <<PMC_USB_ALTMODE_ORI_HSL_SHIFT ; -if (TBT_ADAPTER (data->device_mode) ==TBT_ADAPTER_TBT3 ) req.mode_data |=PMC_USB_ALTMODE_TBT_TYPE ;
Signature · 1 line
2.28.0
Greg Kroah-Hartman
maintainerRe: [PATCH 2/2] usb: typec: intel_pmc_mux: Do not configure SBU and HSL Orientation in Alternate modes
Quoted 11 lines · Heikki Krogerus
From: Utkarsh Patel <[email protected]>
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.
Quoted 1 line
Fixes ff4a30d5e243 ("usb: typec: mux: intel_pmc_mux: Support for static SBU/HSL orientation")
5.8 is still a stable kernel now, so I'll add cc: stable to this...
thanks,
greg k-h