* [V4] roles: Fix USB 3.0 OTG issue on Intel platform
@ 2018-09-07 4:29 saranya.gopal
0 siblings, 0 replies; 3+ messages in thread
From: saranya.gopal @ 2018-09-07 4:29 UTC (permalink / raw)
To: linux-usb
Cc: heikki.krogerus, sathyanarayanan.kuppuswamy, abhilash.k.v,
Saranya Gopal, M Balaji
From: Saranya Gopal <saranya.gopal@intel.com>
This patch adds static DRD mode for host/device
mode switch. This fixes the issue where device
mode was not working after DUT switches to host
mode with 3.0 OTG connector.
Change-Id: Ib6d04b90d277d965ef10026751a7f4832cad5d2a
Signed-off-by: Saranya Gopal <saranya.gopal@intel.com>
Signed-off-by: M Balaji <m.balaji@intel.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Revieved-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
---
drivers/usb/roles/intel-xhci-usb-role-switch.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/roles/intel-xhci-usb-role-switch.c b/drivers/usb/roles/intel-xhci-usb-role-switch.c
index dad2d19..0d1ea82 100644
--- a/drivers/usb/roles/intel-xhci-usb-role-switch.c
+++ b/drivers/usb/roles/intel-xhci-usb-role-switch.c
@@ -25,6 +25,9 @@
#define SW_VBUS_VALID BIT(24)
#define SW_IDPIN_EN BIT(21)
#define SW_IDPIN BIT(20)
+#define SW_SWITCH_EN_CFG0 BIT(16)
+#define SW_DRD_STATIC_HOST_CFG0 1
+#define SW_DRD_STATIC_DEV_CFG0 2
#define DUAL_ROLE_CFG1 0x6c
#define HOST_MODE BIT(29)
@@ -83,17 +86,22 @@ static int intel_xhci_usb_set_role(struct device *dev, enum usb_role role)
case USB_ROLE_NONE:
val |= SW_IDPIN;
val &= ~SW_VBUS_VALID;
+ val &= ~(SW_DRD_STATIC_DEV_CFG0 | SW_DRD_STATIC_HOST_CFG0);
break;
case USB_ROLE_HOST:
val &= ~SW_IDPIN;
val &= ~SW_VBUS_VALID;
+ val &= ~SW_DRD_STATIC_DEV_CFG0;
+ val |= SW_DRD_STATIC_HOST_CFG0;
break;
case USB_ROLE_DEVICE:
val |= SW_IDPIN;
val |= SW_VBUS_VALID;
+ val &= ~SW_DRD_STATIC_HOST_CFG0;
+ val |= SW_DRD_STATIC_DEV_CFG0;
break;
}
- val |= SW_IDPIN_EN;
+ val |= SW_IDPIN_EN | SW_SWITCH_EN_CFG0;
writel(val, data->base + DUAL_ROLE_CFG0);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [V4] roles: Fix USB 3.0 OTG issue on Intel platform
@ 2018-09-07 5:49 Greg Kroah-Hartman
0 siblings, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2018-09-07 5:49 UTC (permalink / raw)
To: saranya.gopal
Cc: linux-usb, heikki.krogerus, sathyanarayanan.kuppuswamy,
abhilash.k.v, M Balaji
On Fri, Sep 07, 2018 at 09:59:40AM +0530, saranya.gopal@intel.com wrote:
> From: Saranya Gopal <saranya.gopal@intel.com>
>
> This patch adds static DRD mode for host/device
> mode switch. This fixes the issue where device
> mode was not working after DUT switches to host
> mode with 3.0 OTG connector.
>
> Change-Id: Ib6d04b90d277d965ef10026751a7f4832cad5d2a
This line is not needed, you didn't run checkpatch.pl :(
> Signed-off-by: Saranya Gopal <saranya.gopal@intel.com>
> Signed-off-by: M Balaji <m.balaji@intel.com>
> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> Revieved-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
> ---
> drivers/usb/roles/intel-xhci-usb-role-switch.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
What changed from previous versions? That always needs to be somewhere,
usually below the --- line.
v5?
^ permalink raw reply [flat|nested] 3+ messages in thread
* [V4] roles: Fix USB 3.0 OTG issue on Intel platform
@ 2018-09-10 18:37 Greg KH
0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2018-09-10 18:37 UTC (permalink / raw)
To: saranya.gopal
Cc: linux-usb, heikki.krogerus, sathyanarayanan.kuppuswamy,
abhilash.k.v, M Balaji
On Fri, Sep 07, 2018 at 09:59:40AM +0530, saranya.gopal@intel.com wrote:
> From: Saranya Gopal <saranya.gopal@intel.com>
>
> This patch adds static DRD mode for host/device
> mode switch. This fixes the issue where device
> mode was not working after DUT switches to host
> mode with 3.0 OTG connector.
>
> Change-Id: Ib6d04b90d277d965ef10026751a7f4832cad5d2a
Why is this line here?
What commit does this "fix"? Or has this always been a problem?
> Signed-off-by: Saranya Gopal <saranya.gopal@intel.com>
> Signed-off-by: M Balaji <m.balaji@intel.com>
> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> Revieved-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
> ---
> drivers/usb/roles/intel-xhci-usb-role-switch.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
Does this need to go to any older stable kernels or is 4.20 ok? 4.19?
something else?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-09-10 18:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-07 5:49 [V4] roles: Fix USB 3.0 OTG issue on Intel platform Greg Kroah-Hartman
-- strict thread matches above, loose matches on Subject: below --
2018-09-10 18:37 Greg KH
2018-09-07 4:29 saranya.gopal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).