devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 01/11] dt-bindings: usb: Add device id for Genesys Logic hub controller
       [not found] <20221228100321.15949-1-linux.amoon@gmail.com>
@ 2022-12-28 10:03 ` Anand Moon
  2022-12-28 10:08   ` Icenowy Zheng
  2022-12-28 15:08   ` Krzysztof Kozlowski
  2022-12-28 10:03 ` [PATCH v1 02/11] ARM: dts: amlogic: Used onboard usb hub reset to enable usb hub Anand Moon
                   ` (5 subsequent siblings)
  6 siblings, 2 replies; 30+ messages in thread
From: Anand Moon @ 2022-12-28 10:03 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski, Icenowy Zheng
  Cc: linux-amlogic, linux-usb, devicetree, linux-kernel

Add usb hub device id for Genesys Logic, Inc. GL852G-OHG Hub USB 2.0
root hub and Genesys Logic, Inc. GL3523-QFN76 USB 3.1 root hub.

Signed-off-by: Anand Moon <linux.amoon@gmail.com>
---
 Documentation/devicetree/bindings/usb/genesys,gl850g.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml b/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml
index a9f831448cca..db009f3ef438 100644
--- a/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml
+++ b/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml
@@ -16,6 +16,8 @@ properties:
   compatible:
     enum:
       - usb5e3,608
+      - genesys,usb5e3,610
+      - genesys,usb5e3,620
 
   reg: true
 
-- 
2.38.1


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v1 02/11] ARM: dts: amlogic: Used onboard usb hub reset to enable usb hub
       [not found] <20221228100321.15949-1-linux.amoon@gmail.com>
  2022-12-28 10:03 ` [PATCH v1 01/11] dt-bindings: usb: Add device id for Genesys Logic hub controller Anand Moon
@ 2022-12-28 10:03 ` Anand Moon
  2022-12-28 15:08   ` Krzysztof Kozlowski
  2022-12-28 10:03 ` [PATCH v1 03/11] arm64: dts: amlogic: Used onboard usb hub reset on odroid c2 Anand Moon
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 30+ messages in thread
From: Anand Moon @ 2022-12-28 10:03 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Neil Armstrong, Kevin Hilman,
	Jerome Brunet, Martin Blumenstingl
  Cc: linux-amlogic, devicetree, linux-arm-kernel, linux-kernel

On Odroid c1 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 usb hub.

Add usb hub regulator as per the schematic.

Signed-off-by: Anand Moon <linux.amoon@gmail.com>
---
 arch/arm/boot/dts/meson8b-odroidc1.dts | 40 +++++++++++++++++---------
 1 file changed, 27 insertions(+), 13 deletions(-)

diff --git a/arch/arm/boot/dts/meson8b-odroidc1.dts b/arch/arm/boot/dts/meson8b-odroidc1.dts
index 04356bc639fa..3b29169aac43 100644
--- a/arch/arm/boot/dts/meson8b-odroidc1.dts
+++ b/arch/arm/boot/dts/meson8b-odroidc1.dts
@@ -185,6 +185,33 @@ vdd_rtc: regulator-vdd-rtc {
 
 		vin-supply = <&vcc_3v3>;
 	};
+
+	usb_otg_pwr: regulator-usb-pwrs {
+		compatible = "regulator-fixed";
+		regulator-name = "USB_OTG_PWR";
+
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+
+		/* signal name from schematics: PWREN */
+		gpio = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+		vin-supply = <&p5v0>;
+	};
+
+	usb {
+		dr_mode = "host";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		hub@1 {
+			/* Genesys Logic GL852G-OHG usb hub */
+			compatible = "genesys,usb5e3,610";
+			reg = <1>;
+			vdd-supply = <&usb_otg_pwr>;
+			reset-gpio = <&gpio_ao GPIOAO_4 GPIO_ACTIVE_LOW>;
+		};
+	};
 };
 
 &cpu0 {
@@ -281,19 +308,6 @@ &gpio_ao {
 			  "J7 Header Pin 6", "J7 Header Pin 5",
 			  "J7 Header Pin 7", "HDMI_CEC",
 			  "SYS_LED", "", "";
-
-	/*
-	 * WARNING: The USB Hub on the Odroid-C1/C1+ 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 {
-		gpio-hog;
-		gpios = <GPIOAO_4 GPIO_ACTIVE_HIGH>;
-		output-high;
-		line-name = "usb-hub-reset";
-	};
 };
 
 &ir_receiver {
-- 
2.38.1


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v1 03/11] arm64: dts: amlogic: Used onboard usb hub reset on odroid c2
       [not found] <20221228100321.15949-1-linux.amoon@gmail.com>
  2022-12-28 10:03 ` [PATCH v1 01/11] dt-bindings: usb: Add device id for Genesys Logic hub controller Anand Moon
  2022-12-28 10:03 ` [PATCH v1 02/11] ARM: dts: amlogic: Used onboard usb hub reset to enable usb hub Anand Moon
@ 2022-12-28 10:03 ` Anand Moon
  2022-12-28 12:51   ` Martin Blumenstingl
  2022-12-28 10:03 ` [PATCH v1 04/11] arm64: dts: amlogic: Used onboard usb hub reset on odroid n2 Anand Moon
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 30+ messages in thread
From: Anand Moon @ 2022-12-28 10:03 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Neil Armstrong, Kevin Hilman,
	Jerome Brunet, Martin Blumenstingl
  Cc: linux-amlogic, devicetree, linux-arm-kernel, linux-kernel

On Odroid c2 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.

Signed-off-by: Anand Moon <linux.amoon@gmail.com>
---
 .../boot/dts/amlogic/meson-gxbb-odroidc2.dts  | 29 +++++++++----------
 1 file changed, 14 insertions(+), 15 deletions(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
index 201596247fd9..3d3e61cf65a8 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
@@ -208,6 +208,20 @@ codec-0 {
 			};
 		};
 	};
+
+	usb {
+		dr_mode = "host";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		hub@1 {
+			/* Genesys Logic GL852G-OHG usb hub */
+			compatible = "genesys,usb5e3,610";
+			reg = <1>;
+			vdd-supply = <&usb_otg_pwr>;
+			reset-gpio = <&gpio_ao GPIOAO_4 GPIO_ACTIVE_LOW>;
+		};
+	};
 };
 
 &aiu {
@@ -250,21 +264,6 @@ eth_phy0: ethernet-phy@0 {
 	};
 };
 
-&gpio_ao {
-	/*
-	 * WARNING: The USB Hub on the Odroid-C2 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.
-	 */
-	hog-0 {
-		gpio-hog;
-		gpios = <GPIOAO_4 GPIO_ACTIVE_HIGH>;
-		output-high;
-		line-name = "usb-hub-reset";
-	};
-};
-
 &hdmi_tx {
 	status = "okay";
 	pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
-- 
2.38.1


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v1 04/11] arm64: dts: amlogic: Used onboard usb hub reset on odroid n2
       [not found] <20221228100321.15949-1-linux.amoon@gmail.com>
                   ` (2 preceding siblings ...)
  2022-12-28 10:03 ` [PATCH v1 03/11] arm64: dts: amlogic: Used onboard usb hub reset on odroid c2 Anand Moon
@ 2022-12-28 10:03 ` Anand Moon
  2022-12-28 10:03 ` [PATCH v1 07/11] vendor-prefixes: Add VIA Labs, Inc Anand Moon
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 30+ messages in thread
From: Anand Moon @ 2022-12-28 10:03 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Neil Armstrong, Kevin Hilman,
	Jerome Brunet, Martin Blumenstingl
  Cc: linux-amlogic, devicetree, linux-arm-kernel, linux-kernel

On Odroid 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.

Signed-off-by: Anand Moon <linux.amoon@gmail.com>
---
 .../dts/amlogic/meson-g12b-odroid-n2.dtsi     | 26 ++++++++++---------
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
index 667d2b774924..e5ae885c4008 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
@@ -347,6 +347,20 @@ codec {
 			};
 		};
 	};
+
+	usb {
+		dr_mode = "host";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		hub: hub@1 {
+			/* Genesys Logic GL3523-QFN76 usb hub*/
+			compatible = "genesys,usb5e3,620";
+			reg = <1>;
+			vdd-supply = <&hub_5v>;
+			reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>;
+		};
+	};
 };
 
 &acodec {
@@ -535,18 +549,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.
-	 */
-	hog-0 {
-		gpio-hog;
-		gpios = <GPIOH_4 GPIO_ACTIVE_HIGH>;
-		output-high;
-		line-name = "usb-hub-reset";
-	};
 };
 
 &hdmi_tx {
-- 
2.38.1


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v1 07/11] vendor-prefixes: Add VIA Labs, Inc.
       [not found] <20221228100321.15949-1-linux.amoon@gmail.com>
                   ` (3 preceding siblings ...)
  2022-12-28 10:03 ` [PATCH v1 04/11] arm64: dts: amlogic: Used onboard usb hub reset on odroid n2 Anand Moon
@ 2022-12-28 10:03 ` Anand Moon
  2022-12-28 15:11   ` Krzysztof Kozlowski
  2022-12-28 10:03 ` [PATCH v1 08/11] dt-bindings: usb: Add binding for Via lab VL817Q7 hub controller Anand Moon
  2022-12-28 10:03 ` [PATCH v1 09/11] arm64: dts: meson-sm1-odroid-c4: Used onboard usb hub reset on odroid c4 Anand Moon
  6 siblings, 1 reply; 30+ messages in thread
From: Anand Moon @ 2022-12-28 10:03 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski
  Cc: linux-amlogic, Rob Herring, devicetree, linux-kernel

Add the vendor prefix for VIA Labs, Inc. (VLI) is a leading supplier
of USB and USB Power Delivery controllers for multi-functional devices
and platforms.

Website: https://www.via-labs.com/

Signed-off-by: Anand Moon <linux.amoon@gmail.com>
---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index 70ffb3780621..d19b7f9cef4c 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -1398,6 +1398,8 @@ patternProperties:
     description: Vertexcom Technologies, Inc.
   "^via,.*":
     description: VIA Technologies, Inc.
+  "^vialab,.*":
+    description: VIA Labs, Inc.
   "^vicor,.*":
     description: Vicor Corporation
   "^videostrong,.*":
-- 
2.38.1


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v1 08/11] dt-bindings: usb: Add binding for Via lab VL817Q7 hub controller
       [not found] <20221228100321.15949-1-linux.amoon@gmail.com>
                   ` (4 preceding siblings ...)
  2022-12-28 10:03 ` [PATCH v1 07/11] vendor-prefixes: Add VIA Labs, Inc Anand Moon
@ 2022-12-28 10:03 ` Anand Moon
  2022-12-28 11:02   ` Johan Hovold
                     ` (2 more replies)
  2022-12-28 10:03 ` [PATCH v1 09/11] arm64: dts: meson-sm1-odroid-c4: Used onboard usb hub reset on odroid c4 Anand Moon
  6 siblings, 3 replies; 30+ messages in thread
From: Anand Moon @ 2022-12-28 10:03 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski
  Cc: linux-amlogic, linux-usb, devicetree, linux-kernel

The VIA Lab VL817-Q7 is a USB 3.1 Gen 1 4-Port hub controller that
features 4 downstream ports, an internal 5V regulator and has
external reset pin.

Add a device tree binding for its USB protocol part.
The internal LDO is not covered by this and can just be modelled
as a fixed regulator.

Signed-off-by: Anand Moon <linux.amoon@gmail.com>
---
 .../bindings/usb/vialab,vl817q7.yaml          | 47 +++++++++++++++++++
 1 file changed, 47 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml

diff --git a/Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml b/Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml
new file mode 100644
index 000000000000..4ae995160fd5
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml
@@ -0,0 +1,47 @@
+# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+%YAML 1.2
+---
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Via labs VL817Q7 USB 3.1 hub controller
+
+maintainers:
+  - Anand Moon <linux.amoon@gmail.com>
+
+allOf:
+  - $ref: usb-device.yaml#
+
+properties:
+  compatible:
+    enum:
+      - vialab,usb2109
+
+  reg: true
+
+  reset-gpios:
+    description: GPIO controlling the RESET# pin.
+
+  vdd-supply:
+    description:
+      the regulator that provides 5.0V core power to the hub.
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+    usb {
+        dr_mode = "host";
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        hub: hub@1 {
+            compatible = "vialab,usb2109"
+            reg = <1>;
+            reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>;
+        };
+    };
-- 
2.38.1


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v1 09/11] arm64: dts: meson-sm1-odroid-c4: Used onboard usb hub reset on odroid c4
       [not found] <20221228100321.15949-1-linux.amoon@gmail.com>
                   ` (5 preceding siblings ...)
  2022-12-28 10:03 ` [PATCH v1 08/11] dt-bindings: usb: Add binding for Via lab VL817Q7 hub controller Anand Moon
@ 2022-12-28 10:03 ` Anand Moon
  6 siblings, 0 replies; 30+ messages in thread
From: Anand Moon @ 2022-12-28 10:03 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Neil Armstrong, Kevin Hilman,
	Jerome Brunet, Martin Blumenstingl
  Cc: linux-amlogic, devicetree, linux-arm-kernel, linux-kernel

On Odroid c4 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.

Signed-off-by: Anand Moon <linux.amoon@gmail.com>
---
 .../boot/dts/amlogic/meson-sm1-odroid-c4.dts  | 25 +++++++++----------
 1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts
index 8c30ce63686e..9b8230d6a9da 100644
--- a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts
@@ -26,20 +26,19 @@ led-blue {
 	sound {
 		model = "ODROID-C4";
 	};
-};
 
-&gpio {
-	/*
-	 * WARNING: The USB Hub on the Odroid-C4 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.
-	 */
-	hog-0 {
-		gpio-hog;
-		gpios = <GPIOH_4 GPIO_ACTIVE_HIGH>;
-		output-high;
-		line-name = "usb-hub-reset";
+	usb {
+		dr_mode = "host";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		hub: hub@1 {
+			/* Via lab VL817-Q7 usb hub */
+			compatible = "vialab,usb2109";
+			reg = <1>;
+			vdd-supply = <&usb_pwr_en>;
+			reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>;
+		};
 	};
 };
 
-- 
2.38.1


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 01/11] dt-bindings: usb: Add device id for Genesys Logic hub controller
  2022-12-28 10:03 ` [PATCH v1 01/11] dt-bindings: usb: Add device id for Genesys Logic hub controller Anand Moon
@ 2022-12-28 10:08   ` Icenowy Zheng
  2022-12-28 10:29     ` Anand Moon
  2022-12-28 15:08   ` Krzysztof Kozlowski
  1 sibling, 1 reply; 30+ messages in thread
From: Icenowy Zheng @ 2022-12-28 10:08 UTC (permalink / raw)
  To: Anand Moon, Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski
  Cc: linux-amlogic, linux-usb, devicetree, linux-kernel

在 2022-12-28星期三的 10:03 +0000,Anand Moon写道:
> Add usb hub device id for Genesys Logic, Inc. GL852G-OHG Hub USB 2.0
> root hub and Genesys Logic, Inc. GL3523-QFN76 USB 3.1 root hub.
> 
> Signed-off-by: Anand Moon <linux.amoon@gmail.com>
> ---
>  Documentation/devicetree/bindings/usb/genesys,gl850g.yaml | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git
> a/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml
> b/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml
> index a9f831448cca..db009f3ef438 100644
> --- a/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml
> +++ b/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml
> @@ -16,6 +16,8 @@ properties:
>    compatible:
>      enum:
>        - usb5e3,608
> +      - genesys,usb5e3,610
> +      - genesys,usb5e3,620

I don't think genesys, is needed here because usb5e3 means USB VID
0x05e3, which is already linked to Genesys Logic.

In addition, the control logic of these two hubs are needed to be
verified.

And what's the status of the companion hub of the USB3 hub? Is it
really a USB3-only hub, or is its USB2 part just equal to another USB3
hub?

>  
>    reg: true
>  


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 01/11] dt-bindings: usb: Add device id for Genesys Logic hub controller
  2022-12-28 10:08   ` Icenowy Zheng
@ 2022-12-28 10:29     ` Anand Moon
  2023-01-04 22:54       ` Matthias Kaehlcke
  0 siblings, 1 reply; 30+ messages in thread
From: Anand Moon @ 2022-12-28 10:29 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	linux-amlogic, linux-usb, devicetree, linux-kernel

Hi Icenowy,

Thanks for the review comments

On Wed, 28 Dec 2022 at 15:38, Icenowy Zheng <uwu@icenowy.me> wrote:
>
> 在 2022-12-28星期三的 10:03 +0000,Anand Moon写道:
> > Add usb hub device id for Genesys Logic, Inc. GL852G-OHG Hub USB 2.0
> > root hub and Genesys Logic, Inc. GL3523-QFN76 USB 3.1 root hub.
> >
> > Signed-off-by: Anand Moon <linux.amoon@gmail.com>
> > ---
> >  Documentation/devicetree/bindings/usb/genesys,gl850g.yaml | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git
> > a/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml
> > b/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml
> > index a9f831448cca..db009f3ef438 100644
> > --- a/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml
> > +++ b/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml
> > @@ -16,6 +16,8 @@ properties:
> >    compatible:
> >      enum:
> >        - usb5e3,608
> > +      - genesys,usb5e3,610
> > +      - genesys,usb5e3,620
>
> I don't think genesys, is needed here because usb5e3 means USB VID
> 0x05e3, which is already linked to Genesys Logic.
>

Ok, I added this as genesys, is it part of the manufacturer or vendor name
which is most commonly used for adding vendor-specific compatible strings.

> In addition, the control logic of these two hubs are needed to be
> verified.

We were using gpio-hog to reset the USB hub, so now switch to USB onboard hub

>
> And what's the status of the companion hub of the USB3 hub? Is it
> really a USB3-only hub, or is its USB2 part just equal to another USB3
> hub?
>
usb5e3,610 is USB 2.0 port hub present on Odroid C1 and Odroid C2 board

usb5e3,620 is USB 3.1 port hub present on Odroid N2.

> >
> >    reg: true
> >
>

Thanks
-Anand

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 08/11] dt-bindings: usb: Add binding for Via lab VL817Q7 hub controller
  2022-12-28 10:03 ` [PATCH v1 08/11] dt-bindings: usb: Add binding for Via lab VL817Q7 hub controller Anand Moon
@ 2022-12-28 11:02   ` Johan Hovold
  2022-12-28 11:09     ` Anand Moon
  2022-12-28 17:16   ` Rob Herring
  2023-01-04 22:37   ` Matthias Kaehlcke
  2 siblings, 1 reply; 30+ messages in thread
From: Johan Hovold @ 2022-12-28 11:02 UTC (permalink / raw)
  To: Anand Moon
  Cc: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	linux-amlogic, linux-usb, devicetree, linux-kernel

On Wed, Dec 28, 2022 at 10:03:17AM +0000, Anand Moon wrote:
> The VIA Lab VL817-Q7 is a USB 3.1 Gen 1 4-Port hub controller that
> features 4 downstream ports, an internal 5V regulator and has
> external reset pin.
> 
> Add a device tree binding for its USB protocol part.
> The internal LDO is not covered by this and can just be modelled
> as a fixed regulator.
> 
> Signed-off-by: Anand Moon <linux.amoon@gmail.com>
> ---
>  .../bindings/usb/vialab,vl817q7.yaml          | 47 +++++++++++++++++++
>  1 file changed, 47 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml
> 
> diff --git a/Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml b/Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml
> new file mode 100644
> index 000000000000..4ae995160fd5
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml
> @@ -0,0 +1,47 @@
> +# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
> +%YAML 1.2
> +---
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Via labs VL817Q7 USB 3.1 hub controller
> +
> +maintainers:
> +  - Anand Moon <linux.amoon@gmail.com>
> +
> +allOf:
> +  - $ref: usb-device.yaml#
> +
> +properties:
> +  compatible:
> +    enum:
> +      - vialab,usb2109

This isn't a valid compatible string for USB devices (should be
"usb<vid>,<pid>").

Same for the other binding.

Also the bindings should go before the driver changes in the series.

Johan

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 08/11] dt-bindings: usb: Add binding for Via lab VL817Q7 hub controller
  2022-12-28 11:02   ` Johan Hovold
@ 2022-12-28 11:09     ` Anand Moon
  0 siblings, 0 replies; 30+ messages in thread
From: Anand Moon @ 2022-12-28 11:09 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	linux-amlogic, linux-usb, devicetree, linux-kernel

Hi Johan

Thanks for your review comments.

On Wed, 28 Dec 2022 at 16:32, Johan Hovold <johan@kernel.org> wrote:
>
> On Wed, Dec 28, 2022 at 10:03:17AM +0000, Anand Moon wrote:
> > The VIA Lab VL817-Q7 is a USB 3.1 Gen 1 4-Port hub controller that
> > features 4 downstream ports, an internal 5V regulator and has
> > external reset pin.
> >
> > Add a device tree binding for its USB protocol part.
> > The internal LDO is not covered by this and can just be modelled
> > as a fixed regulator.
> >
> > Signed-off-by: Anand Moon <linux.amoon@gmail.com>
> > ---
> >  .../bindings/usb/vialab,vl817q7.yaml          | 47 +++++++++++++++++++
> >  1 file changed, 47 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml b/Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml
> > new file mode 100644
> > index 000000000000..4ae995160fd5
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml
> > @@ -0,0 +1,47 @@
> > +# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
> > +%YAML 1.2
> > +---
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Via labs VL817Q7 USB 3.1 hub controller
> > +
> > +maintainers:
> > +  - Anand Moon <linux.amoon@gmail.com>
> > +
> > +allOf:
> > +  - $ref: usb-device.yaml#
> > +
> > +properties:
> > +  compatible:
> > +    enum:
> > +      - vialab,usb2109
>
> This isn't a valid compatible string for USB devices (should be
> "usb<vid>,<pid>").
>
> Same for the other binding.
>

ok, I will change this in the next version.

> Also the bindings should go before the driver changes in the series.
>
> Johan

Thanks
-Anand

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 03/11] arm64: dts: amlogic: Used onboard usb hub reset on odroid c2
  2022-12-28 10:03 ` [PATCH v1 03/11] arm64: dts: amlogic: Used onboard usb hub reset on odroid c2 Anand Moon
@ 2022-12-28 12:51   ` Martin Blumenstingl
  2022-12-28 14:44     ` Anand Moon
  0 siblings, 1 reply; 30+ messages in thread
From: Martin Blumenstingl @ 2022-12-28 12:51 UTC (permalink / raw)
  To: Anand Moon
  Cc: Rob Herring, Krzysztof Kozlowski, Neil Armstrong, Kevin Hilman,
	Jerome Brunet, linux-amlogic, devicetree, linux-arm-kernel,
	linux-kernel

Hi Anand,

thank you for working on this topic!

On Wed, Dec 28, 2022 at 11:05 AM Anand Moon <linux.amoon@gmail.com> wrote:
[...]
> +       usb {
> +               dr_mode = "host";
> +               #address-cells = <1>;
> +               #size-cells = <0>;
> +
> +               hub@1 {
> +                       /* Genesys Logic GL852G-OHG usb hub */
> +                       compatible = "genesys,usb5e3,610";
> +                       reg = <1>;
> +                       vdd-supply = <&usb_otg_pwr>;
> +                       reset-gpio = <&gpio_ao GPIOAO_4 GPIO_ACTIVE_LOW>;
> +               };
> +       };
My understanding is that the hub@1 node should be part of the
corresponding USB controller node, not a new node.
In this case hub@1 should go into the existing &usb1 node. That way we
describe the way the hardware is set up (meaning: hub@1 is connected
to &usb1).

In case hub@1 is not detected within &usb1 then you may need something
like [0] (not tested for your use-case).
If that helps: feel free to include that patch in your series.


Best regards,
Martin


[0] https://github.com/xdarklight/linux/commit/d8b96e5bc9c20ab2585194e0e59580c3b062c431

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 03/11] arm64: dts: amlogic: Used onboard usb hub reset on odroid c2
  2022-12-28 12:51   ` Martin Blumenstingl
@ 2022-12-28 14:44     ` Anand Moon
  2023-01-04  8:13       ` Anand Moon
  0 siblings, 1 reply; 30+ messages in thread
From: Anand Moon @ 2022-12-28 14:44 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: Rob Herring, Krzysztof Kozlowski, Neil Armstrong, Kevin Hilman,
	Jerome Brunet, linux-amlogic, devicetree, linux-arm-kernel,
	linux-kernel

Hi Martin,

On Wed, 28 Dec 2022 at 18:21, Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
>
> Hi Anand,
>
Thanks for your review comments.

> thank you for working on this topic!
>
> On Wed, Dec 28, 2022 at 11:05 AM Anand Moon <linux.amoon@gmail.com> wrote:
> [...]
> > +       usb {
> > +               dr_mode = "host";
> > +               #address-cells = <1>;
> > +               #size-cells = <0>;
> > +
> > +               hub@1 {
> > +                       /* Genesys Logic GL852G-OHG usb hub */
> > +                       compatible = "genesys,usb5e3,610";
> > +                       reg = <1>;
> > +                       vdd-supply = <&usb_otg_pwr>;
> > +                       reset-gpio = <&gpio_ao GPIOAO_4 GPIO_ACTIVE_LOW>;
> > +               };
> > +       };
> My understanding is that the hub@1 node should be part of the
> corresponding USB controller node, not a new node.
> In this case hub@1 should go into the existing &usb1 node. That way we
> describe the way the hardware is set up (meaning: hub@1 is connected
> to &usb1).
>

Ok, I will move this code under &usb0 and &usb1 nodes.

onboard_usb_hub module just assists in usb hub reset.
so these changes are meant to replace the gpio-hog.

$ dmesg | grep onboard
[    5.405558] usbcore: registered new device driver onboard-usb-hub
[    6.383428] onboard-usb-hub 1-1: reset high-speed USB device number
2 using dwc2

Here is the boot log of the odroid c2 [0] https://pastebin.com/PFy5waPb

> In case hub@1 is not detected within &usb1 then you may need something
> like [0] (not tested for your use-case).
> If that helps: feel free to include that patch in your series.
>

Thanks, will check if this is needed in this case. As of now it just
reinitializes the hub.

>
> Best regards,
> Martin
>
>
> [0] https://github.com/xdarklight/linux/commit/d8b96e5bc9c20ab2585194e0e59580c3b062c431

Thanks
-Anand

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 01/11] dt-bindings: usb: Add device id for Genesys Logic hub controller
  2022-12-28 10:03 ` [PATCH v1 01/11] dt-bindings: usb: Add device id for Genesys Logic hub controller Anand Moon
  2022-12-28 10:08   ` Icenowy Zheng
@ 2022-12-28 15:08   ` Krzysztof Kozlowski
  2022-12-28 15:18     ` Anand Moon
  1 sibling, 1 reply; 30+ messages in thread
From: Krzysztof Kozlowski @ 2022-12-28 15:08 UTC (permalink / raw)
  To: Anand Moon, Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Icenowy Zheng
  Cc: linux-amlogic, linux-usb, devicetree, linux-kernel

On 28/12/2022 11:03, Anand Moon wrote:
> Add usb hub device id for Genesys Logic, Inc. GL852G-OHG Hub USB 2.0
> root hub and Genesys Logic, Inc. GL3523-QFN76 USB 3.1 root hub.
> 
> Signed-off-by: Anand Moon <linux.amoon@gmail.com>
> ---
>  Documentation/devicetree/bindings/usb/genesys,gl850g.yaml | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml b/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml
> index a9f831448cca..db009f3ef438 100644
> --- a/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml
> +++ b/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml
> @@ -16,6 +16,8 @@ properties:
>    compatible:
>      enum:
>        - usb5e3,608
> +      - genesys,usb5e3,610
> +      - genesys,usb5e3,620

This does not look like correct compatible. Did you test the bindings
and DTS? This should fail.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 02/11] ARM: dts: amlogic: Used onboard usb hub reset to enable usb hub
  2022-12-28 10:03 ` [PATCH v1 02/11] ARM: dts: amlogic: Used onboard usb hub reset to enable usb hub Anand Moon
@ 2022-12-28 15:08   ` Krzysztof Kozlowski
  2023-01-07 14:59     ` Anand Moon
  0 siblings, 1 reply; 30+ messages in thread
From: Krzysztof Kozlowski @ 2022-12-28 15:08 UTC (permalink / raw)
  To: Anand Moon, Rob Herring, Krzysztof Kozlowski, Neil Armstrong,
	Kevin Hilman, Jerome Brunet, Martin Blumenstingl
  Cc: linux-amlogic, devicetree, linux-arm-kernel, linux-kernel

On 28/12/2022 11:03, Anand Moon wrote:
> On Odroid c1 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 usb hub.
> 
> Add usb hub regulator as per the schematic.
> 
> Signed-off-by: Anand Moon <linux.amoon@gmail.com>
> ---
>  arch/arm/boot/dts/meson8b-odroidc1.dts | 40 +++++++++++++++++---------
>  1 file changed, 27 insertions(+), 13 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/meson8b-odroidc1.dts b/arch/arm/boot/dts/meson8b-odroidc1.dts
> index 04356bc639fa..3b29169aac43 100644
> --- a/arch/arm/boot/dts/meson8b-odroidc1.dts
> +++ b/arch/arm/boot/dts/meson8b-odroidc1.dts
> @@ -185,6 +185,33 @@ vdd_rtc: regulator-vdd-rtc {
>  
>  		vin-supply = <&vcc_3v3>;
>  	};
> +
> +	usb_otg_pwr: regulator-usb-pwrs {
> +		compatible = "regulator-fixed";
> +		regulator-name = "USB_OTG_PWR";
> +
> +		regulator-min-microvolt = <5000000>;
> +		regulator-max-microvolt = <5000000>;
> +
> +		/* signal name from schematics: PWREN */
> +		gpio = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
> +		enable-active-high;
> +		vin-supply = <&p5v0>;
> +	};
> +
> +	usb {
> +		dr_mode = "host";
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		hub@1 {
> +			/* Genesys Logic GL852G-OHG usb hub */
> +			compatible = "genesys,usb5e3,610";

Wrong compatible. Does not match pattern in usb-device.yaml.


Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 07/11] vendor-prefixes: Add VIA Labs, Inc.
  2022-12-28 10:03 ` [PATCH v1 07/11] vendor-prefixes: Add VIA Labs, Inc Anand Moon
@ 2022-12-28 15:11   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 30+ messages in thread
From: Krzysztof Kozlowski @ 2022-12-28 15:11 UTC (permalink / raw)
  To: Anand Moon, Rob Herring, Krzysztof Kozlowski
  Cc: linux-amlogic, Rob Herring, devicetree, linux-kernel

On 28/12/2022 11:03, Anand Moon wrote:
> Add the vendor prefix for VIA Labs, Inc. (VLI) is a leading supplier

Drop marketing, so without "leading".


Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 01/11] dt-bindings: usb: Add device id for Genesys Logic hub controller
  2022-12-28 15:08   ` Krzysztof Kozlowski
@ 2022-12-28 15:18     ` Anand Moon
  0 siblings, 0 replies; 30+ messages in thread
From: Anand Moon @ 2022-12-28 15:18 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Icenowy Zheng, linux-amlogic, linux-usb, devicetree,
	linux-kernel

Hi Krzysztof,

Thanks for your review comments.

On Wed, 28 Dec 2022 at 20:38, Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 28/12/2022 11:03, Anand Moon wrote:
> > Add usb hub device id for Genesys Logic, Inc. GL852G-OHG Hub USB 2.0
> > root hub and Genesys Logic, Inc. GL3523-QFN76 USB 3.1 root hub.
> >
> > Signed-off-by: Anand Moon <linux.amoon@gmail.com>
> > ---
> >  Documentation/devicetree/bindings/usb/genesys,gl850g.yaml | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml b/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml
> > index a9f831448cca..db009f3ef438 100644
> > --- a/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml
> > +++ b/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml
> > @@ -16,6 +16,8 @@ properties:
> >    compatible:
> >      enum:
> >        - usb5e3,608
> > +      - genesys,usb5e3,610
> > +      - genesys,usb5e3,620
>
> This does not look like correct compatible. Did you test the bindings
> and DTS? This should fail.
>

Yes, I have done and it did not report any error.

make ARCH=arm64 mrproper
make ARCH=arm64 defconfig
make ARCH=arm64 -j$(nproc) dtbs
make CHECK_DTBS=y amlogic/meson-gxbb-odroidc2.dtb
make CHECK_DTBS=y amlogic/meson-g12b-odroid-n2.dtb
make CHECK_DTBS=y amlogic/meson-sm1-odroid-c4.dtb

Ok I will update this in the next version for all the patches.

> Best regards,
> Krzysztof
>

Thanks
-Anand

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 08/11] dt-bindings: usb: Add binding for Via lab VL817Q7 hub controller
  2022-12-28 10:03 ` [PATCH v1 08/11] dt-bindings: usb: Add binding for Via lab VL817Q7 hub controller Anand Moon
  2022-12-28 11:02   ` Johan Hovold
@ 2022-12-28 17:16   ` Rob Herring
  2023-01-04 22:37   ` Matthias Kaehlcke
  2 siblings, 0 replies; 30+ messages in thread
From: Rob Herring @ 2022-12-28 17:16 UTC (permalink / raw)
  To: Anand Moon
  Cc: linux-usb, Rob Herring, Krzysztof Kozlowski, linux-kernel,
	linux-amlogic, Greg Kroah-Hartman, devicetree


On Wed, 28 Dec 2022 10:03:17 +0000, Anand Moon wrote:
> The VIA Lab VL817-Q7 is a USB 3.1 Gen 1 4-Port hub controller that
> features 4 downstream ports, an internal 5V regulator and has
> external reset pin.
> 
> Add a device tree binding for its USB protocol part.
> The internal LDO is not covered by this and can just be modelled
> as a fixed regulator.
> 
> Signed-off-by: Anand Moon <linux.amoon@gmail.com>
> ---
>  .../bindings/usb/vialab,vl817q7.yaml          | 47 +++++++++++++++++++
>  1 file changed, 47 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml: '$id' is a required property
	hint: Metaschema for devicetree binding documentation
	from schema $id: http://devicetree.org/meta-schemas/base.yaml#
Error: Documentation/devicetree/bindings/usb/vialab,vl817q7.example.dts:26.17-18 syntax error
FATAL ERROR: Unable to parse input tree
make[1]: *** [scripts/Makefile.lib:434: Documentation/devicetree/bindings/usb/vialab,vl817q7.example.dtb] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1508: dt_binding_check] Error 2

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20221228100321.15949-9-linux.amoon@gmail.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 03/11] arm64: dts: amlogic: Used onboard usb hub reset on odroid c2
  2022-12-28 14:44     ` Anand Moon
@ 2023-01-04  8:13       ` Anand Moon
  2023-01-04  8:56         ` Neil Armstrong
  2023-01-04  9:36         ` Alexander Stein
  0 siblings, 2 replies; 30+ messages in thread
From: Anand Moon @ 2023-01-04  8:13 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: Rob Herring, Krzysztof Kozlowski, Neil Armstrong, Kevin Hilman,
	Jerome Brunet, linux-amlogic, devicetree, linux-arm-kernel,
	linux-kernel

Hi Martin,

On Wed, 28 Dec 2022 at 20:14, Anand Moon <linux.amoon@gmail.com> wrote:
>
> Hi Martin,
>
> On Wed, 28 Dec 2022 at 18:21, Martin Blumenstingl
> <martin.blumenstingl@googlemail.com> wrote:
> >
> > Hi Anand,
> >
> Thanks for your review comments.
>
> > thank you for working on this topic!
> >
> > On Wed, Dec 28, 2022 at 11:05 AM Anand Moon <linux.amoon@gmail.com> wrote:
> > [...]
> > > +       usb {
> > > +               dr_mode = "host";
> > > +               #address-cells = <1>;
> > > +               #size-cells = <0>;
> > > +
> > > +               hub@1 {
> > > +                       /* Genesys Logic GL852G-OHG usb hub */
> > > +                       compatible = "genesys,usb5e3,610";
> > > +                       reg = <1>;
> > > +                       vdd-supply = <&usb_otg_pwr>;
> > > +                       reset-gpio = <&gpio_ao GPIOAO_4 GPIO_ACTIVE_LOW>;
> > > +               };
> > > +       };
> > My understanding is that the hub@1 node should be part of the
> > corresponding USB controller node, not a new node.
> > In this case hub@1 should go into the existing &usb1 node. That way we
> > describe the way the hardware is set up (meaning: hub@1 is connected
> > to &usb1).
> >
>
> Ok, I will move this code under &usb0 and &usb1 nodes.
>
> onboard_usb_hub module just assists in usb hub reset.
> so these changes are meant to replace the gpio-hog.
>
> $ dmesg | grep onboard
> [    5.405558] usbcore: registered new device driver onboard-usb-hub
> [    6.383428] onboard-usb-hub 1-1: reset high-speed USB device number
> 2 using dwc2
>
> Here is the boot log of the odroid c2 [0] https://pastebin.com/PFy5waPb
>

Moving the usb hub into usb subnode usb0 or usb1 does not work
on Odroid n2 and c4, we have a combo phys of usb 2.0 and usb 3.0
so the onboard usb hub reset does not get initialized until both the PHY
and USB nodes are brought up by the drivers.

# On Odroid n2 has a combo hub
alarm@odroid-n2:~$ lsusb -tv
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
        ID 05e3:0620 Genesys Logic, Inc. GL3523 Hub
        |__ Port 1: Dev 5, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
            ID 174c:5106 ASMedia Technology Inc. ASM1051 SATA 3Gb/s bridge
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/2p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        ID 05e3:0610 Genesys Logic, Inc. Hub
        |__ Port 2: Dev 4, If 0, Class=Vendor Specific Class,
Driver=ax88179_178a, 480M
            ID 0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet

# Odroid C4 also has a combo hub

alarm@odroid-c4:~$ lsusb -tv
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
        ID 2109:0817 VIA Labs, Inc.
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/2p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        ID 2109:2817 VIA Labs, Inc.

So I will continue to work with this usb hub node to do a proper reset
of the USB hub.

> > In case hub@1 is not detected within &usb1 then you maym need something
> > like [0] (not tested for your use-case).
> > If that helps: feel free to include that patch in your series.
> >
>
> Thanks, will check if this is needed in this case. As of now it just
> reinitializes the hub.
>
> >
> > Best regards,
> > Martin
> >
> >
> > [0] https://github.com/xdarklight/linux/commit/d8b96e5bc9c20ab2585194e0e59580c3b062c431
>
> Thanks
> -Anand

Thanks
-Anand

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 03/11] arm64: dts: amlogic: Used onboard usb hub reset on odroid c2
  2023-01-04  8:13       ` Anand Moon
@ 2023-01-04  8:56         ` Neil Armstrong
  2023-01-04  9:17           ` Anand Moon
  2023-01-04  9:36         ` Alexander Stein
  1 sibling, 1 reply; 30+ messages in thread
From: Neil Armstrong @ 2023-01-04  8:56 UTC (permalink / raw)
  To: Anand Moon, Martin Blumenstingl
  Cc: Rob Herring, Krzysztof Kozlowski, Kevin Hilman, Jerome Brunet,
	linux-amlogic, devicetree, linux-arm-kernel, linux-kernel

On 04/01/2023 09:13, Anand Moon wrote:
> Hi Martin,
> 
> On Wed, 28 Dec 2022 at 20:14, Anand Moon <linux.amoon@gmail.com> wrote:
>>
>> Hi Martin,
>>
>> On Wed, 28 Dec 2022 at 18:21, Martin Blumenstingl
>> <martin.blumenstingl@googlemail.com> wrote:
>>>
>>> Hi Anand,
>>>
>> Thanks for your review comments.
>>
>>> thank you for working on this topic!
>>>
>>> On Wed, Dec 28, 2022 at 11:05 AM Anand Moon <linux.amoon@gmail.com> wrote:
>>> [...]
>>>> +       usb {
>>>> +               dr_mode = "host";
>>>> +               #address-cells = <1>;
>>>> +               #size-cells = <0>;
>>>> +
>>>> +               hub@1 {
>>>> +                       /* Genesys Logic GL852G-OHG usb hub */
>>>> +                       compatible = "genesys,usb5e3,610";
>>>> +                       reg = <1>;
>>>> +                       vdd-supply = <&usb_otg_pwr>;
>>>> +                       reset-gpio = <&gpio_ao GPIOAO_4 GPIO_ACTIVE_LOW>;
>>>> +               };
>>>> +       };
>>> My understanding is that the hub@1 node should be part of the
>>> corresponding USB controller node, not a new node.
>>> In this case hub@1 should go into the existing &usb1 node. That way we
>>> describe the way the hardware is set up (meaning: hub@1 is connected
>>> to &usb1).
>>>
>>
>> Ok, I will move this code under &usb0 and &usb1 nodes.
>>
>> onboard_usb_hub module just assists in usb hub reset.
>> so these changes are meant to replace the gpio-hog.
>>
>> $ dmesg | grep onboard
>> [    5.405558] usbcore: registered new device driver onboard-usb-hub
>> [    6.383428] onboard-usb-hub 1-1: reset high-speed USB device number
>> 2 using dwc2
>>
>> Here is the boot log of the odroid c2 [0] https://pastebin.com/PFy5waPb
>>
> 
> Moving the usb hub into usb subnode usb0 or usb1 does not work
> on Odroid n2 and c4, we have a combo phys of usb 2.0 and usb 3.0
> so the onboard usb hub reset does not get initialized until both the PHY
> and USB nodes are brought up by the drivers.

Fine, then add a comment before the usb node explaining that.

Thanks,
Neil

> 
> # On Odroid n2 has a combo hub
> alarm@odroid-n2:~$ lsusb -tv
> /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
>      ID 1d6b:0003 Linux Foundation 3.0 root hub
>      |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
>          ID 05e3:0620 Genesys Logic, Inc. GL3523 Hub
>          |__ Port 1: Dev 5, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
>              ID 174c:5106 ASMedia Technology Inc. ASM1051 SATA 3Gb/s bridge
> /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/2p, 480M
>      ID 1d6b:0002 Linux Foundation 2.0 root hub
>      |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
>          ID 05e3:0610 Genesys Logic, Inc. Hub
>          |__ Port 2: Dev 4, If 0, Class=Vendor Specific Class,
> Driver=ax88179_178a, 480M
>              ID 0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet
> 
> # Odroid C4 also has a combo hub
> 
> alarm@odroid-c4:~$ lsusb -tv
> /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
>      ID 1d6b:0003 Linux Foundation 3.0 root hub
>      |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
>          ID 2109:0817 VIA Labs, Inc.
> /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/2p, 480M
>      ID 1d6b:0002 Linux Foundation 2.0 root hub
>      |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
>          ID 2109:2817 VIA Labs, Inc.
> 
> So I will continue to work with this usb hub node to do a proper reset
> of the USB hub.
> 
>>> In case hub@1 is not detected within &usb1 then you maym need something
>>> like [0] (not tested for your use-case).
>>> If that helps: feel free to include that patch in your series.
>>>
>>
>> Thanks, will check if this is needed in this case. As of now it just
>> reinitializes the hub.
>>
>>>
>>> Best regards,
>>> Martin
>>>
>>>
>>> [0] https://github.com/xdarklight/linux/commit/d8b96e5bc9c20ab2585194e0e59580c3b062c431
>>
>> Thanks
>> -Anand
> 
> Thanks
> -Anand


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 03/11] arm64: dts: amlogic: Used onboard usb hub reset on odroid c2
  2023-01-04  8:56         ` Neil Armstrong
@ 2023-01-04  9:17           ` Anand Moon
  0 siblings, 0 replies; 30+ messages in thread
From: Anand Moon @ 2023-01-04  9:17 UTC (permalink / raw)
  To: neil.armstrong
  Cc: Martin Blumenstingl, Rob Herring, Krzysztof Kozlowski,
	Kevin Hilman, Jerome Brunet, linux-amlogic, devicetree,
	linux-arm-kernel, linux-kernel

Hi Niel,


On Wed, 4 Jan 2023 at 14:26, Neil Armstrong <neil.armstrong@linaro.org> wrote:
>
> On 04/01/2023 09:13, Anand Moon wrote:
> > Hi Martin,
> >
> > On Wed, 28 Dec 2022 at 20:14, Anand Moon <linux.amoon@gmail.com> wrote:
> >>
> >> Hi Martin,
> >>
> >> On Wed, 28 Dec 2022 at 18:21, Martin Blumenstingl
> >> <martin.blumenstingl@googlemail.com> wrote:
> >>>
> >>> Hi Anand,
> >>>
> >> Thanks for your review comments.
> >>
> >>> thank you for working on this topic!
> >>>
> >>> On Wed, Dec 28, 2022 at 11:05 AM Anand Moon <linux.amoon@gmail.com> wrote:
> >>> [...]
> >>>> +       usb {
> >>>> +               dr_mode = "host";
> >>>> +               #address-cells = <1>;
> >>>> +               #size-cells = <0>;
> >>>> +
> >>>> +               hub@1 {
> >>>> +                       /* Genesys Logic GL852G-OHG usb hub */
> >>>> +                       compatible = "genesys,usb5e3,610";
> >>>> +                       reg = <1>;
> >>>> +                       vdd-supply = <&usb_otg_pwr>;
> >>>> +                       reset-gpio = <&gpio_ao GPIOAO_4 GPIO_ACTIVE_LOW>;
> >>>> +               };
> >>>> +       };
> >>> My understanding is that the hub@1 node should be part of the
> >>> corresponding USB controller node, not a new node.
> >>> In this case hub@1 should go into the existing &usb1 node. That way we
> >>> describe the way the hardware is set up (meaning: hub@1 is connected
> >>> to &usb1).
> >>>
> >>
> >> Ok, I will move this code under &usb0 and &usb1 nodes.
> >>
> >> onboard_usb_hub module just assists in usb hub reset.
> >> so these changes are meant to replace the gpio-hog.
> >>
> >> $ dmesg | grep onboard
> >> [    5.405558] usbcore: registered new device driver onboard-usb-hub
> >> [    6.383428] onboard-usb-hub 1-1: reset high-speed USB device number
> >> 2 using dwc2
> >>
> >> Here is the boot log of the odroid c2 [0] https://pastebin.com/PFy5waPb
> >>
> >
> > Moving the usb hub into usb subnode usb0 or usb1 does not work
> > on Odroid n2 and c4, we have a combo phys of usb 2.0 and usb 3.0
> > so the onboard usb hub reset does not get initialized until both the PHY
> > and USB nodes are brought up by the drivers.
>
> Fine, then add a comment before the usb node explaining that.
>

Sure, thanks.

> Thanks,
> Neil
>
Thanks
-Anand

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 03/11] arm64: dts: amlogic: Used onboard usb hub reset on odroid c2
  2023-01-04  8:13       ` Anand Moon
  2023-01-04  8:56         ` Neil Armstrong
@ 2023-01-04  9:36         ` Alexander Stein
  2023-01-07 14:56           ` Anand Moon
  1 sibling, 1 reply; 30+ messages in thread
From: Alexander Stein @ 2023-01-04  9:36 UTC (permalink / raw)
  To: Martin Blumenstingl, linux-arm-kernel
  Cc: Rob Herring, Krzysztof Kozlowski, Neil Armstrong, Kevin Hilman,
	Jerome Brunet, linux-amlogic, devicetree, linux-arm-kernel,
	linux-kernel, Anand Moon

Am Mittwoch, 4. Januar 2023, 09:13:21 CET schrieb Anand Moon:
> Hi Martin,
> 
> On Wed, 28 Dec 2022 at 20:14, Anand Moon <linux.amoon@gmail.com> wrote:
> > Hi Martin,
> > 
> > On Wed, 28 Dec 2022 at 18:21, Martin Blumenstingl
> > 
> > <martin.blumenstingl@googlemail.com> wrote:
> > > Hi Anand,
> > 
> > Thanks for your review comments.
> > 
> > > thank you for working on this topic!
> > > 
> > > On Wed, Dec 28, 2022 at 11:05 AM Anand Moon <linux.amoon@gmail.com>
> > > wrote:
> > > [...]
> > > 
> > > > +       usb {
> > > > +               dr_mode = "host";
> > > > +               #address-cells = <1>;
> > > > +               #size-cells = <0>;
> > > > +
> > > > +               hub@1 {
> > > > +                       /* Genesys Logic GL852G-OHG usb hub */
> > > > +                       compatible = "genesys,usb5e3,610";
> > > > +                       reg = <1>;
> > > > +                       vdd-supply = <&usb_otg_pwr>;
> > > > +                       reset-gpio = <&gpio_ao GPIOAO_4
> > > > GPIO_ACTIVE_LOW>;
> > > > +               };
> > > > +       };
> > > 
> > > My understanding is that the hub@1 node should be part of the
> > > corresponding USB controller node, not a new node.
> > > In this case hub@1 should go into the existing &usb1 node. That way we
> > > describe the way the hardware is set up (meaning: hub@1 is connected
> > > to &usb1).
> > 
> > Ok, I will move this code under &usb0 and &usb1 nodes.
> > 
> > onboard_usb_hub module just assists in usb hub reset.
> > so these changes are meant to replace the gpio-hog.
> > 
> > $ dmesg | grep onboard
> > [    5.405558] usbcore: registered new device driver onboard-usb-hub
> > [    6.383428] onboard-usb-hub 1-1: reset high-speed USB device number
> > 2 using dwc2
> > 
> > Here is the boot log of the odroid c2 [0] https://pastebin.com/PFy5waPb
> 
> Moving the usb hub into usb subnode usb0 or usb1 does not work
> on Odroid n2 and c4, we have a combo phys of usb 2.0 and usb 3.0
> so the onboard usb hub reset does not get initialized until both the PHY
> and USB nodes are brought up by the drivers.
> 
> # On Odroid n2 has a combo hub
> alarm@odroid-n2:~$ lsusb -tv
> /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
>     ID 1d6b:0003 Linux Foundation 3.0 root hub
> 
>     |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
> 
>         ID 05e3:0620 Genesys Logic, Inc. GL3523 Hub
> 
>         |__ Port 1: Dev 5, If 0, Class=Mass Storage, Driver=usb-storage,
>         |5000M
> 
>             ID 174c:5106 ASMedia Technology Inc. ASM1051 SATA 3Gb/s bridge
> /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/2p, 480M
>     ID 1d6b:0002 Linux Foundation 2.0 root hub
> 
>     |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
> 
>         ID 05e3:0610 Genesys Logic, Inc. Hub
> 
>         |__ Port 2: Dev 4, If 0, Class=Vendor Specific Class,
> 
> Driver=ax88179_178a, 480M
>             ID 0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet
> 
> # Odroid C4 also has a combo hub
> 
> alarm@odroid-c4:~$ lsusb -tv
> /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
>     ID 1d6b:0003 Linux Foundation 3.0 root hub
> 
>     |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
> 
>         ID 2109:0817 VIA Labs, Inc.
> /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/2p, 480M
>     ID 1d6b:0002 Linux Foundation 2.0 root hub
> 
>     |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
> 
>         ID 2109:2817 VIA Labs, Inc.
> 
> So I will continue to work with this usb hub node to do a proper reset
> of the USB hub.

If your USB hub does both USB2.0 and USB3.0 you need to add both devices in DT 
and reference them using 'peer-hub'property. See ca69b6c78d5d ("arm64: dts: 
tqma8mpql: add support for 2nd USB (host) interface") for a reference.

Best regards,
Alexander

> > > In case hub@1 is not detected within &usb1 then you maym need something
> > > like [0] (not tested for your use-case).
> > > If that helps: feel free to include that patch in your series.
> > 
> > Thanks, will check if this is needed in this case. As of now it just
> > reinitializes the hub.
> > 
> > > Best regards,
> > > Martin
> > > 
> > > 
> > > [0]
> > > https://github.com/xdarklight/linux/commit/d8b96e5bc9c20ab2585194e0e595
> > > 80c3b062c431> 
> > Thanks
> > -Anand
> 
> Thanks
> -Anand
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel





^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 08/11] dt-bindings: usb: Add binding for Via lab VL817Q7 hub controller
  2022-12-28 10:03 ` [PATCH v1 08/11] dt-bindings: usb: Add binding for Via lab VL817Q7 hub controller Anand Moon
  2022-12-28 11:02   ` Johan Hovold
  2022-12-28 17:16   ` Rob Herring
@ 2023-01-04 22:37   ` Matthias Kaehlcke
  2023-01-07 15:00     ` Anand Moon
  2 siblings, 1 reply; 30+ messages in thread
From: Matthias Kaehlcke @ 2023-01-04 22:37 UTC (permalink / raw)
  To: Anand Moon
  Cc: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	linux-amlogic, linux-usb, devicetree, linux-kernel

On Wed, Dec 28, 2022 at 10:03:17AM +0000, Anand Moon wrote:
> The VIA Lab VL817-Q7 is a USB 3.1 Gen 1 4-Port hub controller that
> features 4 downstream ports, an internal 5V regulator and has
> external reset pin.
> 
> Add a device tree binding for its USB protocol part.
> The internal LDO is not covered by this and can just be modelled
> as a fixed regulator.
> 
> Signed-off-by: Anand Moon <linux.amoon@gmail.com>
> ---
>  .../bindings/usb/vialab,vl817q7.yaml          | 47 +++++++++++++++++++
>  1 file changed, 47 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml
> 
> diff --git a/Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml b/Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml
> new file mode 100644
> index 000000000000..4ae995160fd5
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml
> @@ -0,0 +1,47 @@
> +# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
> +%YAML 1.2
> +---
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Via labs VL817Q7 USB 3.1 hub controller

nit: VIA Labs VL817-Q7

> +
> +maintainers:
> +  - Anand Moon <linux.amoon@gmail.com>
> +
> +allOf:
> +  - $ref: usb-device.yaml#
> +
> +properties:
> +  compatible:
> +    enum:
> +      - vialab,usb2109

This is not a valid compatible string as Johan already noted.

Besides that the VL817-Q7 provides both a 3.1 and a 2.0 USB hub, which
are enumerated separately. Please also add a compatible string for the
2.0 hub (assuming 0x2109 is the 3.1 hub).

> +
> +  reg: true
> +
> +  reset-gpios:
> +    description: GPIO controlling the RESET# pin.
> +
> +  vdd-supply:
> +    description:
> +      the regulator that provides 5.0V core power to the hub.
> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/gpio/gpio.h>
> +    usb {
> +        dr_mode = "host";
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        hub: hub@1 {
> +            compatible = "vialab,usb2109"
> +            reg = <1>;
> +            reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>;
> +        };

Please also add a node for the other hub and link the two nodes with
each other through the 'peer-hub' property. See realtek,rts5411.yaml
for reference.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 01/11] dt-bindings: usb: Add device id for Genesys Logic hub controller
  2022-12-28 10:29     ` Anand Moon
@ 2023-01-04 22:54       ` Matthias Kaehlcke
  2023-01-07 15:01         ` Anand Moon
  0 siblings, 1 reply; 30+ messages in thread
From: Matthias Kaehlcke @ 2023-01-04 22:54 UTC (permalink / raw)
  To: Anand Moon
  Cc: Icenowy Zheng, Greg Kroah-Hartman, Rob Herring,
	Krzysztof Kozlowski, linux-amlogic, linux-usb, devicetree,
	linux-kernel

On Wed, Dec 28, 2022 at 03:59:17PM +0530, Anand Moon wrote:
> Hi Icenowy,
> 
> Thanks for the review comments
> 
> On Wed, 28 Dec 2022 at 15:38, Icenowy Zheng <uwu@icenowy.me> wrote:
> >
> > 在 2022-12-28星期三的 10:03 +0000,Anand Moon写道:
> > > Add usb hub device id for Genesys Logic, Inc. GL852G-OHG Hub USB 2.0
> > > root hub and Genesys Logic, Inc. GL3523-QFN76 USB 3.1 root hub.

nit: QFN 76 is one of the package options of the GL3523, I expect this
binding to be applicable as well for other GL3523 variants, so I'd suggest
to drop the suffix. Not sure what 'OHG' stands for, the Genesys website
only lists a GL852G hub with different package types (none of them 'OHG'),
so I'd say drop the suffix unless it is known that 'OHG' variant uses
a different product id than other GL852G variants

> > >
> > > Signed-off-by: Anand Moon <linux.amoon@gmail.com>
> > > ---
> > >  Documentation/devicetree/bindings/usb/genesys,gl850g.yaml | 2 ++
> > >  1 file changed, 2 insertions(+)
> > >
> > > diff --git
> > > a/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml
> > > b/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml
> > > index a9f831448cca..db009f3ef438 100644
> > > --- a/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml
> > > +++ b/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml
> > > @@ -16,6 +16,8 @@ properties:
> > >    compatible:
> > >      enum:
> > >        - usb5e3,608
> > > +      - genesys,usb5e3,610
> > > +      - genesys,usb5e3,620
> >
> > I don't think genesys, is needed here because usb5e3 means USB VID
> > 0x05e3, which is already linked to Genesys Logic.
> >
> 
> Ok, I added this as genesys, is it part of the manufacturer or vendor name
> which is most commonly used for adding vendor-specific compatible strings.

That doesn't follow the generic USB binding, please drop 'genesys,'.

> > In addition, the control logic of these two hubs are needed to be
> > verified.
> 
> We were using gpio-hog to reset the USB hub, so now switch to USB onboard hub
> 
> >
> > And what's the status of the companion hub of the USB3 hub? Is it
> > really a USB3-only hub, or is its USB2 part just equal to another USB3
> > hub?
> >
> usb5e3,610 is USB 2.0 port hub present on Odroid C1 and Odroid C2 board
> 
> usb5e3,620 is USB 3.1 port hub present on Odroid N2.

Like Icenowy I would expect the GL3523 to provide also a 2.0 hub.

What is the output of 'lsusb' on the Odroid N2?

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 03/11] arm64: dts: amlogic: Used onboard usb hub reset on odroid c2
  2023-01-04  9:36         ` Alexander Stein
@ 2023-01-07 14:56           ` Anand Moon
  0 siblings, 0 replies; 30+ messages in thread
From: Anand Moon @ 2023-01-07 14:56 UTC (permalink / raw)
  To: Alexander Stein
  Cc: Martin Blumenstingl, linux-arm-kernel, Rob Herring,
	Krzysztof Kozlowski, Neil Armstrong, Kevin Hilman, Jerome Brunet,
	linux-amlogic, devicetree, linux-kernel

Hi Alexander,

Thanks for your review comments.

On Wed, 4 Jan 2023 at 15:06, Alexander Stein
<alexander.stein@ew.tq-group.com> wrote:
>
> Am Mittwoch, 4. Januar 2023, 09:13:21 CET schrieb Anand Moon:
> > Hi Martin,
> >
> > On Wed, 28 Dec 2022 at 20:14, Anand Moon <linux.amoon@gmail.com> wrote:
> > > Hi Martin,
> > >
> > > On Wed, 28 Dec 2022 at 18:21, Martin Blumenstingl
> > >
> > > <martin.blumenstingl@googlemail.com> wrote:
> > > > Hi Anand,
> > >
> > > Thanks for your review comments.
> > >
> > > > thank you for working on this topic!
> > > >
> > > > On Wed, Dec 28, 2022 at 11:05 AM Anand Moon <linux.amoon@gmail.com>
> > > > wrote:
> > > > [...]
> > > >
> > > > > +       usb {
> > > > > +               dr_mode = "host";
> > > > > +               #address-cells = <1>;
> > > > > +               #size-cells = <0>;
> > > > > +
> > > > > +               hub@1 {
> > > > > +                       /* Genesys Logic GL852G-OHG usb hub */
> > > > > +                       compatible = "genesys,usb5e3,610";
> > > > > +                       reg = <1>;
> > > > > +                       vdd-supply = <&usb_otg_pwr>;
> > > > > +                       reset-gpio = <&gpio_ao GPIOAO_4
> > > > > GPIO_ACTIVE_LOW>;
> > > > > +               };
> > > > > +       };
> > > >
> > > > My understanding is that the hub@1 node should be part of the
> > > > corresponding USB controller node, not a new node.
> > > > In this case hub@1 should go into the existing &usb1 node. That way we
> > > > describe the way the hardware is set up (meaning: hub@1 is connected
> > > > to &usb1).
> > >
> > > Ok, I will move this code under &usb0 and &usb1 nodes.
> > >
> > > onboard_usb_hub module just assists in usb hub reset.
> > > so these changes are meant to replace the gpio-hog.
> > >
> > > $ dmesg | grep onboard
> > > [    5.405558] usbcore: registered new device driver onboard-usb-hub
> > > [    6.383428] onboard-usb-hub 1-1: reset high-speed USB device number
> > > 2 using dwc2
> > >
> > > Here is the boot log of the odroid c2 [0] https://pastebin.com/PFy5waPb
> >
> > Moving the usb hub into usb subnode usb0 or usb1 does not work
> > on Odroid n2 and c4, we have a combo phys of usb 2.0 and usb 3.0
> > so the onboard usb hub reset does not get initialized until both the PHY
> > and USB nodes are brought up by the drivers.
> >
> > # On Odroid n2 has a combo hub
> > alarm@odroid-n2:~$ lsusb -tv
> > /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
> >     ID 1d6b:0003 Linux Foundation 3.0 root hub
> >
> >     |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
> >
> >         ID 05e3:0620 Genesys Logic, Inc. GL3523 Hub
> >
> >         |__ Port 1: Dev 5, If 0, Class=Mass Storage, Driver=usb-storage,
> >         |5000M
> >
> >             ID 174c:5106 ASMedia Technology Inc. ASM1051 SATA 3Gb/s bridge
> > /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/2p, 480M
> >     ID 1d6b:0002 Linux Foundation 2.0 root hub
> >
> >     |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
> >
> >         ID 05e3:0610 Genesys Logic, Inc. Hub
> >
> >         |__ Port 2: Dev 4, If 0, Class=Vendor Specific Class,
> >
> > Driver=ax88179_178a, 480M
> >             ID 0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet
> >
> > # Odroid C4 also has a combo hub
> >
> > alarm@odroid-c4:~$ lsusb -tv
> > /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
> >     ID 1d6b:0003 Linux Foundation 3.0 root hub
> >
> >     |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
> >
> >         ID 2109:0817 VIA Labs, Inc.
> > /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/2p, 480M
> >     ID 1d6b:0002 Linux Foundation 2.0 root hub
> >
> >     |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
> >
> >         ID 2109:2817 VIA Labs, Inc.
> >
> > So I will continue to work with this usb hub node to do a proper reset
> > of the USB hub.
>
> If your USB hub does both USB2.0 and USB3.0 you need to add both devices in DT
> and reference them using 'peer-hub'property. See ca69b6c78d5d ("arm64: dts:
> tqma8mpql: add support for 2nd USB (host) interface") for a reference.
>

Yes, I have updated the DTS example for using peer-hub for both devices.

> Best regards,
> Alexander
>
Thanks



-Anand

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 02/11] ARM: dts: amlogic: Used onboard usb hub reset to enable usb hub
  2022-12-28 15:08   ` Krzysztof Kozlowski
@ 2023-01-07 14:59     ` Anand Moon
  0 siblings, 0 replies; 30+ messages in thread
From: Anand Moon @ 2023-01-07 14:59 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Rob Herring, Krzysztof Kozlowski, Neil Armstrong, Kevin Hilman,
	Jerome Brunet, Martin Blumenstingl, linux-amlogic, devicetree,
	linux-arm-kernel, linux-kernel

Hi Krzysztof,

On Wed, 28 Dec 2022 at 20:39, Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 28/12/2022 11:03, Anand Moon wrote:
> > On Odroid c1 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 usb hub.
> >
> > Add usb hub regulator as per the schematic.
> >
> > Signed-off-by: Anand Moon <linux.amoon@gmail.com>
> > ---
> >  arch/arm/boot/dts/meson8b-odroidc1.dts | 40 +++++++++++++++++---------
> >  1 file changed, 27 insertions(+), 13 deletions(-)
> >
> > diff --git a/arch/arm/boot/dts/meson8b-odroidc1.dts b/arch/arm/boot/dts/meson8b-odroidc1.dts
> > index 04356bc639fa..3b29169aac43 100644
> > --- a/arch/arm/boot/dts/meson8b-odroidc1.dts
> > +++ b/arch/arm/boot/dts/meson8b-odroidc1.dts
> > @@ -185,6 +185,33 @@ vdd_rtc: regulator-vdd-rtc {
> >
> >               vin-supply = <&vcc_3v3>;
> >       };
> > +
> > +     usb_otg_pwr: regulator-usb-pwrs {
> > +             compatible = "regulator-fixed";
> > +             regulator-name = "USB_OTG_PWR";
> > +
> > +             regulator-min-microvolt = <5000000>;
> > +             regulator-max-microvolt = <5000000>;
> > +
> > +             /* signal name from schematics: PWREN */
> > +             gpio = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
> > +             enable-active-high;
> > +             vin-supply = <&p5v0>;
> > +     };
> > +
> > +     usb {
> > +             dr_mode = "host";
> > +             #address-cells = <1>;
> > +             #size-cells = <0>;
> > +
> > +             hub@1 {
> > +                     /* Genesys Logic GL852G-OHG usb hub */
> > +                     compatible = "genesys,usb5e3,610";
>
> Wrong compatible. Does not match pattern in usb-device.yaml.
>

ok, will fix this in the next version.

>
> Best regards,
> Krzysztof
>

Thanks


-Anand

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 08/11] dt-bindings: usb: Add binding for Via lab VL817Q7 hub controller
  2023-01-04 22:37   ` Matthias Kaehlcke
@ 2023-01-07 15:00     ` Anand Moon
  0 siblings, 0 replies; 30+ messages in thread
From: Anand Moon @ 2023-01-07 15:00 UTC (permalink / raw)
  To: Matthias Kaehlcke
  Cc: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	linux-amlogic, linux-usb, devicetree, linux-kernel

Hi Matthias,

On Thu, 5 Jan 2023 at 04:07, Matthias Kaehlcke <mka@chromium.org> wrote:
>
> On Wed, Dec 28, 2022 at 10:03:17AM +0000, Anand Moon wrote:
> > The VIA Lab VL817-Q7 is a USB 3.1 Gen 1 4-Port hub controller that
> > features 4 downstream ports, an internal 5V regulator and has
> > external reset pin.
> >
> > Add a device tree binding for its USB protocol part.
> > The internal LDO is not covered by this and can just be modelled
> > as a fixed regulator.
> >
> > Signed-off-by: Anand Moon <linux.amoon@gmail.com>
> > ---
> >  .../bindings/usb/vialab,vl817q7.yaml          | 47 +++++++++++++++++++
> >  1 file changed, 47 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml b/Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml
> > new file mode 100644
> > index 000000000000..4ae995160fd5
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/usb/vialab,vl817q7.yaml
> > @@ -0,0 +1,47 @@
> > +# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
> > +%YAML 1.2
> > +---
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Via labs VL817Q7 USB 3.1 hub controller
>
> nit: VIA Labs VL817-Q7
>
Ok
> > +
> > +maintainers:
> > +  - Anand Moon <linux.amoon@gmail.com>
> > +
> > +allOf:
> > +  - $ref: usb-device.yaml#
> > +
> > +properties:
> > +  compatible:
> > +    enum:
> > +      - vialab,usb2109
>
> This is not a valid compatible string as Johan already noted.
>
> Besides that the VL817-Q7 provides both a 3.1 and a 2.0 USB hub, which
> are enumerated separately. Please also add a compatible string for the
> 2.0 hub (assuming 0x2109 is the 3.1 hub).
>
Yes, correct,
actually, I would like to rename this file to vialab,vl817.yaml
since vialab,vl817-q7 is used for USB 3.1 hub and vialab,vl817-q5 is
used for USB 2.0 hub.

[0] https://datasheet.lcsc.com/lcsc/1808111624_VIA-Tech-VL817-Q7-B0_C209756.pdf

> > +
> > +  reg: true
> > +
> > +  reset-gpios:
> > +    description: GPIO controlling the RESET# pin.
> > +
> > +  vdd-supply:
> > +    description:
> > +      the regulator that provides 5.0V core power to the hub.
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  - |
> > +    #include <dt-bindings/gpio/gpio.h>
> > +    usb {
> > +        dr_mode = "host";
> > +        #address-cells = <1>;
> > +        #size-cells = <0>;
> > +
> > +        hub: hub@1 {
> > +            compatible = "vialab,usb2109"
> > +            reg = <1>;
> > +            reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>;
> > +        };
>
> Please also add a node for the other hub and link the two nodes with
> each other through the 'peer-hub' property. See realtek,rts5411.yaml
> for reference.

Ok, I will update the example according,

Thanks

-Anand.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 01/11] dt-bindings: usb: Add device id for Genesys Logic hub controller
  2023-01-04 22:54       ` Matthias Kaehlcke
@ 2023-01-07 15:01         ` Anand Moon
  2023-01-09 16:29           ` Matthias Kaehlcke
  0 siblings, 1 reply; 30+ messages in thread
From: Anand Moon @ 2023-01-07 15:01 UTC (permalink / raw)
  To: Matthias Kaehlcke
  Cc: Icenowy Zheng, Greg Kroah-Hartman, Rob Herring,
	Krzysztof Kozlowski, linux-amlogic, linux-usb, devicetree,
	linux-kernel

Hi Matthias,

Thanks for the review comments

On Thu, 5 Jan 2023 at 04:25, Matthias Kaehlcke <mka@chromium.org> wrote:
>
> On Wed, Dec 28, 2022 at 03:59:17PM +0530, Anand Moon wrote:
> > Hi Icenowy,
> >
> > Thanks for the review comments
> >
> > On Wed, 28 Dec 2022 at 15:38, Icenowy Zheng <uwu@icenowy.me> wrote:
> > >
> > > 在 2022-12-28星期三的 10:03 +0000,Anand Moon写道:
> > > > Add usb hub device id for Genesys Logic, Inc. GL852G-OHG Hub USB 2.0
> > > > root hub and Genesys Logic, Inc. GL3523-QFN76 USB 3.1 root hub.
>
> nit: QFN 76 is one of the package options of the GL3523, I expect this
> binding to be applicable as well for other GL3523 variants, so I'd suggest
> to drop the suffix. Not sure what 'OHG' stands for, the Genesys website
> only lists a GL852G hub with different package types (none of them 'OHG'),
> so I'd say drop the suffix unless it is known that 'OHG' variant uses
> a different product id than other GL852G variants
>

Yes, I will be sure to do this reference, I just picked these from the
board schematics.

> > > >
> > > > Signed-off-by: Anand Moon <linux.amoon@gmail.com>
> > > > ---
> > > >  Documentation/devicetree/bindings/usb/genesys,gl850g.yaml | 2 ++
> > > >  1 file changed, 2 insertions(+)
> > > >
> > > > diff --git
> > > > a/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml
> > > > b/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml
> > > > index a9f831448cca..db009f3ef438 100644
> > > > --- a/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml
> > > > +++ b/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml
> > > > @@ -16,6 +16,8 @@ properties:
> > > >    compatible:
> > > >      enum:
> > > >        - usb5e3,608
> > > > +      - genesys,usb5e3,610
> > > > +      - genesys,usb5e3,620
> > >
> > > I don't think genesys, is needed here because usb5e3 means USB VID
> > > 0x05e3, which is already linked to Genesys Logic.
> > >
> >
> > Ok, I added this as genesys, is it part of the manufacturer or vendor name
> > which is most commonly used for adding vendor-specific compatible strings.
>
> That doesn't follow the generic USB binding, please drop 'genesys,'.
>

Yes, I will drop this in the next version.

> > > In addition, the control logic of these two hubs are needed to be
> > > verified.
> >
> > We were using gpio-hog to reset the USB hub, so now switch to USB onboard hub
> >
> > >
> > > And what's the status of the companion hub of the USB3 hub? Is it
> > > really a USB3-only hub, or is its USB2 part just equal to another USB3
> > > hub?
> > >
> > usb5e3,610 is USB 2.0 port hub present on Odroid C1 and Odroid C2 board
> >
> > usb5e3,620 is USB 3.1 port hub present on Odroid N2.
>
> Like Icenowy I would expect the GL3523 to provide also a 2.0 hub.
>
> What is the output of 'lsusb' on the Odroid N2?

alarm@odroid-n2:~$ lsusb -tv
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
        ID 05e3:0620 Genesys Logic, Inc. GL3523 Hub
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/2p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        ID 05e3:0610 Genesys Logic, Inc. Hub

Thanks

-Anand

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 01/11] dt-bindings: usb: Add device id for Genesys Logic hub controller
  2023-01-07 15:01         ` Anand Moon
@ 2023-01-09 16:29           ` Matthias Kaehlcke
  2023-01-09 17:48             ` Anand Moon
  0 siblings, 1 reply; 30+ messages in thread
From: Matthias Kaehlcke @ 2023-01-09 16:29 UTC (permalink / raw)
  To: Anand Moon
  Cc: Icenowy Zheng, Greg Kroah-Hartman, Rob Herring,
	Krzysztof Kozlowski, linux-amlogic, linux-usb, devicetree,
	linux-kernel

On Sat, Jan 07, 2023 at 08:31:23PM +0530, Anand Moon wrote:
> Hi Matthias,
> 
> Thanks for the review comments
> 
> On Thu, 5 Jan 2023 at 04:25, Matthias Kaehlcke <mka@chromium.org> wrote:
> >
> > On Wed, Dec 28, 2022 at 03:59:17PM +0530, Anand Moon wrote:
> > > Hi Icenowy,
> > >
> > > Thanks for the review comments
> > >
> > > On Wed, 28 Dec 2022 at 15:38, Icenowy Zheng <uwu@icenowy.me> wrote:
> > > >
> > > > 在 2022-12-28星期三的 10:03 +0000,Anand Moon写道:
> > > > > Add usb hub device id for Genesys Logic, Inc. GL852G-OHG Hub USB 2.0
> > > > > root hub and Genesys Logic, Inc. GL3523-QFN76 USB 3.1 root hub.
> >
> > nit: QFN 76 is one of the package options of the GL3523, I expect this
> > binding to be applicable as well for other GL3523 variants, so I'd suggest
> > to drop the suffix. Not sure what 'OHG' stands for, the Genesys website
> > only lists a GL852G hub with different package types (none of them 'OHG'),
> > so I'd say drop the suffix unless it is known that 'OHG' variant uses
> > a different product id than other GL852G variants
> >
> 
> Yes, I will be sure to do this reference, I just picked these from the
> board schematics.
> 
> > > > >
> > > > > Signed-off-by: Anand Moon <linux.amoon@gmail.com>
> > > > > ---
> > > > >  Documentation/devicetree/bindings/usb/genesys,gl850g.yaml | 2 ++
> > > > >  1 file changed, 2 insertions(+)
> > > > >
> > > > > diff --git
> > > > > a/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml
> > > > > b/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml
> > > > > index a9f831448cca..db009f3ef438 100644
> > > > > --- a/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml
> > > > > +++ b/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml
> > > > > @@ -16,6 +16,8 @@ properties:
> > > > >    compatible:
> > > > >      enum:
> > > > >        - usb5e3,608
> > > > > +      - genesys,usb5e3,610
> > > > > +      - genesys,usb5e3,620
> > > >
> > > > I don't think genesys, is needed here because usb5e3 means USB VID
> > > > 0x05e3, which is already linked to Genesys Logic.
> > > >
> > >
> > > Ok, I added this as genesys, is it part of the manufacturer or vendor name
> > > which is most commonly used for adding vendor-specific compatible strings.
> >
> > That doesn't follow the generic USB binding, please drop 'genesys,'.
> >
> 
> Yes, I will drop this in the next version.
> 
> > > > In addition, the control logic of these two hubs are needed to be
> > > > verified.
> > >
> > > We were using gpio-hog to reset the USB hub, so now switch to USB onboard hub
> > >
> > > >
> > > > And what's the status of the companion hub of the USB3 hub? Is it
> > > > really a USB3-only hub, or is its USB2 part just equal to another USB3
> > > > hub?
> > > >
> > > usb5e3,610 is USB 2.0 port hub present on Odroid C1 and Odroid C2 board
> > >
> > > usb5e3,620 is USB 3.1 port hub present on Odroid N2.
> >
> > Like Icenowy I would expect the GL3523 to provide also a 2.0 hub.
> >
> > What is the output of 'lsusb' on the Odroid N2?
> 
> alarm@odroid-n2:~$ lsusb -tv
> /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
>     ID 1d6b:0003 Linux Foundation 3.0 root hub
>     |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
>         ID 05e3:0620 Genesys Logic, Inc. GL3523 Hub
> /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/2p, 480M
>     ID 1d6b:0002 Linux Foundation 2.0 root hub
>     |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
>         ID 05e3:0610 Genesys Logic, Inc. Hub

Thanks. So it looks like 0x0610 is the product id of the USB 2.0 portion
of the GL3523. From this patch it seems the GL852G uses the same product
id?

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 01/11] dt-bindings: usb: Add device id for Genesys Logic hub controller
  2023-01-09 16:29           ` Matthias Kaehlcke
@ 2023-01-09 17:48             ` Anand Moon
  0 siblings, 0 replies; 30+ messages in thread
From: Anand Moon @ 2023-01-09 17:48 UTC (permalink / raw)
  To: Matthias Kaehlcke
  Cc: Icenowy Zheng, Greg Kroah-Hartman, Rob Herring,
	Krzysztof Kozlowski, linux-amlogic, linux-usb, devicetree,
	linux-kernel

Hi Matthias,

On Mon, 9 Jan 2023 at 21:59, Matthias Kaehlcke <mka@chromium.org> wrote:
>
> On Sat, Jan 07, 2023 at 08:31:23PM +0530, Anand Moon wrote:
> > Hi Matthias,
> >
> > Thanks for the review comments
> >
> > On Thu, 5 Jan 2023 at 04:25, Matthias Kaehlcke <mka@chromium.org> wrote:
> > >
> > > On Wed, Dec 28, 2022 at 03:59:17PM +0530, Anand Moon wrote:
> > > > Hi Icenowy,
> > > >
> > > > Thanks for the review comments
> > > >
> > > > On Wed, 28 Dec 2022 at 15:38, Icenowy Zheng <uwu@icenowy.me> wrote:
> > > > >
> > > > > 在 2022-12-28星期三的 10:03 +0000,Anand Moon写道:
> > > > > > Add usb hub device id for Genesys Logic, Inc. GL852G-OHG Hub USB 2.0
> > > > > > root hub and Genesys Logic, Inc. GL3523-QFN76 USB 3.1 root hub.
> > >
> > > nit: QFN 76 is one of the package options of the GL3523, I expect this
> > > binding to be applicable as well for other GL3523 variants, so I'd suggest
> > > to drop the suffix. Not sure what 'OHG' stands for, the Genesys website
> > > only lists a GL852G hub with different package types (none of them 'OHG'),
> > > so I'd say drop the suffix unless it is known that 'OHG' variant uses
> > > a different product id than other GL852G variants
> > >
> >
> > Yes, I will be sure to do this reference, I just picked these from the
> > board schematics.
> >
> > > > > >
> > > > > > Signed-off-by: Anand Moon <linux.amoon@gmail.com>
> > > > > > ---
> > > > > >  Documentation/devicetree/bindings/usb/genesys,gl850g.yaml | 2 ++
> > > > > >  1 file changed, 2 insertions(+)
> > > > > >
> > > > > > diff --git
> > > > > > a/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml
> > > > > > b/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml
> > > > > > index a9f831448cca..db009f3ef438 100644
> > > > > > --- a/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml
> > > > > > +++ b/Documentation/devicetree/bindings/usb/genesys,gl850g.yaml
> > > > > > @@ -16,6 +16,8 @@ properties:
> > > > > >    compatible:
> > > > > >      enum:
> > > > > >        - usb5e3,608
> > > > > > +      - genesys,usb5e3,610
> > > > > > +      - genesys,usb5e3,620
> > > > >
> > > > > I don't think genesys, is needed here because usb5e3 means USB VID
> > > > > 0x05e3, which is already linked to Genesys Logic.
> > > > >
> > > >
> > > > Ok, I added this as genesys, is it part of the manufacturer or vendor name
> > > > which is most commonly used for adding vendor-specific compatible strings.
> > >
> > > That doesn't follow the generic USB binding, please drop 'genesys,'.
> > >
> >
> > Yes, I will drop this in the next version.
> >
> > > > > In addition, the control logic of these two hubs are needed to be
> > > > > verified.
> > > >
> > > > We were using gpio-hog to reset the USB hub, so now switch to USB onboard hub
> > > >
> > > > >
> > > > > And what's the status of the companion hub of the USB3 hub? Is it
> > > > > really a USB3-only hub, or is its USB2 part just equal to another USB3
> > > > > hub?
> > > > >
> > > > usb5e3,610 is USB 2.0 port hub present on Odroid C1 and Odroid C2 board
> > > >
> > > > usb5e3,620 is USB 3.1 port hub present on Odroid N2.
> > >
> > > Like Icenowy I would expect the GL3523 to provide also a 2.0 hub.
> > >
> > > What is the output of 'lsusb' on the Odroid N2?
> >
> > alarm@odroid-n2:~$ lsusb -tv
> > /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
> >     ID 1d6b:0003 Linux Foundation 3.0 root hub
> >     |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
> >         ID 05e3:0620 Genesys Logic, Inc. GL3523 Hub
> > /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/2p, 480M
> >     ID 1d6b:0002 Linux Foundation 2.0 root hub
> >     |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
> >         ID 05e3:0610 Genesys Logic, Inc. Hub
>
> Thanks. So it looks like 0x0610 is the product id of the USB 2.0 portion
> of the GL3523. From this patch it seems the GL852G uses the same product
> id?

Yes, it looks correct as per the lsusb output

Thanks
-Anand

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2023-01-09 17:52 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20221228100321.15949-1-linux.amoon@gmail.com>
2022-12-28 10:03 ` [PATCH v1 01/11] dt-bindings: usb: Add device id for Genesys Logic hub controller Anand Moon
2022-12-28 10:08   ` Icenowy Zheng
2022-12-28 10:29     ` Anand Moon
2023-01-04 22:54       ` Matthias Kaehlcke
2023-01-07 15:01         ` Anand Moon
2023-01-09 16:29           ` Matthias Kaehlcke
2023-01-09 17:48             ` Anand Moon
2022-12-28 15:08   ` Krzysztof Kozlowski
2022-12-28 15:18     ` Anand Moon
2022-12-28 10:03 ` [PATCH v1 02/11] ARM: dts: amlogic: Used onboard usb hub reset to enable usb hub Anand Moon
2022-12-28 15:08   ` Krzysztof Kozlowski
2023-01-07 14:59     ` Anand Moon
2022-12-28 10:03 ` [PATCH v1 03/11] arm64: dts: amlogic: Used onboard usb hub reset on odroid c2 Anand Moon
2022-12-28 12:51   ` Martin Blumenstingl
2022-12-28 14:44     ` Anand Moon
2023-01-04  8:13       ` Anand Moon
2023-01-04  8:56         ` Neil Armstrong
2023-01-04  9:17           ` Anand Moon
2023-01-04  9:36         ` Alexander Stein
2023-01-07 14:56           ` Anand Moon
2022-12-28 10:03 ` [PATCH v1 04/11] arm64: dts: amlogic: Used onboard usb hub reset on odroid n2 Anand Moon
2022-12-28 10:03 ` [PATCH v1 07/11] vendor-prefixes: Add VIA Labs, Inc Anand Moon
2022-12-28 15:11   ` Krzysztof Kozlowski
2022-12-28 10:03 ` [PATCH v1 08/11] dt-bindings: usb: Add binding for Via lab VL817Q7 hub controller Anand Moon
2022-12-28 11:02   ` Johan Hovold
2022-12-28 11:09     ` Anand Moon
2022-12-28 17:16   ` Rob Herring
2023-01-04 22:37   ` Matthias Kaehlcke
2023-01-07 15:00     ` Anand Moon
2022-12-28 10:03 ` [PATCH v1 09/11] arm64: dts: meson-sm1-odroid-c4: Used onboard usb hub reset on odroid c4 Anand Moon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).