Skip to content

Commit

Permalink
arm64: dts: renesas: rzg2ul-smarc: Enable microSD on SMARC platform
Browse files Browse the repository at this point in the history
Enable the microSD card slot connected to SDHI1 on the RZ/G2UL SMARC
platform by removing the sdhi1 override which disabled it, and by adding
the necessary pinmux required for SDHI1.

This patch also adds gpios property to vccq_sdhi1 regulator.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://lore.kernel.org/r/20220402081328.26292-6-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
  • Loading branch information
Biju Das authored and Geert Uytterhoeven committed Apr 13, 2022
1 parent 13ea8b3 commit a74a0bf
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 11 deletions.
12 changes: 1 addition & 11 deletions arch/arm64/boot/dts/renesas/r9a07g043u11-smarc.dts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@

/dts-v1/;
#include "r9a07g043.dtsi"
#include "rzg2ul-smarc-som.dtsi"
#include "rzg2ul-smarc-pinfunction.dtsi"
#include "rz-smarc-common.dtsi"
#include "rzg2ul-smarc.dtsi"

/ {
model = "Renesas SMARC EVK based on r9a07g043u11";
Expand Down Expand Up @@ -74,14 +72,6 @@
status = "disabled";
};

&sdhi1 {
/delete-property/ pinctrl-0;
/delete-property/ pinctrl-1;
/delete-property/ pinctrl-names;
/delete-property/ vmmc-supply;
status = "disabled";
};

&spi1 {
/delete-property/ pinctrl-0;
/delete-property/ pinctrl-names;
Expand Down
39 changes: 39 additions & 0 deletions arch/arm64/boot/dts/renesas/rzg2ul-smarc-pinfunction.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,45 @@
<RZG2L_PORT_PINMUX(6, 3, 6)>; /* RxD */
};

sd1-pwr-en-hog {
gpio-hog;
gpios = <RZG2L_GPIO(0, 3) GPIO_ACTIVE_HIGH>;
output-high;
line-name = "sd1_pwr_en";
};

sdhi1_pins: sd1 {
sd1_data {
pins = "SD1_DATA0", "SD1_DATA1", "SD1_DATA2", "SD1_DATA3";
power-source = <3300>;
};

sd1_ctrl {
pins = "SD1_CLK", "SD1_CMD";
power-source = <3300>;
};

sd1_mux {
pinmux = <RZG2L_PORT_PINMUX(0, 2, 1)>; /* SD1_CD */
};
};

sdhi1_pins_uhs: sd1_uhs {
sd1_data_uhs {
pins = "SD1_DATA0", "SD1_DATA1", "SD1_DATA2", "SD1_DATA3";
power-source = <1800>;
};

sd1_ctrl_uhs {
pins = "SD1_CLK", "SD1_CMD";
power-source = <1800>;
};

sd1_mux_uhs {
pinmux = <RZG2L_PORT_PINMUX(0, 2, 1)>; /* SD1_CD */
};
};

sound_clk_pins: sound_clk {
pins = "AUDIO_CLK1", "AUDIO_CLK2";
input-enable;
Expand Down
9 changes: 9 additions & 0 deletions arch/arm64/boot/dts/renesas/rzg2ul-smarc-som.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@
/* first 128MB is reserved for secure area. */
reg = <0x0 0x48000000 0x0 0x38000000>;
};

reg_3p3v: regulator1 {
compatible = "regulator-fixed";
regulator-name = "fixed-3.3V";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-boot-on;
regulator-always-on;
};
};

&extal_clk {
Expand Down
14 changes: 14 additions & 0 deletions arch/arm64/boot/dts/renesas/rzg2ul-smarc.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
/*
* Device Tree Source for the RZ/G2UL Type-1 SMARC EVK parts
*
* Copyright (C) 2022 Renesas Electronics Corp.
*/

#include "rzg2ul-smarc-som.dtsi"
#include "rzg2ul-smarc-pinfunction.dtsi"
#include "rz-smarc-common.dtsi"

&vccq_sdhi1 {
gpios = <&pinctrl RZG2L_GPIO(6, 1) GPIO_ACTIVE_HIGH>;
};

0 comments on commit a74a0bf

Please sign in to comment.