Skip to contentSkip to conversation

R-Car D3 (r8a77995) SYS-DMAC integration

PATCH Applied Ulrich Hecht 3 participants 8 messages Nov 20, 2017 – Nov 28, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v2 cover R-Car D3 (r8a77995) SYS-DMAC integration

Hi!

This adds DT nodes and bindings for the SYS-DMAC on R-Car D3 and enables the DMAs for SCIF2.

Thanks to Chris, Geert and Simon for the review. This revision adds the second pair of DMAs to SCIF2 and fixes a typo in the subject line.

CU
Uli

Ulrich Hecht (3):
arm64: dts: r8a77995: add SYS-DMAC nodes
arm64: dts: r8a77995: add DMA for SCIF2
dmaengine: rcar-dmac: Document R-Car D3 bindings

 .../devicetree/bindings/dma/renesas,rcar-dmac.txt  |  1 +
 arch/arm64/boot/dts/renesas/r8a77995.dtsi          | 75 ++++++++++++++++++++++
 2 files changed, 76 insertions(+)
Signature · 1 line
2.7.4
#1 lore raw

PATCH v2 1/3 arm64: dts: r8a77995: add SYS-DMAC nodes

Differs from other Gen3 SoCs in that each controller only supports eight channels.

---
 arch/arm64/boot/dts/renesas/r8a77995.dtsi | 72 +++++++++++++++++++++++++++++++
 1 file changed, 72 insertions(+)
arch/arm64/boot/dts/renesas/r8a77995.dtsi +72 -0
index 788e3af..04a392a 100644
@@ -155,6 +155,78 @@
 			resets = <&cpg 407>;
 		};
 
+		dmac0: dma-controller@e6700000 {
+			compatible = "renesas,dmac-r8a77995",
+				     "renesas,rcar-dmac";
+			reg = <0 0xe6700000 0 0x10000>;
+			interrupts = <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "error",
+					"ch0", "ch1", "ch2", "ch3",
+					"ch4", "ch5", "ch6", "ch7";
+			clocks = <&cpg CPG_MOD 219>;
+			clock-names = "fck";
+			power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+			resets = <&cpg 219>;
+			#dma-cells = <1>;
+			dma-channels = <8>;
+		};
+
+		dmac1: dma-controller@e7300000 {
+			compatible = "renesas,dmac-r8a77995",
+				     "renesas,rcar-dmac";
+			reg = <0 0xe7300000 0 0x10000>;
+			interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "error",
+					"ch0", "ch1", "ch2", "ch3",
+					"ch4", "ch5", "ch6", "ch7";
+			clocks = <&cpg CPG_MOD 218>;
+			clock-names = "fck";
+			power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+			resets = <&cpg 218>;
+			#dma-cells = <1>;
+			dma-channels = <8>;
+		};
+
+		dmac2: dma-controller@e7310000 {
+			compatible = "renesas,dmac-r8a77995",
+				     "renesas,rcar-dmac";
+			reg = <0 0xe7310000 0 0x10000>;
+			interrupts = <GIC_SPI 416 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 417 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 419 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 420 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 422 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH
+				      GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "error",
+					"ch0", "ch1", "ch2", "ch3",
+					"ch4", "ch5", "ch6", "ch7";
+			clocks = <&cpg CPG_MOD 217>;
+			clock-names = "fck";
+			power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+			resets = <&cpg 217>;
+			#dma-cells = <1>;
+			dma-channels = <8>;
+		};
+
 		gpio0: gpio@e6050000 {
 			compatible = "renesas,gpio-r8a77995",
 				     "renesas,rcar-gen3-gpio",
Signature · 1 line
2.7.4
#2 lore raw

Re: [PATCH v2 1/3] arm64: dts: r8a77995: add SYS-DMAC nodes

Quoted 4 lines · Ulrich Hecht

Differs from other Gen3 SoCs in that each controller only supports eight channels.

This patch has already been applied (which confused me somewhat).

#3 lore raw

PATCH v2 2/3 arm64: dts: r8a77995: add DMA for SCIF2

In reply to Ulrich Hecht

Tested on Draak.

---
 arch/arm64/boot/dts/renesas/r8a77995.dtsi | 3 +++
 1 file changed, 3 insertions(+)
arch/arm64/boot/dts/renesas/r8a77995.dtsi +3 -0
index 04a392a..71f5ec9 100644
@@ -393,6 +393,9 @@
 				 <&cpg CPG_CORE R8A77995_CLK_S3D1C>,
 				 <&scif_clk>;
 			clock-names = "fck", "brg_int", "scif_clk";
+			dmas = <&dmac1 0x13>, <&dmac1 0x12>,
+			       <&dmac2 0x13>, <&dmac2 0x12>;
+			dma-names = "tx", "rx", "tx", "rx";
 			power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
 			resets = <&cpg 310>;
 			status = "disabled";
Signature · 1 line
2.7.4
Reviewed-by on v2 2/3
#4 lore raw

Re: [PATCH v2 2/3] arm64: dts: r8a77995: add DMA for SCIF2

Quoted 3 lines · Ulrich Hecht

Tested on Draak.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#6 lore raw

PATCH v2 3/3 dmaengine: rcar-dmac: Document R-Car D3 bindings

In reply to Ulrich Hecht

R8A77995's SYS-DMAC is R-Car Gen3-compatible.

---
 Documentation/devicetree/bindings/dma/renesas,rcar-dmac.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/dma/renesas,rcar-dmac.txt +1 -0
index 891db41..af071ed 100644
@@ -26,6 +26,7 @@ Required Properties:
 		- "renesas,dmac-r8a7795" (R-Car H3)
 		- "renesas,dmac-r8a7796" (R-Car M3-W)
 		- "renesas,dmac-r8a77970" (R-Car V3M)
+		- "renesas,dmac-r8a77995" (R-Car D3)
 
 - reg: base address and length of the registers block for the DMAC
 
Signature · 1 line
2.7.4
Reviewed-by Reviewed-by Simon Horman on v2 3/3
#7 lore raw

Re: [PATCH v2 3/3] dmaengine: rcar-dmac: Document R-Car D3 bindings

Quoted 3 lines · Ulrich Hecht

R8A77995's SYS-DMAC is R-Car Gen3-compatible.

You seem to have lost:

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds