Skip to contentSkip to conversation

usb: misc: onboard_usb_dev: Add Genesys Logic GL3525 hub support

PATCH New Fei Shao 2 participants 5 messages Nov 11

Subsystems (3)
lore
Share & tools
lore

Fei Shao

author
#0 lore raw

cover usb: misc: onboard_usb_dev: Add Genesys Logic GL3525 hub support

This series adds DT binding and onboard_usb_dev driver support for the Genesys Logic GL3525 hub controller.

Fei Shao (2):
dt-bindings: usb: Add Genesys Logic GL3525 hub controller
usb: misc: onboard_usb_dev: Add Genesys Logic GL3525 hub support

 Documentation/devicetree/bindings/usb/genesys,gl850g.yaml | 4 ++++
 drivers/usb/misc/onboard_usb_dev.c                        | 2 ++
 drivers/usb/misc/onboard_usb_dev.h                        | 2 ++
 3 files changed, 8 insertions(+)
Signature · 1 line
2.56.0.542.g3ef89b7020-goog
author
#1 lore raw

PATCH 1/2 dt-bindings: usb: Add Genesys Logic GL3525 hub controller

Add USB 3.2 (usb5e3,629) and USB 2.0 (usb5e3,630) compatibles for the Genesys Logic GL3525 hub controller, which is powered by a 5V VDD supply like GL3523.

---

 Documentation/devicetree/bindings/usb/genesys,gl850g.yaml | 4 ++++
 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/usb/genesys,gl850g.yaml +4 -0
index e8b8c03f87a0..5153a988a835 100644
@@ -17,6 +17,8 @@ properties:
       - usb5e3,620
       - usb5e3,625
       - usb5e3,626
+      - usb5e3,629
+      - usb5e3,630
 
   reg: true
 
@@ -70,6 +72,8 @@ allOf:
             enum:
               - usb5e3,610
               - usb5e3,620
+              - usb5e3,629
+              - usb5e3,630
     then:
       properties:
         peer-hub: true
Signature · 1 line
2.56.0.542.g3ef89b7020-goog
#2 lore raw

Re: [PATCH 1/2] dt-bindings: usb: Add Genesys Logic GL3525 hub controller

Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] dt-bindings: usb: unwieldy per-compatible conditionals in genesys,gl850g.yaml --

Thank you for your contribution! Sashiko AI review found 1 potential issue to consider:
- [Low] dt-bindings: usb: unwieldy per-compatible conditionals in genesys,gl850g.yaml
--

commit 74488a0f4f0a5f370e0fe57ea84abc8dcd904262
Author: Fei Shao <[email protected]>

dt-bindings: usb: Add Genesys Logic GL3525 hub controller

This commit adds the USB 3.2 (usb5e3,629) and USB 2.0 (usb5e3,630) compatible strings for the Genesys Logic GL3525 hub controller to genesys,gl850g.yaml.

Quoted 4 lines
Documentation/devicetree/bindings/usb/genesys,gl850g.yaml +0 -0
index e8b8c03f87a0e..5153a988a835e 100644

[ ... ]

Documentation/devicetree/bindings/usb/genesys,gl850g.yaml allOf: · line 79

Quoted 9 lines
Documentation/devicetree/bindings/usb/genesys,gl850g.yaml +2 -0
@@ -70,6 +72,8 @@ allOf:
             enum:
               - usb5e3,610
               - usb5e3,620
+              - usb5e3,629
+              - usb5e3,630
     then:
       properties:
         peer-hub: true

[Severity: Low]
This isn't a bug, but the per-compatible if-then conditionals in allOf are becoming unwieldy and inconsistent as more hub variants with different supply and peer-hub rules are added to genesys,gl850g.yaml.

In particular, setting peer-hub: true and vdd-supply: true in the then blocks is redundant because those properties are already defined at the top level, usb5e3,626 is omitted from the conditionals entirely (leaving vdd12-supply allowed on usb5e3,626 while disallowing it here), and usb5e3,610 is restricted to vdd12-supply: false even when paired as the USB 2.0 companion hub for GL3590 (usb5e3,625). Could these variants be split into separate schema documents, or the conditionals simplified to only restrict the properties that do not apply to specific compatibles?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
author
#3 lore raw

PATCH 2/2 usb: misc: onboard_usb_dev: Add Genesys Logic GL3525 hub support

In reply to Fei Shao

Add support for the Genesys Logic GL3525 USB 3.2 (05e3:0629) and USB 2.0 (05e3:0630) hub controller, which shares the same reset duration and one VDD supply as GL3523.

---

 drivers/usb/misc/onboard_usb_dev.c | 2 ++
 drivers/usb/misc/onboard_usb_dev.h | 2 ++
 2 files changed, 4 insertions(+)
drivers/usb/misc/onboard_usb_dev.c +2 -0
index 0606d405c16f..3bf03e1d1287 100644
@@ -666,6 +666,8 @@ static const struct usb_device_id onboard_dev_id_table[] = {
 	{ USB_DEVICE(VENDOR_ID_GENESYS, 0x0610) }, /* Genesys Logic GL852G USB 2.0 HUB */
 	{ USB_DEVICE(VENDOR_ID_GENESYS, 0x0620) }, /* Genesys Logic GL3523 USB 3.1 HUB */
 	{ USB_DEVICE(VENDOR_ID_GENESYS, 0x0625) }, /* Genesys Logic GL3590 USB 3.2 HUB */
+	{ USB_DEVICE(VENDOR_ID_GENESYS, 0x0629) }, /* Genesys Logic GL3525 USB 3.2 HUB */
+	{ USB_DEVICE(VENDOR_ID_GENESYS, 0x0630) }, /* Genesys Logic GL3525 USB 2.0 HUB */
 	{ USB_DEVICE(VENDOR_ID_MICROCHIP, 0x2412) }, /* USB2412 USB 2.0 HUB */
 	{ USB_DEVICE(VENDOR_ID_MICROCHIP, 0x2514) }, /* USB2514B USB 2.0 HUB */
 	{ USB_DEVICE(VENDOR_ID_MICROCHIP, 0x2517) }, /* USB2517 USB 2.0 HUB */
drivers/usb/misc/onboard_usb_dev.h +2 -0
index 3523f8f8a149..b1844a068ddd 100644
@@ -155,6 +155,8 @@ static const struct of_device_id onboard_dev_match[] = {
 	{ .compatible = "usb5e3,620", .data = &genesys_gl852g_data, },
 	{ .compatible = "usb5e3,625", .data = &genesys_gl3590_data, },
 	{ .compatible = "usb5e3,626", .data = &genesys_gl852g_data, },
+	{ .compatible = "usb5e3,629", .data = &genesys_gl852g_data, },
+	{ .compatible = "usb5e3,630", .data = &genesys_gl852g_data, },
 	{ .compatible = "usbbda,179", .data = &realtek_rtl8188etv_data, },
 	{ .compatible = "usbbda,411", .data = &realtek_rts5411_data, },
 	{ .compatible = "usbbda,5411", .data = &realtek_rts5411_data, },
Signature · 1 line
2.56.0.542.g3ef89b7020-goog
#4 lore raw
Sashiko has reviewed this patch and found no issues.
Quoted 5 lines

Add support for the Genesys Logic GL3525 USB 3.2 (05e3:0629) and USB 2.0 (05e3:0630) hub controller, which shares the same reset duration and one VDD supply as GL3523.

Sashiko has reviewed this patch and found no issues.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2