[PATCH 7/7] dt-bindings: usb: ti,da830-musb: Convert to DT schema
Bhargav Joshi <[email protected]>
| Newsgroups | org.kernel.vger.linux-devicetree,org.infradead.lists.linux-phy,org.kernel.vger.dmaengine,org.kernel.vger.linux-kernel,org.kernel.vger.linux-omap,org.kernel.vger.linux-usb |
|---|---|
| Message-ID | <[email protected]> |
Convert the TI DA8xx/OMAP-L1x MUSB text bindings to DT schema. Since DA8xx MUSB node acts as a parent bus for the CPPI41 DMA controller add required #address-cells, #size-cells, and ranges properties. Signed-off-by: Bhargav Joshi <[email protected]> --- .../devicetree/bindings/usb/da8xx-usb.txt | 69 ------------- .../devicetree/bindings/usb/ti,da830-musb.yaml | 111 +++++++++++++++++++++ 2 files changed, 111 insertions(+), 69 deletions(-) diff --git a/Documentation/devicetree/bindings/usb/da8xx-usb.txt b/Documentation/devicetree/bindings/usb/da8xx-usb.txt deleted file mode 100644 index 00320d92d3bb..000000000000 --- a/Documentation/devicetree/bindings/usb/da8xx-usb.txt +++ /dev/null @@ -1,69 +0,0 @@ -TI DA8xx MUSB -~~~~~~~~~~~~~ -For DA8xx/OMAP-L1x/AM17xx/AM18xx platforms. - -Required properties: -~~~~~~~~~~~~~~~~~~~~ - - compatible : Should be set to "ti,da830-musb". - - - reg: Offset and length of the USB controller register set. - - - interrupts: The USB interrupt number. - - - interrupt-names: Should be set to "mc". - - - dr_mode: The USB operation mode. Should be one of "host", "peripheral" or "otg". - - - phys: Phandle for the PHY device - - - phy-names: Should be "usb-phy" - - - dmas: specifies the dma channels - - - dma-names: specifies the names of the channels. Use "rxN" for receive - and "txN" for transmit endpoints. N specifies the endpoint number. - -Optional properties: -~~~~~~~~~~~~~~~~~~~~ - - vbus-supply: Phandle to a regulator providing the USB bus power. - -Example: - usb_phy: usb-phy { - compatible = "ti,da830-usb-phy"; - #phy-cells = <0>; - }; - usb0: usb@200000 { - compatible = "ti,da830-musb"; - reg = <0x00200000 0x1000>; - ranges; - #address-cells = <1>; - #size-cells = <1>; - interrupts = <58>; - interrupt-names = "mc"; - - dr_mode = "host"; - vbus-supply = <&usb_vbus>; - phys = <&usb_phy 0>; - phy-names = "usb-phy"; - - dmas = <&cppi41dma 0 0 &cppi41dma 1 0 - &cppi41dma 2 0 &cppi41dma 3 0 - &cppi41dma 0 1 &cppi41dma 1 1 - &cppi41dma 2 1 &cppi41dma 3 1>; - dma-names = - "rx1", "rx2", "rx3", "rx4", - "tx1", "tx2", "tx3", "tx4"; - - - cppi41dma: dma-controller@201000 { - compatible = "ti,da830-cppi41"; - reg = <0x201000 0x1000 - 0x202000 0x1000 - 0x204000 0x4000>; - reg-names = "controller", "scheduler", "queuemgr"; - interrupts = <58>; - #dma-cells = <2>; - dma-channels = <4>; - }; - - }; diff --git a/Documentation/devicetree/bindings/usb/ti,da830-musb.yaml b/Documentation/devicetree/bindings/usb/ti,da830-musb.yaml new file mode 100644 index 000000000000..c54bdfb4d1ad --- /dev/null +++ b/Documentation/devicetree/bindings/usb/ti,da830-musb.yaml @@ -0,0 +1,111 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/ti,da830-musb.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: TI DA8xx MUSB + +maintainers: + - Sergei Shtylyov <[email protected]> + +allOf: + - $ref: /schemas/usb/usb-drd.yaml# + +properties: + compatible: + const: ti,da830-musb + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + interrupt-names: + const: mc + + phys: + maxItems: 1 + + phy-names: + const: usb-phy + + dmas: + minItems: 1 + maxItems: 8 + + dma-names: + minItems: 1 + maxItems: 8 + + vbus-supply: + description: Phandle to a regulator providing the USB bus power. + + clocks: + maxItems: 1 + + clock-ranges: true + + ranges: true + + "#address-cells": + const: 1 + + "#size-cells": + const: 1 + +patternProperties: + "^dma-controller@[0-9a-f]+$": + $ref: /schemas/dma/ti/ti,cppi41.yaml# + +required: + - compatible + - reg + - interrupts + - interrupt-names + - phys + - phy-names + - ranges + - "#address-cells" + - "#size-cells" + +unevaluatedProperties: false + +examples: + - | + usb@200000 { + compatible = "ti,da830-musb"; + reg = <0x00200000 0x1000>; + ranges; + #address-cells = <1>; + #size-cells = <1>; + interrupts = <58>; + interrupt-names = "mc"; + + dr_mode = "host"; + vbus-supply = <&usb_vbus>; + phys = <&usb_phy 0>; + phy-names = "usb-phy"; + + clocks = <&psc1 1>; + clock-ranges; + + dmas = <&cppi41dma 0 0>, <&cppi41dma 1 0>, + <&cppi41dma 2 0>, <&cppi41dma 3 0>, + <&cppi41dma 0 1>, <&cppi41dma 1 1>, + <&cppi41dma 2 1>, <&cppi41dma 3 1>; + dma-names = "rx1", "rx2", "rx3", "rx4", + "tx1", "tx2", "tx3", "tx4"; + + dma-controller@201000 { + compatible = "ti,da830-cppi41"; + reg = <0x201000 0x1000>, + <0x202000 0x1000>, + <0x204000 0x4000>; + reg-names = "controller", "scheduler", "queuemgr"; + interrupts = <58>; + #dma-cells = <2>; + dma-channels = <4>; + }; + }; -- 2.55.0