Skip to contentSkip to conversation

dt-bindings: usb: mtu3: add mediatek,usb3-drd property

PATCH In review Macpaul Lin 3 participants 4 messages Oct 15, 2024 – Oct 16, 2024

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

PATCH 1/1 dt-bindings: usb: mtu3: add mediatek,usb3-drd property

Add optional 'mediatek,usb3-drd' property to MediaTek MTU3 DT Schema. This flag specify whether it is a USB3 Dual-role device hardware.

---
 Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml | 6 ++++++
 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml +6 -0
index d4e187c78a0b..1e70af0dac82 100644
@@ -155,6 +155,12 @@ properties:
       property is used. See graph.txt
     $ref: /schemas/graph.yaml#/properties/port
 
+  mediatek,usb3-drd:
+    $ref: /schemas/types.yaml#/definitions/flag
+    description:
+      Specify whether it is a USB3 Dual-role device hardware.
+    type: boolean
+
   enable-manual-drd:
     $ref: /schemas/types.yaml#/definitions/flag
     description:
Signature · 1 line
2.45.2
maintainer
#1 lore raw
Quoted 13 lines · Macpaul Lin

Add optional 'mediatek,usb3-drd' property to MediaTek MTU3 DT Schema. This flag specify whether it is a USB3 Dual-role device hardware.

---
 Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml | 6 ++++++
 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml +0 -0
index d4e187c78a0b..1e70af0dac82 100644

Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml properties: · line 163

Quoted 9 lines
Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml +6 -0
@@ -155,6 +155,12 @@ properties:
       property is used. See graph.txt
     $ref: /schemas/graph.yaml#/properties/port
 
+  mediatek,usb3-drd:
+    $ref: /schemas/types.yaml#/definitions/flag
+    description:
+      Specify whether it is a USB3 Dual-role device hardware.
+    type: boolean
+

Don't the standard properties such as usb-role-switch or dr_mode work for you?

Quoted 6 lines
Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml +0 -0
   enable-manual-drd:
     $ref: /schemas/types.yaml#/definitions/flag
     description:
Signature · 1 line
2.45.2
#2 lore raw
Quoted 21 lines · Rob Herring

External email : Please do not click links or open attachments until you have verified the sender or the content.

Quoted 16 lines · Macpaul Lin

Add optional 'mediatek,usb3-drd' property to MediaTek MTU3 DT Schema. This flag specify whether it is a USB3 Dual-role device hardware.

---
 Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml | 6 ++++++
 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml +0 -0
index d4e187c78a0b..1e70af0dac82 100644
@@ -155,6 +155,12 @@ properties:
       property is used. See graph.txt
     $ref: /schemas/graph.yaml#/properties/port
 
Quoted 9 lines

Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml properties: · line 163

Quoted 6 lines
Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml +6 -0
+  mediatek,usb3-drd:
+    $ref: /schemas/types.yaml#/definitions/flag
+    description:
+      Specify whether it is a USB3 Dual-role device hardware.
+    type: boolean
+

Don't the standard properties such as usb-role-switch or dr_mode work for you?

I've found there are some hardware capability registers could be read
when probing the device. I'll try if the platform I'm using could access
these capability registers.
This patch can be discard. If the hardware really need specify the capability in dts and there is no capability registers, I'll resend this patch that time.

Quoted 7 lines
Quoted 6 lines
Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml +0 -0
   enable-manual-drd:
     $ref: /schemas/types.yaml#/definitions/flag
     description:
Signature · 1 line
2.45.2

Thanks!
Macpaul Lin

#3 lore raw
In reply to Rob Herring

Il 16/10/24 00:20, Rob Herring ha scritto:

Quoted 17 lines · Macpaul Lin
Quoted 16 lines

Add optional 'mediatek,usb3-drd' property to MediaTek MTU3 DT Schema. This flag specify whether it is a USB3 Dual-role device hardware.

---
  Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml | 6 ++++++
  1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml +0 -0
index d4e187c78a0b..1e70af0dac82 100644
@@ -155,6 +155,12 @@ properties:
        property is used. See graph.txt
      $ref: /schemas/graph.yaml#/properties/port
 
Quoted 10 lines

Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml properties: · line 163

Quoted 6 lines
Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml +6 -0
+  mediatek,usb3-drd:
+    $ref: /schemas/types.yaml#/definitions/flag
+    description:
+      Specify whether it is a USB3 Dual-role device hardware.
+    type: boolean
+

Don't the standard properties such as usb-role-switch or dr_mode work for you?

They do - and in fact, the upstream MTU3 driver doesn't even support parsing the proposed property because it does parse the standard usb-role-switch property.

This means that this commit is not needed at all.

Cheers,
Angelo

Quoted 6 lines
Quoted 6 lines
Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml +0 -0
    enable-manual-drd:
      $ref: /schemas/types.yaml#/definitions/flag
      description:
Signature · 1 line
2.45.2