arm64: dts: renesas: rzg2ul-smarc: Enable microSD on SMARC platform
authorBiju Das <biju.das.jz@bp.renesas.com>
Sat, 2 Apr 2022 08:13:26 +0000 (09:13 +0100)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Wed, 13 Apr 2022 11:56:09 +0000 (13:56 +0200)
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>
arch/arm64/boot/dts/renesas/r9a07g043u11-smarc.dts
arch/arm64/boot/dts/renesas/rzg2ul-smarc-pinfunction.dtsi
arch/arm64/boot/dts/renesas/rzg2ul-smarc-som.dtsi
arch/arm64/boot/dts/renesas/rzg2ul-smarc.dtsi [new file with mode: 0644]

index 64370fa..08a0404 100644 (file)
@@ -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";
        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;
index 2db9c92..b515748 100644 (file)
                         <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;
index 3bbb8fc..8ecc650 100644 (file)
                /* 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 {
diff --git a/arch/arm64/boot/dts/renesas/rzg2ul-smarc.dtsi b/arch/arm64/boot/dts/renesas/rzg2ul-smarc.dtsi
new file mode 100644 (file)
index 0000000..f47b4e2
--- /dev/null
@@ -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>;
+};