Skip to contentSkip to conversation

Add R8A7792 SDHI support

PATCH New Sergei Shtylyov 3 participants 5 messages Jul 23, 2016 – Aug 8, 2016 Device tree bindings

lore
Share & tools
lore
#0 lore raw

v2 cover Add R8A7792 SDHI support

Hello.

Here's the set of 2 patches against Simon Horman's 'renesas.git' repo,
'renesas-devel-20160722-v4.7-rc7' tag. We're adding the R8A7792 SDHI clocks and device nodes. They have been tested on the Blanche board -- I'm not posting the Blanche patch only because it has some strange interaction with the Ethernet chip, so that NFS root wouldn't work anymore...

[1/2] ARM: dts: r8a7792: add SD clocks
[2/2] ARM: dts: r8a7792: add SDHI support

WBR, Sergei

#1 lore raw

PATCH v2 1/2 ARM: dts: r8a7792: add SD clocks

Describe the SDHI0 clock and its parent, SD clock in the R8A7792 device tree.

---
Changes in version 2:
- refreshed the patch.

 arch/arm/boot/dts/r8a7792.dtsi |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/arm/boot/dts/r8a7792.dtsi +16 -0
Index: renesas/arch/arm/boot/dts/r8a7792.dtsi
===================================================================
@@ -535,6 +535,13 @@
 			clock-div = <8>;
 			clock-mult = <1>;
 		};
+		sd_clk: sd {
+			compatible = "fixed-factor-clock";
+			clocks = <&pll1_div2_clk>;
+			#clock-cells = <0>;
+			clock-div = <8>;
+			clock-mult = <1>;
+		};
 		rcan_clk: rcan {
 			compatible = "fixed-factor-clock";
 			clocks = <&pll1_div2_clk>;
@@ -564,6 +571,15 @@
 			>;
 			clock-output-names = "sys-dmac1", "sys-dmac0";
 		};
+		mstp3_clks: mstp3_clks at e615013c {
+			compatible = "renesas,r8a7792-mstp-clocks",
+				     "renesas,cpg-mstp-clocks";
+			reg = <0 0xe615013c 0 4>, <0 0xe6150048 0 4>;
+			clocks = <&sd_clk>;
+			#clock-cells = <1>;
+			renesas,clock-indices = <R8A7792_CLK_SDHI0>;
+			clock-output-names = "sdhi0";
+		};
 		mstp4_clks: mstp4_clks at e6150140 {
 			compatible = "renesas,r8a7792-mstp-clocks",
 				     "renesas,cpg-mstp-clocks";
#2 lore raw

PATCH v2 1/2 ARM: dts: r8a7792: add SD clocks

Quoted 3 lines · Sergei Shtylyov

Describe the SDHI0 clock and its parent, SD clock in the R8A7792 device tree.

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 v2 2/2 ARM: dts: r8a7792: add SDHI support

In reply to Sergei Shtylyov

Define the generic R8A7792 part of the SDHI0 device node.

---
Changes in version 2:
- fixed up the size in the "reg" property.

 arch/arm/boot/dts/r8a7792.dtsi |   12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm/boot/dts/r8a7792.dtsi +12 -0
Index: renesas/arch/arm/boot/dts/r8a7792.dtsi
===================================================================
@@ -435,6 +435,18 @@
 			status = "disabled";
 		};
 
+		sdhi0: sd at ee100000 {
+			compatible = "renesas,sdhi-r8a7792";
+			reg = <0 0xee100000 0 0x328>;
+			interrupts = <0 165 IRQ_TYPE_LEVEL_HIGH>;
+			dmas = <&dmac0 0xcd>, <&dmac0 0xce>,
+			       <&dmac1 0xcd>, <&dmac1 0xce>;
+			dma-names = "tx", "rx", "tx", "rx";
+			clocks = <&mstp3_clks R8A7792_CLK_SDHI0>;
+			power-domains = <&sysc R8A7792_PD_ALWAYS_ON>;
+			status = "disabled";
+		};
+
 		jpu: jpeg-codec at fe980000 {
 			compatible = "renesas,jpu-r8a7792",
 				     "renesas,rcar-gen2-jpu";
#4 lore raw

v2 cover Add R8A7792 SDHI support

In reply to Sergei Shtylyov
Quoted 10 lines · Sergei Shtylyov

Hello.

Here's the set of 2 patches against Simon Horman's 'renesas.git' repo,
'renesas-devel-20160722-v4.7-rc7' tag. We're adding the R8A7792 SDHI clocks and device nodes. They have been tested on the Blanche board -- I'm not posting the Blanche patch only because it has some strange interaction with the Ethernet chip, so that NFS root wouldn't work anymore...

[1/2] ARM: dts: r8a7792: add SD clocks
[2/2] ARM: dts: r8a7792: add SDHI support

Thanks, I have queued this up for v4.9.