diff mbox series

[v1,6/9] dt-bindings: dma: add fsl-edma3 yaml

Message ID 1593702489-21648-7-git-send-email-yibin.gong@nxp.com (mailing list archive)
State Superseded
Headers show
Series add fsl-edma3 support | expand

Commit Message

Robin Gong July 2, 2020, 3:08 p.m. UTC
Add device binding doc for fsl-edma3 driver.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
---
 .../devicetree/bindings/dma/nxp,fsl-edma3.yaml     | 129 +++++++++++++++++++++
 1 file changed, 129 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/dma/nxp,fsl-edma3.yaml

Comments

Rob Herring (Arm) July 2, 2020, 9:01 p.m. UTC | #1
On Thu, 02 Jul 2020 23:08:06 +0800, Robin Gong wrote:
> Add device binding doc for fsl-edma3 driver.
> 
> Signed-off-by: Robin Gong <yibin.gong@nxp.com>
> ---
>  .../devicetree/bindings/dma/nxp,fsl-edma3.yaml     | 129 +++++++++++++++++++++
>  1 file changed, 129 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/dma/nxp,fsl-edma3.yaml
> 


My bot found errors running 'make dt_binding_check' on your patch:

/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/dma/nxp,fsl-edma3.example.dt.yaml: dma-controller@5a1f0000: 'power-domain-names' does not match any of the regexes: 'pinctrl-[0-9]+'
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/dma/nxp,fsl-edma3.example.dt.yaml: dma-controller@5a1f0000: interrupt-names:1: 'edma2-chan9-tx' does not match '^edma[0-2]-chan[0-31]-tx|rx+$'
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/dma/nxp,fsl-edma3.example.dt.yaml: dma-controller@5a1f0000: interrupt-names:3: 'edma2-chan11-tx' does not match '^edma[0-2]-chan[0-31]-tx|rx+$'
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/dma/nxp,fsl-edma3.example.dt.yaml: dma-controller@5a1f0000: interrupt-names:5: 'edma2-chan13-tx' does not match '^edma[0-2]-chan[0-31]-tx|rx+$'
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/dma/nxp,fsl-edma3.example.dt.yaml: dma-controller@5a1f0000: interrupt-names:7: 'edma2-chan15-tx' does not match '^edma[0-2]-chan[0-31]-tx|rx+$'
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/dma/nxp,fsl-edma3.example.dt.yaml: dma-controller@5a1f0000: reg: [[1512570880, 65536], [1512636416, 65536], [1512701952, 65536], [1512767488, 65536], [1512833024, 65536], [1512898560, 65536], [1512964096, 65536], [1513029632, 65536]] is too long


See https://patchwork.ozlabs.org/patch/1321003

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure dt-schema is up to date:

pip3 install git+https://github.com/devicetree-org/dt-schema.git@master --upgrade

Please check and re-submit.
Robin Gong July 3, 2020, 6:47 a.m. UTC | #2
On 2020/07/03 5:01 Rob Herring <robh@kernel.org>
> 
> Please check and re-submit.
Thanks, will fix it in v2.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/dma/nxp,fsl-edma3.yaml b/Documentation/devicetree/bindings/dma/nxp,fsl-edma3.yaml
new file mode 100644
index 00000000..d1b47a6
--- /dev/null
+++ b/Documentation/devicetree/bindings/dma/nxp,fsl-edma3.yaml
@@ -0,0 +1,129 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/dma/nxp,fsl-edma3.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP eDMA3 Controller
+
+maintainers:
+  - Robin Gong <yibin.gong@nxp.com>
+
+allOf:
+  - $ref: "dma-controller.yaml#"
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - fsl,imx8qm-edma  # i.mx8qm/qxp
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    minItems: 2
+    maxItems: 32
+
+  interrupt-names:
+    minItems: 2
+    maxItems: 32
+    items:
+      - pattern: "^edma[0-2]-chan[0-31]-tx|rx+$"
+      - pattern: "^edma[0-2]-chan[0-31]-tx|rx+$"
+      - pattern: "^edma[0-2]-chan[0-31]-tx|rx+$"
+      - pattern: "^edma[0-2]-chan[0-31]-tx|rx+$"
+      - pattern: "^edma[0-2]-chan[0-31]-tx|rx+$"
+      - pattern: "^edma[0-2]-chan[0-31]-tx|rx+$"
+      - pattern: "^edma[0-2]-chan[0-31]-tx|rx+$"
+      - pattern: "^edma[0-2]-chan[0-31]-tx|rx+$"
+
+  '#dma-cells':
+    const: 3
+    description: |
+      The 1st cell specifies the channel ID.
+
+      The 2nd cell specifies the channel priority.
+
+      The 3rd cell specifies the channel attributes:
+        bit0 transmit or receive.
+          0 = transmit
+          1 = receive
+        bit1 local or remote access.
+          0 = local
+          1 = remote
+        bit2 dualfifo case or not(only in Audio cyclic now).
+          0 = not dual fifo case
+          1 =  dualfifo case.
+
+  dma-channels:
+    minimum: 2
+    maximum: 32
+
+  power-domains:
+    minItems: 2
+    maxItems: 32
+    items:
+      - pattern: "^edma[0-2]-chan[0-31]$"
+      - pattern: "^edma[0-2]-chan[0-31]$"
+      - pattern: "^edma[0-2]-chan[0-31]$"
+      - pattern: "^edma[0-2]-chan[0-31]$"
+      - pattern: "^edma[0-2]-chan[0-31]$"
+      - pattern: "^edma[0-2]-chan[0-31]$"
+      - pattern: "^edma[0-2]-chan[0-31]$"
+      - pattern: "^edma[0-2]-chan[0-31]$"
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - interrupt-names
+  - '#dma-cells'
+  - dma-channels
+  - power-domains
+  - power-domain-names
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/firmware/imx/rsrc.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+    edma2: dma-controller@5a1f0000 {
+        compatible = "fsl,imx8qm-edma";
+        reg = <0x5a280000 0x10000>, /* channel8 UART0 rx */
+              <0x5a290000 0x10000>, /* channel9 UART0 tx */
+              <0x5a2a0000 0x10000>, /* channel10 UART1 rx */
+              <0x5a2b0000 0x10000>, /* channel11 UART1 tx */
+              <0x5a2c0000 0x10000>, /* channel12 UART2 rx */
+              <0x5a2d0000 0x10000>, /* channel13 UART2 tx */
+              <0x5a2e0000 0x10000>, /* channel14 UART3 rx */
+              <0x5a2f0000 0x10000>; /* channel15 UART3 tx */
+        #dma-cells = <3>;
+        dma-channels = <8>;
+        interrupts = <GIC_SPI 434 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 435 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 436 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 437 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 438 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 439 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 440 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 441 IRQ_TYPE_LEVEL_HIGH>;
+       interrupt-names = "edma2-chan8-rx", "edma2-chan9-tx",
+                         "edma2-chan10-rx", "edma2-chan11-tx",
+                         "edma2-chan12-rx", "edma2-chan13-tx",
+                         "edma2-chan14-rx", "edma2-chan15-tx";
+       power-domains = <&pd IMX_SC_R_DMA_2_CH8>,
+                       <&pd IMX_SC_R_DMA_2_CH9>,
+                       <&pd IMX_SC_R_DMA_2_CH10>,
+                       <&pd IMX_SC_R_DMA_2_CH11>,
+                       <&pd IMX_SC_R_DMA_2_CH12>,
+                       <&pd IMX_SC_R_DMA_2_CH13>,
+                       <&pd IMX_SC_R_DMA_2_CH14>,
+                       <&pd IMX_SC_R_DMA_2_CH15>;
+       power-domain-names = "edma2-chan8", "edma2-chan9",
+                            "edma2-chan10", "edma2-chan11",
+                            "edma2-chan12", "edma2-chan13",
+                            "edma2-chan14", "edma2-chan15";
+    };