public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm: dts: renesas: r8a7740-armadillo800eva: Enable SDHI1
@ 2026-02-12  7:38 phucduc.bui
  2026-02-20  0:43 ` [PATCH] ARM: dts: renesas: r8a7740-armadillo800eva: Enable phucduc.bui
  2026-02-24  7:45 ` [PATCH v2] arm: dts: renesas: r8a7740-armadillo800eva: Enable SDHI1 phucduc.bui
  0 siblings, 2 replies; 6+ messages in thread
From: phucduc.bui @ 2026-02-12  7:38 UTC (permalink / raw)
  To: geert+renesas, magnus.damm
  Cc: robh, krzk+dt, conor+dt, linux-renesas-soc, devicetree,
	linux-kernel, phucduc.bui

From: bui duc phuc <phucduc.bui@gmail.com>

The Armadillo800EVA board provides an SD card slot connected to
the SDHI1 interface, but it is currently disabled in the device tree.

Add a fixed 3.3V regulator, configure the required pinctrl groups,
and enable the SDHI1 controller in 4-bit mode.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
 .../dts/renesas/r8a7740-armadillo800eva.dts   | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/arch/arm/boot/dts/renesas/r8a7740-armadillo800eva.dts b/arch/arm/boot/dts/renesas/r8a7740-armadillo800eva.dts
index 04d24b6d8056..4838b285bdd9 100644
--- a/arch/arm/boot/dts/renesas/r8a7740-armadillo800eva.dts
+++ b/arch/arm/boot/dts/renesas/r8a7740-armadillo800eva.dts
@@ -65,6 +65,17 @@ vccq_sdhi0: regulator-vccq-sdhi0 {
 		enable-active-high;
 	};
 
+	vcc_sdhi1: regulator-vcc-sdhi1 {
+		compatible = "regulator-fixed";
+
+		regulator-name = "SDHI1 Vcc";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+
+		gpio = <&pfc 16 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
+
 	reg_5p0v: regulator-5p0v {
 		compatible = "regulator-fixed";
 		regulator-name = "fixed-5.0V";
@@ -285,6 +296,11 @@ sdhi0_pins: sd0 {
 		function = "sdhi0";
 	};
 
+	sdhi1_pins: sd1 {
+		groups = "sdhi1_data4", "sdhi1_ctrl", "sdhi1_cd", "sdhi1_wp";
+		function = "sdhi1";
+	};
+
 	fsia_pins: sounda {
 		groups = "fsia_sclk_in", "fsia_mclk_out",
 			 "fsia_data_in_1", "fsia_data_out_0";
@@ -336,6 +352,15 @@ &sdhi0 {
 	status = "okay";
 };
 
+&sdhi1 {
+	pinctrl-0 = <&sdhi1_pins>;
+	pinctrl-names = "default";
+
+	vmmc-supply = <&vcc_sdhi1>;
+	bus-width = <4>;
+	status = "okay";
+};
+
 &sh_fsi2 {
 	pinctrl-0 = <&fsia_pins>;
 	pinctrl-names = "default";
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] ARM: dts: renesas: r8a7740-armadillo800eva: Enable
  2026-02-12  7:38 [PATCH] arm: dts: renesas: r8a7740-armadillo800eva: Enable SDHI1 phucduc.bui
@ 2026-02-20  0:43 ` phucduc.bui
  2026-02-24  7:45 ` [PATCH v2] arm: dts: renesas: r8a7740-armadillo800eva: Enable SDHI1 phucduc.bui
  1 sibling, 0 replies; 6+ messages in thread
From: phucduc.bui @ 2026-02-20  0:43 UTC (permalink / raw)
  To: geert+renesas, magnus.damm
  Cc: phucduc.bui, conor+dt, krzk+dt, robh, devicetree,
	linux-renesas-soc, linux-kernel

Sorry for the previous HTML email.

Hi Geert, hi Magnus,

Gentle ping for this patch:
https://lore.kernel.org/all/20260212073819.41304-1-phucduc.bui@gmail.com/

Additional hardware clarification regarding SDHI1:

SDHI1 is routed through a mechanical DIP switch selecting either
the SD slot (CON8) or the AWL13 SDIO interface (CON14). Only one
device is electrically connected at a time and no runtime
reconfiguration is required.

Tested in both configurations:

SD card (CON8):
  mmc1: new high speed SDHC card
  mmcblk1: 29.7 GiB

SDIO (CON14):
  mmc1: new high speed SDIO card

So the SDHI1 host works correctly in both cases.

Please let me know if any changes are needed.

Thanks,
Bui Duc Phuc

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2] arm: dts: renesas: r8a7740-armadillo800eva: Enable SDHI1
  2026-02-12  7:38 [PATCH] arm: dts: renesas: r8a7740-armadillo800eva: Enable SDHI1 phucduc.bui
  2026-02-20  0:43 ` [PATCH] ARM: dts: renesas: r8a7740-armadillo800eva: Enable phucduc.bui
@ 2026-02-24  7:45 ` phucduc.bui
  2026-03-02 16:45   ` Wolfram Sang
  2026-03-13  9:39   ` Geert Uytterhoeven
  1 sibling, 2 replies; 6+ messages in thread
From: phucduc.bui @ 2026-02-24  7:45 UTC (permalink / raw)
  To: phucduc.bui, geert+renesas, magnus.damm
  Cc: conor+dt, devicetree, krzk+dt, linux-kernel, linux-renesas-soc,
	robh

From: bui duc phuc <phucduc.bui@gmail.com>

The Armadillo-800EVA board provides an SD card slot and an AWL13 SDIO
interface connected to the SDHI1 controller. Routing between these two
interfaces is controlled by a mechanical DIP switch and a set of
multiplexers.

This patch adds:

  - A fixed 3.3V regulator for SDHI1 power, controlled by PORT16 (G2).
  - SDHI1 pinmux groups for data, control, and card detection.
  - A gpio-hog for PORT6 (J5) to control the SDHI1/AWLAN multiplexer.

PORT176 (N21) is already configured as output-high in this DTS (via
lcd0-mux-hog), routing the SDSLOT2_ENABLE signal to PORT6. Since the
hardware includes an external 10k pull-up resistor (R94) on this line,
PORT6 is configured as an input to allow the physical DIP switch to
determine the routing without SoC interference.

Both configurations have been verified:

  - SD card (CON8): detected as mmcblk1, high-speed SDHC.
  - SDIO (CON14): detected as mmc1, high-speed SDIO.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---

Changes in v2:
  - Added PORT6 (J5) as a gpio-hog in input mode to preserve physical switch
    functionality, influenced by the R94 10k pull-up resistor.
  - Included hardware verification results for both SD card and SDIO modes.
  - Improved commit description with detailed hardware routing logic.

Note: While a specific driver for the AWL13 SDIO module may not be
present in the current mainline kernel, the SDHI1 host successfully
detects it as a high-speed SDIO device, confirming the hardware
description is correct.

 .../dts/renesas/r8a7740-armadillo800eva.dts   | 31 +++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/arch/arm/boot/dts/renesas/r8a7740-armadillo800eva.dts b/arch/arm/boot/dts/renesas/r8a7740-armadillo800eva.dts
index 04d24b6d8056..e7aae1e32b2e 100644
--- a/arch/arm/boot/dts/renesas/r8a7740-armadillo800eva.dts
+++ b/arch/arm/boot/dts/renesas/r8a7740-armadillo800eva.dts
@@ -65,6 +65,17 @@ vccq_sdhi0: regulator-vccq-sdhi0 {
 		enable-active-high;
 	};
 
+	vcc_sdhi1: regulator-vcc-sdhi1 {
+		compatible = "regulator-fixed";
+
+		regulator-name = "SDHI1 Vcc";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+
+		gpio = <&pfc 16 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
+
 	reg_5p0v: regulator-5p0v {
 		compatible = "regulator-fixed";
 		regulator-name = "fixed-5.0V";
@@ -285,6 +296,11 @@ sdhi0_pins: sd0 {
 		function = "sdhi0";
 	};
 
+	sdhi1_pins: sd1 {
+		groups = "sdhi1_data4", "sdhi1_ctrl", "sdhi1_cd", "sdhi1_wp";
+		function = "sdhi1";
+	};
+
 	fsia_pins: sounda {
 		groups = "fsia_sclk_in", "fsia_mclk_out",
 			 "fsia_data_in_1", "fsia_data_out_0";
@@ -302,6 +318,12 @@ lcd0-mux-hog {
 		gpios = <176 0>;
 		output-high;
 	};
+
+	sdhi1-select-hog {
+		gpio-hog;
+		gpios = <6 0>;
+		input;
+	};
 };
 
 &tpu {
@@ -336,6 +358,15 @@ &sdhi0 {
 	status = "okay";
 };
 
+&sdhi1 {
+	pinctrl-0 = <&sdhi1_pins>;
+	pinctrl-names = "default";
+
+	vmmc-supply = <&vcc_sdhi1>;
+	bus-width = <4>;
+	status = "okay";
+};
+
 &sh_fsi2 {
 	pinctrl-0 = <&fsia_pins>;
 	pinctrl-names = "default";
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] arm: dts: renesas: r8a7740-armadillo800eva: Enable SDHI1
  2026-02-24  7:45 ` [PATCH v2] arm: dts: renesas: r8a7740-armadillo800eva: Enable SDHI1 phucduc.bui
@ 2026-03-02 16:45   ` Wolfram Sang
  2026-03-03 13:12     ` phucduc.bui
  2026-03-13  9:39   ` Geert Uytterhoeven
  1 sibling, 1 reply; 6+ messages in thread
From: Wolfram Sang @ 2026-03-02 16:45 UTC (permalink / raw)
  To: phucduc.bui
  Cc: geert+renesas, magnus.damm, conor+dt, devicetree, krzk+dt,
	linux-kernel, linux-renesas-soc, robh

[-- Attachment #1: Type: text/plain, Size: 1323 bytes --]

On Tue, Feb 24, 2026 at 02:45:32PM +0700, phucduc.bui@gmail.com wrote:
> From: bui duc phuc <phucduc.bui@gmail.com>
> 
> The Armadillo-800EVA board provides an SD card slot and an AWL13 SDIO
> interface connected to the SDHI1 controller. Routing between these two
> interfaces is controlled by a mechanical DIP switch and a set of
> multiplexers.
> 
> This patch adds:
> 
>   - A fixed 3.3V regulator for SDHI1 power, controlled by PORT16 (G2).
>   - SDHI1 pinmux groups for data, control, and card detection.
>   - A gpio-hog for PORT6 (J5) to control the SDHI1/AWLAN multiplexer.
> 
> PORT176 (N21) is already configured as output-high in this DTS (via
> lcd0-mux-hog), routing the SDSLOT2_ENABLE signal to PORT6. Since the
> hardware includes an external 10k pull-up resistor (R94) on this line,
> PORT6 is configured as an input to allow the physical DIP switch to
> determine the routing without SoC interference.
> 
> Both configurations have been verified:
> 
>   - SD card (CON8): detected as mmcblk1, high-speed SDHC.
>   - SDIO (CON14): detected as mmc1, high-speed SDIO.
> 
> Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>

I don't have any schematics for the Armadillo, but the SDHI parts here
look good to me.

Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] arm: dts: renesas: r8a7740-armadillo800eva: Enable SDHI1
  2026-03-02 16:45   ` Wolfram Sang
@ 2026-03-03 13:12     ` phucduc.bui
  0 siblings, 0 replies; 6+ messages in thread
From: phucduc.bui @ 2026-03-03 13:12 UTC (permalink / raw)
  To: wsa+renesas
  Cc: conor+dt, devicetree, geert+renesas, krzk+dt, linux-kernel,
	linux-renesas-soc, magnus.damm, phucduc.bui, robh

Hi Wolfram,

> I don't have any schematics for the Armadillo, but the SDHI parts here
> look good to me.

Thank you for your review.

To further validate the SDHI1 implementation on the Armadillo-800EVA, I
have tested both SD card and SDIO modes. Please find the test results
below:

Video demonstration:

https://youtu.be/jWDJSKTzyn8

Boot logs:
https://gist.github.com/BuiDucPhuc/f0390f11407b7973a43b4279a1435589

Regarding the schematics, I am referencing the hardware documentation
included with the original DVD shipped with the board. Since the online
schematics require registration and hardware verification, I hope the 
provided logs and video serve as sufficient verification for this patch.

Please let me know if any additional information is needed.

Best regards,
Phuc

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] arm: dts: renesas: r8a7740-armadillo800eva: Enable SDHI1
  2026-02-24  7:45 ` [PATCH v2] arm: dts: renesas: r8a7740-armadillo800eva: Enable SDHI1 phucduc.bui
  2026-03-02 16:45   ` Wolfram Sang
@ 2026-03-13  9:39   ` Geert Uytterhoeven
  1 sibling, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2026-03-13  9:39 UTC (permalink / raw)
  To: phucduc.bui
  Cc: magnus.damm, conor+dt, devicetree, krzk+dt, linux-kernel,
	linux-renesas-soc, robh

On Tue, 24 Feb 2026 at 08:45, <phucduc.bui@gmail.com> wrote:
> From: bui duc phuc <phucduc.bui@gmail.com>
>
> The Armadillo-800EVA board provides an SD card slot and an AWL13 SDIO
> interface connected to the SDHI1 controller. Routing between these two
> interfaces is controlled by a mechanical DIP switch and a set of
> multiplexers.
>
> This patch adds:
>
>   - A fixed 3.3V regulator for SDHI1 power, controlled by PORT16 (G2).
>   - SDHI1 pinmux groups for data, control, and card detection.
>   - A gpio-hog for PORT6 (J5) to control the SDHI1/AWLAN multiplexer.
>
> PORT176 (N21) is already configured as output-high in this DTS (via
> lcd0-mux-hog), routing the SDSLOT2_ENABLE signal to PORT6. Since the
> hardware includes an external 10k pull-up resistor (R94) on this line,
> PORT6 is configured as an input to allow the physical DIP switch to
> determine the routing without SoC interference.
>
> Both configurations have been verified:
>
>   - SD card (CON8): detected as mmcblk1, high-speed SDHC.
>   - SDIO (CON14): detected as mmc1, high-speed SDIO.
>
> Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
i.e. will queue in renesas-devel for v7.1.

> Note: While a specific driver for the AWL13 SDIO module may not be
> present in the current mainline kernel, the SDHI1 host successfully
> detects it as a high-speed SDIO device, confirming the hardware
> description is correct.

With SW1.5 OFF, the AWL13 SDIO module is detected as a high-speed SDIO device.
With SW1.5 ON, SD slot 2 works with SD cards (incl. card detect).

Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-03-13  9:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-12  7:38 [PATCH] arm: dts: renesas: r8a7740-armadillo800eva: Enable SDHI1 phucduc.bui
2026-02-20  0:43 ` [PATCH] ARM: dts: renesas: r8a7740-armadillo800eva: Enable phucduc.bui
2026-02-24  7:45 ` [PATCH v2] arm: dts: renesas: r8a7740-armadillo800eva: Enable SDHI1 phucduc.bui
2026-03-02 16:45   ` Wolfram Sang
2026-03-03 13:12     ` phucduc.bui
2026-03-13  9:39   ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox