Skip to contentSkip to conversation

dt-bindings: usb: dwc2: Add otg-rev property documentation

PATCH In review Marek Vasut 3 participants 5 messages Oct 24, 2021 – Oct 31, 2021

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

PATCH 1/1 dt-bindings: usb: dwc2: Add otg-rev property documentation

Copy the otg-rev property documentation from usb-drd.yaml into the DWC2 binding document, since some users of the DWC2 IP like STM32MP1 use the otg-rev property in DT bindings for this controller.

Cc Greg Kroah-Hartman <[email protected]>
Cc Rob Herring <[email protected]>

---
NOTE: Shouldn't this somehow be part of the USB core bindings instead?

---
 Documentation/devicetree/bindings/usb/dwc2.yaml | 10 ++++++++++
 1 file changed, 10 insertions(+)
Documentation/devicetree/bindings/usb/dwc2.yaml +10 -0
index 10c7d9b6cc53f..254436c19870b 100644
@@ -120,6 +120,16 @@ properties:
     $ref: /schemas/types.yaml#/definitions/uint32-array
     description: size of periodic tx fifo per endpoint (except ep0) in gadget mode.
 
+  otg-rev:
+    description:
+      Tells usb driver the release number of the OTG and EH supplement with
+      which the device and its descriptors are compliant, in binary-coded
+      decimal (i.e. 2.0 is 0200H). This property is used if any real OTG
+      features (HNP/SRP/ADP) is enabled. If ADP is required, otg-rev should be
+      0x0200 or above.
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum: [0x0100, 0x0120, 0x0130, 0x0200]
+
   snps,need-phy-for-wake:
     $ref: /schemas/types.yaml#/definitions/flag
     description: If present indicates that the phy needs to be left on for 
Signature · 1 line
2.33.0
#1 lore raw
Quoted 10 lines · Marek Vasut

Copy the otg-rev property documentation from usb-drd.yaml into the DWC2 binding document, since some users of the DWC2 IP like STM32MP1 use the otg-rev property in DT bindings for this controller.

Cc Greg Kroah-Hartman <[email protected]>
Cc Rob Herring <[email protected]>

---
NOTE: Shouldn't this somehow be part of the USB core bindings instead?

Hi Marek,

Yes, this is similar to patch series I sent recently, see [1].

[1]
https://lore.kernel.org/linux-usb/[email protected]/

BR,
Fabrice

Quoted 26 lines
---
 Documentation/devicetree/bindings/usb/dwc2.yaml | 10 ++++++++++
 1 file changed, 10 insertions(+)
Documentation/devicetree/bindings/usb/dwc2.yaml +10 -0
index 10c7d9b6cc53f..254436c19870b 100644
@@ -120,6 +120,16 @@ properties:
     $ref: /schemas/types.yaml#/definitions/uint32-array
     description: size of periodic tx fifo per endpoint (except ep0) in gadget mode.
 
+  otg-rev:
+    description:
+      Tells usb driver the release number of the OTG and EH supplement with
+      which the device and its descriptors are compliant, in binary-coded
+      decimal (i.e. 2.0 is 0200H). This property is used if any real OTG
+      features (HNP/SRP/ADP) is enabled. If ADP is required, otg-rev should be
+      0x0200 or above.
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum: [0x0100, 0x0120, 0x0130, 0x0200]
+
   snps,need-phy-for-wake:
     $ref: /schemas/types.yaml#/definitions/flag
     description: If present indicates that the phy needs to be left on for 
#2 lore raw
Quoted 12 lines · Fabrice Gasnier
Quoted 10 lines · Marek Vasut

Copy the otg-rev property documentation from usb-drd.yaml into the DWC2 binding document, since some users of the DWC2 IP like STM32MP1 use the otg-rev property in DT bindings for this controller.

Cc Greg Kroah-Hartman <[email protected]>
Cc Rob Herring <[email protected]>

---
NOTE: Shouldn't this somehow be part of the USB core bindings instead?

Quoted 6 lines

Hi Marek,

Yes, this is similar to patch series I sent recently, see [1].

[1]
https://lore.kernel.org/linux-usb/[email protected]/

That looks good, thanks.

maintainer
#3 lore raw
In reply to Marek Vasut
Quoted 10 lines · Marek Vasut

Copy the otg-rev property documentation from usb-drd.yaml into the DWC2 binding document, since some users of the DWC2 IP like STM32MP1 use the otg-rev property in DT bindings for this controller.

Cc Greg Kroah-Hartman <[email protected]>
Cc Rob Herring <[email protected]>

---
NOTE: Shouldn't this somehow be part of the USB core bindings instead?

Yes, usb-drd.yaml IIRC

Quoted 29 lines
---
 Documentation/devicetree/bindings/usb/dwc2.yaml | 10 ++++++++++
 1 file changed, 10 insertions(+)
Documentation/devicetree/bindings/usb/dwc2.yaml +10 -0
index 10c7d9b6cc53f..254436c19870b 100644
@@ -120,6 +120,16 @@ properties:
     $ref: /schemas/types.yaml#/definitions/uint32-array
     description: size of periodic tx fifo per endpoint (except ep0) in gadget mode.
 
+  otg-rev:
+    description:
+      Tells usb driver the release number of the OTG and EH supplement with
+      which the device and its descriptors are compliant, in binary-coded
+      decimal (i.e. 2.0 is 0200H). This property is used if any real OTG
+      features (HNP/SRP/ADP) is enabled. If ADP is required, otg-rev should be
+      0x0200 or above.
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum: [0x0100, 0x0120, 0x0130, 0x0200]
+
   snps,need-phy-for-wake:
     $ref: /schemas/types.yaml#/definitions/flag
     description: If present indicates that the phy needs to be left on for 
Signature · 1 line
2.33.0
#4 lore raw
Quoted 5 lines · Rob Herring
Quoted 4 lines · Marek Vasut

Copy the otg-rev property documentation from usb-drd.yaml into the DWC2 binding document, since some users of the DWC2 IP like STM32MP1 use the otg-rev property in DT bindings for this controller.

Quoted 8 lines
Quoted 6 lines
Cc Greg Kroah-Hartman <[email protected]>
Cc Rob Herring <[email protected]>

---
NOTE: Shouldn't this somehow be part of the USB core bindings instead?

Yes, usb-drd.yaml IIRC

Right, drop this patch, since the patchset from Fabrice is better and does exactly what I was wondering about in the NOTE.