All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
To: Biju Das <biju.das.jz@bp.renesas.com>
Cc: Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Magnus Damm <magnus.damm@gmail.com>,
	linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org,
	Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	Biju Das <biju.das.au@gmail.com>
Subject: Re: [PATCH 7/7] arm64: dts: renesas: r9a09g047e57-smarc: Enable SDHI1
Date: Sun, 26 Jan 2025 20:02:29 +0100	[thread overview]
Message-ID: <Z5aGxeIqSr7hWvws@tom-desktop> (raw)
In-Reply-To: <20250126134616.37334-8-biju.das.jz@bp.renesas.com>

On Sun, Jan 26, 2025 at 01:46:09PM +0000, Biju Das wrote:
> Enable SDHI1 on the RZ/G3E SMARC EVK platform using gpio regulator for
> voltage switching.
> 
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> ---
>  .../boot/dts/renesas/r9a09g047e57-smarc.dts   | 65 +++++++++++++++++++
>  .../boot/dts/renesas/renesas-smarc2.dtsi      |  9 +++
>  2 files changed, 74 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/renesas/r9a09g047e57-smarc.dts b/arch/arm64/boot/dts/renesas/r9a09g047e57-smarc.dts
> index c063d47e2952..0e3d4ff31285 100644
> --- a/arch/arm64/boot/dts/renesas/r9a09g047e57-smarc.dts
> +++ b/arch/arm64/boot/dts/renesas/r9a09g047e57-smarc.dts
> @@ -12,10 +12,40 @@
>  #include "rzg3e-smarc-som.dtsi"
>  #include "renesas-smarc2.dtsi"
>  
> +/*
> + * To enable uSD card on SDIO_USD:
> + *
> + * Switch bank - SW_OPT_MUX-1 (SW_SDIO_M2E):
> + *	0 - SMARC SDIO signal is connected to uSD1
> + *	1 - SMARC SDIO signal is connected to M.2 Key E connector
> + */
> +
>  / {
>  	model = "Renesas SMARC EVK version 2 based on r9a09g047e57";
>  	compatible = "renesas,smarc2-evk", "renesas,rzg3e-smarcm",
>  		     "renesas,r9a09g047e57", "renesas,r9a09g047";
> +
> +	usd_vdd_3p3v: regulator-usd-vdd-3p3v {
> +		compatible = "regulator-fixed";
> +		regulator-name = "fixed-3.3V";
> +		regulator-min-microvolt = <3300000>;
> +		regulator-max-microvolt = <3300000>;
> +		regulator-boot-on;
> +		regulator-always-on;
> +	};
> +
> +	vqmmc_sdhi1_ext: regulator-vqmmc-sdhi1-ext {
> +		compatible = "regulator-gpio";
> +
> +		regulator-name = "SDHI1 VccQ";
> +		regulator-min-microvolt = <1800000>;
> +		regulator-max-microvolt = <3300000>;
> +
> +		gpios = <&pinctrl RZG3E_GPIO(1, 5) GPIO_ACTIVE_HIGH>;
> +
> +		gpios-states = <0>;
> +		states = <3300000 0>, <1800000 1>;
> +	};
>  };
>  
>  &pinctrl {
> @@ -23,9 +53,44 @@ scif_pins: scif {
>  		pins = "SCIF_TXD", "SCIF_RXD";
>  		renesas,output-impedance = <1>;
>  	};
> +
> +	sd1-pwr-en {
> +		gpio-hog;
> +		gpios = <RZG3E_GPIO(1, 6) GPIO_ACTIVE_HIGH>;
> +		output-high;
> +		line-name = "sd1_pwr_en";
> +	};
> +
> +	sdhi1_pins: sd1 {
> +		sd1-cd {
> +			pinmux = <RZG3E_PORT_PINMUX(1, 4, 8)>; /* SD1CD */
> +		};
> +
> +		sd1-data {
> +			pinmux = <RZG3E_PORT_PINMUX(G, 2, 1)>, /* SD1DAT0 */
> +				 <RZG3E_PORT_PINMUX(G, 3, 1)>, /* SD1DAT1 */
> +				 <RZG3E_PORT_PINMUX(G, 4, 1)>, /* SD1DAT2 */
> +				 <RZG3E_PORT_PINMUX(G, 5, 1)>; /* SD1DAT3 */
> +		};
> +
> +		sd1-ctrl {
> +			pinmux = <RZG3E_PORT_PINMUX(G, 0, 1)>, /* SD1CLK */
> +				 <RZG3E_PORT_PINMUX(G, 1, 1)>; /* SD1CMD */
> +		};
> +	};
>  };
>  
>  &scif0 {
>  	pinctrl-0 = <&scif_pins>;
>  	pinctrl-names = "default";
>  };
> +
> +&sdhi1 {
> +	pinctrl-0 = <&sdhi1_pins>;
> +	pinctrl-1 = <&sdhi1_pins>;
> +	pinctrl-names = "default", "state_uhs";
> +
> +	vmmc-supply = <&usd_vdd_3p3v>;
> +	vqmmc-supply = <&vqmmc_sdhi1_ext>;
> +	/delete-node/ vqmmc_regulator;
> +};
> diff --git a/arch/arm64/boot/dts/renesas/renesas-smarc2.dtsi b/arch/arm64/boot/dts/renesas/renesas-smarc2.dtsi
> index e378d55e6e9b..ec79452393b0 100644
> --- a/arch/arm64/boot/dts/renesas/renesas-smarc2.dtsi
> +++ b/arch/arm64/boot/dts/renesas/renesas-smarc2.dtsi
> @@ -16,9 +16,18 @@ chosen {
>  
>  	aliases {
>  		serial3 = &scif0;
> +		mmc1 = &sdhi1;
>  	};
>  };
>  
>  &scif0 {
>  	status = "okay";
>  };
> +
> +&sdhi1 {
> +	bus-width = <4>;
> +	sd-uhs-sdr50;
> +	sd-uhs-sdr104;
> +
> +	status = "okay";
> +};
> -- 
> 2.43.0
> 
Reviewed-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>

  reply	other threads:[~2025-01-26 19:02 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-26 13:46 [PATCH 0/7] Add RZ/G3E SDHI support Biju Das
2025-01-26 13:46 ` [PATCH 1/7] dt-bindings: mmc: renesas,sdhi: Document RZ/G3E support Biju Das
2025-01-26 18:57   ` Tommaso Merciai
2025-01-27 19:16   ` Rob Herring
2025-01-28  8:56     ` Biju Das
2025-01-28 11:15   ` Geert Uytterhoeven
2025-01-28 12:41     ` Biju Das
2025-01-26 13:46 ` [PATCH 2/7] clk: renesas: r9a09g047: Add SDHI clocks/resets Biju Das
2025-01-26 18:59   ` Tommaso Merciai
2025-01-28 11:13   ` Geert Uytterhoeven
2025-01-26 13:46 ` [PATCH 3/7] mmc: renesas_sdhi: Arrange local variables in reverse xmas tree order Biju Das
2025-01-26 19:00   ` Tommaso Merciai
2025-01-28 11:14   ` Geert Uytterhoeven
2025-01-26 13:46 ` [PATCH 4/7] mmc: renesas_sdhi: Add support for RZ/G3E SoC Biju Das
2025-01-26 19:00   ` Tommaso Merciai
2025-01-28 13:32   ` Geert Uytterhoeven
2025-01-28 13:43     ` Biju Das
2025-01-29 14:45       ` Biju Das
2025-01-29 14:47         ` Geert Uytterhoeven
2025-01-26 13:46 ` [PATCH 5/7] arm64: dts: renesas: r9a09g047: Add SDHI0-SDHI2 nodes Biju Das
2025-01-26 19:01   ` Tommaso Merciai
2025-01-28 11:33   ` Geert Uytterhoeven
2025-01-28 12:11     ` Biju Das
2025-01-28 13:25       ` Geert Uytterhoeven
2025-01-28 14:07         ` Biju Das
2025-01-29 15:37         ` Biju Das
2025-01-26 13:46 ` [PATCH 6/7] arm64: dts: renesas: rzg3e-smarc-som: Enable SDHI{0,2} Biju Das
2025-01-26 19:01   ` Tommaso Merciai
2025-01-28 14:04   ` Geert Uytterhoeven
2025-01-26 13:46 ` [PATCH 7/7] arm64: dts: renesas: r9a09g047e57-smarc: Enable SDHI1 Biju Das
2025-01-26 19:02   ` Tommaso Merciai [this message]
2025-01-28 14:04   ` Geert Uytterhoeven
2025-01-28 14:14     ` Biju Das
2025-01-28 15:48   ` Geert Uytterhoeven
2025-01-29 15:41     ` Biju Das

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z5aGxeIqSr7hWvws@tom-desktop \
    --to=tommaso.merciai.xr@bp.renesas.com \
    --cc=biju.das.au@gmail.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=krzk+dt@kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.