Skip to contentSkip to conversation

R-Car D3 (r8a77995) SYS-DMAC integration

PATCH Applied Ulrich Hecht 4 participants 12 messages Nov 15, 2017 – Nov 29, 2017

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

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.

CU
Uli

Ulrich Hecht (3):
arm64: dts: r8a77995: add SYS-DMAC nodes
arm64: dts: r8a7795: 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          | 74 ++++++++++++++++++++++
 2 files changed, 75 insertions(+)
Signature · 1 line
2.7.4
#1 lore raw

PATCH 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
Reviewed-by on v1 1/3
#2 lore raw

Re: [PATCH 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.

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

#4 lore raw

PATCH 2/3 arm64: dts: r8a7795: add DMA for SCIF2

In reply to Ulrich Hecht

Tested on Draak.

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

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

Hi Ulrich,

Quoted 3 lines · Ulrich Hecht

Tested on Draak.

Thanks for your patch!

arch/arm64/boot/dts/renesas/r8a77995.dtsi line 397

Quoted 8 lines
arch/arm64/boot/dts/renesas/r8a77995.dtsi +2 -0
@@ -393,6 +393,8 @@
                                 <&cpg CPG_CORE R8A77995_CLK_S3D1C>,
                                 <&scif_clk>;
                        clock-names = "fck", "brg_int", "scif_clk";
+                       dmas = <&dmac1 0x13>, <&dmac1 0x12>;
+                       dma-names = "tx", "rx";

I guess SCIF2 can work with both dmac1 and dmac2?

arch/arm64/boot/dts/renesas/r8a77995.dtsi line 400

Quoted 3 lines
arch/arm64/boot/dts/renesas/r8a77995.dtsi +0 -0
                        power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
                        resets = <&cpg 310>;
                        status = "disabled";

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

RE: [PATCH 2/3] arm64: dts: r8a7795: add DMA for SCIF2

In reply to Ulrich Hecht

Hello Ulrich,

Quoted 5 lines

From: [email protected] [mailto:linux-renesas-soc- [email protected]] On Behalf Of Ulrich Hecht
Sent: 15 November 2017 15:25

Tested on Draak.

I guess you meant for the patch title to use r8a77995?

Kind regards, Chris

Quoted 23 lines
---
 arch/arm64/boot/dts/renesas/r8a77995.dtsi | 2 ++
 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/renesas/r8a77995.dtsi +2 -0
index 04a392a..5fa7572 100644
@@ -393,6 +393,8 @@
 				 <&cpg CPG_CORE R8A77995_CLK_S3D1C>,
 				 <&scif_clk>;
 			clock-names = "fck", "brg_int", "scif_clk";
+			dmas = <&dmac1 0x13>, <&dmac1 0x12>;
+			dma-names = "tx", "rx";
 			power-domains = <&sysc
 R8A77995_PD_ALWAYS_ON>;
 			resets = <&cpg 310>;

status = "disabled";
--
2.7.4

#7 lore raw

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

Quoted 9 lines · Chris Paterson

Hello Ulrich,

Quoted 5 lines

From: [email protected] [mailto:linux-renesas-soc- [email protected]] On Behalf Of Ulrich Hecht
Sent: 15 November 2017 15:25

Tested on Draak.

I guess you meant for the patch title to use r8a77995?

I assumed so too. I fixed it up when applying.

#8 lore raw

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

In reply to Ulrich Hecht
Quoted 6 lines · Ulrich Hecht

Tested on Draak.

---
 arch/arm64/boot/dts/renesas/r8a77995.dtsi | 2 ++
 1 file changed, 2 insertions(+)

Hi Ulrich,

there seem to be some review comments for this patch. I would like you to address them before I apply this patch.

#9 lore raw

PATCH 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 on v1 3/3
#10 lore raw

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

Quoted 3 lines · Ulrich Hecht

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

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