Skip to contentSkip to conversation

usb: dwc3: Add new updates for DWC_usb31

PATCH In review Thinh Nguyen 2 participants 4 messages Jan 31, 2018 – Feb 5, 2018 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v4 cover usb: dwc3: Add new updates for DWC_usb31

This patch series adds new updates and some fixes for DWC_usb31.

Changes in v4:
- Correctly refer "databook" as "programming guide"
- Document more detail about enabling of ESS periodic tx/rx threshold

Changes in v3:
- Add "usb: dwc3: Check controller type before setting speed" to series

Changes in v2:
- Add another patch to the series to increase mass_storage max_speed
- Separate "usb: dwc3: ep0: Reset TRB counter for ep0 IN" from series
- Separate "usb: dwc3: gadget: Set maxpacket size for ep0 IN" from series
- Use msleep() instead of mdelay() for SoftReset PHY sync delay
- Rename new USB31 macros from DWC3_USB31_* to DWC31_*
- Rename device properties and replace '_' with '-'
- Minor fixes in the commit messages

Thinh Nguyen (15):
usb: dwc3: Add SoftReset PHY synchonization delay
usb: core: urb: Check SSP isoc ep comp descriptor
usb: dwc3: Update DWC_usb31 GTXFIFOSIZ reg fields
usb: dwc3: Check IP revision for GTXFIFOSIZ
usb: dwc3: Add DWC_usb31 GRXTHRCFG bit fields
usb: dwc3: gadget: Check IP revision for GRXTHRCFG
usb: dwc3: Add DWC_usb31 GTXTHRCFG reg fields
usb: dwc3: Make TX/RX threshold configurable
usb: dwc3: Check for ESS TX/RX threshold config
usb: dwc3: Dump LSP and BMU debug info
usb: dwc3: Track DWC_usb31 VERSIONTYPE
usb: dwc3: Add disabling of start_transfer failure quirk
usb: dwc3: Add workaround for isoc start transfer failure
usb: dwc3: Check controller type before setting speed
usb: gadget: mass_storage: Set max_speed to SSP

 Documentation/devicetree/bindings/usb/dwc3.txt |  19 +++
 drivers/usb/core/urb.c                         |   8 +
 drivers/usb/dwc3/core.c                        |  72 ++++++++-
 drivers/usb/dwc3/core.h                        |  53 +++++++
 drivers/usb/dwc3/debugfs.c                     |   5 +
 drivers/usb/dwc3/gadget.c                      | 205 ++++++++++++++++++++++++-
 drivers/usb/gadget/legacy/mass_storage.c       |   2 +-
 7 files changed, 354 insertions(+), 10 deletions(-)
Signature · 6 lines
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): cover.1517428812.git.thinhn-HKixBCOQz3hWk0Htik3J/[email protected]

#2 lore raw

PATCH v4 8/15 usb: dwc3: Make TX/RX threshold configurable

DWC_usb31 periodic transfer at 48K+ bytes per interval may need modification to the TX/RX packet threshold to achieve optimal result. Add properties to make it configurable.

By default, periodic ESS TX and RX threshold are not enabled. To enable TX or RX threshold (host mode only), both packet threshold count and max burst size properties must be set to a valid non-zero value 1-16.

DWC_usb31 programming guide section 1.2.3 and 1.2.4.

Cc John Youn <johnyoun-HKixBCOQz3hWk0Htik3J/[email protected]>
---
 Documentation/devicetree/bindings/usb/dwc3.txt | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
Documentation/devicetree/bindings/usb/dwc3.txt +16 -0
index 52fb41046b34..e2c1edcd83dd 100644
@@ -55,6 +55,22 @@ Optional properties:
  - snps,quirk-frame-length-adjustment: Value for GFLADJ_30MHZ field of GFLADJ
 	register for post-silicon frame length adjustment when the
 	fladj_30mhz_sdbnd signal is invalid or incorrect.
+ - snps,rx-thr-num-pkt-prd: periodic ESS RX packet threshold count - host mode
+			only. Set this and rx-max-burst-prd to a valid,
+			non-zero value 1-16 (DWC_usb31 programming guide
+			section 1.2.4) to enable periodic ESS RX threshold.
+ - snps,rx-max-burst-prd: max periodic ESS RX burst size - host mode only. Set
+			this and rx-thr-num-pkt-prd to a valid, non-zero value
+			1-16 (DWC_usb31 programming guide section 1.2.4) to
+			enable periodic ESS RX threshold.
+ - snps,tx-thr-num-pkt-prd: periodic ESS TX packet threshold count - host mode
+			only. Set this and tx-max-burst-prd to a valid,
+			non-zero value 1-16 (DWC_usb31 programming guide
+			section 1.2.3) to enable periodic ESS TX threshold.
+ - snps,tx-max-burst-prd: max periodic ESS TX burst size - host mode only. Set
+			this and tx-thr-num-pkt-prd to a valid, non-zero value
+			1-16 (DWC_usb31 programming guide section 1.2.3) to
+			enable periodic ESS TX threshold.
 
  - <DEPRECATED> tx-fifo-resize: determines if the FIFO *has* to be reallocated.
 
Signature · 6 lines
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): c42923b000093b7fc77a27e64d51b60fb28d3312.1517428812.git.thinhn-HKixBCOQz3hWk0Htik3J/[email protected]

Reviewed-by
#4 lore raw

Re: [PATCH v4 08/15] usb: dwc3: Make TX/RX threshold configurable

Quoted 8 lines · Thinh Nguyen

DWC_usb31 periodic transfer at 48K+ bytes per interval may need modification to the TX/RX packet threshold to achieve optimal result. Add properties to make it configurable.

By default, periodic ESS TX and RX threshold are not enabled. To enable TX or RX threshold (host mode only), both packet threshold count and max burst size properties must be set to a valid non-zero value 1-16.

Quoted 7 lines

DWC_usb31 programming guide section 1.2.3 and 1.2.4.

Cc John Youn <johnyoun-HKixBCOQz3hWk0Htik3J/[email protected]>
---
 Documentation/devicetree/bindings/usb/dwc3.txt | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#5 lore raw

PATCH v4 12/15 usb: dwc3: Add disabling of start_transfer failure quirk

In reply to a message not in the archive

In DWC_usb31 version 1.70a-ea06 and prior needs a SW workaround for isoc START TRANSFER command failure. However, some affected versions may have RTL patches to fix this without a SW workaround. Add this quirk to disable the SW workaround when it is not needed.

Synopsys STAR 9001202023: Wrong microframe number for isochronous IN endpoints.

Cc John Youn <johnyoun-HKixBCOQz3hWk0Htik3J/[email protected]>
---
 Documentation/devicetree/bindings/usb/dwc3.txt | 3 +++
 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/usb/dwc3.txt +3 -0
index e2c1edcd83dd..98b4da23c595 100644
@@ -15,6 +15,9 @@ Optional properties:
  - phys: from the *Generic PHY* bindings
  - phy-names: from the *Generic PHY* bindings; supported names are "usb2-phy"
 	or "usb3-phy".
+ - snps,dis-start-transfer-quirk: when set, disable isoc START TRANSFER command
+			failure SW work-around for DWC_usb31 version 1.70a-ea06
+			and prior.
  - snps,usb3_lpm_capable: determines if platform is USB3 LPM capable
  - snps,disable_scramble_quirk: true when SW should disable data scrambling.
 	Only really useful for FPGA builds.
Signature · 6 lines
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html