All of lore.kernel.org
 help / color / mirror / Atom feed
* [RESEND PATCH 0/2] [PATCH 0/2] Fixes for the Intel PMC mux driver
@ 2020-09-07 14:21 Heikki Krogerus
  2020-09-07 14:21 ` [PATCH 1/2] usb: typec: intel_pmc_mux: Do not configure Altmode HPD High Heikki Krogerus
  2020-09-07 14:21 ` [PATCH 2/2] usb: typec: intel_pmc_mux: Do not configure SBU and HSL Orientation in Alternate modes Heikki Krogerus
  0 siblings, 2 replies; 4+ messages in thread
From: Heikki Krogerus @ 2020-09-07 14:21 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Mani, Rajmohan, Utkarsh Patel, linux-usb

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
linux-acpi@vger.kernel.org

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(-)

-- 
2.28.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] usb: typec: intel_pmc_mux: Do not configure Altmode HPD High
  2020-09-07 14:21 [RESEND PATCH 0/2] [PATCH 0/2] Fixes for the Intel PMC mux driver Heikki Krogerus
@ 2020-09-07 14:21 ` Heikki Krogerus
  2020-09-07 14:21 ` [PATCH 2/2] usb: typec: intel_pmc_mux: Do not configure SBU and HSL Orientation in Alternate modes Heikki Krogerus
  1 sibling, 0 replies; 4+ messages in thread
From: Heikki Krogerus @ 2020-09-07 14:21 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Mani, Rajmohan, Utkarsh Patel, linux-usb, stable

From: Utkarsh Patel <utkarsh.h.patel@intel.com>

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.

Fixes: 7990be48ef4d ("usb: typec: mux: intel: Handle alt mode HPD_HIGH")
Cc: stable@vger.kernel.org
Signed-off-by: Utkarsh Patel <utkarsh.h.patel@intel.com>
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
---
 drivers/usb/typec/mux/intel_pmc_mux.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/usb/typec/mux/intel_pmc_mux.c b/drivers/usb/typec/mux/intel_pmc_mux.c
index e4021e13af40a..802d443b367c6 100644
--- a/drivers/usb/typec/mux/intel_pmc_mux.c
+++ b/drivers/usb/typec/mux/intel_pmc_mux.c
@@ -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;
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] usb: typec: intel_pmc_mux: Do not configure SBU and HSL Orientation in Alternate modes
  2020-09-07 14:21 [RESEND PATCH 0/2] [PATCH 0/2] Fixes for the Intel PMC mux driver Heikki Krogerus
  2020-09-07 14:21 ` [PATCH 1/2] usb: typec: intel_pmc_mux: Do not configure Altmode HPD High Heikki Krogerus
@ 2020-09-07 14:21 ` Heikki Krogerus
  2020-09-07 14:53   ` Greg Kroah-Hartman
  1 sibling, 1 reply; 4+ messages in thread
From: Heikki Krogerus @ 2020-09-07 14:21 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Mani, Rajmohan, Utkarsh Patel, linux-usb

From: Utkarsh Patel <utkarsh.h.patel@intel.com>

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>
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
---
 drivers/usb/typec/mux/intel_pmc_mux.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/usb/typec/mux/intel_pmc_mux.c b/drivers/usb/typec/mux/intel_pmc_mux.c
index 802d443b367c6..3bc08847fb7f0 100644
--- a/drivers/usb/typec/mux/intel_pmc_mux.c
+++ b/drivers/usb/typec/mux/intel_pmc_mux.c
@@ -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;
 
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] usb: typec: intel_pmc_mux: Do not configure SBU and HSL Orientation in Alternate modes
  2020-09-07 14:21 ` [PATCH 2/2] usb: typec: intel_pmc_mux: Do not configure SBU and HSL Orientation in Alternate modes Heikki Krogerus
@ 2020-09-07 14:53   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2020-09-07 14:53 UTC (permalink / raw)
  To: Heikki Krogerus; +Cc: Mani, Rajmohan, Utkarsh Patel, linux-usb

On Mon, Sep 07, 2020 at 05:21:52PM +0300, Heikki Krogerus wrote:
> From: Utkarsh Patel <utkarsh.h.patel@intel.com>
> 
> 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")

5.8 is still a stable kernel now, so I'll add cc: stable to this...

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-09-07 17:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-07 14:21 [RESEND PATCH 0/2] [PATCH 0/2] Fixes for the Intel PMC mux driver Heikki Krogerus
2020-09-07 14:21 ` [PATCH 1/2] usb: typec: intel_pmc_mux: Do not configure Altmode HPD High Heikki Krogerus
2020-09-07 14:21 ` [PATCH 2/2] usb: typec: intel_pmc_mux: Do not configure SBU and HSL Orientation in Alternate modes Heikki Krogerus
2020-09-07 14:53   ` Greg Kroah-Hartman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.