ARM: dts: stm32: Repair SDMMC1 operation on AV96
authorMarek Vasut <marex@denx.de>
Tue, 31 Mar 2020 17:51:25 +0000 (19:51 +0200)
committerPatrick Delaunay <patrick.delaunay@st.com>
Wed, 1 Apr 2020 08:12:44 +0000 (10:12 +0200)
The SD uses different pinmux for the D123DIRline, use such a pinmux,
otherwise there is a pinmux collision on the AV96. Add missing SD
voltage regulator switch and enable SDR104 operation.

Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Cc: Patrick Delaunay <patrick.delaunay@st.com>
Cc: Patrice Chotard <patrice.chotard@st.com>
arch/arm/dts/stm32mp157a-avenger96-u-boot.dtsi
arch/arm/dts/stm32mp157a-avenger96.dts

index 8dcd8866e8dcded0bdd09ffc22e35ea9b11489fb..47bfbb8d77c0cfced9c9abdda7af67cd22e01c0b 100644 (file)
        };
 };
 
-&sdmmc1_dir_pins_a {
+&sdmmc1_dir_pins_b {
        u-boot,dm-spl;
        pins1 {
                u-boot,dm-spl;
index 3065593bf2add004a41d8ff43677592331bde0e6..1e9b45b69dab49ea02afd1bad5a1e5b5cd262b70 100644 (file)
                        default-state = "off";
                };
        };
+
+       sd_switch: regulator-sd_switch {
+               compatible = "regulator-gpio";
+               regulator-name = "sd_switch";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <2900000>;
+               regulator-type = "voltage";
+               regulator-always-on;
+
+               gpios = <&gpioi 5 GPIO_ACTIVE_HIGH>;
+               gpios-states = <0>;
+               states = <1800000 0x1>,
+                        <2900000 0x0>;
+       };
 };
 
 &ethernet0 {
 
 &sdmmc1 {
        pinctrl-names = "default", "opendrain", "sleep";
-       pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_a>;
-       pinctrl-1 = <&sdmmc1_b4_od_pins_a>;
-       pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
-       broken-cd;
+       pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_b>;
+       pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_dir_pins_b>;
+       pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_b>;
+       cd-gpios = <&gpioi 8 GPIO_ACTIVE_LOW>;
+       disable-wp;
        st,sig-dir;
        st,neg-edge;
        st,use-ckin;
+       sd-uhs-sdr104;
        bus-width = <4>;
        vmmc-supply = <&vdd_sd>;
+       vqmmc-supply = <&sd_switch>;
        status = "okay";
 };