dt-bindings: usb: Convert TI OMAP MUSB OTG controller and DWC3 USB Glue to DT schema
Subsystems (2)
v2 cover dt-bindings: usb: Convert TI OMAP MUSB OTG controller and DWC3 USB Glue to DT schema
This series converts the old text-based DeviceTree bindings for TI OMAP MUSB OTG controller and TI DWC3 USB glue to modern JSON-schema (YAML) format.
---
Changes in v2:
- ti,omap4-musb: Fix a missing ">" in the maintainer entry.
- ti,omap4-musb: Drop obsolete "pattern" and "ti,hwmods" properties.
- ti,omap4-musb: Update "interrupt-names" and "power" properties for clarity.
- ti,dwc3: Drop obsolete "pattern" and "ti,hwmods" properties.
- ti,omap4-musb, ti,dwc3: Revise commit message to justify changes in YAML bindings.
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Charan Pedumuru (2):
dt-bindings: usb: ti,omap4-musb: convert to DT schema
dt-bindings: usb: ti,dwc3: convert to DT schema
Documentation/devicetree/bindings/usb/omap-usb.txt | 80 -------------- Documentation/devicetree/bindings/usb/ti,dwc3.yaml | 100 +++++++++++++++++ .../devicetree/bindings/usb/ti,omap4-musb.yaml | 120 +++++++++++++++++++++ 3 files changed, 220 insertions(+), 80 deletions(-)
---
base-commit: f417b7ffcbef7d76b0d8860518f50dae0e7e5eda
change-id: 20260109-ti-usb-9df63c7ee152
Best regards,
Signature · 1 line
Charan Pedumuru <[email protected]>
PATCH v2 1/2 dt-bindings: usb: ti,omap4-musb: convert to DT schema
Convert OMAP MUSB USB OTG Controller binding to DT schema. Changes during conversion:
- Include "interrupts" and "interrupt-names" properties in the YAML, as they are used by many in-tree DTS files.
- Extend the "power" property to allow the value 150 (in addition to existing values), since this is present in several in-tree DTS examples.
- Drop the ti,hwmods property, as it is not used by any in-tree DTS files.
--- .../devicetree/bindings/usb/ti,omap4-musb.yaml | 120 +++++++++++++++++++++ 1 file changed, 120 insertions(+)
Documentation/devicetree/bindings/usb/ti,omap4-musb.yaml new file +120 -0
@@ -0,0 +1,120 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/ti,omap4-musb.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Texas Instruments OMAP MUSB USB OTG Controller + +maintainers: + - Felipe Balbi <[email protected]> + +description: + Texas Instruments glue layer for the Mentor Graphics MUSB OTG controller. + Handles SoC-specific integration including PHY interface bridging(ULPI/ + UTMI), interrupt aggregation, DMA engine coordination (internal/ + external), VBUS/session control via control module mailbox, and + clock/reset management. Provides fixed hardware configuration parameters + to the generic MUSB core driver. + +properties: + compatible: + enum: + - ti,omap3-musb + - ti,omap4-musb + + reg: + maxItems: 1 + + interrupts: + minItems: 1 + maxItems: 2 + + interrupt-names: + minItems: 1 + items: + - const: mc + - const: dma + + multipoint: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Indicates the MUSB controller supports multipoint. This is a MUSB + configuration-specific setting. + const: 1 + + num-eps: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Specifies the number of endpoints. This is a MUSB configuration + specific setting. + const: 16 + + ram-bits: + description: Specifies the RAM address size. + const: 12 + + interface-type: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Describes the type of interface between the controller and the PHY. + 0 for ULPI, 1 for UTMI. + enum: [0, 1] + + mode: + $ref: /schemas/types.yaml#/definitions/uint32 + description: 1 for HOST, 2 for PERIPHERAL, 3 for OTG. + enum: [1, 2, 3] + + power: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Indicates the maximum current the controller can supply when + operating in host mode. A value of 50 corresponds to 100 mA, and a + value of 150 corresponds to 300 mA. + enum: [50, 150] + + phys: + maxItems: 1 + + phy-names: + const: usb2-phy + + usb-phy: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: Phandle for the PHY device. + deprecated: true + + ctrl-module: + $ref: /schemas/types.yaml#/definitions/phandle + description: + Phandle of the control module this glue uses to write to mailbox. + +required: + - reg + - compatible + - interrupts + - interrupt-names + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + usb@4a0ab000 { + compatible = "ti,omap4-musb"; + reg = <0x4a0ab000 0x1000>; + interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "mc", "dma"; + multipoint = <1>; + num-eps = <16>; + ram-bits = <12>; + ctrl-module = <&omap_control_usb>; + phys = <&usb2_phy>; + phy-names = "usb2-phy"; + interface-type = <1>; + mode = <3>; + power = <50>; + }; +...
Signature · 1 line
2.52.0
Re: [PATCH v2 1/2] dt-bindings: usb: ti,omap4-musb: convert to DT schema
Quoted 8 lines · Charan Pedumuru
Convert OMAP MUSB USB OTG Controller binding to DT schema. Changes during conversion:
- Include "interrupts" and "interrupt-names" properties in the YAML, as they are used by many in-tree DTS files.
- Extend the "power" property to allow the value 150 (in addition to existing values), since this is present in several in-tree DTS examples.
- Drop the ti,hwmods property, as it is not used by any in-tree DTS files.
Quoted 5 lines
Signed-off-by Charan Pedumuru <[email protected]>--- .../devicetree/bindings/usb/ti,omap4-musb.yaml | 120 +++++++++++++++++++++ 1 file changed, 120 insertions(+)
PATCH v2 2/2 dt-bindings: usb: ti,dwc3: convert to DT schema
In reply to Charan PedumuruConvert OMAP DWC3 USB Glue Layer binding to DT schema.
Changes made during the conversion:
- Drop the ti,hwmods property, as it is not used by any in-tree DTS files.
--- Documentation/devicetree/bindings/usb/omap-usb.txt | 80 ----------------- Documentation/devicetree/bindings/usb/ti,dwc3.yaml | 100 +++++++++++++++++++++ 2 files changed, 100 insertions(+), 80 deletions(-)
Documentation/devicetree/bindings/usb/omap-usb.txt deleted +0 -80
@@ -1,80 +0,0 @@ -OMAP GLUE AND OTHER OMAP SPECIFIC COMPONENTS - -OMAP MUSB GLUE - - compatible : Should be "ti,omap4-musb" or "ti,omap3-musb" - - ti,hwmods : must be "usb_otg_hs" - - multipoint : Should be "1" indicating the musb controller supports - multipoint. This is a MUSB configuration-specific setting. - - num-eps : Specifies the number of endpoints. This is also a - MUSB configuration-specific setting. Should be set to "16" - - ram-bits : Specifies the ram address size. Should be set to "12" - - interface-type : This is a board specific setting to describe the type of - interface between the controller and the phy. It should be "0" or "1" - specifying ULPI and UTMI respectively. - - mode : Should be "3" to represent OTG. "1" signifies HOST and "2" - represents PERIPHERAL. - - power : Should be "50". This signifies the controller can supply up to - 100mA when operating in host mode. - - usb-phy : the phandle for the PHY device - - phys : the phandle for the PHY device (used by generic PHY framework) - - phy-names : the names of the PHY corresponding to the PHYs present in the - *phy* phandle. - -Optional properties: - - ctrl-module : phandle of the control module this glue uses to write to - mailbox - -SOC specific device node entry -usb_otg_hs: usb_otg_hs@4a0ab000 { - compatible = "ti,omap4-musb"; - ti,hwmods = "usb_otg_hs"; - multipoint = <1>; - num-eps = <16>; - ram-bits = <12>; - ctrl-module = <&omap_control_usb>; - phys = <&usb2_phy>; - phy-names = "usb2-phy"; -}; - -Board specific device node entry -&usb_otg_hs { - interface-type = <1>; - mode = <3>; - power = <50>; -}; - -OMAP DWC3 GLUE - - compatible : Should be - * "ti,dwc3" for OMAP5 and DRA7 - * "ti,am437x-dwc3" for AM437x - - ti,hwmods : Should be "usb_otg_ss" - - reg : Address and length of the register set for the device. - - interrupts : The irq number of this device that is used to interrupt the - MPU - - #address-cells, #size-cells : Must be present if the device has sub-nodes - - utmi-mode : controls the source of UTMI/PIPE status for VBUS and OTG ID. - It should be set to "1" for HW mode and "2" for SW mode. - - ranges: the child address space are mapped 1:1 onto the parent address space - -Optional Properties: - - extcon : phandle for the extcon device omap dwc3 uses to detect - connect/disconnect events. - - vbus-supply : phandle to the regulator device tree node if needed. - -Sub-nodes: -The dwc3 core should be added as subnode to omap dwc3 glue. -- dwc3 : - The binding details of dwc3 can be found in: - Documentation/devicetree/bindings/usb/snps,dwc3.yaml - -omap_dwc3 { - compatible = "ti,dwc3"; - ti,hwmods = "usb_otg_ss"; - reg = <0x4a020000 0x1ff>; - interrupts = <0 93 4>; - #address-cells = <1>; - #size-cells = <1>; - utmi-mode = <2>; - ranges; -}; -
Documentation/devicetree/bindings/usb/ti,dwc3.yaml new file +100 -0
100 lines not on this page · raw message
Signature · 1 line
2.52.0
Re: [PATCH v2 2/2] dt-bindings: usb: ti,dwc3: convert to DT schema
Quoted 10 lines · Charan Pedumuru
Convert OMAP DWC3 USB Glue Layer binding to DT schema.
Changes made during the conversion:
- Drop the ti,hwmods property, as it is not used by any in-tree DTS files.Signed-off-by Charan Pedumuru <[email protected]>--- Documentation/devicetree/bindings/usb/omap-usb.txt | 80 ----------------- Documentation/devicetree/bindings/usb/ti,dwc3.yaml | 100 +++++++++++++++++++++ 2 files changed, 100 insertions(+), 80 deletions(-)