Convert STM32 dma to json-schema
Subsystems (3)
cover Convert STM32 dma to json-schema
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
Signature · 1 line
2.15.0
PATCH 1/6 dt-bindings: dma: Convert stm32 DMA bindings to json-schema
Convert the STM32 DMA binding to DT schema format using json-schema
--- .../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
Documentation/devicetree/bindings/dma/st,stm32-dma.yaml new file +102 -0
@@ -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 <[email protected]> + +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>; + }; + +...
Documentation/devicetree/bindings/dma/stm32-dma.txt deleted +0 -83
83 lines not on this page · raw message
Signature · 1 line
2.15.0
Re: [PATCH 1/6] dt-bindings: dma: Convert stm32 DMA bindings to json-schema
Quoted 10 lines · Benjamin Gaignard
Convert the STM32 DMA binding to DT schema format using json-schema
Signed-off-by Benjamin Gaignard <[email protected]>--- .../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
PATCH 2/6 dt-bindings: dma: Convert stm32 MDMA bindings to json-schema
In reply to Benjamin GaignardConvert the STM32 MDMA binding to DT schema format using json-schema
--- .../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
Documentation/devicetree/bindings/dma/st,stm32-mdma.yaml new file +105 -0
@@ -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 <[email protected]> + +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>; + }; + +... +
Documentation/devicetree/bindings/dma/stm32-mdma.txt deleted +0 -94
94 lines not on this page · raw message
Signature · 7 lines
2.15.0 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH 2/6] dt-bindings: dma: Convert stm32 MDMA bindings to json-schema
Quoted 10 lines · Benjamin Gaignard
Convert the STM32 MDMA binding to DT schema format using json-schema
Signed-off-by Benjamin Gaignard <[email protected]>--- .../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
PATCH 3/6 dt-bindings: dma: Convert stm32 DMAMUX bindings to json-schema
In reply to Benjamin GaignardConvert the STM32 DMAMUX binding to DT schema format using json-schema
--- .../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
Documentation/devicetree/bindings/dma/st,stm32-dmamux.yaml new file +52 -0
@@ -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 <[email protected]> + +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>; + }; + +... +
Documentation/devicetree/bindings/dma/stm32-dmamux.txt deleted +0 -84
84 lines not on this page · raw message
Signature · 1 line
2.15.0
Re: [PATCH 3/6] dt-bindings: dma: Convert stm32 DMAMUX bindings to json-schema
Quoted 10 lines · Benjamin Gaignard
Convert the STM32 DMAMUX binding to DT schema format using json-schema
Signed-off-by Benjamin Gaignard <[email protected]>--- .../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
PATCH 4/6 ARM: dts: stm32: fix dma controller node name on stm32f746
In reply to Benjamin GaignardModify dma controller nodes name to fit with the standard naming.
--- arch/arm/boot/dts/stm32f746.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/stm32f746.dtsi +2 -2
@@ -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>,
Signature · 1 line
2.15.0
PATCH 5/6 ARM: dts: stm32: fix dma controller node name on stm32f743
In reply to Benjamin GaignardModify dma controller nodes name to fit with the standard naming.
--- arch/arm/boot/dts/stm32h743.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/boot/dts/stm32h743.dtsi +3 -3
@@ -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>;
Signature · 1 line
2.15.0
PATCH 6/6 ARM: dts: stm32: fix dma controller node name on stm32mp157c
In reply to Benjamin GaignardModify dma controller nodes name to fit with the standard naming.
--- arch/arm/boot/dts/stm32mp157c.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/boot/dts/stm32mp157c.dtsi +3 -3
@@ -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>;
Signature · 1 line
2.15.0
Hi Benjamin,
Quoted 23 lines · 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(-)
Quoted 7 lines
create mode 100644
Documentation/devicetree/bindings/dma/st,stm32-dma.yamlcreate mode 100644Documentation/devicetree/bindings/dma/st,stm32-dmamux.yamlcreate mode 100644Documentation/devicetree/bindings/dma/st,stm32-mdma.yamldelete mode 100644Documentation/devicetree/bindings/dma/stm32-dma.txtdelete mode 100644Documentation/devicetree/bindings/dma/stm32-dmamux.txtdelete mode 100644Documentation/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
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel