Skip to contentSkip to conversation

arm64: dts: renesas: r8a779g0/white-hawk: Add SDHI/eMMC support

PATCH In review Geert Uytterhoeven 2 participants 6 messages Oct 12, 2022

Subsystems (2)
lore
Share & tools
lore

Geert Uytterhoeven

author maintainer
#0 lore raw

cover arm64: dts: renesas: r8a779g0/white-hawk: Add SDHI/eMMC support

Hi all,

This patch series adds SDHI support for the R-Car V4H SoC, and eMMC support for the White Hawk board.

    renesas_sdhi_internal_dmac ee140000.mmc: mmc0 base at 0x00000000ee140000, max clock rate 200 MHz
    mmc0: new HS400 MMC card at address 0001
    mmcblk0: mmc0:0001 G1M15L 29.6 GiB
    mmcblk0boot0: mmc0:0001 G1M15L 31.5 MiB
    mmcblk0boot1: mmc0:0001 G1M15L 31.5 MiB
    mmcblk0rpmb: mmc0:0001 G1M15L 4.00 MiB, chardev (246:0)

The White Hawk CPU board also has a µSD-slot, which is mutually exclusive with the eMMC, and obstructed by a pin header on the BreakOut Board. Hence accessing it requires removing the CPU board, which is a task I haven't undertaken.

I plan to queue these in renesas-devel for v6.2.
Thanks for your comments!

Geert Uytterhoeven (1):
arm64: dts: renesas: r8a779g0: Add SDHI node

Takeshi Kihara (1):
arm64: dts: renesas: white-hawk-cpu: Add eMMC support

 .../dts/renesas/r8a779g0-white-hawk-cpu.dtsi  | 41 +++++++++++++++++++
 arch/arm64/boot/dts/renesas/r8a779g0.dtsi     | 14 +++++++
 2 files changed, 55 insertions(+)
Signature · 12 lines
2.25.1

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
author maintainer
#1 lore raw

PATCH 1/2 arm64: dts: renesas: r8a779g0: Add SDHI node

Add a device node for the SD Card/MMC Interface on the Renesas R-Car V4H (R8A779G0) SoC.

Based on a patch in the BSP by Takeshi Kihara.

---
Changes compared to the BSP:
- Add "clkh" clock and clock-names property.

---
 arch/arm64/boot/dts/renesas/r8a779g0.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm64/boot/dts/renesas/r8a779g0.dtsi +14 -0
index ea96ed20906b9e12..33d9df39a9cc7149 100644
@@ -907,6 +907,20 @@ dmac1: dma-controller@e7351000 {
 			dma-channels = <16>;
 		};
 
+		mmc0: mmc@ee140000 {
+			compatible = "renesas,sdhi-r8a779g0",
+				     "renesas,rcar-gen4-sdhi";
+			reg = <0 0xee140000 0 0x2000>;
+			interrupts = <GIC_SPI 440 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 706>,
+				 <&cpg CPG_CORE R8A779G0_CLK_SD0H>;
+			clock-names = "core", "clkh";
+			power-domains = <&sysc R8A779G0_PD_ALWAYS_ON>;
+			resets = <&cpg 706>;
+			max-frequency = <200000000>;
+			status = "disabled";
+		};
+
 		gic: interrupt-controller@f1000000 {
 			compatible = "arm,gic-v3";
 			#interrupt-cells = <3>;
Signature · 1 line
2.25.1
author maintainer
#3 lore raw

PATCH 2/2 arm64: dts: renesas: white-hawk-cpu: Add eMMC support

In reply to Geert Uytterhoeven

From: Takeshi Kihara <[email protected]>

Describe the eMMC on the White Hawk CPU board.

---
 .../dts/renesas/r8a779g0-white-hawk-cpu.dtsi  | 41 +++++++++++++++++++
 1 file changed, 41 insertions(+)
arch/arm64/boot/dts/renesas/r8a779g0-white-hawk-cpu.dtsi +41 -0
index f424b827fcbc7666..b306e5a10794dfb5 100644
@@ -96,6 +96,24 @@ memory@600000000 {
 		device_type = "memory";
 		reg = <0x6 0x00000000 0x1 0x00000000>;
 	};
+
+	reg_1p8v: regulator-1p8v {
+		compatible = "regulator-fixed";
+		regulator-name = "fixed-1.8V";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+
+	reg_3p3v: regulator-3p3v {
+		compatible = "regulator-fixed";
+		regulator-name = "fixed-3.3V";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
 };
 
 &avb0 {
@@ -154,6 +172,23 @@ eeprom@50 {
 	};
 };
 
+&mmc0 {
+	pinctrl-0 = <&mmc_pins>;
+	pinctrl-1 = <&mmc_pins>;
+	pinctrl-names = "default", "state_uhs";
+
+	vmmc-supply = <&reg_3p3v>;
+	vqmmc-supply = <&reg_1p8v>;
+	mmc-hs200-1_8v;
+	mmc-hs400-1_8v;
+	bus-width = <8>;
+	no-sd;
+	no-sdio;
+	non-removable;
+	full-pwr-cycle-in-suspend;
+	status = "okay";
+};
+
 &pfc {
 	pinctrl-0 = <&scif_clk_pins>;
 	pinctrl-names = "default";
@@ -191,6 +226,12 @@ keys_pins: keys {
 		bias-pull-up;
 	};
 
+	mmc_pins: mmc {
+		groups = "mmc_data8", "mmc_ctrl", "mmc_ds";
+		function = "mmc";
+		power-source = <1800>;
+	};
+
 	scif_clk_pins: scif_clk {
 		groups = "scif_clk";
 		function = "scif_clk";
Signature · 1 line
2.25.1
#5 lore raw
In reply to Geert Uytterhoeven
Quoted 5 lines

The White Hawk CPU board also has a µSD-slot, which is mutually exclusive with the eMMC, and obstructed by a pin header on the BreakOut Board. Hence accessing it requires removing the CPU board, which is a task I haven't undertaken.

This sounds pretty similar to the uSD slot on the Spider board. Shimoda-san and I have decided there to only upstream eMMC support. I think the same can easily be argued for WhiteHawk, so your series looks fine as is regarding upstream, I'd say.