Skip to contentSkip to conversation

dt-binding: cdns,usb3: Fix cdns,on-chip-buff-size type

PATCH Applied Frank Li 3 participants 4 messages May 15, 2023 – May 16, 2023

Subsystems (4)
lore
Share & tools
lore

Frank Li

author maintainer
#0 lore raw

PATCH v3 1/2 dt-binding: cdns,usb3: Fix cdns,on-chip-buff-size type

In cdns3-gadget.c, 'cdns,on-chip-buff-size' was read using device_property_read_u16(). It resulted in 0 if a 32bit value was used in dts. This commit fixes the dt binding doc to declare it as u16.

Fixes 68989fe1c39d ("dt-bindings: usb: Convert cdns-usb3.txt to YAML schema")

---
Change from v2 to v3
- add fixes tag and cc stable
Change from v1 to v2
- new patch

 Documentation/devicetree/bindings/usb/cdns,usb3.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/usb/cdns,usb3.yaml +1 -1
index cae46c4982ad..69a93a0722f0 100644
@@ -64,7 +64,7 @@ properties:
     description:
       size of memory intended as internal memory for endpoints
       buffers expressed in KB
-    $ref: /schemas/types.yaml#/definitions/uint32
+    $ref: /schemas/types.yaml#/definitions/uint16
 
   cdns,phyrst-a-enable:
     description: Enable resetting of PHY if Rx fail is detected
Signature · 1 line
2.34.1
author maintainer
#1 lore raw

PATCH v3 2/2 arm64: dts: imx8: fix USB 3.0 Gadget Failure in QM & QXPB0 at super speed

Resolve USB 3.0 gadget failure for QM and QXPB0 in super speed mode with single IN and OUT endpoints, like mass storage devices, due to incorrect ACTUAL_MEM_SIZE in ep_cap2 (32k instead of actual 18k). Implement dt property cdns,on-chip-buff-size to override ep_cap2 and set it to 18k for imx8QM and imx8QXP chips. No adverse effects for 8QXP C0.

Fixes dce49449e04f ("usb: cdns3: allocate TX FIFO size according to composite EP number")

---
Change from v2 to v3
-cc stable
change from v1 to v2
- fixes warning from check-patch
- update dt-binding doc

 arch/arm64/boot/dts/freescale/imx8-ss-conn.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/freescale/imx8-ss-conn.dtsi +1 -0
index b32c2e199c16..030c273c8be4 100644
@@ -171,6 +171,7 @@ usbotg3_cdns3: usb@5b120000 {
 			interrupt-names = "host", "peripheral", "otg", "wakeup";
 			phys = <&usb3_phy>;
 			phy-names = "cdns3,usb3-phy";
+			cdns,on-chip-buff-size = /bits/ 16 <18>;
 			status = "disabled";
 		};
 	};
Signature · 1 line
2.34.1
Reviewed-by on v3 1/2
#2 lore raw
In reply to Frank Li
Quoted 8 lines · Frank Li

In cdns3-gadget.c, 'cdns,on-chip-buff-size' was read using device_property_read_u16(). It resulted in 0 if a 32bit value was used in dts. This commit fixes the dt binding doc to declare it as u16.

Fixes 68989fe1c39d ("dt-bindings: usb: Convert cdns-usb3.txt to YAML schema")

---

Best regards,
Krzysztof

Applied
#3 lore raw
In reply to Frank Li
Quoted 7 lines · Frank Li

In cdns3-gadget.c, 'cdns,on-chip-buff-size' was read using device_property_read_u16(). It resulted in 0 if a 32bit value was used in dts. This commit fixes the dt binding doc to declare it as u16.

Fixes 68989fe1c39d ("dt-bindings: usb: Convert cdns-usb3.txt to YAML schema")

Applied both and will send them as fixes for v6.4-rc through arm-soc tree.

Shawn