aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ipq806x/patches-4.4/096-02-usb-dwc3-Update-maximum_speed-for-SuperSpeedPlus.patch
diff options
context:
space:
mode:
authorPavel Kubelun <be.dissent@gmail.com>2016-11-12 14:35:56 +0300
committerJohn Crispin <john@phrozen.org>2016-11-21 09:58:42 +0100
commit70434c3f948749690de24effbfd98f7a64e0991f (patch)
tree31de7f236a55c7649afcf2b7fea8d75ec4a5f3ed /target/linux/ipq806x/patches-4.4/096-02-usb-dwc3-Update-maximum_speed-for-SuperSpeedPlus.patch
parent6e65576f2d808513148bc8b6e399e62805c3fe03 (diff)
downloadupstream-70434c3f948749690de24effbfd98f7a64e0991f.tar.gz
upstream-70434c3f948749690de24effbfd98f7a64e0991f.tar.bz2
upstream-70434c3f948749690de24effbfd98f7a64e0991f.zip
ipq806x: switch to upstream usb driver and backport fixes
Also removing fifo-resize property drom DT as it has been removed from the driver. Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
Diffstat (limited to 'target/linux/ipq806x/patches-4.4/096-02-usb-dwc3-Update-maximum_speed-for-SuperSpeedPlus.patch')
-rw-r--r--target/linux/ipq806x/patches-4.4/096-02-usb-dwc3-Update-maximum_speed-for-SuperSpeedPlus.patch56
1 files changed, 56 insertions, 0 deletions
diff --git a/target/linux/ipq806x/patches-4.4/096-02-usb-dwc3-Update-maximum_speed-for-SuperSpeedPlus.patch b/target/linux/ipq806x/patches-4.4/096-02-usb-dwc3-Update-maximum_speed-for-SuperSpeedPlus.patch
new file mode 100644
index 0000000000..9575166f74
--- /dev/null
+++ b/target/linux/ipq806x/patches-4.4/096-02-usb-dwc3-Update-maximum_speed-for-SuperSpeedPlus.patch
@@ -0,0 +1,56 @@
+From 2c7f1bd9127a1a49ee25d9c2b2ce17b11c7fb05f Mon Sep 17 00:00:00 2001
+From: John Youn <John.Youn@synopsys.com>
+Date: Fri, 5 Feb 2016 17:08:59 -0800
+Subject: usb: dwc3: Update maximum_speed for SuperSpeedPlus
+
+If the maximum_speed is not set, set it to a known value, either
+SuperSpeed or SuperSpeedPlus based on the type of controller we are
+using. If we are on DWC_usb31 controller, check the PHY interface to see
+if it is capable of SuperSpeedPlus.
+
+Also this check is moved after dwc3_core_init() so that we can check
+dwc->revision.
+
+Signed-off-by: John Youn <johnyoun@synopsys.com>
+Signed-off-by: Felipe Balbi <balbi@kernel.org>
+---
+ drivers/usb/dwc3/core.c | 17 +++++++++++++----
+ 1 file changed, 13 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
+index de5e01f..001c755 100644
+--- a/drivers/usb/dwc3/core.c
++++ b/drivers/usb/dwc3/core.c
+@@ -962,10 +962,6 @@ static int dwc3_probe(struct platform_device *pdev)
+ fladj = pdata->fladj_value;
+ }
+
+- /* default to superspeed if no maximum_speed passed */
+- if (dwc->maximum_speed == USB_SPEED_UNKNOWN)
+- dwc->maximum_speed = USB_SPEED_SUPER;
+-
+ dwc->lpm_nyet_threshold = lpm_nyet_threshold;
+ dwc->tx_de_emphasis = tx_de_emphasis;
+
+@@ -1016,6 +1012,19 @@ static int dwc3_probe(struct platform_device *pdev)
+ goto err1;
+ }
+
++ /* default to superspeed if no maximum_speed passed */
++ if (dwc->maximum_speed == USB_SPEED_UNKNOWN) {
++ dwc->maximum_speed = USB_SPEED_SUPER;
++
++ /*
++ * default to superspeed plus if we are capable.
++ */
++ if (dwc3_is_usb31(dwc) &&
++ (DWC3_GHWPARAMS3_SSPHY_IFC(dwc->hwparams.hwparams3) ==
++ DWC3_GHWPARAMS3_SSPHY_IFC_GEN2))
++ dwc->maximum_speed = USB_SPEED_SUPER_PLUS;
++ }
++
+ /* Adjust Frame Length */
+ dwc3_frame_length_adjustment(dwc, fladj);
+
+--
+cgit v0.12