[PATCH 1/7] dt-bindings: dma: ti,cppi41: Convert to DT schema
Bhargav Joshi <[email protected]>
| Newsgroups | org.kernel.vger.linux-usb,org.infradead.lists.linux-phy,org.kernel.vger.dmaengine,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel,org.kernel.vger.linux-omap |
|---|---|
| Message-ID | <[email protected]> |
Convert TI CPPI 4.1 DMA controller text bindings to DT schema. Add ti,am3359-cppi41 and ti,da830-cppi41 into single schema since they share the same hardware IP block and driver. Add undocumented #dma-requests and power-domains properties to match existing DTS usage. Signed-off-by: Bhargav Joshi <[email protected]> --- .../devicetree/bindings/dma/ti/ti,cppi41.yaml | 108 +++++++++++++++++++++ .../devicetree/bindings/usb/am33xx-usb.txt | 14 --- .../devicetree/bindings/usb/da8xx-usb.txt | 12 --- 3 files changed, 108 insertions(+), 26 deletions(-) diff --git a/Documentation/devicetree/bindings/dma/ti/ti,cppi41.yaml b/Documentation/devicetree/bindings/dma/ti/ti,cppi41.yaml new file mode 100644 index 000000000000..110cf62c66d2 --- /dev/null +++ b/Documentation/devicetree/bindings/dma/ti/ti,cppi41.yaml @@ -0,0 +1,108 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/dma/ti/ti,cppi41.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: TI CPPI41 DMA Controller + +maintainers: + - Sebastian Andrzej Siewior <[email protected]> + +properties: + compatible: + enum: + - ti,am3359-cppi41 + - ti,da830-cppi41 + + reg: + minItems: 3 + maxItems: 4 + + reg-names: + minItems: 3 + maxItems: 4 + + interrupts: + maxItems: 1 + + interrupt-names: + const: glue + + "#dma-cells": + const: 2 + + dma-channels: + description: Number of DMA channels supported. + $ref: /schemas/types.yaml#/definitions/uint32 + + dma-requests: + description: Number of DMA requests supported. + $ref: /schemas/types.yaml#/definitions/uint32 + + power-domains: + maxItems: 1 + + "#dma-channels": + description: Deprecated, use dma-channels instead. + deprecated: true + + "#dma-requests": + description: Deprecated, use dma-requests instead. + deprecated: true + +required: + - compatible + - reg + - reg-names + - "#dma-cells" + - dma-channels + +allOf: + - $ref: /schemas/dma/dma-controller.yaml# + - if: + properties: + compatible: + contains: + const: ti,am3359-cppi41 + then: + properties: + reg: + minItems: 4 + reg-names: + items: + - const: glue + - const: controller + - const: scheduler + - const: queuemgr + power-domains: false + required: + - interrupt-names + - dma-requests + else: + properties: + reg: + maxItems: 3 + reg-names: + items: + - const: controller + - const: scheduler + - const: queuemgr + +unevaluatedProperties: false + +examples: + - | + dma-controller@7402000 { + compatible = "ti,am3359-cppi41"; + reg = <0x47400000 0x1000>, + <0x47402000 0x1000>, + <0x47403000 0x1000>, + <0x47404000 0x4000>; + reg-names = "glue", "controller", "scheduler", "queuemgr"; + interrupts = <17>; + interrupt-names = "glue"; + #dma-cells = <2>; + dma-channels = <30>; + dma-requests = <256>; + }; diff --git a/Documentation/devicetree/bindings/usb/am33xx-usb.txt b/Documentation/devicetree/bindings/usb/am33xx-usb.txt index 654ffc62d013..8431de346129 100644 --- a/Documentation/devicetree/bindings/usb/am33xx-usb.txt +++ b/Documentation/devicetree/bindings/usb/am33xx-usb.txt @@ -51,20 +51,6 @@ USB The controller should have an "usb" alias numbered properly in the alias node. -DMA -~~~ -- compatible: ti,am3359-cppi41 -- reg: offset and length of the following register spaces: USBSS, USB - CPPI DMA Controller, USB CPPI DMA Scheduler, USB Queue Manager -- reg-names: glue, controller, scheduler, queuemgr -- #dma-cells: should be set to 2. The first number represents the - endpoint number (0 … 14 for endpoints 1 … 15 on instance 0 and 15 … 29 - for endpoints 1 … 15 on instance 1). The second number is 0 for RX and - 1 for TX transfers. -- dma-channels: should be set to 30 representing the 15 endpoints for - each USB instance. -- #dma-channels: deprecated - Example: ~~~~~~~~ The following example contains all the nodes as used on am335x-evm: diff --git a/Documentation/devicetree/bindings/usb/da8xx-usb.txt b/Documentation/devicetree/bindings/usb/da8xx-usb.txt index fb2027a7d80d..00320d92d3bb 100644 --- a/Documentation/devicetree/bindings/usb/da8xx-usb.txt +++ b/Documentation/devicetree/bindings/usb/da8xx-usb.txt @@ -27,18 +27,6 @@ Optional properties: ~~~~~~~~~~~~~~~~~~~~ - vbus-supply: Phandle to a regulator providing the USB bus power. -DMA -~~~ -- compatible: ti,da830-cppi41 -- reg: offset and length of the following register spaces: CPPI DMA Controller, - CPPI DMA Scheduler, Queue Manager -- reg-names: "controller", "scheduler", "queuemgr" -- #dma-cells: should be set to 2. The first number represents the - channel number (0 … 3 for endpoints 1 … 4). - The second number is 0 for RX and 1 for TX transfers. -- dma-channels: should be set to 4 representing the 4 endpoints. -- #dma-channels: deprecated - Example: usb_phy: usb-phy { compatible = "ti,da830-usb-phy"; -- 2.55.0