Add YAML bindings for ep93xx SoC.
Signed-off-by: Nikita Shubin <[email protected]>
---
.../bindings/dma/cirrus,ep93xx-dma-m2m.yaml | 66 ++++++++++++
.../bindings/dma/cirrus,ep93xx-dma-m2p.yaml | 102 ++++++++++++++++++
2 files changed, 168 insertions(+)
create mode 100644 Documentation/devicetree/bindings/dma/cirrus,ep93xx-dma-m2m.yaml
create mode 100644 Documentation/devicetree/bindings/dma/cirrus,ep93xx-dma-m2p.yaml
diff --git a/Documentation/devicetree/bindings/dma/cirrus,ep93xx-dma-m2m.yaml b/Documentation/devicetree/bindings/dma/cirrus,ep93xx-dma-m2m.yaml
new file mode 100644
index 000000000000..9a53ee9052a0
--- /dev/null
+++ b/Documentation/devicetree/bindings/dma/cirrus,ep93xx-dma-m2m.yaml
@@ -0,0 +1,66 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/dma/cirrus,ep93xx-dma-m2m.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Cirrus Logick ep93xx SoC DMA controller Device Tree Bindings
+
+maintainers:
+ - Vinod Koul <[email protected]>
+
+properties:
+ compatible:
+ items:
+ - const: cirrus,ep9301-dma-m2m
+
+ reg:
+ minItems: 2
+ maxItems: 2
+
+ clocks:
+ items:
+ - description: m2m0 channel gate clock
+ - description: m2m1 channel gate clock
+
+ clock-names:
+ items:
+ - const: m2m0
+ - const: m2m1
+
+ interrupts:
+ minItems: 2
+ maxItems: 2
+
+ dma-channels:
+ minimum: 2
+ maximum: 2
+
+ '#dma-cells': false
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - interrupts
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/cirrus,ep93xx-clock.h>
+ dma1: dma-controller@80000100 {
+ compatible = "cirrus,ep9301-dma-m2m";
+ reg = <0x80000100 0x0040>,
+ <0x80000140 0x0040>;
+ clocks = <&syscon EP93XX_CLK_M2M0>,
+ <&syscon EP93XX_CLK_M2M1>;
+ clock-names = "m2m0", "m2m1";
+ dma-channels = <2>;
+ interrupt-parent = <&vic0>;
+ interrupts = <17>, <18>;
+ };
+
+...
+
diff --git a/Documentation/devicetree/bindings/dma/cirrus,ep93xx-dma-m2p.yaml b/Documentation/devicetree/bindings/dma/cirrus,ep93xx-dma-m2p.yaml
new file mode 100644
index 000000000000..51fd72b4e843
--- /dev/null
+++ b/Documentation/devicetree/bindings/dma/cirrus,ep93xx-dma-m2p.yaml
@@ -0,0 +1,102 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/dma/cirrus,ep93xx-dma-m2p.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Cirrus Logick ep93xx SoC M2P DMA controller Device Tree Bindings
+
+maintainers:
+ - Vinod Koul <[email protected]>
+
+properties:
+ compatible:
+ items:
+ - const: cirrus,ep9301-dma-m2p
+
+ reg:
+ minItems: 10
+ maxItems: 10
+
+ clocks:
+ items:
+ - description: m2p0 channel gate clock
+ - description: m2p1 channel gate clock
+ - description: m2p2 channel gate clock
+ - description: m2p3 channel gate clock
+ - description: m2p4 channel gate clock
+ - description: m2p5 channel gate clock
+ - description: m2p6 channel gate clock
+ - description: m2p7 channel gate clock
+ - description: m2p8 channel gate clock
+ - description: m2p9 channel gate clock
+
+ clock-names:
+ items:
+ - const: m2p0
+ - const: m2p1
+ - const: m2p2
+ - const: m2p3
+ - const: m2p4
+ - const: m2p5
+ - const: m2p6
+ - const: m2p7
+ - const: m2p8
+ - const: m2p9
+
+ interrupts:
+ minItems: 10
+ maxItems: 10
+
+ dma-channels:
+ minimum: 10
+ maximum: 10
+
+ '#dma-cells': false
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - interrupts
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/cirrus,ep93xx-clock.h>
+ dma0: dma-controller@80000000 {
+ compatible = "cirrus,ep9301-dma-m2p";
+ reg = <0x80000000 0x0040>,
+ <0x80000040 0x0040>,
+ <0x80000080 0x0040>,
+ <0x800000c0 0x0040>,
+ <0x80000240 0x0040>,
+ <0x80000200 0x0040>,
+ <0x800002c0 0x0040>,
+ <0x80000280 0x0040>,
+ <0x80000340 0x0040>,
+ <0x80000300 0x0040>;
+ clocks = <&syscon EP93XX_CLK_M2P0>,
+ <&syscon EP93XX_CLK_M2P1>,
+ <&syscon EP93XX_CLK_M2P2>,
+ <&syscon EP93XX_CLK_M2P3>,
+ <&syscon EP93XX_CLK_M2P4>,
+ <&syscon EP93XX_CLK_M2P5>,
+ <&syscon EP93XX_CLK_M2P6>,
+ <&syscon EP93XX_CLK_M2P7>,
+ <&syscon EP93XX_CLK_M2P8>,
+ <&syscon EP93XX_CLK_M2P9>;
+ clock-names = "m2p0", "m2p1",
+ "m2p2", "m2p3",
+ "m2p4", "m2p5",
+ "m2p6", "m2p7",
+ "m2p8", "m2p9";
+ dma-channels = <10>;
+ interrupt-parent = <&vic0>;
+ interrupts = <7>, <8>, <9>, <10>, <11>, <12>, <13>, <14>, <15>, <16>;
+ };
+
+...
+
--
2.39.2
On Mon, Apr 24, 2023 at 03:34:36PM +0300, Nikita Shubin wrote:
> Add YAML bindings for ep93xx SoC.
>
> Signed-off-by: Nikita Shubin <[email protected]>
> ---
> .../bindings/dma/cirrus,ep93xx-dma-m2m.yaml | 66 ++++++++++++
> .../bindings/dma/cirrus,ep93xx-dma-m2p.yaml | 102 ++++++++++++++++++
> 2 files changed, 168 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/dma/cirrus,ep93xx-dma-m2m.yaml
> create mode 100644 Documentation/devicetree/bindings/dma/cirrus,ep93xx-dma-m2p.yaml
>
> diff --git a/Documentation/devicetree/bindings/dma/cirrus,ep93xx-dma-m2m.yaml b/Documentation/devicetree/bindings/dma/cirrus,ep93xx-dma-m2m.yaml
> new file mode 100644
> index 000000000000..9a53ee9052a0
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/dma/cirrus,ep93xx-dma-m2m.yaml
> @@ -0,0 +1,66 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/dma/cirrus,ep93xx-dma-m2m.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Cirrus Logick ep93xx SoC DMA controller Device Tree Bindings
> +
> +maintainers:
> + - Vinod Koul <[email protected]>
Again, wrong person.
> +
> +properties:
> + compatible:
> + items:
> + - const: cirrus,ep9301-dma-m2m
'items' can be dropped.
> +
> + reg:
> + minItems: 2
> + maxItems: 2
Need to define what each entry is.
> +
> + clocks:
> + items:
> + - description: m2m0 channel gate clock
> + - description: m2m1 channel gate clock
> +
> + clock-names:
> + items:
> + - const: m2m0
> + - const: m2m1
> +
> + interrupts:
> + minItems: 2
> + maxItems: 2
Need to define what each entry is.
> +
> + dma-channels:
> + minimum: 2
> + maximum: 2
If the only possible number of channels is 2, why is this property
needed?
> +
> + '#dma-cells': false
> +
> +required:
> + - compatible
> + - reg
> + - clocks
> + - clock-names
> + - interrupts
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/clock/cirrus,ep93xx-clock.h>
> + dma1: dma-controller@80000100 {
> + compatible = "cirrus,ep9301-dma-m2m";
> + reg = <0x80000100 0x0040>,
> + <0x80000140 0x0040>;
> + clocks = <&syscon EP93XX_CLK_M2M0>,
> + <&syscon EP93XX_CLK_M2M1>;
> + clock-names = "m2m0", "m2m1";
> + dma-channels = <2>;
> + interrupt-parent = <&vic0>;
> + interrupts = <17>, <18>;
> + };
> +
> +...
> +
> diff --git a/Documentation/devicetree/bindings/dma/cirrus,ep93xx-dma-m2p.yaml b/Documentation/devicetree/bindings/dma/cirrus,ep93xx-dma-m2p.yaml
> new file mode 100644
> index 000000000000..51fd72b4e843
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/dma/cirrus,ep93xx-dma-m2p.yaml
> @@ -0,0 +1,102 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/dma/cirrus,ep93xx-dma-m2p.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Cirrus Logick ep93xx SoC M2P DMA controller Device Tree Bindings
> +
> +maintainers:
> + - Vinod Koul <[email protected]>
> +
> +properties:
> + compatible:
> + items:
> + - const: cirrus,ep9301-dma-m2p
> +
> + reg:
> + minItems: 10
> + maxItems: 10
Define each entry. Looks like it's just N entries for N channels. Just a
description with that is enough.
> +
> + clocks:
> + items:
> + - description: m2p0 channel gate clock
> + - description: m2p1 channel gate clock
> + - description: m2p2 channel gate clock
> + - description: m2p3 channel gate clock
> + - description: m2p4 channel gate clock
> + - description: m2p5 channel gate clock
> + - description: m2p6 channel gate clock
> + - description: m2p7 channel gate clock
> + - description: m2p8 channel gate clock
> + - description: m2p9 channel gate clock
> +
> + clock-names:
> + items:
> + - const: m2p0
> + - const: m2p1
> + - const: m2p2
> + - const: m2p3
> + - const: m2p4
> + - const: m2p5
> + - const: m2p6
> + - const: m2p7
> + - const: m2p8
> + - const: m2p9
> +
> + interrupts:
> + minItems: 10
> + maxItems: 10
> +
> + dma-channels:
> + minimum: 10
> + maximum: 10
> +
> + '#dma-cells': false
> +
> +required:
> + - compatible
> + - reg
> + - clocks
> + - clock-names
> + - interrupts
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/clock/cirrus,ep93xx-clock.h>
> + dma0: dma-controller@80000000 {
> + compatible = "cirrus,ep9301-dma-m2p";
> + reg = <0x80000000 0x0040>,
> + <0x80000040 0x0040>,
> + <0x80000080 0x0040>,
> + <0x800000c0 0x0040>,
> + <0x80000240 0x0040>,
> + <0x80000200 0x0040>,
> + <0x800002c0 0x0040>,
> + <0x80000280 0x0040>,
> + <0x80000340 0x0040>,
> + <0x80000300 0x0040>;
> + clocks = <&syscon EP93XX_CLK_M2P0>,
> + <&syscon EP93XX_CLK_M2P1>,
> + <&syscon EP93XX_CLK_M2P2>,
> + <&syscon EP93XX_CLK_M2P3>,
> + <&syscon EP93XX_CLK_M2P4>,
> + <&syscon EP93XX_CLK_M2P5>,
> + <&syscon EP93XX_CLK_M2P6>,
> + <&syscon EP93XX_CLK_M2P7>,
> + <&syscon EP93XX_CLK_M2P8>,
> + <&syscon EP93XX_CLK_M2P9>;
> + clock-names = "m2p0", "m2p1",
> + "m2p2", "m2p3",
> + "m2p4", "m2p5",
> + "m2p6", "m2p7",
> + "m2p8", "m2p9";
> + dma-channels = <10>;
> + interrupt-parent = <&vic0>;
> + interrupts = <7>, <8>, <9>, <10>, <11>, <12>, <13>, <14>, <15>, <16>;
> + };
> +
> +...
> +
> --
> 2.39.2
>