devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] Convert STM32 dma to json-schema
@ 2019-12-17  9:21 Benjamin Gaignard
  2019-12-17  9:21 ` [PATCH 1/6] dt-bindings: dma: Convert stm32 DMA bindings " Benjamin Gaignard
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Benjamin Gaignard @ 2019-12-17  9:21 UTC (permalink / raw)
  To: vkoul, robh+dt, mark.rutland, mcoquelin.stm32, alexandre.torgue
  Cc: dmaengine, devicetree, linux-stm32, linux-arm-kernel,
	linux-kernel, Benjamin Gaignard

This series convert STM32 dma, mdma and dmamux bindings to json-schema.
Yaml bindings use dma-controller and dma-router schemas where nodes names
are verified which lead to fix stm32f746, stm32f743 and stm32mp157 device
tree files.

Benjamin Gaignard (6):
  dt-bindings: dma: Convert stm32 DMA bindings to json-schema
  dt-bindings: dma: Convert stm32 MDMA bindings to json-schema
  dt-bindings: dma: Convert stm32 DMAMUX bindings to json-schema
  ARM: dts: stm32: fix dma controller node name on stm32f746
  ARM: dts: stm32: fix dma controller node name on stm32f743
  ARM: dts: stm32: fix dma controller node name on stm32mp157c

 .../devicetree/bindings/dma/st,stm32-dma.yaml      | 102 ++++++++++++++++++++
 .../devicetree/bindings/dma/st,stm32-dmamux.yaml   |  52 ++++++++++
 .../devicetree/bindings/dma/st,stm32-mdma.yaml     | 105 +++++++++++++++++++++
 .../devicetree/bindings/dma/stm32-dma.txt          |  83 ----------------
 .../devicetree/bindings/dma/stm32-dmamux.txt       |  84 -----------------
 .../devicetree/bindings/dma/stm32-mdma.txt         |  94 ------------------
 arch/arm/boot/dts/stm32f746.dtsi                   |   4 +-
 arch/arm/boot/dts/stm32h743.dtsi                   |   6 +-
 arch/arm/boot/dts/stm32mp157c.dtsi                 |   6 +-
 9 files changed, 267 insertions(+), 269 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/dma/st,stm32-dma.yaml
 create mode 100644 Documentation/devicetree/bindings/dma/st,stm32-dmamux.yaml
 create mode 100644 Documentation/devicetree/bindings/dma/st,stm32-mdma.yaml
 delete mode 100644 Documentation/devicetree/bindings/dma/stm32-dma.txt
 delete mode 100644 Documentation/devicetree/bindings/dma/stm32-dmamux.txt
 delete mode 100644 Documentation/devicetree/bindings/dma/stm32-mdma.txt

-- 
2.15.0


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/6] dt-bindings: dma: Convert stm32 DMA bindings to json-schema
  2019-12-17  9:21 [PATCH 0/6] Convert STM32 dma to json-schema Benjamin Gaignard
@ 2019-12-17  9:21 ` Benjamin Gaignard
  2019-12-18  0:01   ` Rob Herring
  2019-12-17  9:21 ` [PATCH 2/6] dt-bindings: dma: Convert stm32 MDMA " Benjamin Gaignard
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 11+ messages in thread
From: Benjamin Gaignard @ 2019-12-17  9:21 UTC (permalink / raw)
  To: vkoul, robh+dt, mark.rutland, mcoquelin.stm32, alexandre.torgue
  Cc: dmaengine, devicetree, linux-stm32, linux-arm-kernel,
	linux-kernel, Benjamin Gaignard

Convert the STM32 DMA binding to DT schema format using json-schema

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
---
 .../devicetree/bindings/dma/st,stm32-dma.yaml      | 102 +++++++++++++++++++++
 .../devicetree/bindings/dma/stm32-dma.txt          |  83 -----------------
 2 files changed, 102 insertions(+), 83 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/dma/st,stm32-dma.yaml
 delete mode 100644 Documentation/devicetree/bindings/dma/stm32-dma.txt

diff --git a/Documentation/devicetree/bindings/dma/st,stm32-dma.yaml b/Documentation/devicetree/bindings/dma/st,stm32-dma.yaml
new file mode 100644
index 000000000000..0c0ac11ad55f
--- /dev/null
+++ b/Documentation/devicetree/bindings/dma/st,stm32-dma.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/st,stm32-dma.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: STMicroelectronics STM32 DMA Controller bindings
+
+description: |
+  The STM32 DMA is a general-purpose direct memory access controller capable of
+  supporting 8 independent DMA channels. Each channel can have up to 8 requests.
+  DMA clients connected to the STM32 DMA controller must use the format
+  described in the dma.txt file, using a four-cell specifier for each
+  channel: a phandle to the DMA controller plus the following four integer cells:
+    1. The channel id
+    2. The request line number
+    3. A 32bit mask specifying the DMA channel configuration which are device
+      dependent:
+        -bit 9: Peripheral Increment Address
+          0x0: no address increment between transfers
+          0x1: increment address between transfers
+        -bit 10: Memory Increment Address
+          0x0: no address increment between transfers
+          0x1: increment address between transfers
+        -bit 15: Peripheral Increment Offset Size
+          0x0: offset size is linked to the peripheral bus width
+          0x1: offset size is fixed to 4 (32-bit alignment)
+        -bit 16-17: Priority level
+          0x0: low
+          0x1: medium
+          0x2: high
+          0x3: very high
+    4. A 32bit bitfield value specifying DMA features which are device dependent:
+       -bit 0-1: DMA FIFO threshold selection
+         0x0: 1/4 full FIFO
+         0x1: 1/2 full FIFO
+         0x2: 3/4 full FIFO
+         0x3: full FIFO
+
+maintainers:
+  - Amelie Delaunay <amelie.delaunay@st.com>
+
+allOf:
+  - $ref: "dma-controller.yaml#"
+
+properties:
+  "#dma-cells":
+    const: 4
+
+  compatible:
+    const: st,stm32-dma
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 8
+    description: Should contain all of the per-channel DMA
+      interrupts in ascending order with respect to the
+      DMA channel index.
+
+  resets:
+    maxItems: 1
+
+  st,mem2mem:
+    $ref: /schemas/types.yaml#/definitions/flag
+    description: if defined, it indicates that the controller
+      supports memory-to-memory transfer
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - interrupts
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/clock/stm32mp1-clks.h>
+    #include <dt-bindings/reset/stm32mp1-resets.h>
+    dma-controller@40026400 {
+      compatible = "st,stm32-dma";
+      reg = <0x40026400 0x400>;
+      interrupts = <56>,
+                   <57>,
+                   <58>,
+                   <59>,
+                   <60>,
+                   <68>,
+                   <69>,
+                   <70>;
+      clocks = <&clk_hclk>;
+      #dma-cells = <4>;
+      st,mem2mem;
+      resets = <&rcc 150>;
+      dma-requests = <8>;
+    };
+
+...
diff --git a/Documentation/devicetree/bindings/dma/stm32-dma.txt b/Documentation/devicetree/bindings/dma/stm32-dma.txt
deleted file mode 100644
index c5f519097204..000000000000
--- a/Documentation/devicetree/bindings/dma/stm32-dma.txt
+++ /dev/null
@@ -1,83 +0,0 @@
-* STMicroelectronics STM32 DMA controller
-
-The STM32 DMA is a general-purpose direct memory access controller capable of
-supporting 8 independent DMA channels. Each channel can have up to 8 requests.
-
-Required properties:
-- compatible: Should be "st,stm32-dma"
-- reg: Should contain DMA registers location and length. This should include
-  all of the per-channel registers.
-- interrupts: Should contain all of the per-channel DMA interrupts in
-  ascending order with respect to the DMA channel index.
-- clocks: Should contain the input clock of the DMA instance.
-- #dma-cells : Must be <4>. See DMA client paragraph for more details.
-
-Optional properties:
-- dma-requests : Number of DMA requests supported.
-- resets: Reference to a reset controller asserting the DMA controller
-- st,mem2mem: boolean; if defined, it indicates that the controller supports
-  memory-to-memory transfer
-
-Example:
-
-	dma2: dma-controller@40026400 {
-		compatible = "st,stm32-dma";
-		reg = <0x40026400 0x400>;
-		interrupts = <56>,
-			     <57>,
-			     <58>,
-			     <59>,
-			     <60>,
-			     <68>,
-			     <69>,
-			     <70>;
-		clocks = <&clk_hclk>;
-		#dma-cells = <4>;
-		st,mem2mem;
-		resets = <&rcc 150>;
-		dma-requests = <8>;
-	};
-
-* DMA client
-
-DMA clients connected to the STM32 DMA controller must use the format
-described in the dma.txt file, using a four-cell specifier for each
-channel: a phandle to the DMA controller plus the following four integer cells:
-
-1. The channel id
-2. The request line number
-3. A 32bit mask specifying the DMA channel configuration which are device
-   dependent:
-  -bit 9: Peripheral Increment Address
-	0x0: no address increment between transfers
-	0x1: increment address between transfers
- -bit 10: Memory Increment Address
-	0x0: no address increment between transfers
-	0x1: increment address between transfers
- -bit 15: Peripheral Increment Offset Size
-	0x0: offset size is linked to the peripheral bus width
-	0x1: offset size is fixed to 4 (32-bit alignment)
- -bit 16-17: Priority level
-	0x0: low
-	0x1: medium
-	0x2: high
-	0x3: very high
-4. A 32bit bitfield value specifying DMA features which are device dependent:
- -bit 0-1: DMA FIFO threshold selection
-	0x0: 1/4 full FIFO
-	0x1: 1/2 full FIFO
-	0x2: 3/4 full FIFO
-	0x3: full FIFO
-
-
-Example:
-
-	usart1: serial@40011000 {
-		compatible = "st,stm32-uart";
-		reg = <0x40011000 0x400>;
-		interrupts = <37>;
-		clocks = <&clk_pclk2>;
-		dmas = <&dma2 2 4 0x10400 0x3>,
-		       <&dma2 7 5 0x10200 0x3>;
-		dma-names = "rx", "tx";
-	};
-- 
2.15.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/6] dt-bindings: dma: Convert stm32 MDMA bindings to json-schema
  2019-12-17  9:21 [PATCH 0/6] Convert STM32 dma to json-schema Benjamin Gaignard
  2019-12-17  9:21 ` [PATCH 1/6] dt-bindings: dma: Convert stm32 DMA bindings " Benjamin Gaignard
@ 2019-12-17  9:21 ` Benjamin Gaignard
  2019-12-18  0:01   ` Rob Herring
  2019-12-17  9:21 ` [PATCH 3/6] dt-bindings: dma: Convert stm32 DMAMUX " Benjamin Gaignard
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 11+ messages in thread
From: Benjamin Gaignard @ 2019-12-17  9:21 UTC (permalink / raw)
  To: vkoul, robh+dt, mark.rutland, mcoquelin.stm32, alexandre.torgue
  Cc: dmaengine, devicetree, linux-stm32, linux-arm-kernel,
	linux-kernel, Benjamin Gaignard

Convert the STM32 MDMA binding to DT schema format using json-schema

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
---
 .../devicetree/bindings/dma/st,stm32-mdma.yaml     | 105 +++++++++++++++++++++
 .../devicetree/bindings/dma/stm32-mdma.txt         |  94 ------------------
 2 files changed, 105 insertions(+), 94 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/dma/st,stm32-mdma.yaml
 delete mode 100644 Documentation/devicetree/bindings/dma/stm32-mdma.txt

diff --git a/Documentation/devicetree/bindings/dma/st,stm32-mdma.yaml b/Documentation/devicetree/bindings/dma/st,stm32-mdma.yaml
new file mode 100644
index 000000000000..c66543d0c267
--- /dev/null
+++ b/Documentation/devicetree/bindings/dma/st,stm32-mdma.yaml
@@ -0,0 +1,105 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/dma/st,stm32-mdma.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: STMicroelectronics STM32 MDMA Controller bindings
+
+description: |
+  The STM32 MDMA is a general-purpose direct memory access controller capable of
+  supporting 64 independent DMA channels with 256 HW requests.
+  DMA clients connected to the STM32 MDMA controller must use the format
+  described in the dma.txt file, using a five-cell specifier for each channel:
+  a phandle to the MDMA controller plus the following five integer cells:
+    1. The request line number
+    2. The priority level
+      0x0: Low
+      0x1: Medium
+      0x2: High
+      0x3: Very high
+    3. A 32bit mask specifying the DMA channel configuration
+      -bit 0-1: Source increment mode
+        0x0: Source address pointer is fixed
+        0x2: Source address pointer is incremented after each data transfer
+        0x3: Source address pointer is decremented after each data transfer
+      -bit 2-3: Destination increment mode
+        0x0: Destination address pointer is fixed
+        0x2: Destination address pointer is incremented after each data transfer
+        0x3: Destination address pointer is decremented after each data transfer
+      -bit 8-9: Source increment offset size
+        0x0: byte (8bit)
+        0x1: half-word (16bit)
+        0x2: word (32bit)
+        0x3: double-word (64bit)
+      -bit 10-11: Destination increment offset size
+        0x0: byte (8bit)
+        0x1: half-word (16bit)
+        0x2: word (32bit)
+        0x3: double-word (64bit)
+      -bit 25-18: The number of bytes to be transferred in a single transfer
+                  (min = 1 byte, max = 128 bytes)
+      -bit 29:28: Trigger Mode
+        0x00: Each MDMA request triggers a buffer transfer (max 128 bytes)
+        0x1: Each MDMA request triggers a block transfer (max 64K bytes)
+        0x2: Each MDMA request triggers a repeated block transfer
+        0x3: Each MDMA request triggers a linked list transfer
+    4. A 32bit value specifying the register to be used to acknowledge the request
+       if no HW ack signal is used by the MDMA client
+    5. A 32bit mask specifying the value to be written to acknowledge the request
+       if no HW ack signal is used by the MDMA client
+
+maintainers:
+  - Amelie Delaunay <amelie.delaunay@st.com>
+
+allOf:
+  - $ref: "dma-controller.yaml#"
+
+properties:
+  "#dma-cells":
+    const: 5
+
+  compatible:
+    const: st,stm32h7-mdma
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  resets:
+    maxItems: 1
+
+  st,ahb-addr-masks:
+    $ref: /schemas/types.yaml#/definitions/uint32-array
+    description: Array of u32 mask to list memory devices addressed via AHB bus.
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - interrupts
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/clock/stm32mp1-clks.h>
+    #include <dt-bindings/reset/stm32mp1-resets.h>
+    dma-controller@52000000 {
+      compatible = "st,stm32h7-mdma";
+      reg = <0x52000000 0x1000>;
+      interrupts = <122>;
+      clocks = <&timer_clk>;
+      resets = <&rcc 992>;
+      #dma-cells = <5>;
+      dma-channels = <16>;
+      dma-requests = <32>;
+      st,ahb-addr-masks = <0x20000000>, <0x00000000>;
+    };
+
+...
+
diff --git a/Documentation/devicetree/bindings/dma/stm32-mdma.txt b/Documentation/devicetree/bindings/dma/stm32-mdma.txt
deleted file mode 100644
index d18772d6bc65..000000000000
--- a/Documentation/devicetree/bindings/dma/stm32-mdma.txt
+++ /dev/null
@@ -1,94 +0,0 @@
-* STMicroelectronics STM32 MDMA controller
-
-The STM32 MDMA is a general-purpose direct memory access controller capable of
-supporting 64 independent DMA channels with 256 HW requests.
-
-Required properties:
-- compatible: Should be "st,stm32h7-mdma"
-- reg: Should contain MDMA registers location and length. This should include
-  all of the per-channel registers.
-- interrupts: Should contain the MDMA interrupt.
-- clocks: Should contain the input clock of the DMA instance.
-- resets: Reference to a reset controller asserting the DMA controller.
-- #dma-cells : Must be <5>. See DMA client paragraph for more details.
-
-Optional properties:
-- dma-channels: Number of DMA channels supported by the controller.
-- dma-requests: Number of DMA request signals supported by the controller.
-- st,ahb-addr-masks: Array of u32 mask to list memory devices addressed via
-  AHB bus.
-
-Example:
-
-	mdma1: dma@52000000 {
-		compatible = "st,stm32h7-mdma";
-		reg = <0x52000000 0x1000>;
-		interrupts = <122>;
-		clocks = <&timer_clk>;
-		resets = <&rcc 992>;
-		#dma-cells = <5>;
-		dma-channels = <16>;
-		dma-requests = <32>;
-		st,ahb-addr-masks = <0x20000000>, <0x00000000>;
-	};
-
-* DMA client
-
-DMA clients connected to the STM32 MDMA controller must use the format
-described in the dma.txt file, using a five-cell specifier for each channel:
-a phandle to the MDMA controller plus the following five integer cells:
-
-1. The request line number
-2. The priority level
-	0x00: Low
-	0x01: Medium
-	0x10: High
-	0x11: Very high
-3. A 32bit mask specifying the DMA channel configuration
- -bit 0-1: Source increment mode
-	0x00: Source address pointer is fixed
-	0x10: Source address pointer is incremented after each data transfer
-	0x11: Source address pointer is decremented after each data transfer
- -bit 2-3: Destination increment mode
-	0x00: Destination address pointer is fixed
-	0x10: Destination address pointer is incremented after each data
-	transfer
-	0x11: Destination address pointer is decremented after each data
-	transfer
- -bit 8-9: Source increment offset size
-	0x00: byte (8bit)
-	0x01: half-word (16bit)
-	0x10: word (32bit)
-	0x11: double-word (64bit)
- -bit 10-11: Destination increment offset size
-	0x00: byte (8bit)
-	0x01: half-word (16bit)
-	0x10: word (32bit)
-	0x11: double-word (64bit)
--bit 25-18: The number of bytes to be transferred in a single transfer
-	(min = 1 byte, max = 128 bytes)
--bit 29:28: Trigger Mode
-	0x00: Each MDMA request triggers a buffer transfer (max 128 bytes)
-	0x01: Each MDMA request triggers a block transfer (max 64K bytes)
-	0x10: Each MDMA request triggers a repeated block transfer
-	0x11: Each MDMA request triggers a linked list transfer
-4. A 32bit value specifying the register to be used to acknowledge the request
-   if no HW ack signal is used by the MDMA client
-5. A 32bit mask specifying the value to be written to acknowledge the request
-   if no HW ack signal is used by the MDMA client
-
-Example:
-
-	i2c4: i2c@5c002000 {
-		compatible = "st,stm32f7-i2c";
-		reg = <0x5c002000 0x400>;
-		interrupts = <95>,
-			     <96>;
-		clocks = <&timer_clk>;
-		#address-cells = <1>;
-		#size-cells = <0>;
-		dmas = <&mdma1 36 0x0 0x40008 0x0 0x0>,
-		       <&mdma1 37 0x0 0x40002 0x0 0x0>;
-		dma-names = "rx", "tx";
-		status = "disabled";
-	};
-- 
2.15.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 3/6] dt-bindings: dma: Convert stm32 DMAMUX bindings to json-schema
  2019-12-17  9:21 [PATCH 0/6] Convert STM32 dma to json-schema Benjamin Gaignard
  2019-12-17  9:21 ` [PATCH 1/6] dt-bindings: dma: Convert stm32 DMA bindings " Benjamin Gaignard
  2019-12-17  9:21 ` [PATCH 2/6] dt-bindings: dma: Convert stm32 MDMA " Benjamin Gaignard
@ 2019-12-17  9:21 ` Benjamin Gaignard
  2019-12-18  0:01   ` Rob Herring
  2019-12-17  9:21 ` [PATCH 4/6] ARM: dts: stm32: fix dma controller node name on stm32f746 Benjamin Gaignard
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 11+ messages in thread
From: Benjamin Gaignard @ 2019-12-17  9:21 UTC (permalink / raw)
  To: vkoul, robh+dt, mark.rutland, mcoquelin.stm32, alexandre.torgue
  Cc: dmaengine, devicetree, linux-stm32, linux-arm-kernel,
	linux-kernel, Benjamin Gaignard

Convert the STM32 DMAMUX binding to DT schema format using json-schema

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
---
 .../devicetree/bindings/dma/st,stm32-dmamux.yaml   | 52 ++++++++++++++
 .../devicetree/bindings/dma/stm32-dmamux.txt       | 84 ----------------------
 2 files changed, 52 insertions(+), 84 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/dma/st,stm32-dmamux.yaml
 delete mode 100644 Documentation/devicetree/bindings/dma/stm32-dmamux.txt

diff --git a/Documentation/devicetree/bindings/dma/st,stm32-dmamux.yaml b/Documentation/devicetree/bindings/dma/st,stm32-dmamux.yaml
new file mode 100644
index 000000000000..915bc4af9568
--- /dev/null
+++ b/Documentation/devicetree/bindings/dma/st,stm32-dmamux.yaml
@@ -0,0 +1,52 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/dma/st,stm32-dmamux.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: STMicroelectronics STM32 DMA MUX (DMA request router) bindings
+
+maintainers:
+  - Amelie Delaunay <amelie.delaunay@st.com>
+
+allOf:
+  - $ref: "dma-router.yaml#"
+
+properties:
+  "#dma-cells":
+    const: 3
+
+  compatible:
+    const: st,stm32h7-dmamux
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  resets:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - dma-masters
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/clock/stm32mp1-clks.h>
+    #include <dt-bindings/reset/stm32mp1-resets.h>
+    dma-router@40020800 {
+      compatible = "st,stm32h7-dmamux";
+      reg = <0x40020800 0x3c>;
+      #dma-cells = <3>;
+      dma-requests = <128>;
+      dma-channels = <16>;
+      dma-masters = <&dma1 &dma2>;
+      clocks = <&timer_clk>;
+    };
+
+...
+
diff --git a/Documentation/devicetree/bindings/dma/stm32-dmamux.txt b/Documentation/devicetree/bindings/dma/stm32-dmamux.txt
deleted file mode 100644
index 1b893b235507..000000000000
--- a/Documentation/devicetree/bindings/dma/stm32-dmamux.txt
+++ /dev/null
@@ -1,84 +0,0 @@
-STM32 DMA MUX (DMA request router)
-
-Required properties:
-- compatible:	"st,stm32h7-dmamux"
-- reg:		Memory map for accessing module
-- #dma-cells:	Should be set to <3>.
-		First parameter is request line number.
-		Second is DMA channel configuration
-		Third is Fifo threshold
-		For more details about the three cells, please see
-		stm32-dma.txt documentation binding file
-- dma-masters:	Phandle pointing to the DMA controllers.
-		Several controllers are allowed. Only "st,stm32-dma" DMA
-		compatible are supported.
-
-Optional properties:
-- dma-channels : Number of DMA requests supported.
-- dma-requests : Number of DMAMUX requests supported.
-- resets: Reference to a reset controller asserting the DMA controller
-- clocks: Input clock of the DMAMUX instance.
-
-Example:
-
-/* DMA controller 1 */
-dma1: dma-controller@40020000 {
-	compatible = "st,stm32-dma";
-	reg = <0x40020000 0x400>;
-	interrupts = <11>,
-		     <12>,
-		     <13>,
-		     <14>,
-		     <15>,
-		     <16>,
-		     <17>,
-		     <47>;
-	clocks = <&timer_clk>;
-	#dma-cells = <4>;
-	st,mem2mem;
-	resets = <&rcc 150>;
-	dma-channels = <8>;
-	dma-requests = <8>;
-};
-
-/* DMA controller 1 */
-dma2: dma@40020400 {
-	compatible = "st,stm32-dma";
-	reg = <0x40020400 0x400>;
-	interrupts = <56>,
-		     <57>,
-		     <58>,
-		     <59>,
-		     <60>,
-		     <68>,
-		     <69>,
-		     <70>;
-	clocks = <&timer_clk>;
-	#dma-cells = <4>;
-	st,mem2mem;
-	resets = <&rcc 150>;
-	dma-channels = <8>;
-	dma-requests = <8>;
-};
-
-/* DMA mux */
-dmamux1: dma-router@40020800 {
-	compatible = "st,stm32h7-dmamux";
-	reg = <0x40020800 0x3c>;
-	#dma-cells = <3>;
-	dma-requests = <128>;
-	dma-channels = <16>;
-	dma-masters = <&dma1 &dma2>;
-	clocks = <&timer_clk>;
-};
-
-/* DMA client */
-usart1: serial@40011000 {
-	compatible = "st,stm32-usart", "st,stm32-uart";
-	reg = <0x40011000 0x400>;
-	interrupts = <37>;
-	clocks = <&timer_clk>;
-	dmas = <&dmamux1 41 0x414 0>,
-	       <&dmamux1 42 0x414 0>;
-	dma-names = "rx", "tx";
-};
-- 
2.15.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 4/6] ARM: dts: stm32: fix dma controller node name on stm32f746
  2019-12-17  9:21 [PATCH 0/6] Convert STM32 dma to json-schema Benjamin Gaignard
                   ` (2 preceding siblings ...)
  2019-12-17  9:21 ` [PATCH 3/6] dt-bindings: dma: Convert stm32 DMAMUX " Benjamin Gaignard
@ 2019-12-17  9:21 ` Benjamin Gaignard
  2019-12-17  9:22 ` [PATCH 5/6] ARM: dts: stm32: fix dma controller node name on stm32f743 Benjamin Gaignard
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Benjamin Gaignard @ 2019-12-17  9:21 UTC (permalink / raw)
  To: vkoul, robh+dt, mark.rutland, mcoquelin.stm32, alexandre.torgue
  Cc: dmaengine, devicetree, linux-stm32, linux-arm-kernel,
	linux-kernel, Benjamin Gaignard

Modify dma controller nodes name to fit with the standard naming.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
---
 arch/arm/boot/dts/stm32f746.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/stm32f746.dtsi b/arch/arm/boot/dts/stm32f746.dtsi
index d26f93f8b9c2..ed222577f6da 100644
--- a/arch/arm/boot/dts/stm32f746.dtsi
+++ b/arch/arm/boot/dts/stm32f746.dtsi
@@ -587,7 +587,7 @@
 			assigned-clock-rates = <1000000>;
 		};
 
-		dma1: dma@40026000 {
+		dma1: dma-controller@40026000 {
 			compatible = "st,stm32-dma";
 			reg = <0x40026000 0x400>;
 			interrupts = <11>,
@@ -603,7 +603,7 @@
 			status = "disabled";
 		};
 
-		dma2: dma@40026400 {
+		dma2: dma-controller@40026400 {
 			compatible = "st,stm32-dma";
 			reg = <0x40026400 0x400>;
 			interrupts = <56>,
-- 
2.15.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 5/6] ARM: dts: stm32: fix dma controller node name on stm32f743
  2019-12-17  9:21 [PATCH 0/6] Convert STM32 dma to json-schema Benjamin Gaignard
                   ` (3 preceding siblings ...)
  2019-12-17  9:21 ` [PATCH 4/6] ARM: dts: stm32: fix dma controller node name on stm32f746 Benjamin Gaignard
@ 2019-12-17  9:22 ` Benjamin Gaignard
  2019-12-17  9:22 ` [PATCH 6/6] ARM: dts: stm32: fix dma controller node name on stm32mp157c Benjamin Gaignard
  2019-12-18 14:23 ` [PATCH 0/6] Convert STM32 dma to json-schema Alexandre Torgue
  6 siblings, 0 replies; 11+ messages in thread
From: Benjamin Gaignard @ 2019-12-17  9:22 UTC (permalink / raw)
  To: vkoul, robh+dt, mark.rutland, mcoquelin.stm32, alexandre.torgue
  Cc: dmaengine, devicetree, linux-stm32, linux-arm-kernel,
	linux-kernel, Benjamin Gaignard

Modify dma controller nodes name to fit with the standard naming.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
---
 arch/arm/boot/dts/stm32h743.dtsi | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boot/dts/stm32h743.dtsi b/arch/arm/boot/dts/stm32h743.dtsi
index c065266ee377..05eb02e6d083 100644
--- a/arch/arm/boot/dts/stm32h743.dtsi
+++ b/arch/arm/boot/dts/stm32h743.dtsi
@@ -231,7 +231,7 @@
 			status = "disabled";
 		};
 
-		dma1: dma@40020000 {
+		dma1: dma-controller@40020000 {
 			compatible = "st,stm32-dma";
 			reg = <0x40020000 0x400>;
 			interrupts = <11>,
@@ -249,7 +249,7 @@
 			status = "disabled";
 		};
 
-		dma2: dma@40020400 {
+		dma2: dma-controller@40020400 {
 			compatible = "st,stm32-dma";
 			reg = <0x40020400 0x400>;
 			interrupts = <56>,
@@ -329,7 +329,7 @@
 			status = "disabled";
 		};
 
-		mdma1: dma@52000000 {
+		mdma1: dma-controller@52000000 {
 			compatible = "st,stm32h7-mdma";
 			reg = <0x52000000 0x1000>;
 			interrupts = <122>;
-- 
2.15.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 6/6] ARM: dts: stm32: fix dma controller node name on stm32mp157c
  2019-12-17  9:21 [PATCH 0/6] Convert STM32 dma to json-schema Benjamin Gaignard
                   ` (4 preceding siblings ...)
  2019-12-17  9:22 ` [PATCH 5/6] ARM: dts: stm32: fix dma controller node name on stm32f743 Benjamin Gaignard
@ 2019-12-17  9:22 ` Benjamin Gaignard
  2019-12-18 14:23 ` [PATCH 0/6] Convert STM32 dma to json-schema Alexandre Torgue
  6 siblings, 0 replies; 11+ messages in thread
From: Benjamin Gaignard @ 2019-12-17  9:22 UTC (permalink / raw)
  To: vkoul, robh+dt, mark.rutland, mcoquelin.stm32, alexandre.torgue
  Cc: dmaengine, devicetree, linux-stm32, linux-arm-kernel,
	linux-kernel, Benjamin Gaignard

Modify dma controller nodes name to fit with the standard naming.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
---
 arch/arm/boot/dts/stm32mp157c.dtsi | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boot/dts/stm32mp157c.dtsi b/arch/arm/boot/dts/stm32mp157c.dtsi
index 9b11654a0a39..8fac522b1bc9 100644
--- a/arch/arm/boot/dts/stm32mp157c.dtsi
+++ b/arch/arm/boot/dts/stm32mp157c.dtsi
@@ -949,7 +949,7 @@
 			status = "disabled";
 		};
 
-		dma1: dma@48000000 {
+		dma1: dma-controller@48000000 {
 			compatible = "st,stm32-dma";
 			reg = <0x48000000 0x400>;
 			interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>,
@@ -966,7 +966,7 @@
 			dma-requests = <8>;
 		};
 
-		dma2: dma@48001000 {
+		dma2: dma-controller@48001000 {
 			compatible = "st,stm32-dma";
 			reg = <0x48001000 0x400>;
 			interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>,
@@ -1248,7 +1248,7 @@
 			status = "disabled";
 		};
 
-		mdma1: dma@58000000 {
+		mdma1: dma-controller@58000000 {
 			compatible = "st,stm32h7-mdma";
 			reg = <0x58000000 0x1000>;
 			interrupts = <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>;
-- 
2.15.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/6] dt-bindings: dma: Convert stm32 DMA bindings to json-schema
  2019-12-17  9:21 ` [PATCH 1/6] dt-bindings: dma: Convert stm32 DMA bindings " Benjamin Gaignard
@ 2019-12-18  0:01   ` Rob Herring
  0 siblings, 0 replies; 11+ messages in thread
From: Rob Herring @ 2019-12-18  0:01 UTC (permalink / raw)
  To: Benjamin Gaignard
  Cc: vkoul, robh+dt, mark.rutland, mcoquelin.stm32, alexandre.torgue,
	dmaengine, devicetree, linux-stm32, linux-arm-kernel,
	linux-kernel, Benjamin Gaignard

On Tue, 17 Dec 2019 10:21:56 +0100, Benjamin Gaignard wrote:
> Convert the STM32 DMA binding to DT schema format using json-schema
> 
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
> ---
>  .../devicetree/bindings/dma/st,stm32-dma.yaml      | 102 +++++++++++++++++++++
>  .../devicetree/bindings/dma/stm32-dma.txt          |  83 -----------------
>  2 files changed, 102 insertions(+), 83 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/dma/st,stm32-dma.yaml
>  delete mode 100644 Documentation/devicetree/bindings/dma/stm32-dma.txt
> 

Applied, thanks.

Rob

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/6] dt-bindings: dma: Convert stm32 MDMA bindings to json-schema
  2019-12-17  9:21 ` [PATCH 2/6] dt-bindings: dma: Convert stm32 MDMA " Benjamin Gaignard
@ 2019-12-18  0:01   ` Rob Herring
  0 siblings, 0 replies; 11+ messages in thread
From: Rob Herring @ 2019-12-18  0:01 UTC (permalink / raw)
  To: Benjamin Gaignard
  Cc: vkoul, robh+dt, mark.rutland, mcoquelin.stm32, alexandre.torgue,
	dmaengine, devicetree, linux-stm32, linux-arm-kernel,
	linux-kernel, Benjamin Gaignard

On Tue, 17 Dec 2019 10:21:57 +0100, Benjamin Gaignard wrote:
> Convert the STM32 MDMA binding to DT schema format using json-schema
> 
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
> ---
>  .../devicetree/bindings/dma/st,stm32-mdma.yaml     | 105 +++++++++++++++++++++
>  .../devicetree/bindings/dma/stm32-mdma.txt         |  94 ------------------
>  2 files changed, 105 insertions(+), 94 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/dma/st,stm32-mdma.yaml
>  delete mode 100644 Documentation/devicetree/bindings/dma/stm32-mdma.txt
> 

Applied, thanks.

Rob

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/6] dt-bindings: dma: Convert stm32 DMAMUX bindings to json-schema
  2019-12-17  9:21 ` [PATCH 3/6] dt-bindings: dma: Convert stm32 DMAMUX " Benjamin Gaignard
@ 2019-12-18  0:01   ` Rob Herring
  0 siblings, 0 replies; 11+ messages in thread
From: Rob Herring @ 2019-12-18  0:01 UTC (permalink / raw)
  To: Benjamin Gaignard
  Cc: vkoul, robh+dt, mark.rutland, mcoquelin.stm32, alexandre.torgue,
	dmaengine, devicetree, linux-stm32, linux-arm-kernel,
	linux-kernel, Benjamin Gaignard

On Tue, 17 Dec 2019 10:21:58 +0100, Benjamin Gaignard wrote:
> Convert the STM32 DMAMUX binding to DT schema format using json-schema
> 
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
> ---
>  .../devicetree/bindings/dma/st,stm32-dmamux.yaml   | 52 ++++++++++++++
>  .../devicetree/bindings/dma/stm32-dmamux.txt       | 84 ----------------------
>  2 files changed, 52 insertions(+), 84 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/dma/st,stm32-dmamux.yaml
>  delete mode 100644 Documentation/devicetree/bindings/dma/stm32-dmamux.txt
> 

Applied, thanks.

Rob

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/6] Convert STM32 dma to json-schema
  2019-12-17  9:21 [PATCH 0/6] Convert STM32 dma to json-schema Benjamin Gaignard
                   ` (5 preceding siblings ...)
  2019-12-17  9:22 ` [PATCH 6/6] ARM: dts: stm32: fix dma controller node name on stm32mp157c Benjamin Gaignard
@ 2019-12-18 14:23 ` Alexandre Torgue
  6 siblings, 0 replies; 11+ messages in thread
From: Alexandre Torgue @ 2019-12-18 14:23 UTC (permalink / raw)
  To: Benjamin Gaignard, vkoul, robh+dt, mark.rutland, mcoquelin.stm32
  Cc: dmaengine, devicetree, linux-stm32, linux-arm-kernel, linux-kernel

Hi Benjamin,

On 12/17/19 10:21 AM, Benjamin Gaignard wrote:
> This series convert STM32 dma, mdma and dmamux bindings to json-schema.
> Yaml bindings use dma-controller and dma-router schemas where nodes names
> are verified which lead to fix stm32f746, stm32f743 and stm32mp157 device
> tree files.
> 
> Benjamin Gaignard (6):
>    dt-bindings: dma: Convert stm32 DMA bindings to json-schema
>    dt-bindings: dma: Convert stm32 MDMA bindings to json-schema
>    dt-bindings: dma: Convert stm32 DMAMUX bindings to json-schema
>    ARM: dts: stm32: fix dma controller node name on stm32f746
>    ARM: dts: stm32: fix dma controller node name on stm32f743
>    ARM: dts: stm32: fix dma controller node name on stm32mp157c
> 
>   .../devicetree/bindings/dma/st,stm32-dma.yaml      | 102 ++++++++++++++++++++
>   .../devicetree/bindings/dma/st,stm32-dmamux.yaml   |  52 ++++++++++
>   .../devicetree/bindings/dma/st,stm32-mdma.yaml     | 105 +++++++++++++++++++++
>   .../devicetree/bindings/dma/stm32-dma.txt          |  83 ----------------
>   .../devicetree/bindings/dma/stm32-dmamux.txt       |  84 -----------------
>   .../devicetree/bindings/dma/stm32-mdma.txt         |  94 ------------------
>   arch/arm/boot/dts/stm32f746.dtsi                   |   4 +-
>   arch/arm/boot/dts/stm32h743.dtsi                   |   6 +-
>   arch/arm/boot/dts/stm32mp157c.dtsi                 |   6 +-
>   9 files changed, 267 insertions(+), 269 deletions(-)
>   create mode 100644 Documentation/devicetree/bindings/dma/st,stm32-dma.yaml
>   create mode 100644 Documentation/devicetree/bindings/dma/st,stm32-dmamux.yaml
>   create mode 100644 Documentation/devicetree/bindings/dma/st,stm32-mdma.yaml
>   delete mode 100644 Documentation/devicetree/bindings/dma/stm32-dma.txt
>   delete mode 100644 Documentation/devicetree/bindings/dma/stm32-dmamux.txt
>   delete mode 100644 Documentation/devicetree/bindings/dma/stm32-mdma.txt
> 

For  DT patches, please rebase your patches on stm32-next. Major updates 
have been done for STM DT diversity.

Thanks in advance.

Alex

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-12-18 14:23 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-17  9:21 [PATCH 0/6] Convert STM32 dma to json-schema Benjamin Gaignard
2019-12-17  9:21 ` [PATCH 1/6] dt-bindings: dma: Convert stm32 DMA bindings " Benjamin Gaignard
2019-12-18  0:01   ` Rob Herring
2019-12-17  9:21 ` [PATCH 2/6] dt-bindings: dma: Convert stm32 MDMA " Benjamin Gaignard
2019-12-18  0:01   ` Rob Herring
2019-12-17  9:21 ` [PATCH 3/6] dt-bindings: dma: Convert stm32 DMAMUX " Benjamin Gaignard
2019-12-18  0:01   ` Rob Herring
2019-12-17  9:21 ` [PATCH 4/6] ARM: dts: stm32: fix dma controller node name on stm32f746 Benjamin Gaignard
2019-12-17  9:22 ` [PATCH 5/6] ARM: dts: stm32: fix dma controller node name on stm32f743 Benjamin Gaignard
2019-12-17  9:22 ` [PATCH 6/6] ARM: dts: stm32: fix dma controller node name on stm32mp157c Benjamin Gaignard
2019-12-18 14:23 ` [PATCH 0/6] Convert STM32 dma to json-schema Alexandre Torgue

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).