Linux-USB Archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 1/9] dt-bindings: usb: Add device id for Genesys Logic hub controller
       [not found] <20230121175639.12818-1-linux.amoon@gmail.com>
@ 2023-01-21 17:56 ` Anand Moon
  2023-01-25 14:34   ` Greg Kroah-Hartman
  2023-01-21 17:56 ` [PATCH v3 4/9] usb: misc: onboard_usb_hub: add Genesys Logic GL852G hub support Anand Moon
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Anand Moon @ 2023-01-21 17:56 UTC (permalink / raw
  To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Icenowy Zheng
  Cc: linux-amlogic, Matthias Kaehlcke, Alexander Stein, Johan Hovold,
	Krzysztof Kozlowski, linux-usb, devicetree, linux-kernel

Add usb hub device id for Genesys Logic, Inc. GL852G Hub USB 2.0
root hub.

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Anand Moon <linux.amoon@gmail.com>
---
v3: - add Ack of Krzysztof
v2: - drop the vendor name from compatible string.
    - drop the -OTG and -QFN76 suffix from commit message.
    - drop the GL3523 USB 3.1 root hub device id.
---
 Documentation/devicetree/bindings/usb/genesys,gl850g.yaml | 1 +
 1 file changed, 1 insertion(+)

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


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

* [PATCH v3 4/9] usb: misc: onboard_usb_hub: add Genesys Logic GL852G hub support
       [not found] <20230121175639.12818-1-linux.amoon@gmail.com>
  2023-01-21 17:56 ` [PATCH v3 1/9] dt-bindings: usb: Add device id for Genesys Logic hub controller Anand Moon
@ 2023-01-21 17:56 ` Anand Moon
  2023-01-21 17:56 ` [PATCH v3 6/9] dt-bindings: usb: Add Via lab VL817 hub Anand Moon
  2023-01-21 17:56 ` [PATCH v3 8/9] usb: misc: onboard_usb_hub: add VIA LAB VL817 hub support Anand Moon
  3 siblings, 0 replies; 7+ messages in thread
From: Anand Moon @ 2023-01-21 17:56 UTC (permalink / raw
  To: Matthias Kaehlcke, Greg Kroah-Hartman
  Cc: linux-amlogic, Alexander Stein, Johan Hovold, linux-usb,
	linux-kernel

Genesys Logic GL852G is a 4-port USB 2.0 STT hub that has a reset pin to
toggle and a 5.0V core supply exported though an integrated LDO is
available for powering it.

Add the support for this hub, for controlling the reset pin and the core
power supply.

Acked-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Anand Moon <linux.amoon@gmail.com>
---
v3: - Add Ack Matthias
v2: - fix the compatible string
    - drop the -OHG suffix from commit message.
    - Add reset delay.
---
 drivers/usb/misc/onboard_usb_hub.c | 1 +
 drivers/usb/misc/onboard_usb_hub.h | 5 +++++
 2 files changed, 6 insertions(+)

diff --git a/drivers/usb/misc/onboard_usb_hub.c b/drivers/usb/misc/onboard_usb_hub.c
index 94e7966e199d..9bf59792fb94 100644
--- a/drivers/usb/misc/onboard_usb_hub.c
+++ b/drivers/usb/misc/onboard_usb_hub.c
@@ -409,6 +409,7 @@ static void onboard_hub_usbdev_disconnect(struct usb_device *udev)
 
 static const struct usb_device_id onboard_hub_id_table[] = {
 	{ USB_DEVICE(VENDOR_ID_GENESYS, 0x0608) }, /* Genesys Logic GL850G USB 2.0 */
+	{ USB_DEVICE(VENDOR_ID_GENESYS, 0x0610) }, /* Genesys Logic GL852G USB 2.0 */
 	{ USB_DEVICE(VENDOR_ID_MICROCHIP, 0x2514) }, /* USB2514B USB 2.0 */
 	{ USB_DEVICE(VENDOR_ID_REALTEK, 0x0411) }, /* RTS5411 USB 3.1 */
 	{ USB_DEVICE(VENDOR_ID_REALTEK, 0x5411) }, /* RTS5411 USB 2.1 */
diff --git a/drivers/usb/misc/onboard_usb_hub.h b/drivers/usb/misc/onboard_usb_hub.h
index 62129a6a1ba5..163fc07abf25 100644
--- a/drivers/usb/misc/onboard_usb_hub.h
+++ b/drivers/usb/misc/onboard_usb_hub.h
@@ -26,11 +26,16 @@ static const struct onboard_hub_pdata genesys_gl850g_data = {
 	.reset_us = 3,
 };
 
+static const struct onboard_hub_pdata genesys_gl852g_data = {
+	.reset_us = 50,
+};
+
 static const struct of_device_id onboard_hub_match[] = {
 	{ .compatible = "usb424,2514", .data = &microchip_usb424_data, },
 	{ .compatible = "usb451,8140", .data = &ti_tusb8041_data, },
 	{ .compatible = "usb451,8142", .data = &ti_tusb8041_data, },
 	{ .compatible = "usb5e3,608", .data = &genesys_gl850g_data, },
+	{ .compatible = "usb5e3,610", .data = &genesys_gl852g_data, },
 	{ .compatible = "usbbda,411", .data = &realtek_rts5411_data, },
 	{ .compatible = "usbbda,5411", .data = &realtek_rts5411_data, },
 	{ .compatible = "usbbda,414", .data = &realtek_rts5411_data, },
-- 
2.38.1


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

* [PATCH v3 6/9] dt-bindings: usb: Add Via lab VL817 hub
       [not found] <20230121175639.12818-1-linux.amoon@gmail.com>
  2023-01-21 17:56 ` [PATCH v3 1/9] dt-bindings: usb: Add device id for Genesys Logic hub controller Anand Moon
  2023-01-21 17:56 ` [PATCH v3 4/9] usb: misc: onboard_usb_hub: add Genesys Logic GL852G hub support Anand Moon
@ 2023-01-21 17:56 ` Anand Moon
  2023-01-21 18:52   ` Krzysztof Kozlowski
  2023-01-21 17:56 ` [PATCH v3 8/9] usb: misc: onboard_usb_hub: add VIA LAB VL817 hub support Anand Moon
  3 siblings, 1 reply; 7+ messages in thread
From: Anand Moon @ 2023-01-21 17:56 UTC (permalink / raw
  To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski
  Cc: linux-amlogic, Matthias Kaehlcke, Alexander Stein, Johan Hovold,
	linux-usb, devicetree, linux-kernel

The VIA Lab VL817 is a USB 3.1 Gen 1 hub and USB 2.0 hub
controller that features 4 downstream ports and 1 otg, with
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.

Add combo of USB 2.0 and USB 3.0 root hub using peer-hub.

Signed-off-by: Anand Moon <linux.amoon@gmail.com>
---
v3 - address review coments - Krzysztof
     dropped dr_mode
v2 - fix the compatible string and fix the $id
   - update the commit message.
   - update the example for use peer-hub node because it
     combo of USB 2.0 and USB 3.0 hub.
   - rename the yaml file from vialab,vl817q7.yaml to vialab,vl817.yaml
     as q7 suffix is ued for USB 3.1 and q5 suffix is used for USB 2.0.
---
 .../devicetree/bindings/usb/vialab,vl817.yaml | 71 +++++++++++++++++++
 1 file changed, 71 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/usb/vialab,vl817.yaml

diff --git a/Documentation/devicetree/bindings/usb/vialab,vl817.yaml b/Documentation/devicetree/bindings/usb/vialab,vl817.yaml
new file mode 100644
index 000000000000..23a13e1d5c7a
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/vialab,vl817.yaml
@@ -0,0 +1,71 @@
+# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/vialab,vl817.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Via labs VL817 USB 3.1 hub controller
+
+maintainers:
+  - Anand Moon <linux.amoon@gmail.com>
+
+allOf:
+  - $ref: usb-device.yaml#
+
+properties:
+  compatible:
+    enum:
+      - usb2109,2817
+      - usb2109,817
+
+  reg: true
+
+  reset-gpios:
+    maxItems: 1
+    description:
+      GPIO controlling the RESET# pin.
+
+  vdd-supply:
+    description:
+      phandle to the regulator that provides power to the hub.
+
+  peer-hub:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description:
+      phandle to the peer hub on the controller.
+
+required:
+  - compatible
+  - reg
+  - reset-gpios
+  - vdd-supply
+  - peer-hub
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    usb {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        /* 2.0 hub on port 1 */
+        hub_2_0: hub@1 {
+            compatible = "usb2109,2817";
+            reg = <1>;
+            vdd-supply = <&vcc_5v>;
+            peer-hub = <&hub_3_0>;
+            reset-gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
+        };
+
+        /* 3.1 hub on port 4 */
+        hub_3_0: hub@2 {
+            compatible = "usb2109,817";
+            reg = <2>;
+            vdd-supply = <&vcc_5v>;
+            peer-hub = <&hub_2_0>;
+            reset-gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
+        };
+    };
-- 
2.38.1


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

* [PATCH v3 8/9] usb: misc: onboard_usb_hub: add VIA LAB VL817 hub support
       [not found] <20230121175639.12818-1-linux.amoon@gmail.com>
                   ` (2 preceding siblings ...)
  2023-01-21 17:56 ` [PATCH v3 6/9] dt-bindings: usb: Add Via lab VL817 hub Anand Moon
@ 2023-01-21 17:56 ` Anand Moon
  3 siblings, 0 replies; 7+ messages in thread
From: Anand Moon @ 2023-01-21 17:56 UTC (permalink / raw
  To: Matthias Kaehlcke, Greg Kroah-Hartman
  Cc: linux-amlogic, Alexander Stein, Johan Hovold, linux-usb,
	linux-kernel

VIA LAB VL817 is a 4-port USB 3.1 hub and USB 2.0 root hub
that has a reset pin to toggle and a 5.0V core supply exported
though an integrated LDO is available for powering it.

Add the support for this hub, for controlling the reset pin and
the core power supply.

Add USB device id's for USB 2.0 and USB 3.0 root hub.

Acked-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Anand Moon <linux.amoon@gmail.com>
---
v3 - Add ack Matthias
v2 - fix the compatible string and update the commit message
   - update the USB device id for USB 3.0 and USB 2.0 root hub.
---
 drivers/usb/misc/onboard_usb_hub.c | 3 +++
 drivers/usb/misc/onboard_usb_hub.h | 6 ++++++
 2 files changed, 9 insertions(+)

diff --git a/drivers/usb/misc/onboard_usb_hub.c b/drivers/usb/misc/onboard_usb_hub.c
index 9bf59792fb94..945d4e7125ea 100644
--- a/drivers/usb/misc/onboard_usb_hub.c
+++ b/drivers/usb/misc/onboard_usb_hub.c
@@ -335,6 +335,7 @@ static struct platform_driver onboard_hub_driver = {
 #define VENDOR_ID_MICROCHIP	0x0424
 #define VENDOR_ID_REALTEK	0x0bda
 #define VENDOR_ID_TI		0x0451
+#define VENDOR_ID_VIA		0x2109
 
 /*
  * Returns the onboard_hub platform device that is associated with the USB
@@ -417,6 +418,8 @@ static const struct usb_device_id onboard_hub_id_table[] = {
 	{ USB_DEVICE(VENDOR_ID_REALTEK, 0x5414) }, /* RTS5414 USB 2.1 */
 	{ USB_DEVICE(VENDOR_ID_TI, 0x8140) }, /* TI USB8041 3.0 */
 	{ USB_DEVICE(VENDOR_ID_TI, 0x8142) }, /* TI USB8041 2.0 */
+	{ USB_DEVICE(VENDOR_ID_VIA, 0x0817) }, /* VIA VL817 3.1 */
+	{ USB_DEVICE(VENDOR_ID_VIA, 0x2817) }, /* VIA VL817 2.0 */
 	{}
 };
 MODULE_DEVICE_TABLE(usb, onboard_hub_id_table);
diff --git a/drivers/usb/misc/onboard_usb_hub.h b/drivers/usb/misc/onboard_usb_hub.h
index 163fc07abf25..0a943a154649 100644
--- a/drivers/usb/misc/onboard_usb_hub.h
+++ b/drivers/usb/misc/onboard_usb_hub.h
@@ -30,6 +30,10 @@ static const struct onboard_hub_pdata genesys_gl852g_data = {
 	.reset_us = 50,
 };
 
+static const struct onboard_hub_pdata vialab_vl817_data = {
+	.reset_us = 10,
+};
+
 static const struct of_device_id onboard_hub_match[] = {
 	{ .compatible = "usb424,2514", .data = &microchip_usb424_data, },
 	{ .compatible = "usb451,8140", .data = &ti_tusb8041_data, },
@@ -40,6 +44,8 @@ static const struct of_device_id onboard_hub_match[] = {
 	{ .compatible = "usbbda,5411", .data = &realtek_rts5411_data, },
 	{ .compatible = "usbbda,414", .data = &realtek_rts5411_data, },
 	{ .compatible = "usbbda,5414", .data = &realtek_rts5411_data, },
+	{ .compatible = "usb2109,817", .data = &vialab_vl817_data, },
+	{ .compatible = "usb2109,2817", .data = &vialab_vl817_data, },
 	{}
 };
 
-- 
2.38.1


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

* Re: [PATCH v3 6/9] dt-bindings: usb: Add Via lab VL817 hub
  2023-01-21 17:56 ` [PATCH v3 6/9] dt-bindings: usb: Add Via lab VL817 hub Anand Moon
@ 2023-01-21 18:52   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2023-01-21 18:52 UTC (permalink / raw
  To: Anand Moon, Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski
  Cc: linux-amlogic, Matthias Kaehlcke, Alexander Stein, Johan Hovold,
	linux-usb, devicetree, linux-kernel

On 21/01/2023 18:56, Anand Moon wrote:
> The VIA Lab VL817 is a USB 3.1 Gen 1 hub and USB 2.0 hub
> controller that features 4 downstream ports and 1 otg, with
> 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.
> 
> Add combo of USB 2.0 and USB 3.0 root hub using peer-hub.
> 
> Signed-off-by: Anand Moon <linux.amoon@gmail.com>
> ---
> v3 - address review coments - Krzysztof

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

Best regards,
Krzysztof


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

* Re: [PATCH v3 1/9] dt-bindings: usb: Add device id for Genesys Logic hub controller
  2023-01-21 17:56 ` [PATCH v3 1/9] dt-bindings: usb: Add device id for Genesys Logic hub controller Anand Moon
@ 2023-01-25 14:34   ` Greg Kroah-Hartman
  2023-01-25 14:41     ` Anand Moon
  0 siblings, 1 reply; 7+ messages in thread
From: Greg Kroah-Hartman @ 2023-01-25 14:34 UTC (permalink / raw
  To: Anand Moon
  Cc: Rob Herring, Krzysztof Kozlowski, Icenowy Zheng, linux-amlogic,
	Matthias Kaehlcke, Alexander Stein, Johan Hovold,
	Krzysztof Kozlowski, linux-usb, devicetree, linux-kernel

On Sat, Jan 21, 2023 at 05:56:29PM +0000, Anand Moon wrote:
> Add usb hub device id for Genesys Logic, Inc. GL852G Hub USB 2.0
> root hub.
> 
> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Signed-off-by: Anand Moon <linux.amoon@gmail.com>
> ---
> v3: - add Ack of Krzysztof
> v2: - drop the vendor name from compatible string.
>     - drop the -OTG and -QFN76 suffix from commit message.
>     - drop the GL3523 USB 3.1 root hub device id.

I only see 4 of the 9 patches sent to the linux-usb list and cc: me, so
I'm totally confused.

I'll drop them all from my review queue now and expect a full series to
show up if they are needed to be merged through the USB tree

thanks,

greg k-h

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

* Re: [PATCH v3 1/9] dt-bindings: usb: Add device id for Genesys Logic hub controller
  2023-01-25 14:34   ` Greg Kroah-Hartman
@ 2023-01-25 14:41     ` Anand Moon
  0 siblings, 0 replies; 7+ messages in thread
From: Anand Moon @ 2023-01-25 14:41 UTC (permalink / raw
  To: Greg Kroah-Hartman
  Cc: Rob Herring, Krzysztof Kozlowski, Icenowy Zheng, linux-amlogic,
	Matthias Kaehlcke, Alexander Stein, Johan Hovold,
	Krzysztof Kozlowski, linux-usb, devicetree, linux-kernel

Hi Greg,

Thanks for your review comments.

On Wed, 25 Jan 2023 at 20:04, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> On Sat, Jan 21, 2023 at 05:56:29PM +0000, Anand Moon wrote:
> > Add usb hub device id for Genesys Logic, Inc. GL852G Hub USB 2.0
> > root hub.
> >
> > Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> > Signed-off-by: Anand Moon <linux.amoon@gmail.com>
> > ---
> > v3: - add Ack of Krzysztof
> > v2: - drop the vendor name from compatible string.
> >     - drop the -OTG and -QFN76 suffix from commit message.
> >     - drop the GL3523 USB 3.1 root hub device id.
>
> I only see 4 of the 9 patches sent to the linux-usb list and cc: me, so
> I'm totally confused.
>
> I'll drop them all from my review queue now and expect a full series to
> show up if they are needed to be merged through the USB tree
>
> thanks,
>

Sorry for this mixup from my side.
I will send the full series of patches again tmr

> greg k-h

Thanks
-Anand

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

end of thread, other threads:[~2023-01-25 14:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20230121175639.12818-1-linux.amoon@gmail.com>
2023-01-21 17:56 ` [PATCH v3 1/9] dt-bindings: usb: Add device id for Genesys Logic hub controller Anand Moon
2023-01-25 14:34   ` Greg Kroah-Hartman
2023-01-25 14:41     ` Anand Moon
2023-01-21 17:56 ` [PATCH v3 4/9] usb: misc: onboard_usb_hub: add Genesys Logic GL852G hub support Anand Moon
2023-01-21 17:56 ` [PATCH v3 6/9] dt-bindings: usb: Add Via lab VL817 hub Anand Moon
2023-01-21 18:52   ` Krzysztof Kozlowski
2023-01-21 17:56 ` [PATCH v3 8/9] usb: misc: onboard_usb_hub: add VIA LAB VL817 hub support 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 read-only IMAP folder(s) and NNTP newsgroup(s).