dt-bindings: usb: Convert fsl-usb to yaml
Subsystems (3)
Frank Li
maintainerPATCH v2 1/1 dt-bindings: usb: Convert fsl-usb to yaml
Convert fsl-usb binding doc to yaml format.
Additional change:
- Remove port0 and port1 from required list.
- Use common usb-drd.yaml for dr_mode property
- Keep two difference examples.
- Add interrupts to required property list.
- Remove #address-cells and #size-cells in example.
- Use predefined irq type macro.
---
Change from v1 to v2
- move phy_type after interrupt
- change file name to fsl,usb2.yaml
- remove 'fsl-usb2-dr-v2.2' from standalone compatible list
--- .../devicetree/bindings/usb/fsl,usb2.yaml | 95 +++++++++++++++++++ .../devicetree/bindings/usb/fsl-usb.txt | 81 ---------------- 2 files changed, 95 insertions(+), 81 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/fsl,usb2.yaml delete mode 100644 Documentation/devicetree/bindings/usb/fsl-usb.txt
Documentation/devicetree/bindings/usb/fsl,usb2.yaml new file +95 -0
@@ -0,0 +1,95 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/fsl,usb2.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale SOC USB controllers + +maintainers: + - Frank Li <[email protected]> + +description: | + The device node for a USB controller that is part of a Freescale + SOC is as described in the document "Open Firmware Recommended + Practice: Universal Serial Bus" with the following modifications + and additions. + +properties: + compatible: + oneOf: + - enum: + - fsl-usb2-mph + - fsl-usb2-dr + - items: + - enum: + - fsl-usb2-dr-v2.2 + - fsl-usb2-dr-v2.5 + - const: fsl-usb2-dr + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + phy_type: + $ref: /schemas/types.yaml#/definitions/string + enum: [ulpi, serial, utmi, utmi_wide] + + port0: + $ref: /schemas/types.yaml#/definitions/flag + description: + Indicates port0 is connected for fsl-usb2-mph compatible controllers. + + port1: + $ref: /schemas/types.yaml#/definitions/flag + description: + Indicates port1 is connected for "fsl-usb2-mph" compatible controllers. + + fsl,invert-drvvbus: + $ref: /schemas/types.yaml#/definitions/flag + description: + for MPC5121 USB0 only. Indicates the + port power polarity of internal PHY signal DRVVBUS is inverted. + + fsl,invert-pwr-fault: + $ref: /schemas/types.yaml#/definitions/flag + description: + for MPC5121 USB0 only. Indicates + the PWR_FAULT signal polarity is inverted. + +required: + - compatible + - reg + - interrupts + - phy_type + +allOf: + - $ref: usb-drd.yaml# + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + + usb@22000 { + compatible = "fsl-usb2-mph"; + reg = <22000 1000>; + interrupts = <27 IRQ_TYPE_EDGE_RISING>; + phy_type = "ulpi"; + port0; + port1; + }; + + - | + #include <dt-bindings/interrupt-controller/irq.h> + + usb@23000 { + compatible = "fsl-usb2-dr"; + reg = <23000 1000>; + interrupts = <26 IRQ_TYPE_EDGE_RISING>; + dr_mode = "otg"; + phy_type = "ulpi"; + };
Documentation/devicetree/bindings/usb/fsl-usb.txt deleted +0 -81
81 lines not on this page · raw message
Signature · 1 line
2.34.1
Quoted 11 lines · Frank Li
Convert fsl-usb binding doc to yaml format.
Additional change:
- Remove port0 and port1 from required list.
- Use commonusb-drd.yamlfordr_modeproperty
- Keep two difference examples.
- Add interrupts to required property list.
- Remove #address-cells and #size-cells in example.
- Use predefined irq type macro.Signed-off-by Frank Li <[email protected]>
Best regards,
Krzysztof