dt-bindings: usb: Document the Microchip USB2514 hub
Subsystems (2)
PATCH 1/1 dt-bindings: usb: Document the Microchip USB2514 hub
From: Fabio Estevam <[email protected]>
Document the Microchip USB2514, USB2412, and USB2417 USB hubs.
--- .../bindings/usb/microchip,usb2514.yaml | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/microchip,usb2514.yaml
Documentation/devicetree/bindings/usb/microchip,usb2514.yaml new file +53 -0
@@ -0,0 +1,53 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/microchip,usb2514.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Microchip USB2514 Hub Controller + +maintainers: + - Fabio Estevam <[email protected]> + +properties: + compatible: + enum: + - usb424,2412 + - usb424,2514 + - usb424,2417 + + reg: true + + reset-gpios: + description: GPIO connected to the RESET_N pin. + + vdd-supply: + description: 3.3V power supply. + + clocks: + description: External 24MHz clock connected to the CLKIN pin. + +required: + - compatible + - reg + +unevaluatedProperties: true + +examples: + - | + #include <dt-bindings/clock/imx6qdl-clock.h> + #include <dt-bindings/gpio/gpio.h> + + usb { + dr_mode = "host"; + #address-cells = <1>; + #size-cells = <0>; + + hub@1 { + compatible = "usb424,2514"; + reg = <1>; + clocks = <&clks IMX6QDL_CLK_CKO>; + reset-gpios = <&gpio7 12 GPIO_ACTIVE_LOW>; + vdd-supply = <®_3v3_hub>; + }; + };
Signature · 1 line
2.34.1
Quoted 3 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Document the Microchip USB2514, USB2412, and USB2417 USB hubs.
There is 2514b already. Why it cannot be there? Is the existing file only for I2C interface and here you add on-board-hub approach interface?
If so, mention it briefly in commit msg (one sentence is enough).
Quoted 20 lines
Signed-off-by Fabio Estevam <[email protected]>--- .../bindings/usb/microchip,usb2514.yaml | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/microchip,usb2514.yamlDocumentation/devicetree/bindings/usb/microchip,usb2514.yaml new file +7
-0@@ -0,0 +1,53 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/microchip,usb2514.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Microchip USB2514 Hub Controller
Documentation/devicetree/bindings/usb/microchip,usb2514.yaml line 17
Quoted 10 lines
Documentation/devicetree/bindings/usb/microchip,usb2514.yaml new file +10
-0+ +maintainers: + - Fabio Estevam <[email protected]> + +properties: + compatible: + enum: + - usb424,2412 + - usb424,2514 + - usb424,2417
Please keep the list ordered.
Documentation/devicetree/bindings/usb/microchip,usb2514.yaml line 28
Quoted 11 lines
Documentation/devicetree/bindings/usb/microchip,usb2514.yaml new file +11
-0+ + reg: true + + reset-gpios: + description: GPIO connected to the RESET_N pin. + + vdd-supply: + description: 3.3V power supply. + + clocks: + description: External 24MHz clock connected to the CLKIN pin.
maxItems.
Documentation/devicetree/bindings/usb/microchip,usb2514.yaml line 34
Quoted 6 lines
Documentation/devicetree/bindings/usb/microchip,usb2514.yaml new file +6
-0+ +required: + - compatible + - reg + +unevaluatedProperties: true
No, this must be false.
This does not make really sense. You miss $ref... and when you do not have $ref you should use additionalProperties: false. Open existing bindings for device of the same class.
Documentation/devicetree/bindings/usb/microchip,usb2514.yaml line 42
Quoted 8 lines
Documentation/devicetree/bindings/usb/microchip,usb2514.yaml new file +8
-0+ +examples: + - | + #include <dt-bindings/clock/imx6qdl-clock.h> + #include <dt-bindings/gpio/gpio.h> + + usb { + dr_mode = "host";
Drop property, it's kind of expected/obvious and we want to limit chances schema will complain about something unrelated to your device.
Documentation/devicetree/bindings/usb/microchip,usb2514.yaml line 47
Quoted 5 lines
Documentation/devicetree/bindings/usb/microchip,usb2514.yaml new file +5
-0+ #address-cells = <1>; + #size-cells = <0>; + + hub@1 { + compatible = "usb424,2514";
Inconsistent indentation. Use 4 spaces for example indentation.
Documentation/devicetree/bindings/usb/microchip,usb2514.yaml line 53
Quoted 6 lines
Documentation/devicetree/bindings/usb/microchip,usb2514.yaml new file +6
-0+ reg = <1>; + clocks = <&clks IMX6QDL_CLK_CKO>; + reset-gpios = <&gpio7 12 GPIO_ACTIVE_LOW>; + vdd-supply = <®_3v3_hub>; + }; + };
Best regards,
Krzysztof