Skip to contentSkip to conversation

dt-bindings: dma: fsl,imx-dma: Convert to dtschema

PATCH Superseded Animesh Agarwal 3 participants 4 messages May 31, 2024 – Jun 4, 2024

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 dt-bindings: dma: fsl,imx-dma: Convert to dtschema

Convert the fsl i.MX DMA controller bindings to DT schema.

---
 .../devicetree/bindings/dma/fsl,imx-dma.yaml  | 56 +++++++++++++++++++
 .../devicetree/bindings/dma/fsl-imx-dma.txt   | 50 -----------------
 2 files changed, 56 insertions(+), 50 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/dma/fsl,imx-dma.yaml
 delete mode 100644 Documentation/devicetree/bindings/dma/fsl-imx-dma.txt
Documentation/devicetree/bindings/dma/fsl,imx-dma.yaml new file +56 -0
new file mode 100644
index 000000000000..13ac6d6ad49f
@@ -0,0 +1,56 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/dma/fsl,imx-dma.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Freescale Direct Memory Access (DMA) Controller for i.MX
+
+maintainers:
+  - Animesh Agarwal <[email protected]>
+
+allOf:
+  - $ref: dma-controller.yaml#
+
+properties:
+  compatible:
+    enum:
+      - fsl,imx1-dma
+      - fsl,imx21-dma
+      - fsl,imx27-dma
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    items:
+      - description: DMA complete interrupt
+      - description: DMA Error interrupt
+    minItems: 1
+
+  "#dma-cells":
+    const: 1
+
+  dma-channels:
+    maximum: 16
+
+  dma-requests:
+    description: Number of DMA requests supported.
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - "#dma-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    dma-controller@10001000 {
+      compatible = "fsl,imx27-dma";
+      reg = <0x10001000 0x1000>;
+      interrupts = <32 33>;
+      #dma-cells = <1>;
+      dma-channels = <16>;
+    };
Documentation/devicetree/bindings/dma/fsl-imx-dma.txt deleted +0 -50

50 lines not on this page · raw message

Signature · 1 line
2.45.1
#1 lore raw
Quoted 5 lines · Animesh Agarwal

Convert the fsl i.MX DMA controller bindings to DT schema.

---
 .../devicetree/bindings/dma/fsl,imx-dma.yaml  | 56 +++++++++++++++++++

Thank you for your patch. There is something to discuss/improve.

Documentation/devicetree/bindings/dma/fsl,imx-dma.yaml line 35

Quoted 5 lines
Documentation/devicetree/bindings/dma/fsl,imx-dma.yaml new file +5 -0
+  "#dma-cells":
+    const: 1
+
+  dma-channels:
+    maximum: 16

maximum or const?

deprecated: true

Documentation/devicetree/bindings/dma/fsl,imx-dma.yaml line 38

Quoted 3 lines
Documentation/devicetree/bindings/dma/fsl,imx-dma.yaml new file +3 -0
+
+  dma-requests:
+    description: Number of DMA requests supported.

deprecated: true

Quoted 7 lines
Documentation/devicetree/bindings/dma/fsl,imx-dma.yaml new file +7 -0
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - "#dma-cells"
+

Documentation/devicetree/bindings/dma/fsl,imx-dma.yaml line 55

Quoted 10 lines
Documentation/devicetree/bindings/dma/fsl,imx-dma.yaml new file +10 -0
+additionalProperties: false
+
+examples:
+  - |
+    dma-controller@10001000 {
+      compatible = "fsl,imx27-dma";
+      reg = <0x10001000 0x1000>;
+      interrupts = <32 33>;
+      #dma-cells = <1>;
+      dma-channels = <16>;

and drop it from here

Best regards,
Krzysztof

#2 lore raw
Quoted 9 lines · Krzysztof Kozlowski

Documentation/devicetree/bindings/dma/fsl,imx-dma.yaml line 35

Quoted 5 lines · Animesh Agarwal
Documentation/devicetree/bindings/dma/fsl,imx-dma.yaml new file +5 -0
+  "#dma-cells":
+    const: 1
+
+  dma-channels:
+    maximum: 16

maximum or const?

The txt binding says it should always be 16. Datasheet says this device has 16 channels of DMA services. I thought specifying just the maximum implies maximum=minimum=16. Sorry for missing the changelog in this version it was cost in the v1 of this patch.

Quoted 3 lines

deprecated: true

Shall it not be
"#dma-channels ":
deprecated: true
?

Quoted 6 lines

Documentation/devicetree/bindings/dma/fsl,imx-dma.yaml line 38

Quoted 3 lines
Documentation/devicetree/bindings/dma/fsl,imx-dma.yaml new file +3 -0
+
+  dma-requests:
+    description: Number of DMA requests supported.

deprecated: true

Shall it not be
"#dma-requests ":
deprecated: true
?

Quoted 11 lines
Quoted 11 lines
Documentation/devicetree/bindings/dma/fsl,imx-dma.yaml new file +11 -0
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - "#dma-cells"
+
+additionalProperties: false
+
+examples:
+  - |
Quoted 8 lines

Documentation/devicetree/bindings/dma/fsl,imx-dma.yaml line 55

Quoted 6 lines
Documentation/devicetree/bindings/dma/fsl,imx-dma.yaml new file +6 -0
+    dma-controller@10001000 {
+      compatible = "fsl,imx27-dma";
+      reg = <0x10001000 0x1000>;
+      interrupts = <32 33>;
+      #dma-cells = <1>;
+      dma-channels = <16>;

and drop it from here

Is this really a deprecated property?

maintainer
#3 lore raw
Quoted 17 lines · Animesh Agarwal
Quoted 9 lines · Krzysztof Kozlowski

Documentation/devicetree/bindings/dma/fsl,imx-dma.yaml line 35

Quoted 5 lines · Animesh Agarwal
Documentation/devicetree/bindings/dma/fsl,imx-dma.yaml new file +5 -0
+  "#dma-cells":
+    const: 1
+
+  dma-channels:
+    maximum: 16

maximum or const?

The txt binding says it should always be 16. Datasheet says this device has 16 channels of DMA services. I thought specifying just the maximum implies maximum=minimum=16. Sorry for missing the changelog in this version it was cost in the v1 of this patch.

Quoted 1 line
Quoted 7 lines
Quoted 2 lines

deprecated: true

Shall it not be
"#dma-channels ":
deprecated: true
?

Yes. dma-channels is not deprecated.

For the old ones, maybe it has been long enough that their use has been dropped that you can just drop them in the conversion. Looks like there is no driver support already.

Rob