Skip to contentSkip to conversation

dt-bindings: usb: Add microchip USB5807 HUB

PATCH In review Mike Looijmans 3 participants 6 messages May 22, 2023 – Nov 21, 2024 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 1b153bce-a66a-45ee-a5c6-963ea6fb1c82.949ef384-8293-46b8-903f-40a477c056ae.656f2a13-85bf-42a3-8490-f97f2538d8c3@emailsignatures365.codetwo.com

#1 lore raw

PATCH v3 1/2 dt-bindings: usb: Add microchip USB5807 HUB

The USB5807 is a 7-port USB 3.1 hub that can be configured by I2C. This driver resets the chip, optionally allows D+/D- lines to be swapped in the devicetree config, and then sends an ATTACH command to put the device in operational mode.

---

Changes in v3:
Add minItems

Changes in v2:
Rename to microchip,usb5807.yaml
Remove reset-gpios description
Add maxItems
Add vddXX-supply properties

 .../bindings/usb/microchip,usb5807.yaml       | 58 +++++++++++++++++++
 1 file changed, 58 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/usb/microchip,usb5807.yaml
Documentation/devicetree/bindings/usb/microchip,usb5807.yaml new file +58 -0
new file mode 100644
index 000000000000..0a92b2f9802e
@@ -0,0 +1,58 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/microchip,usb5807.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Microchip USB 3.1 SuperSpeed Hub Controller
+
+maintainers:
+  - Mike Looijmans <[email protected]>
+
+properties:
+  compatible:
+    enum:
+      - microchip,usb5807
+
+  reg:
+    maxItems: 1
+
+  reset-gpios:
+    maxItems: 1
+
+  vdd12-supply:
+    description: core power supply (1.2V)
+
+  vdd33-supply:
+    description: main power supply (3.3V)
+
+  swap-dx-lanes:
+    $ref: /schemas/types.yaml#/definitions/uint32-array
+    minItems: 1
+    maxItems: 8
+    description:
+      Specifies the ports which will swap the differential-pair (D+/D-),
+      default is not-swapped.
+
+additionalProperties: false
+
+required:
+  - compatible
+  - reg
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      usb-hub@2d {
+        compatible = "microchip,usb5807";
+        reg = <0x2d>;
+        reset-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
+        /* Swapped D+/D- on port 0 */
+        swap-dx-lanes = <0>;
+      };
+    };
Signature · 18 lines
2.17.1


Met vriendelijke groet / kind regards,

Mike Looijmans
System Expert


TOPIC Embedded Products B.V.
Materiaalweg 4, 5681 RJ Best
The Netherlands

T: +31 (0) 499 33 69 69
E: [email protected]
W: www.topic.nl

Please consider the environment before printing this e-mail
#2 lore raw

PATCH v3 2/2 usb: misc: usb5807: Add driver

The USB5807 is a 7-port USB 3.1 hub that can be configured by I2C. This drivers resets the chip, optionally allows D+/D- lines to be swapped in the devicetree config, and then sends an ATTACH command to put the device in operational mode.

---

(no changes since v2)

Changes in v2:
Add regulator support for vddXX supplies

 drivers/usb/misc/Kconfig   |   9 ++
 drivers/usb/misc/Makefile  |   1 +
 drivers/usb/misc/usb5807.c | 184 +++++++++++++++++++++++++++++++++++++
 3 files changed, 194 insertions(+)
 create mode 100644 drivers/usb/misc/usb5807.c
drivers/usb/misc/Kconfig +9 -0
index 99b15b77dfd5..6659e917ea26 100644
@@ -251,6 +251,15 @@ config USB_EZUSB_FX2
 	  Say Y here if you need EZUSB device support.
 	  (Cypress FX/FX2/FX2LP microcontrollers)
 
+config USB_HUB_USB5807
+	tristate "USB5807 Hub Controller Configuration Driver"
+	depends on I2C
+	help
+	  This option enables support for configuration via SMBus of the
+	  Microchip USB5807 USB 3.1 Hub Controller. Configuration parameters may
+	  be set in devicetree.
+	  Say Y or M here if you need to configure such a device via SMBus.
+
 config USB_HUB_USB251XB
 	tristate "USB251XB Hub Controller Configuration Driver"
 	depends on I2C
drivers/usb/misc/Makefile +1 -0
index 1992cc284d8a..e827ed251fa5 100644
@@ -25,6 +25,7 @@ obj-$(CONFIG_USB_USS720)		+= uss720.o
 obj-$(CONFIG_USB_SEVSEG)		+= usbsevseg.o
 obj-$(CONFIG_USB_YUREX)			+= yurex.o
 obj-$(CONFIG_USB_HUB_USB251XB)		+= usb251xb.o
+obj-$(CONFIG_USB_HUB_USB5807)		+= usb5807.o
 obj-$(CONFIG_USB_HSIC_USB3503)		+= usb3503.o
 obj-$(CONFIG_USB_HSIC_USB4604)		+= usb4604.o
 obj-$(CONFIG_USB_CHAOSKEY)		+= chaoskey.o
drivers/usb/misc/usb5807.c new file +184 -0

184 lines not on this page · raw message

Signature · 18 lines
2.17.1


Met vriendelijke groet / kind regards,

Mike Looijmans
System Expert


TOPIC Embedded Products B.V.
Materiaalweg 4, 5681 RJ Best
The Netherlands

T: +31 (0) 499 33 69 69
E: [email protected]
W: www.topic.nl

Please consider the environment before printing this e-mail
maintainer
#3 lore raw
In reply to Mike Looijmans
Quoted 18 lines · Mike Looijmans

The USB5807 is a 7-port USB 3.1 hub that can be configured by I2C. This driver resets the chip, optionally allows D+/D- lines to be swapped in the devicetree config, and then sends an ATTACH command to put the device in operational mode.

---

Changes in v3:
Add minItems

Changes in v2:
Rename to microchip,usb5807.yaml
Remove reset-gpios description
Add maxItems
Add vddXX-supply properties

Quoted 4 lines
 .../bindings/usb/microchip,usb5807.yaml       | 58 +++++++++++++++++++
 1 file changed, 58 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/usb/microchip,usb5807.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/usb251xb.example.dtb: usb-hub@2d: swap-dx-lanes: size is 32, expected 8
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/usb/usb251xb.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]

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.

#4 lore raw

Hi @Mike

Do you have plans to mainline this change?

We are using microchip hub in one of our project and we need this driver, we have taken your change and able to enable usb hub.
Please check if you can push updated patchset addressing the comments from Rob.

Quoted 43 lines · Rob Herring
Quoted 18 lines · Mike Looijmans

The USB5807 is a 7-port USB 3.1 hub that can be configured by I2C. This driver resets the chip, optionally allows D+/D- lines to be swapped in the devicetree config, and then sends an ATTACH command to put the device in operational mode.

---

Changes in v3:
Add minItems

Changes in v2:
Rename to microchip,usb5807.yaml
Remove reset-gpios description
Add maxItems
Add vddXX-supply properties

Quoted 4 lines
  .../bindings/usb/microchip,usb5807.yaml       | 58 +++++++++++++++++++
  1 file changed, 58 insertions(+)

create mode 100644 Documentation/devicetree/bindings/usb/microchip,usb5807.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/usb251xb.example.dtb: usb-hub@2d: swap-dx-lanes: size is 32, expected 8
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/usb/usb251xb.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]

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:

Quoted 5 lines

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.

Thanks,
Akash

#5 lore raw

Hi Akash,

I was planning to, but the project was terminated so there was no budget to finalize it. You're free to take over and make the required changes.

M.

Quoted 59 lines · AKASH KUMAR

Hi @Mike

Do you have plans to mainline this change?

We are using microchip hub in one of our project and we need this driver, we have taken your change and able to enable usb hub.
Please check if you can push updated patchset addressing the comments from Rob.

Quoted 43 lines · Rob Herring
Quoted 18 lines · Mike Looijmans

The USB5807 is a 7-port USB 3.1 hub that can be configured by I2C. This driver resets the chip, optionally allows D+/D- lines to be swapped in the devicetree config, and then sends an ATTACH command to put the device in operational mode.

---

Changes in v3:
Add minItems

Changes in v2:
Rename to microchip,usb5807.yaml
Remove reset-gpios description
Add maxItems
Add vddXX-supply properties

Quoted 4 lines

  .../bindings/usb/microchip,usb5807.yaml       | 58 +++++++++++++++++++

  1 file changed, 58 insertions(+)

  create mode 100644 Documentation/devicetree/bindings/usb/microchip,usb5807.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/usb251xb.example.dtb: usb-hub@2d: swap-dx-lanes: size is 32, expected 8 From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/usb/usb251xb.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]

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:

Quoted 5 lines

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.

Thanks,
Akash

#6 lore raw
Quoted 5 lines · Mike Looijmans

Hi Akash,

I was planning to, but the project was terminated so there was no budget to finalize it. You're free to take over and make the required changes.

M.

Thanks for quick response, will push the updated patchset. Akash

Quoted 61 lines · AKASH KUMAR
Quoted 59 lines

Hi @Mike

Do you have plans to mainline this change?

We are using microchip hub in one of our project and we need this driver, we have taken your change and able to enable usb hub.
Please check if you can push updated patchset addressing the comments from Rob.

Quoted 49 lines · Rob Herring
Quoted 18 lines · Mike Looijmans

The USB5807 is a 7-port USB 3.1 hub that can be configured by I2C. This driver resets the chip, optionally allows D+/D- lines to be swapped in the devicetree config, and then sends an ATTACH command to put the device in operational mode.

---

Changes in v3:
Add minItems

Changes in v2:
Rename to microchip,usb5807.yaml
Remove reset-gpios description
Add maxItems
Add vddXX-supply properties

Quoted 5 lines

  .../bindings/usb/microchip,usb5807.yaml       | 58
+++++++++++++++++++

  1 file changed, 58 insertions(+)

  create mode 100644 Documentation/devicetree/bindings/usb/microchip,usb5807.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/usb251xb.example.dtb: usb-hub@2d: swap-dx-lanes: size is 32, expected 8 From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/usb/usb251xb.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]

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.