summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2019-08-30 05:56:14 +0200
committerFelipe Balbi <felipe.balbi@linux.intel.com>2019-08-30 08:27:33 +0200
commit18a93cd38be3e69ac5b067c570a78a369b79e31d (patch)
treea1f6264e618b6fcb15b97074733b9e5fc8e18148 /drivers
parentusb: gadget: net2280: Move all "ll" registers in one structure (diff)
downloadlinux-18a93cd38be3e69ac5b067c570a78a369b79e31d.tar.xz
linux-18a93cd38be3e69ac5b067c570a78a369b79e31d.zip
usb: gadget: net2280: Add workaround for AB chip Errata 11
The errata description is: Workaround for Default Duration of LFPS Handshake Signaling for Device-Initiated U1 Exit is too short. The default duration of the LFPS handshake generated by USB3380 for a device-initiated U1-exit may not be long enough for certain SuperSpeed downstream ports (SuperSpeed hubs/hosts) to recognize. This could lead to USB3380 entering the recovery state pre-maturely and ending up in the SS.Inactive state. I have observed various enumeration failures, seemingly related to lost transactions or SETUP status phases on modern hosts (typically thunderbolt capable systems) without this workaround. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/gadget/udc/net2280.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/usb/gadget/udc/net2280.c b/drivers/usb/gadget/udc/net2280.c
index e0191146ba22..51efee21915f 100644
--- a/drivers/usb/gadget/udc/net2280.c
+++ b/drivers/usb/gadget/udc/net2280.c
@@ -2270,6 +2270,16 @@ static void usb_reinit_338x(struct net2280 *dev)
writel(val, &dev->llregs->ll_tsn_counters_3);
/*
+ * AB errata. Errata 11. Workaround for Default Duration of LFPS
+ * Handshake Signaling for Device-Initiated U1 Exit is too short.
+ * Without this, various enumeration failures observed with
+ * modern superspeed hosts.
+ */
+ val = readl(&dev->llregs->ll_lfps_timers_2);
+ writel((val & 0xffff0000) | LFPS_TIMERS_2_WORKAROUND_VALUE,
+ &dev->llregs->ll_lfps_timers_2);
+
+ /*
* Set Recovery Idle to Recover bit:
* - On SS connections, setting Recovery Idle to Recover Fmw improves
* link robustness with various hosts and hubs.