Skip to contentSkip to conversation

Use onboard usb hub reset on Odroid N2

PATCH Superseded Anand Moon 3 participants 23 messages Dec 4, 2023 – Apr 4, 2024

Subsystems (3)

v6 of 7 Superseded Latest is v7 →

lore
Share & tools
lore

Anand Moon

author
#0 lore raw

v6 cover Use onboard usb hub reset on Odroid N2

Add new binding for Genesys GL3523
Fix the dt_binding_check error
Fix commit message and peer-hub description Fix commit message and vdd-supply description

Hope not more issue with these changes, finger crossed.

Previous:
v1: https://lore.kernel.org/r/[email protected]
v2: https://lore.kernel.org/all/[email protected]/
v3: https://lore.kernel.org/all/[email protected]/
v4: https://lore.kernel.org/all/[email protected]/
v5: https://patchwork.kernel.org/project/linux-amlogic/patch/[email protected]/

Thanks
-Anand

Anand Moon (2):
dt-bindings: usb: Add the binding example for the Genesys Logic GL3523
hub
arm64: dts: amlogic: Used onboard usb hub reset on odroid n2

 .../bindings/usb/genesys,gl850g.yaml          | 65 +++++++++++++++++--
 .../dts/amlogic/meson-g12b-odroid-n2.dtsi     | 36 ++++++----
 2 files changed, 85 insertions(+), 16 deletions(-)
Signature · 7 lines
2.42.0


_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
author
#1 lore raw

PATCH v6 1/2 dt-bindings: usb: Add the binding example for the Genesys Logic GL3523 hub

Add the binding example for the USB3.1 Genesys Logic GL3523 integrates with USB 3.1 Gen 1 Super Speed and USB 2.0 High-Speed hub.

For onboard hub controllers that support USB 3.x and USB 2.0 hubs with shared resets and power supplies, this property is used to identify the hubs with which these are shared.

GL3523 has built-in 5V to 3.3V and 5V to 1.2V regulators, which serves power to the USB HUB, it uses 5V power regulator.

---
V6: fix the description of the regulators
Updated the commit message for regulator updates.
add reviewed by Conor Dooley
[1] https://lore.kernel.org/all/[email protected]/
v5: upgrade peer-hub description : Conor Dooley
[0] https://www.genesyslogic.com.tw/en/product_view.php?show=67 [Block Diagram]
v4: Fix the description of peer-hub and update the commit message. Schematics of the Odroid N2+
https://dn.odroid.com/S922X/ODROID-N2/Schematic/odroid-n2_rev0.6_20210121.pdf
V3: fix the dt_binding_check error, added new example for Genesys GL3523
v2: added Genesys GL3523 binding
v1: none

---
 .../bindings/usb/genesys,gl850g.yaml          | 65 +++++++++++++++++--
 1 file changed, 61 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/usb/genesys,gl850g.yaml +61 -4
index ee08b9c3721f..c6f63a69396d 100644
@@ -9,9 +9,6 @@ title: Genesys Logic USB hub controller
 maintainers:
   - Icenowy Zheng <[email protected]>
 
-allOf:
-  - $ref: usb-device.yaml#
-
 properties:
   compatible:
     enum:
@@ -27,12 +24,46 @@ properties:
 
   vdd-supply:
     description:
-      the regulator that provides 3.3V core power to the hub.
+      The regulator that provides 3.3V or 5.0V core power to the hub.
+
+  peer-hub:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description:
+      For onboard hub controllers that support USB 3.x and USB 2.0 hubs
+      with shared resets and power supplies, this property is used to identify
+      the hubs with which these are shared.
 
 required:
   - compatible
   - reg
 
+allOf:
+  - $ref: usb-device.yaml#
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - usb5e3,608
+    then:
+      properties:
+        peer-hub: false
+        vdd-supply: false
+        reset-gpios: true
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - usb5e3,610
+              - usb5e3,620
+    then:
+      properties:
+        peer-hub: true
+        vdd-supply: true
+        reset-gpios: true
+
 additionalProperties: false
 
 examples:
@@ -49,3 +80,29 @@ examples:
             reset-gpios = <&pio 7 2 GPIO_ACTIVE_LOW>;
         };
     };
+
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+    usb {
+        dr_mode = "host";
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        /* 2.0 hub on port 1 */
+        hub_2_0: hub@1 {
+            compatible = "usb5e3,610";
+            reg = <1>;
+            peer-hub = <&hub_3_0>;
+            reset-gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
+            vdd-supply = <&vcc_5v>;
+        };
+
+        /* 3.1 hub on port 4 */
+        hub_3_0: hub@2 {
+            compatible = "usb5e3,620";
+            reg = <2>;
+            peer-hub = <&hub_2_0>;
+            reset-gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
+            vdd-supply = <&vcc_5v>;
+        };
+    };
Signature · 1 line
2.42.0
maintainer
#2 lore raw

Re: [PATCH v6 1/2] dt-bindings: usb: Add the binding example for the Genesys Logic GL3523 hub

Quoted 78 lines · Anand Moon

Add the binding example for the USB3.1 Genesys Logic GL3523 integrates with USB 3.1 Gen 1 Super Speed and USB 2.0 High-Speed hub.

For onboard hub controllers that support USB 3.x and USB 2.0 hubs with shared resets and power supplies, this property is used to identify the hubs with which these are shared.

GL3523 has built-in 5V to 3.3V and 5V to 1.2V regulators, which serves power to the USB HUB, it uses 5V power regulator.

---
V6: fix the description of the regulators
Updated the commit message for regulator updates.
add reviewed by Conor Dooley
[1] https://lore.kernel.org/all/[email protected]/
v5: upgrade peer-hub description : Conor Dooley
[0] https://www.genesyslogic.com.tw/en/product_view.php?show=67 [Block Diagram]
v4: Fix the description of peer-hub and update the commit message. Schematics of the Odroid N2+
https://dn.odroid.com/S922X/ODROID-N2/Schematic/odroid-n2_rev0.6_20210121.pdf
V3: fix the dt_binding_check error, added new example for Genesys GL3523
v2: added Genesys GL3523 binding
v1: none

---
 .../bindings/usb/genesys,gl850g.yaml          | 65 +++++++++++++++++--
 1 file changed, 61 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/usb/genesys,gl850g.yaml +24 -4
index ee08b9c3721f..c6f63a69396d 100644
@@ -9,9 +9,6 @@ title: Genesys Logic USB hub controller
 maintainers:
   - Icenowy Zheng <[email protected]>
 
-allOf:
-  - $ref: usb-device.yaml#
-
 properties:
   compatible:
     enum:
@@ -27,12 +24,46 @@ properties:
 
   vdd-supply:
     description:
-      the regulator that provides 3.3V core power to the hub.
+      The regulator that provides 3.3V or 5.0V core power to the hub.
+
+  peer-hub:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description:
+      For onboard hub controllers that support USB 3.x and USB 2.0 hubs
+      with shared resets and power supplies, this property is used to identify
+      the hubs with which these are shared.
 
 required:
   - compatible
   - reg
 
+allOf:
+  - $ref: usb-device.yaml#
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - usb5e3,608
+    then:
+      properties:
+        peer-hub: false
+        vdd-supply: false
+        reset-gpios: true
+
+  - if:
+      properties:

Documentation/devicetree/bindings/usb/genesys,gl850g.yaml properties: · line 65

Quoted 10 lines
Documentation/devicetree/bindings/usb/genesys,gl850g.yaml +10 -0
+        compatible:
+          contains:
+            enum:
+              - usb5e3,610
+              - usb5e3,620
+    then:
+      properties:
+        peer-hub: true
+        vdd-supply: true
+        reset-gpios: true

No need for this if schema. The default is they are allowed.

Rob

author
#3 lore raw

Re: [PATCH v6 1/2] dt-bindings: usb: Add the binding example for the Genesys Logic GL3523 hub

Hi Rob,

Quoted 84 lines · Rob Herring
Quoted 82 lines · Anand Moon

Add the binding example for the USB3.1 Genesys Logic GL3523 integrates with USB 3.1 Gen 1 Super Speed and USB 2.0 High-Speed hub.

For onboard hub controllers that support USB 3.x and USB 2.0 hubs with shared resets and power supplies, this property is used to identify the hubs with which these are shared.

GL3523 has built-in 5V to 3.3V and 5V to 1.2V regulators, which serves power to the USB HUB, it uses 5V power regulator.

---
V6: fix the description of the regulators
Updated the commit message for regulator updates.
add reviewed by Conor Dooley
[1] https://lore.kernel.org/all/[email protected]/
v5: upgrade peer-hub description : Conor Dooley
[0] https://www.genesyslogic.com.tw/en/product_view.php?show=67 [Block Diagram]
v4: Fix the description of peer-hub and update the commit message. Schematics of the Odroid N2+
https://dn.odroid.com/S922X/ODROID-N2/Schematic/odroid-n2_rev0.6_20210121.pdf
V3: fix the dt_binding_check error, added new example for Genesys GL3523
v2: added Genesys GL3523 binding
v1: none

---
 .../bindings/usb/genesys,gl850g.yaml          | 65 +++++++++++++++++--
 1 file changed, 61 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/usb/genesys,gl850g.yaml +28 -4
index ee08b9c3721f..c6f63a69396d 100644
@@ -9,9 +9,6 @@ title: Genesys Logic USB hub controller
 maintainers:
   - Icenowy Zheng <[email protected]>
 
-allOf:
-  - $ref: usb-device.yaml#
-
 properties:
   compatible:
     enum:
@@ -27,12 +24,46 @@ properties:
 
   vdd-supply:
     description:
-      the regulator that provides 3.3V core power to the hub.
+      The regulator that provides 3.3V or 5.0V core power to the hub.
+
+  peer-hub:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description:
+      For onboard hub controllers that support USB 3.x and USB 2.0 hubs
+      with shared resets and power supplies, this property is used to identify
+      the hubs with which these are shared.
 
 required:
   - compatible
   - reg
 
+allOf:
+  - $ref: usb-device.yaml#
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - usb5e3,608
+    then:
+      properties:
+        peer-hub: false
+        vdd-supply: false
+        reset-gpios: true
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - usb5e3,610
Quoted 9 lines

Documentation/devicetree/bindings/usb/genesys,gl850g.yaml properties: · line 65

Quoted 6 lines
Documentation/devicetree/bindings/usb/genesys,gl850g.yaml +6 -0
+              - usb5e3,620
+    then:
+      properties:
+        peer-hub: true
+        vdd-supply: true
+        reset-gpios: true

No need for this if schema. The default is they are allowed.

If I move reset-gpios to required, I observe the below warning.

DTC_CHK Documentation/devicetree/bindings/usb/maxim,max33359.example.dtb
/home/alarm/linux-amlogic-5.y-devel/Documentation/devicetree/bindings/usb/usb-device.example.dtb:
hub@1: 'reset-gpio' is a required property
from schema $id: http://devicetree.org/schemas/usb/genesys,gl850g.yaml#
DTC_CHK Documentation/devicetree/bindings/usb/mediatek,musb.example.dtb
DTC_CHK Documentation/devicetree/bindings/usb/usb251xb.example.dtb
DTC_CHK Documentation/devicetree/bindings/usb/realtek,rts5411.example.dtb
/home/alarm/linux-amlogic-5.y-devel/Documentation/devicetree/bindings/usb/genesys,gl850g.example.dtb:
hub@1: 'reset-gpio' is a required property
from schema $id: http://devicetree.org/schemas/usb/genesys,gl850g.yaml#
DTC_CHK Documentation/devicetree/bindings/usb/brcm,bdc.example.dtb
/home/alarm/linux-amlogic-5.y-devel/Documentation/devicetree/bindings/usb/genesys,gl850g.example.dtb:
hub@1: 'reset-gpio' is a required property
from schema $id: http://devicetree.org/schemas/usb/genesys,gl850g.yaml#
DTC_CHK Documentation/devicetree/bindings/usb/xlnx,usb2.example.dtb
/home/alarm/linux-amlogic-5.y-devel/Documentation/devicetree/bindings/usb/genesys,gl850g.example.dtb:
hub@2: 'reset-gpio' is a required property
from schema $id: http://devicetree.org/schemas/usb/genesys,gl850g.yaml#
DTC_CHK Documentation/devicetree/bindings/usb/starfive,jh7110-usb.example.dtb

Quoted 1 line

Rob

Thanks
-Anand

#4 lore raw

Re: [PATCH v6 1/2] dt-bindings: usb: Add the binding example for the Genesys Logic GL3523 hub

Quoted 97 lines · Anand Moon

Hi Rob,

Quoted 84 lines · Rob Herring
Quoted 82 lines · Anand Moon

Add the binding example for the USB3.1 Genesys Logic GL3523 integrates with USB 3.1 Gen 1 Super Speed and USB 2.0 High-Speed hub.

For onboard hub controllers that support USB 3.x and USB 2.0 hubs with shared resets and power supplies, this property is used to identify the hubs with which these are shared.

GL3523 has built-in 5V to 3.3V and 5V to 1.2V regulators, which serves power to the USB HUB, it uses 5V power regulator.

---
V6: fix the description of the regulators
Updated the commit message for regulator updates.
add reviewed by Conor Dooley
[1] https://lore.kernel.org/all/[email protected]/
v5: upgrade peer-hub description : Conor Dooley
[0] https://www.genesyslogic.com.tw/en/product_view.php?show=67 [Block Diagram]
v4: Fix the description of peer-hub and update the commit message. Schematics of the Odroid N2+
https://dn.odroid.com/S922X/ODROID-N2/Schematic/odroid-n2_rev0.6_20210121.pdf
V3: fix the dt_binding_check error, added new example for Genesys GL3523
v2: added Genesys GL3523 binding
v1: none

---
 .../bindings/usb/genesys,gl850g.yaml          | 65 +++++++++++++++++--
 1 file changed, 61 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/usb/genesys,gl850g.yaml +28 -4
index ee08b9c3721f..c6f63a69396d 100644
@@ -9,9 +9,6 @@ title: Genesys Logic USB hub controller
 maintainers:
   - Icenowy Zheng <[email protected]>
 
-allOf:
-  - $ref: usb-device.yaml#
-
 properties:
   compatible:
     enum:
@@ -27,12 +24,46 @@ properties:
 
   vdd-supply:
     description:
-      the regulator that provides 3.3V core power to the hub.
+      The regulator that provides 3.3V or 5.0V core power to the hub.
+
+  peer-hub:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description:
+      For onboard hub controllers that support USB 3.x and USB 2.0 hubs
+      with shared resets and power supplies, this property is used to identify
+      the hubs with which these are shared.
 
 required:
   - compatible
   - reg
 
+allOf:
+  - $ref: usb-device.yaml#
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - usb5e3,608
+    then:
+      properties:
+        peer-hub: false
+        vdd-supply: false
+        reset-gpios: true
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - usb5e3,610
Quoted 9 lines

Documentation/devicetree/bindings/usb/genesys,gl850g.yaml properties: · line 65

Quoted 6 lines
Documentation/devicetree/bindings/usb/genesys,gl850g.yaml +6 -0
+              - usb5e3,620
+    then:
+      properties:
+        peer-hub: true
+        vdd-supply: true
+        reset-gpios: true

No need for this if schema. The default is they are allowed.

Quoted 6 lines

If I move reset-gpios to required, I observe the below warning.

DTC_CHK Documentation/devicetree/bindings/usb/maxim,max33359.example.dtb
/home/alarm/linux-amlogic-5.y-devel/Documentation/devicetree/bindings/usb/usb-device.example.dtb:
hub@1: 'reset-gpio' is a required property
from schema $id: http://devicetree.org/schemas/usb/genesys,gl850g.yaml#

Where are the properties defined? If you open the binding you see:
nowhere. You cannot define properties in some variant with "true". Please define all of them in top-level and only narrow/constrain when applicable.

Best regards,
Krzysztof

author
#5 lore raw

Re: [PATCH v6 1/2] dt-bindings: usb: Add the binding example for the Genesys Logic GL3523 hub

Hi Krzysztof

Quoted 106 lines · Krzysztof Kozlowski
Quoted 97 lines · Anand Moon

Hi Rob,

Quoted 84 lines · Rob Herring
Quoted 82 lines · Anand Moon

Add the binding example for the USB3.1 Genesys Logic GL3523 integrates with USB 3.1 Gen 1 Super Speed and USB 2.0 High-Speed hub.

For onboard hub controllers that support USB 3.x and USB 2.0 hubs with shared resets and power supplies, this property is used to identify the hubs with which these are shared.

GL3523 has built-in 5V to 3.3V and 5V to 1.2V regulators, which serves power to the USB HUB, it uses 5V power regulator.

---
V6: fix the description of the regulators
Updated the commit message for regulator updates.
add reviewed by Conor Dooley
[1] https://lore.kernel.org/all/[email protected]/
v5: upgrade peer-hub description : Conor Dooley
[0] https://www.genesyslogic.com.tw/en/product_view.php?show=67 [Block Diagram]
v4: Fix the description of peer-hub and update the commit message. Schematics of the Odroid N2+
https://dn.odroid.com/S922X/ODROID-N2/Schematic/odroid-n2_rev0.6_20210121.pdf
V3: fix the dt_binding_check error, added new example for Genesys GL3523
v2: added Genesys GL3523 binding
v1: none

---
 .../bindings/usb/genesys,gl850g.yaml          | 65 +++++++++++++++++--
 1 file changed, 61 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/usb/genesys,gl850g.yaml +28 -4
index ee08b9c3721f..c6f63a69396d 100644
@@ -9,9 +9,6 @@ title: Genesys Logic USB hub controller
 maintainers:
   - Icenowy Zheng <[email protected]>
 
-allOf:
-  - $ref: usb-device.yaml#
-
 properties:
   compatible:
     enum:
@@ -27,12 +24,46 @@ properties:
 
   vdd-supply:
     description:
-      the regulator that provides 3.3V core power to the hub.
+      The regulator that provides 3.3V or 5.0V core power to the hub.
+
+  peer-hub:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description:
+      For onboard hub controllers that support USB 3.x and USB 2.0 hubs
+      with shared resets and power supplies, this property is used to identify
+      the hubs with which these are shared.
 
 required:
   - compatible
   - reg
 
+allOf:
+  - $ref: usb-device.yaml#
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - usb5e3,608
+    then:
+      properties:
+        peer-hub: false
+        vdd-supply: false
+        reset-gpios: true
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - usb5e3,610
Quoted 9 lines

Documentation/devicetree/bindings/usb/genesys,gl850g.yaml properties: · line 65

Quoted 6 lines
Documentation/devicetree/bindings/usb/genesys,gl850g.yaml +6 -0
+              - usb5e3,620
+    then:
+      properties:
+        peer-hub: true
+        vdd-supply: true
+        reset-gpios: true

No need for this if schema. The default is they are allowed.

Quoted 6 lines

If I move reset-gpios to required, I observe the below warning.

DTC_CHK Documentation/devicetree/bindings/usb/maxim,max33359.example.dtb
/home/alarm/linux-amlogic-5.y-devel/Documentation/devicetree/bindings/usb/usb-device.example.dtb:
hub@1: 'reset-gpio' is a required property
from schema $id: http://devicetree.org/schemas/usb/genesys,gl850g.yaml#

Quoted 5 lines

Where are the properties defined? If you open the binding you see:
nowhere. You cannot define properties in some variant with "true". Please define all of them in top-level and only narrow/constrain when applicable.

What I meant is the example below, required meant applicable for both the binding
But it shows me the above warning.

required:
- compatible
- reg
- reset-gpio

allOf:
- $ref: usb-device.yaml#
- if:
properties:
compatible:
contains:
enum:
- usb5e3,608
then:
properties:
peer-hub: false
vdd-supply: false

- if:
properties:
compatible:
contains:
enum:
- usb5e3,610
- usb5e3,620
then:
properties:
peer-hub: true
vdd-supply: true

additionalProperties: false

Quoted 4 lines

Best regards,
Krzysztof

Thanks
-Anand

#6 lore raw

Re: [PATCH v6 1/2] dt-bindings: usb: Add the binding example for the Genesys Logic GL3523 hub

Quoted 110 lines · Anand Moon

Hi Krzysztof

Quoted 106 lines · Krzysztof Kozlowski
Quoted 103 lines · Anand Moon

Hi Rob,

Quoted 84 lines · Rob Herring
Quoted 82 lines · Anand Moon

Add the binding example for the USB3.1 Genesys Logic GL3523 integrates with USB 3.1 Gen 1 Super Speed and USB 2.0 High-Speed hub.

For onboard hub controllers that support USB 3.x and USB 2.0 hubs with shared resets and power supplies, this property is used to identify the hubs with which these are shared.

GL3523 has built-in 5V to 3.3V and 5V to 1.2V regulators, which serves power to the USB HUB, it uses 5V power regulator.

---
V6: fix the description of the regulators
Updated the commit message for regulator updates.
add reviewed by Conor Dooley
[1] https://lore.kernel.org/all/[email protected]/
v5: upgrade peer-hub description : Conor Dooley
[0] https://www.genesyslogic.com.tw/en/product_view.php?show=67 [Block Diagram]
v4: Fix the description of peer-hub and update the commit message. Schematics of the Odroid N2+
https://dn.odroid.com/S922X/ODROID-N2/Schematic/odroid-n2_rev0.6_20210121.pdf
V3: fix the dt_binding_check error, added new example for Genesys GL3523
v2: added Genesys GL3523 binding
v1: none

---
 .../bindings/usb/genesys,gl850g.yaml          | 65 +++++++++++++++++--
 1 file changed, 61 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/usb/genesys,gl850g.yaml +28 -4
index ee08b9c3721f..c6f63a69396d 100644
@@ -9,9 +9,6 @@ title: Genesys Logic USB hub controller
 maintainers:
   - Icenowy Zheng <[email protected]>
 
-allOf:
-  - $ref: usb-device.yaml#
-
 properties:
   compatible:
     enum:
@@ -27,12 +24,46 @@ properties:
 
   vdd-supply:
     description:
-      the regulator that provides 3.3V core power to the hub.
+      The regulator that provides 3.3V or 5.0V core power to the hub.
+
+  peer-hub:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description:
+      For onboard hub controllers that support USB 3.x and USB 2.0 hubs
+      with shared resets and power supplies, this property is used to identify
+      the hubs with which these are shared.
 
 required:
   - compatible
   - reg
 
+allOf:
+  - $ref: usb-device.yaml#
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - usb5e3,608
+    then:
+      properties:
+        peer-hub: false
+        vdd-supply: false
+        reset-gpios: true
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - usb5e3,610
Quoted 9 lines

Documentation/devicetree/bindings/usb/genesys,gl850g.yaml properties: · line 65

Quoted 6 lines
Documentation/devicetree/bindings/usb/genesys,gl850g.yaml +6 -0
+              - usb5e3,620
+    then:
+      properties:
+        peer-hub: true
+        vdd-supply: true
+        reset-gpios: true

No need for this if schema. The default is they are allowed.

If I move reset-gpios to required, I observe the below warning.

DTC_CHK Documentation/devicetree/bindings/usb/maxim,max33359.example.dtb
/home/alarm/linux-amlogic-5.y-devel/Documentation/devicetree/bindings/usb/usb-device.example.dtb:
hub@1: 'reset-gpio' is a required property
from schema $id: http://devicetree.org/schemas/usb/genesys,gl850g.yaml#

Quoted 8 lines
Quoted 5 lines

Where are the properties defined? If you open the binding you see:
nowhere. You cannot define properties in some variant with "true". Please define all of them in top-level and only narrow/constrain when applicable.

What I meant is the example below, required meant applicable for both the binding
But it shows me the above warning.

My explanation stands... So again:

Quoted 2 lines
Quoted 2 lines

Please define all of them in top-level and only narrow/constrain when applicable.

Best regards,
Krzysztof

author
#7 lore raw

Re: [PATCH v6 1/2] dt-bindings: usb: Add the binding example for the Genesys Logic GL3523 hub

Hi Krzysztof,

Quoted 117 lines · Krzysztof Kozlowski
Quoted 115 lines · Anand Moon

Hi Krzysztof

Quoted 111 lines · Krzysztof Kozlowski
Quoted 97 lines · Anand Moon

Hi Rob,

Quoted 84 lines · Rob Herring
Quoted 82 lines · Anand Moon

Add the binding example for the USB3.1 Genesys Logic GL3523 integrates with USB 3.1 Gen 1 Super Speed and USB 2.0 High-Speed hub.

For onboard hub controllers that support USB 3.x and USB 2.0 hubs with shared resets and power supplies, this property is used to identify the hubs with which these are shared.

GL3523 has built-in 5V to 3.3V and 5V to 1.2V regulators, which serves power to the USB HUB, it uses 5V power regulator.

---
V6: fix the description of the regulators
Updated the commit message for regulator updates.
add reviewed by Conor Dooley
[1] https://lore.kernel.org/all/[email protected]/
v5: upgrade peer-hub description : Conor Dooley
[0] https://www.genesyslogic.com.tw/en/product_view.php?show=67 [Block Diagram]
v4: Fix the description of peer-hub and update the commit message. Schematics of the Odroid N2+
https://dn.odroid.com/S922X/ODROID-N2/Schematic/odroid-n2_rev0.6_20210121.pdf
V3: fix the dt_binding_check error, added new example for Genesys GL3523
v2: added Genesys GL3523 binding
v1: none

---
 .../bindings/usb/genesys,gl850g.yaml          | 65 +++++++++++++++++--
 1 file changed, 61 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/usb/genesys,gl850g.yaml +28 -4
index ee08b9c3721f..c6f63a69396d 100644
@@ -9,9 +9,6 @@ title: Genesys Logic USB hub controller
 maintainers:
   - Icenowy Zheng <[email protected]>
 
-allOf:
-  - $ref: usb-device.yaml#
-
 properties:
   compatible:
     enum:
@@ -27,12 +24,46 @@ properties:
 
   vdd-supply:
     description:
-      the regulator that provides 3.3V core power to the hub.
+      The regulator that provides 3.3V or 5.0V core power to the hub.
+
+  peer-hub:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description:
+      For onboard hub controllers that support USB 3.x and USB 2.0 hubs
+      with shared resets and power supplies, this property is used to identify
+      the hubs with which these are shared.
 
 required:
   - compatible
   - reg
 
+allOf:
+  - $ref: usb-device.yaml#
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - usb5e3,608
+    then:
+      properties:
+        peer-hub: false
+        vdd-supply: false
+        reset-gpios: true
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - usb5e3,610
Quoted 9 lines

Documentation/devicetree/bindings/usb/genesys,gl850g.yaml properties: · line 65

Quoted 6 lines
Documentation/devicetree/bindings/usb/genesys,gl850g.yaml +6 -0
+              - usb5e3,620
+    then:
+      properties:
+        peer-hub: true
+        vdd-supply: true
+        reset-gpios: true

No need for this if schema. The default is they are allowed.

Quoted 6 lines

If I move reset-gpios to required, I observe the below warning.

DTC_CHK Documentation/devicetree/bindings/usb/maxim,max33359.example.dtb
/home/alarm/linux-amlogic-5.y-devel/Documentation/devicetree/bindings/usb/usb-device.example.dtb:
hub@1: 'reset-gpio' is a required property
from schema $id: http://devicetree.org/schemas/usb/genesys,gl850g.yaml#

Where are the properties defined? If you open the binding you see:
nowhere. You cannot define properties in some variant with "true". Please define all of them in top-level and only narrow/constrain when applicable.

Quoted 9 lines
Quoted 3 lines

What I meant is the example below, required meant applicable for both the binding
But it shows me the above warning.

My explanation stands... So again:

Quoted 2 lines
Quoted 2 lines

Please define all of them in top-level and only narrow/constrain when applicable.

Apologies, But I have tried this multiple times but have not been able to fix the device tree warning
I have verified that example Documentation/devicetree/bindings/usb/genesys,gl850g.example.dts generate is correct

required:
- compatible
- reg
- reset-gpio
- peer-hub
- vdd-supply

allOf:
- $ref: usb-device.yaml#
- if:
properties:
compatible:
contains:
enum:
- usb5e3,608
then:
properties:
peer-hub: false
vdd-supply: false

- if:
properties:
compatible:
contains:
enum:
- usb5e3,610
- usb5e3,620
then:
properties:
peer-hub: true
vdd-supply: true

additionalProperties: false

Quoted 3 lines

Best regards,
Krzysztof

Thanks
-Anand

#8 lore raw

Re: [PATCH v6 1/2] dt-bindings: usb: Add the binding example for the Genesys Logic GL3523 hub

Quoted 17 lines · Anand Moon
Quoted 17 lines
Quoted 16 lines
Quoted 8 lines
Quoted 7 lines

If I move reset-gpios to required, I observe the below warning.

DTC_CHK Documentation/devicetree/bindings/usb/maxim,max33359.example.dtb
/home/alarm/linux-amlogic-5.y-devel/Documentation/devicetree/bindings/usb/usb-device.example.dtb:
hub@1: 'reset-gpio' is a required property
from schema $id: http://devicetree.org/schemas/usb/genesys,gl850g.yaml#

Quoted 5 lines

Where are the properties defined? If you open the binding you see:
nowhere. You cannot define properties in some variant with "true". Please define all of them in top-level and only narrow/constrain when applicable.

What I meant is the example below, required meant applicable for both the binding
But it shows me the above warning.

Quoted 7 lines
Quoted 5 lines

My explanation stands... So again:

Quoted 2 lines
Quoted 2 lines

Please define all of them in top-level and only narrow/constrain when applicable.

Apologies, But I have tried this multiple times but have not been able to fix the device tree warning

Did you document all properties in top-level "properties:" block?

Best regards,
Krzysztof

author
#9 lore raw

Re: [PATCH v6 1/2] dt-bindings: usb: Add the binding example for the Genesys Logic GL3523 hub

Hi Krzysztof,

Quoted 21 lines · Krzysztof Kozlowski
Quoted 19 lines · Anand Moon
Quoted 19 lines
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines

If I move reset-gpios to required, I observe the below warning.

DTC_CHK Documentation/devicetree/bindings/usb/maxim,max33359.example.dtb
/home/alarm/linux-amlogic-5.y-devel/Documentation/devicetree/bindings/usb/usb-device.example.dtb:
hub@1: 'reset-gpio' is a required property
from schema $id: http://devicetree.org/schemas/usb/genesys,gl850g.yaml#

Quoted 8 lines
Quoted 5 lines

Where are the properties defined? If you open the binding you see:
nowhere. You cannot define properties in some variant with "true". Please define all of them in top-level and only narrow/constrain when applicable.

What I meant is the example below, required meant applicable for both the binding
But it shows me the above warning.

My explanation stands... So again:

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Quoted 2 lines
Quoted 2 lines

Please define all of them in top-level and only narrow/constrain when applicable.

Apologies, But I have tried this multiple times but have not been able to fix the device tree warning

Did you document all properties in top-level "properties:" block?

Yes, I have,

Can you suggest a couple of examples to follow?
I looked at some of the YAML files but could not fix my issue.

Thanks
-Anand

#10 lore raw

Re: [PATCH v6 1/2] dt-bindings: usb: Add the binding example for the Genesys Logic GL3523 hub

Quoted 31 lines · Anand Moon

Hi Krzysztof,

Quoted 27 lines · Krzysztof Kozlowski
Quoted 24 lines · Anand Moon
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 7 lines

If I move reset-gpios to required, I observe the below warning.

DTC_CHK Documentation/devicetree/bindings/usb/maxim,max33359.example.dtb
/home/alarm/linux-amlogic-5.y-devel/Documentation/devicetree/bindings/usb/usb-device.example.dtb:
hub@1: 'reset-gpio' is a required property
from schema $id: http://devicetree.org/schemas/usb/genesys,gl850g.yaml#

Where are the properties defined? If you open the binding you see:
nowhere. You cannot define properties in some variant with "true". Please define all of them in top-level and only narrow/constrain when applicable.

Quoted 9 lines
Quoted 3 lines

What I meant is the example below, required meant applicable for both the binding
But it shows me the above warning.

My explanation stands... So again:

Quoted 2 lines
Quoted 2 lines

Please define all of them in top-level and only narrow/constrain when applicable.

Apologies, But I have tried this multiple times but have not been able to fix the device tree warning

Quoted 6 lines
Quoted 2 lines

Did you document all properties in top-level "properties:" block?

Yes, I have,

Can you suggest a couple of examples to follow?
I looked at some of the YAML files but could not fix my issue.

99% of bindings. Look also at example-schema.

You can also attach here complete patch for fast look / short review.

Best regards,
Krzysztof

author
#11 lore raw

Re: [PATCH v6 1/2] dt-bindings: usb: Add the binding example for the Genesys Logic GL3523 hub

Hi Krzysztof,

Quoted 35 lines · Krzysztof Kozlowski
Quoted 33 lines · Anand Moon

Hi Krzysztof,

Quoted 29 lines · Krzysztof Kozlowski
Quoted 17 lines · Anand Moon
Quoted 17 lines
Quoted 16 lines
Quoted 8 lines
Quoted 7 lines

If I move reset-gpios to required, I observe the below warning.

DTC_CHK Documentation/devicetree/bindings/usb/maxim,max33359.example.dtb
/home/alarm/linux-amlogic-5.y-devel/Documentation/devicetree/bindings/usb/usb-device.example.dtb:
hub@1: 'reset-gpio' is a required property
from schema $id: http://devicetree.org/schemas/usb/genesys,gl850g.yaml#

Quoted 5 lines

Where are the properties defined? If you open the binding you see:
nowhere. You cannot define properties in some variant with "true". Please define all of them in top-level and only narrow/constrain when applicable.

What I meant is the example below, required meant applicable for both the binding
But it shows me the above warning.

Quoted 7 lines
Quoted 5 lines

My explanation stands... So again:

Quoted 2 lines
Quoted 2 lines

Please define all of them in top-level and only narrow/constrain when applicable.

Apologies, But I have tried this multiple times but have not been able to fix the device tree warning

Did you document all properties in top-level "properties:" block?

Quoted 9 lines
Quoted 4 lines

Yes, I have,

Can you suggest a couple of examples to follow?
I looked at some of the YAML files but could not fix my issue.

99% of bindings. Look also at example-schema.

You can also attach here complete patch for fast look / short review.

Please find the modified patch, I have tried a few things but none resolve the binding warning.
I am not able to debug this.

-Thanks
Anand -----8<----------8<----------8<----------8<----------8<----------8<-----

(quoted diff) +0 -0

b/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml index ee08b9c3721f..7f75fa3c1945 100644

Documentation/devicetree/bindings/usb/genesys,gl850g.yaml +63 -4

86 lines not on this page · raw message

#12 lore raw

Re: [PATCH v6 1/2] dt-bindings: usb: Add the binding example for the Genesys Logic GL3523 hub

Quoted 44 lines · Anand Moon

Hi Krzysztof,

Quoted 40 lines · Krzysztof Kozlowski
Quoted 37 lines · Anand Moon

Hi Krzysztof,

Quoted 21 lines · Krzysztof Kozlowski
Quoted 19 lines · Anand Moon
Quoted 19 lines
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines

If I move reset-gpios to required, I observe the below warning.

DTC_CHK Documentation/devicetree/bindings/usb/maxim,max33359.example.dtb
/home/alarm/linux-amlogic-5.y-devel/Documentation/devicetree/bindings/usb/usb-device.example.dtb:
hub@1: 'reset-gpio' is a required property
from schema $id: http://devicetree.org/schemas/usb/genesys,gl850g.yaml#

Quoted 8 lines
Quoted 5 lines

Where are the properties defined? If you open the binding you see:
nowhere. You cannot define properties in some variant with "true". Please define all of them in top-level and only narrow/constrain when applicable.

What I meant is the example below, required meant applicable for both the binding
But it shows me the above warning.

My explanation stands... So again:

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Quoted 2 lines
Quoted 2 lines

Please define all of them in top-level and only narrow/constrain when applicable.

Apologies, But I have tried this multiple times but have not been able to fix the device tree warning

Did you document all properties in top-level "properties:" block?

Yes, I have,

Can you suggest a couple of examples to follow?
I looked at some of the YAML files but could not fix my issue.

Quoted 8 lines
Quoted 4 lines

99% of bindings. Look also at example-schema.

You can also attach here complete patch for fast look / short review.

Please find the modified patch, I have tried a few things but none resolve the binding warning.
I am not able to debug this.

And where is the warning or the issue? Can you describe what problem do you have?

Quoted 55 lines

-Thanks
Anand -----8<----------8<----------8<----------8<----------8<----------8<-----

Documentation/devicetree/bindings/usb/genesys,gl850g.yaml +27 -4
index ee08b9c3721f..7f75fa3c1945 100644
@@ -9,9 +9,6 @@ title: Genesys Logic USB hub controller
 maintainers:
   - Icenowy Zheng <[email protected]>
 
-allOf:
-  - $ref: usb-device.yaml#
-
 properties:
   compatible:
     enum:
@@ -27,11 +24,47 @@ properties:
 
   vdd-supply:
     description:
-      the regulator that provides 3.3V core power to the hub.
+      The regulator that provides 3.3V or 5.0V core power to the hub.
+
+  peer-hub:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description:
+      For onboard hub controllers that support USB 3.x and USB 2.0 hubs with
+      shared resets and power supplies, this property is used to identify the
+      hubs with which these are shared.
 
 required:
   - compatible
   - reg
+  - vdd-supply
+  - reset-gpios
+  - peer-hub
+
+allOf:
+  - $ref: usb-device.yaml#
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - usb5e3,608
+    then:
+      properties:
+        peer-hub: false
+        vdd-supply: false
+
+  - if:

Documentation/devicetree/bindings/usb/genesys,gl850g.yaml properties: · line 67

Quoted 10 lines
Documentation/devicetree/bindings/usb/genesys,gl850g.yaml +10 -0
+      properties:
+        compatible:
+          contains:
+            enum:
+              - usb5e3,610
+              - usb5e3,620
+    then:
+      properties:
+        peer-hub: true
+        vdd-supply: true

Drop this if:, redundant.

Best regards,
Krzysztof

author
#13 lore raw

Re: [PATCH v6 1/2] dt-bindings: usb: Add the binding example for the Genesys Logic GL3523 hub

Hi Krzysztof,

Quoted 51 lines · Krzysztof Kozlowski
Quoted 49 lines · Anand Moon

Hi Krzysztof,

Quoted 44 lines · Krzysztof Kozlowski
Quoted 31 lines · Anand Moon

Hi Krzysztof,

Quoted 27 lines · Krzysztof Kozlowski
Quoted 24 lines · Anand Moon
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 7 lines

If I move reset-gpios to required, I observe the below warning.

DTC_CHK Documentation/devicetree/bindings/usb/maxim,max33359.example.dtb
/home/alarm/linux-amlogic-5.y-devel/Documentation/devicetree/bindings/usb/usb-device.example.dtb:
hub@1: 'reset-gpio' is a required property
from schema $id: http://devicetree.org/schemas/usb/genesys,gl850g.yaml#

Where are the properties defined? If you open the binding you see:
nowhere. You cannot define properties in some variant with "true". Please define all of them in top-level and only narrow/constrain when applicable.

Quoted 9 lines
Quoted 3 lines

What I meant is the example below, required meant applicable for both the binding
But it shows me the above warning.

My explanation stands... So again:

Quoted 2 lines
Quoted 2 lines

Please define all of them in top-level and only narrow/constrain when applicable.

Apologies, But I have tried this multiple times but have not been able to fix the device tree warning

Quoted 6 lines
Quoted 2 lines

Did you document all properties in top-level "properties:" block?

Yes, I have,

Can you suggest a couple of examples to follow?
I looked at some of the YAML files but could not fix my issue.

99% of bindings. Look also at example-schema.

You can also attach here complete patch for fast look / short review.

Quoted 6 lines
Quoted 3 lines

Please find the modified patch, I have tried a few things but none resolve the binding warning.
I am not able to debug this.

And where is the warning or the issue? Can you describe what problem do you have?

Here is the list of warnings I observed with this patch

DTC_CHK Documentation/devicetree/bindings/usb/nvidia,tegra186-xusb.example.dtb
/home/amoon/mainline/linux-amlogic-6.y-devel/Documentation/devicetree/bindings/usb/usb-device.example.dtb:
hub@1: 'vdd-supply' is a required property
from schema $id: http://devicetree.org/schemas/usb/genesys,gl850g.yaml#
/home/amoon/mainline/linux-amlogic-6.y-devel/Documentation/devicetree/bindings/usb/usb-device.example.dtb:
hub@1: 'reset-gpios' is a required property
from schema $id: http://devicetree.org/schemas/usb/genesys,gl850g.yaml#
/home/amoon/mainline/linux-amlogic-6.y-devel/Documentation/devicetree/bindings/usb/usb-device.example.dtb:
hub@1: 'peer-hub' is a required property
from schema $id: http://devicetree.org/schemas/usb/genesys,gl850g.yaml#
DTC_CHK Documentation/devicetree/bindings/usb/ti,tps6598x.example.dtb
DTC_CHK Documentation/devicetree/bindings/usb/xlnx,usb2.example.dtb
DTC_CHK Documentation/devicetree/bindings/usb/renesas,usb-xhci.example.dtb
DTC_CHK Documentation/devicetree/bindings/usb/renesas,usbhs.example.dtb
DTC_CHK Documentation/devicetree/bindings/usb/brcm,bcm7445-ehci.example.dtb
DTC_CHK Documentation/devicetree/bindings/usb/cypress,cypd4226.example.dtb
DTC_CHK Documentation/devicetree/bindings/usb/cdns,usb3.example.dtb
DTC_CHK Documentation/devicetree/bindings/usb/renesas,rzn1-usbf.example.dtb
DTC_CHK Documentation/devicetree/bindings/usb/nvidia,tegra124-xusb.example.dtb
DTC_CHK Documentation/devicetree/bindings/usb/ci-hdrc-usb2.example.dtb
DTC_CHK Documentation/devicetree/bindings/usb/brcm,usb-pinmap.example.dtb
DTC_CHK Documentation/devicetree/bindings/usb/renesas,usb3-peri.example.dtb
DTC_CHK Documentation/devicetree/bindings/usb/qcom,pmic-typec.example.dtb
DTC_CHK Documentation/devicetree/bindings/usb/microchip,usb5744.example.dtb
DTC_CHK Documentation/devicetree/bindings/usb/smsc,usb3503.example.dtb
DTC_CHK Documentation/devicetree/bindings/usb/mediatek,musb.example.dtb
DTC_CHK Documentation/devicetree/bindings/usb/vialab,vl817.example.dtb
DTC_CHK Documentation/devicetree/bindings/usb/marvell,pxau2o-ehci.example.dtb
DTC_CHK Documentation/devicetree/bindings/usb/richtek,rt1711h.example.dtb
DTC_CHK Documentation/devicetree/bindings/usb/usb.example.dtb
DTC_CHK Documentation/devicetree/bindings/usb/realtek,rts5411.example.dtb
DTC_CHK Documentation/devicetree/bindings/usb/nvidia,tegra210-xusb.example.dtb
DTC_CHK Documentation/devicetree/bindings/usb/realtek,rtd-dwc3.example.dtb
DTC_CHK Documentation/devicetree/bindings/usb/usb-drd.example.dtb
DTC_CHK Documentation/devicetree/bindings/usb/genesys,gl850g.example.dtb
DTC_CHK Documentation/devicetree/bindings/usb/ti,j721e-usb.example.dtb
DTC_CHK Documentation/devicetree/bindings/usb/ti,am62-usb.example.dtb
/home/amoon/mainline/linux-amlogic-6.y-devel/Documentation/devicetree/bindings/usb/genesys,gl850g.example.dtb:
hub@1: 'vdd-supply' is a required property
from schema $id: http://devicetree.org/schemas/usb/genesys,gl850g.yaml#
/home/amoon/mainline/linux-amlogic-6.y-devel/Documentation/devicetree/bindings/usb/genesys,gl850g.example.dtb:
hub@1: 'peer-hub' is a required property
from schema $id: http://devicetree.org/schemas/usb/genesys,gl850g.yaml#
DTC_CHK Documentation/devicetree/bindings/usb/renesas,rzv2m-usb3drd.example.dtb
DTC_CHK Documentation/devicetree/bindings/usb/usb-hcd.example.dtb
DTC_CHK Documentation/devicetree/bindings/usb/fsl,imx8mq-dwc3.example.dtb
DTC_CHK Documentation/devicetree/bindings/usb/mediatek,mtu3.example.dtb
/home/amoon/mainline/linux-amlogic-6.y-devel/Documentation/devicetree/bindings/usb/usb-hcd.example.dtb:
hub@1: 'vdd-supply' is a required property
from schema $id: http://devicetree.org/schemas/usb/genesys,gl850g.yaml#
/home/amoon/mainline/linux-amlogic-6.y-devel/Documentation/devicetree/bindings/usb/usb-hcd.example.dtb:
hub@1: 'reset-gpios' is a required property
from schema $id: http://devicetree.org/schemas/usb/genesys,gl850g.yaml#
/home/amoon/mainline/linux-amlogic-6.y-devel/Documentation/devicetree/bindings/usb/usb-hcd.example.dtb:
hub@1: 'peer-hub' is a required property
from schema $id: http://devicetree.org/schemas/usb/genesys,gl850g.yaml#
DTC_CHK Documentation/devicetree/bindings/usb/nxp,isp1760.example.dtb

Quoted 60 lines
Quoted 60 lines

-Thanks
Anand -----8<----------8<----------8<----------8<----------8<----------8<-----

Documentation/devicetree/bindings/usb/genesys,gl850g.yaml +31 -4
index ee08b9c3721f..7f75fa3c1945 100644
@@ -9,9 +9,6 @@ title: Genesys Logic USB hub controller
 maintainers:
   - Icenowy Zheng <[email protected]>
 
-allOf:
-  - $ref: usb-device.yaml#
-
 properties:
   compatible:
     enum:
@@ -27,11 +24,47 @@ properties:
 
   vdd-supply:
     description:
-      the regulator that provides 3.3V core power to the hub.
+      The regulator that provides 3.3V or 5.0V core power to the hub.
+
+  peer-hub:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description:
+      For onboard hub controllers that support USB 3.x and USB 2.0 hubs with
+      shared resets and power supplies, this property is used to identify the
+      hubs with which these are shared.
 
 required:
   - compatible
   - reg
+  - vdd-supply
+  - reset-gpios
+  - peer-hub
+
+allOf:
+  - $ref: usb-device.yaml#
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - usb5e3,608
+    then:
+      properties:
+        peer-hub: false
+        vdd-supply: false
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
Quoted 9 lines

Documentation/devicetree/bindings/usb/genesys,gl850g.yaml properties: · line 67

Quoted 6 lines
Documentation/devicetree/bindings/usb/genesys,gl850g.yaml +6 -0
+              - usb5e3,610
+              - usb5e3,620
+    then:
+      properties:
+        peer-hub: true
+        vdd-supply: true

Drop this if:, redundant.

No, this does not resolve the above issue.

Quoted 1 line

Thanks
-Anand

#14 lore raw

Re: [PATCH v6 1/2] dt-bindings: usb: Add the binding example for the Genesys Logic GL3523 hub

Quoted 6 lines · Anand Moon

Here is the list of warnings I observed with this patch

DTC_CHK Documentation/devicetree/bindings/usb/nvidia,tegra186-xusb.example.dtb
/home/amoon/mainline/linux-amlogic-6.y-devel/Documentation/devicetree/bindings/usb/usb-device.example.dtb:
hub@1: 'vdd-supply' is a required property

You always require the property, but it is not valid for some devices. Just require it only where it is applicable (in if:then: clause).

Quoted 6 lines

from schema $id: http://devicetree.org/schemas/usb/genesys,gl850g.yaml#
/home/amoon/mainline/linux-amlogic-6.y-devel/Documentation/devicetree/bindings/usb/usb-device.example.dtb:
hub@1: 'reset-gpios' is a required property
from schema $id: http://devicetree.org/schemas/usb/genesys,gl850g.yaml#
/home/amoon/mainline/linux-amlogic-6.y-devel/Documentation/devicetree/bindings/usb/usb-device.example.dtb:
hub@1: 'peer-hub' is a required property

...

Quoted 12 lines
Quoted 12 lines
Quoted 11 lines
Documentation/devicetree/bindings/usb/genesys,gl850g.yaml +11 -0
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - usb5e3,610
+              - usb5e3,620
+    then:
+      properties:
+        peer-hub: true
+        vdd-supply: true
Quoted 3 lines
Quoted 2 lines

Drop this if:, redundant.

No, this does not resolve the above issue.

It shouldn't resolve it, not related.

Best regards,
Krzysztof

author
#15 lore raw

Re: [PATCH v6 1/2] dt-bindings: usb: Add the binding example for the Genesys Logic GL3523 hub

Hi Krzysztof,

Quoted 12 lines · Krzysztof Kozlowski
Quoted 6 lines · Anand Moon

Here is the list of warnings I observed with this patch

DTC_CHK Documentation/devicetree/bindings/usb/nvidia,tegra186-xusb.example.dtb
/home/amoon/mainline/linux-amlogic-6.y-devel/Documentation/devicetree/bindings/usb/usb-device.example.dtb:
hub@1: 'vdd-supply' is a required property

You always require the property, but it is not valid for some devices. Just require it only where it is applicable (in if:then: clause).

I had already done this check many times before.
my v6 original patch was doing the same and it passed all the tests but since I updated the required field it not parsing correctly.

required:
- compatible
- reg
- vdd-supply
- reset-gpios
- peer-hub

Quoted 22 lines
Quoted 7 lines

from schema $id: http://devicetree.org/schemas/usb/genesys,gl850g.yaml#
/home/amoon/mainline/linux-amlogic-6.y-devel/Documentation/devicetree/bindings/usb/usb-device.example.dtb:
hub@1: 'reset-gpios' is a required property
from schema $id: http://devicetree.org/schemas/usb/genesys,gl850g.yaml#
/home/amoon/mainline/linux-amlogic-6.y-devel/Documentation/devicetree/bindings/usb/usb-device.example.dtb:
hub@1: 'peer-hub' is a required property

...

Quoted 12 lines
Quoted 12 lines
Quoted 11 lines
Documentation/devicetree/bindings/usb/genesys,gl850g.yaml +11 -0
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - usb5e3,610
+              - usb5e3,620
+    then:
+      properties:
+        peer-hub: true
+        vdd-supply: true
Quoted 6 lines
Quoted 3 lines
Quoted 2 lines

Drop this if:, redundant.

No, this does not resolve the above issue.

It shouldn't resolve it, not related.

ok

Quoted 3 lines

Best regards,
Krzysztof

Thanks
-Anand

#16 lore raw

Re: [PATCH v6 1/2] dt-bindings: usb: Add the binding example for the Genesys Logic GL3523 hub

Quoted 9 lines · Anand Moon

Hi Krzysztof,

Quoted 5 lines · Krzysztof Kozlowski
Quoted 3 lines · Anand Moon

Here is the list of warnings I observed with this patch

Quoted 8 lines
Quoted 7 lines
Quoted 3 lines

DTC_CHK Documentation/devicetree/bindings/usb/nvidia,tegra186-xusb.example.dtb
/home/amoon/mainline/linux-amlogic-6.y-devel/Documentation/devicetree/bindings/usb/usb-device.example.dtb:
hub@1: 'vdd-supply' is a required property

You always require the property, but it is not valid for some devices. Just require it only where it is applicable (in if:then: clause).

I had already done this check many times before.

I don't ask you to check. I ask you to change the code.

Quoted 2 lines

my v6 original patch was doing the same and it passed all the tests but since I updated the required field it not parsing correctly.

Your original v6 patch was different. I don't understand what you are trying to achieve. Or rather: how is it different, that my simple advice above does not work for you (as in the past you reply with some really unrelated sentence).

Best regards,
Krzysztof

author
#17 lore raw

Re: [PATCH v6 1/2] dt-bindings: usb: Add the binding example for the Genesys Logic GL3523 hub

Hi Krzysztof,

Quoted 15 lines · Krzysztof Kozlowski
Quoted 13 lines · Anand Moon

Hi Krzysztof,

Quoted 9 lines · Krzysztof Kozlowski
Quoted 6 lines · Anand Moon

Here is the list of warnings I observed with this patch

DTC_CHK Documentation/devicetree/bindings/usb/nvidia,tegra186-xusb.example.dtb
/home/amoon/mainline/linux-amlogic-6.y-devel/Documentation/devicetree/bindings/usb/usb-device.example.dtb:
hub@1: 'vdd-supply' is a required property

Quoted 7 lines
Quoted 4 lines
Quoted 3 lines

You always require the property, but it is not valid for some devices. Just require it only where it is applicable (in if:then: clause).

I had already done this check many times before.

I don't ask you to check. I ask you to change the code.

I have tried this and it's not working for me.

Quoted 8 lines
Quoted 2 lines

my v6 original patch was doing the same and it passed all the tests but since I updated the required field it not parsing correctly.

Your original v6 patch was different. I don't understand what you are trying to achieve. Or rather: how is it different, that my simple advice above does not work for you (as in the past you reply with some really unrelated sentence).

Ok, It's my poor English grammar, thanks for your review comments.

Quoted 3 lines

Best regards,
Krzysztof

Thanks
-Anand

author
#18 lore raw

Re: [PATCH v6 1/2] dt-bindings: usb: Add the binding example for the Genesys Logic GL3523 hub

Hi Krzysztof,

Quoted 32 lines · Anand Moon

Hi Krzysztof,

Quoted 15 lines · Krzysztof Kozlowski
Quoted 13 lines · Anand Moon

Hi Krzysztof,

Quoted 9 lines · Krzysztof Kozlowski
Quoted 6 lines · Anand Moon

Here is the list of warnings I observed with this patch

DTC_CHK Documentation/devicetree/bindings/usb/nvidia,tegra186-xusb.example.dtb
/home/amoon/mainline/linux-amlogic-6.y-devel/Documentation/devicetree/bindings/usb/usb-device.example.dtb:
hub@1: 'vdd-supply' is a required property

Quoted 7 lines
Quoted 4 lines
Quoted 3 lines

You always require the property, but it is not valid for some devices. Just require it only where it is applicable (in if:then: clause).

I had already done this check many times before.

I don't ask you to check. I ask you to change the code.

I have tried this and it's not working for me.

Quoted 3 lines
Quoted 2 lines

my v6 original patch was doing the same and it passed all the tests but since I updated the required field it not parsing correctly.

Quoted 10 lines
Quoted 5 lines

Your original v6 patch was different. I don't understand what you are trying to achieve. Or rather: how is it different, that my simple advice above does not work for you (as in the past you reply with some really unrelated sentence).

Ok, It's my poor English grammar, thanks for your review comments.

Quoted 3 lines

Best regards,
Krzysztof

Any reason this device tree binding got removed,I cannot find this file Can not find the commit which removed this file.

[0] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/usb?h=v6.9-rc2

Thanks
-Anand

#19 lore raw

Re: [PATCH v6 1/2] dt-bindings: usb: Add the binding example for the Genesys Logic GL3523 hub

Quoted 40 lines · Anand Moon

Hi Krzysztof,

Quoted 37 lines · Anand Moon

Hi Krzysztof,

Quoted 15 lines · Krzysztof Kozlowski
Quoted 13 lines · Anand Moon

Hi Krzysztof,

Quoted 9 lines · Krzysztof Kozlowski
Quoted 6 lines · Anand Moon

Here is the list of warnings I observed with this patch

DTC_CHK Documentation/devicetree/bindings/usb/nvidia,tegra186-xusb.example.dtb
/home/amoon/mainline/linux-amlogic-6.y-devel/Documentation/devicetree/bindings/usb/usb-device.example.dtb:
hub@1: 'vdd-supply' is a required property

Quoted 7 lines
Quoted 4 lines
Quoted 3 lines

You always require the property, but it is not valid for some devices. Just require it only where it is applicable (in if:then: clause).

I had already done this check many times before.

I don't ask you to check. I ask you to change the code.

I have tried this and it's not working for me.

Quoted 8 lines
Quoted 2 lines

my v6 original patch was doing the same and it passed all the tests but since I updated the required field it not parsing correctly.

Your original v6 patch was different. I don't understand what you are trying to achieve. Or rather: how is it different, that my simple advice above does not work for you (as in the past you reply with some really unrelated sentence).

Quoted 8 lines
Quoted 5 lines

Ok, It's my poor English grammar, thanks for your review comments.

Quoted 3 lines

Best regards,
Krzysztof

Any reason this device tree binding got removed,I cannot find this file Can not find the commit which removed this file.

Use git log.

Best regards,
Krzysztof

author
#20 lore raw

Re: [PATCH v6 1/2] dt-bindings: usb: Add the binding example for the Genesys Logic GL3523 hub

Hi,

Quoted 56 lines · Krzysztof Kozlowski
Quoted 40 lines · Anand Moon

Hi Krzysztof,

Quoted 37 lines · Anand Moon

Hi Krzysztof,

Quoted 15 lines · Krzysztof Kozlowski
Quoted 13 lines · Anand Moon

Hi Krzysztof,

Quoted 9 lines · Krzysztof Kozlowski
Quoted 6 lines · Anand Moon

Here is the list of warnings I observed with this patch

DTC_CHK Documentation/devicetree/bindings/usb/nvidia,tegra186-xusb.example.dtb
/home/amoon/mainline/linux-amlogic-6.y-devel/Documentation/devicetree/bindings/usb/usb-device.example.dtb:
hub@1: 'vdd-supply' is a required property

Quoted 7 lines
Quoted 4 lines
Quoted 3 lines

You always require the property, but it is not valid for some devices. Just require it only where it is applicable (in if:then: clause).

I had already done this check many times before.

I don't ask you to check. I ask you to change the code.

I have tried this and it's not working for me.

Quoted 8 lines
Quoted 2 lines

my v6 original patch was doing the same and it passed all the tests but since I updated the required field it not parsing correctly.

Your original v6 patch was different. I don't understand what you are trying to achieve. Or rather: how is it different, that my simple advice above does not work for you (as in the past you reply with some really unrelated sentence).

Quoted 8 lines
Quoted 5 lines

Ok, It's my poor English grammar, thanks for your review comments.

Quoted 3 lines

Best regards,
Krzysztof

Any reason this device tree binding got removed,I cannot find this file Can not find the commit which removed this file.

Use git log.

Best regards,
Krzysztof

author
#21 lore raw

Re: [PATCH v6 1/2] dt-bindings: usb: Add the binding example for the Genesys Logic GL3523 hub

Hi Krzysztof,

Quoted 58 lines · Anand Moon

Hi,

Quoted 53 lines · Krzysztof Kozlowski
Quoted 40 lines · Anand Moon

Hi Krzysztof,

Quoted 37 lines · Anand Moon

Hi Krzysztof,

Quoted 15 lines · Krzysztof Kozlowski
Quoted 13 lines · Anand Moon

Hi Krzysztof,

Quoted 9 lines · Krzysztof Kozlowski
Quoted 6 lines · Anand Moon

Here is the list of warnings I observed with this patch

DTC_CHK Documentation/devicetree/bindings/usb/nvidia,tegra186-xusb.example.dtb
/home/amoon/mainline/linux-amlogic-6.y-devel/Documentation/devicetree/bindings/usb/usb-device.example.dtb:
hub@1: 'vdd-supply' is a required property

Quoted 7 lines
Quoted 4 lines
Quoted 3 lines

You always require the property, but it is not valid for some devices. Just require it only where it is applicable (in if:then: clause).

I had already done this check many times before.

I don't ask you to check. I ask you to change the code.

I have tried this and it's not working for me.

Quoted 8 lines
Quoted 2 lines

my v6 original patch was doing the same and it passed all the tests but since I updated the required field it not parsing correctly.

Your original v6 patch was different. I don't understand what you are trying to achieve. Or rather: how is it different, that my simple advice above does not work for you (as in the past you reply with some really unrelated sentence).

Quoted 8 lines
Quoted 5 lines

Ok, It's my poor English grammar, thanks for your review comments.

Quoted 3 lines

Best regards,
Krzysztof

Any reason this device tree binding got removed,I cannot find this file Can not find the commit which removed this file.

Use git log.

I got confused with the file name and my local changes.

Quoted 3 lines
Quoted 3 lines

Best regards,
Krzysztof

Thanks
-Anand

author
#22 lore raw

PATCH v6 2/2 arm64: dts: amlogic: Used onboard usb hub reset on odroid n2

In reply to Anand Moon

On Odroid n2/n2+ previously use gpio-hog to reset the usb hub, switch to used on-board usb hub reset to enable the usb hub and enable power to hub.

---
V6:none
V5:none
V4:none
V3:none
V2:none
V1:none

---
 .../dts/amlogic/meson-g12b-odroid-n2.dtsi     | 36 ++++++++++++-------
 1 file changed, 24 insertions(+), 12 deletions(-)
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi +24 -12
index 91c9769fda20..9e671444eca6 100644
@@ -31,6 +31,30 @@ hub_5v: regulator-hub_5v {
 		enable-active-high;
 	};
 
+	/* USB hub supports both USB 2.0 and USB 3.0 root hub */
+	usb-hub {
+		dr_mode = "host";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		/* 2.0 hub on port 1 */
+		hub_2_0: hub@1 {
+			compatible = "usb5e3,610";
+			reg = <1>;
+			peer-hub = <&hub_3_0>;
+			vdd-supply = <&usb_pwr_en>;
+		};
+
+		/* 3.0 hub on port 4 */
+		hub_3_0: hub@2 {
+			compatible = "usb5e3,620";
+			reg = <2>;
+			peer-hub = <&hub_2_0>;
+			reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>;
+			vdd-supply = <&vcc_5v>;
+		};
+	};
+
 	sound {
 		compatible = "amlogic,axg-sound-card";
 		model = "ODROID-N2";
@@ -234,18 +258,6 @@ &gpio {
 		"PIN_3",  /* GPIOX_17 */
 		"PIN_5",  /* GPIOX_18 */
 		"PIN_36"; /* GPIOX_19 */
-	/*
-	 * WARNING: The USB Hub on the Odroid-N2 needs a reset signal
-	 * to be turned high in order to be detected by the USB Controller
-	 * This signal should be handled by a USB specific power sequence
-	 * in order to reset the Hub when USB bus is powered down.
-	 */
-	usb-hub-hog {
-		gpio-hog;
-		gpios = <GPIOH_4 GPIO_ACTIVE_HIGH>;
-		output-high;
-		line-name = "usb-hub-reset";
-	};
 };
 
 &i2c3 {
Signature · 1 line
2.42.0