Skip to contentSkip to conversation

Add R8A7792 MSIOF support

PATCH New Sergei Shtylyov 3 participants 7 messages Sep 5, 2016 – Sep 23, 2016 Device tree bindings

lore
Share & tools
lore
#0 lore raw

cover Add R8A7792 MSIOF support

Hello.

Here's the set of 2 patches against Simon Horman's 'renesas.git' repo,
'renesas-devel-20160905-v4.8-rc5' tag. We're adding the R8A7792 MSIOF clocks and device nodes. I'm not posting the board patches because the MSIOF driver seems erratic ATM...

[1/2] ARM: dts: r8a7792: add MSIOF clock
[2/2] ARM: dts: r8a7792: add MSIOF support

WBR, Sergei

#1 lore raw

PATCH 1/2 ARM: dts: r8a7792: add MSIOF clocks

Describe the MSIOF0/1 clocks and their parent, MP clock in the R8A7792 device tree.

Based on the original (and large) patch by Vladimir Barinov <[email protected]>.

---
 arch/arm/boot/dts/r8a7792.dtsi |   21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)
arch/arm/boot/dts/r8a7792.dtsi +19 -2
Index: renesas/arch/arm/boot/dts/r8a7792.dtsi
===================================================================
@@ -763,6 +763,13 @@
 			clock-div = <48>;
 			clock-mult = <1>;
 		};
+		mp_clk: mp {
+			compatible = "fixed-factor-clock";
+			clocks = <&pll1_div2_clk>;
+			#clock-cells = <0>;
+			clock-div = <15>;
+			clock-mult = <1>;
+		};
 		m2_clk: m2 {
 			compatible = "fixed-factor-clock";
 			clocks = <&cpg_clocks R8A7792_CLK_PLL1>;
@@ -793,6 +800,15 @@
 		};
 
 		/* Gate clocks */
+		mstp0_clks: mstp0_clks at e6150130 {
+			compatible = "renesas,r8a7792-mstp-clocks",
+				     "renesas,cpg-mstp-clocks";
+			reg = <0 0xe6150130 0 4>, <0 0xe6150030 0 4>;
+			clocks = <&mp_clk>;
+			#clock-cells = <1>;
+			clock-indices = <R8A7792_CLK_MSIOF0>;
+			clock-output-names = "msiof0";
+		};
 		mstp1_clks: mstp1_clks at e6150134 {
 			compatible = "renesas,r8a7792-mstp-clocks",
 				     "renesas,cpg-mstp-clocks";
@@ -811,12 +827,13 @@
 			compatible = "renesas,r8a7792-mstp-clocks",
 				     "renesas,cpg-mstp-clocks";
 			reg = <0 0xe6150138 0 4>, <0 0xe6150040 0 4>;
-			clocks = <&zs_clk>, <&zs_clk>;
+			clocks = <&mp_clk>, <&zs_clk>, <&zs_clk>;
 			#clock-cells = <1>;
 			clock-indices = <
+				R8A7792_CLK_MSIOF1
 				R8A7792_CLK_SYS_DMAC1 R8A7792_CLK_SYS_DMAC0
 			>;
-			clock-output-names = "sys-dmac1", "sys-dmac0";
+			clock-output-names = "msiof1", "sys-dmac1", "sys-dmac0";
 		};
 		mstp3_clks: mstp3_clks at e615013c {
 			compatible = "renesas,r8a7792-mstp-clocks",
#2 lore raw

PATCH 1/2 ARM: dts: r8a7792: add MSIOF clocks

Quoted 7 lines · Sergei Shtylyov

Describe the MSIOF0/1 clocks and their parent, MP clock in the R8A7792 device tree.

Based on the original (and large) patch by Vladimir Barinov <[email protected]>.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

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

#3 lore raw

PATCH 2/2 ARM: dts: r8a7792: add MSIOF support

In reply to Sergei Shtylyov

Define the generic R8A7792 parts of the MSIOF0/1 device nodes.

Based on the original (and large) patch by Vladimir Barinov <[email protected]>.

---
 arch/arm/boot/dts/r8a7792.dtsi |   30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
arch/arm/boot/dts/r8a7792.dtsi +30 -0
Index: renesas/arch/arm/boot/dts/r8a7792.dtsi
===================================================================
@@ -26,6 +26,8 @@
 		i2c4 = &i2c4;
 		i2c5 = &i2c5;
 		spi0 = &qspi;
+		spi1 = &msiof0;
+		spi2 = &msiof1;
 		vin0 = &vin0;
 		vin1 = &vin1;
 		vin2 = &vin2;
@@ -570,6 +572,34 @@
 			#address-cells = <1>;
 			#size-cells = <0>;
 			status = "disabled";
+		};
+
+		msiof0: spi at e6e20000 {
+			compatible = "renesas,msiof-r8a7792";
+			reg = <0 0xe6e20000 0 0x0064>;
+			interrupts = <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&mstp0_clks R8A7792_CLK_MSIOF0>;
+			dmas = <&dmac0 0x51>, <&dmac0 0x52>,
+			       <&dmac1 0x51>, <&dmac1 0x52>;
+			dma-names = "tx", "rx", "tx", "rx";
+			power-domains = <&sysc R8A7792_PD_ALWAYS_ON>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		msiof1: spi at e6e10000 {
+			compatible = "renesas,msiof-r8a7792";
+			reg = <0 0xe6e10000 0 0x0064>;
+			interrupts = <GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&mstp2_clks R8A7792_CLK_MSIOF1>;
+			dmas = <&dmac0 0x55>, <&dmac0 0x56>,
+			       <&dmac1 0x55>, <&dmac1 0x56>;
+			dma-names = "tx", "rx", "tx", "rx";
+			power-domains = <&sysc R8A7792_PD_ALWAYS_ON>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
 		};
 
 		du: display at feb00000 {
#4 lore raw

PATCH 2/2 ARM: dts: r8a7792: add MSIOF support

Quoted 4 lines · Sergei Shtylyov

Based on the original (and large) patch by Vladimir Barinov <[email protected]>.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

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

#5 lore raw

cover Add R8A7792 MSIOF support

In reply to Sergei Shtylyov

Hello.

Quoted 7 lines · Sergei Shtylyov

Here's the set of 2 patches against Simon Horman's 'renesas.git' repo,
'renesas-devel-20160905-v4.8-rc5' tag. We're adding the R8A7792 MSIOF clocks and device nodes. I'm not posting the board patches because the MSIOF driver seems erratic ATM...

[1/2] ARM: dts: r8a7792: add MSIOF clock
[2/2] ARM: dts: r8a7792: add MSIOF support

These seem stuck for no apparent reason. Simon?

WBR, Sergei

#6 lore raw

cover Add R8A7792 MSIOF support

Quoted 9 lines · Sergei Shtylyov

Hello.

Quoted 5 lines · Sergei Shtylyov

Here's the set of 2 patches against Simon Horman's 'renesas.git' repo,
'renesas-devel-20160905-v4.8-rc5' tag. We're adding the R8A7792 MSIOF clocks and device nodes. I'm not posting the board patches because the MSIOF driver seems erratic ATM...

Quoted 4 lines
Quoted 2 lines

[1/2] ARM: dts: r8a7792: add MSIOF clock
[2/2] ARM: dts: r8a7792: add MSIOF support

These seem stuck for no apparent reason. Simon?

Thanks, I have queued these up.