ARM: dts: stm32: update eMMC configuration for stm32mp157c-ev1
authorPatrick Delaunay <patrick.delaunay@st.com>
Wed, 6 Nov 2019 15:16:34 +0000 (16:16 +0100)
committerPatrick Delaunay <patrick.delaunay@st.com>
Tue, 26 Nov 2019 09:11:48 +0000 (10:11 +0100)
Update the sdmmc2 node for eMMC support on eval board stm32mp157c-ev1.
- update slew-rate for pin configuration
- update "vqmmc-supply"
- remove "st,sig-dir"
- add mandatory "pinctrl-names"
- add "mmc-ddr-3_3v"

This patch solve the eMMC detection issue for command "mmc dev 1".

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
arch/arm/dts/stm32mp157-pinctrl.dtsi
arch/arm/dts/stm32mp157a-avenger96-u-boot.dtsi
arch/arm/dts/stm32mp157c-ed1-u-boot.dtsi
arch/arm/dts/stm32mp157c-ed1.dts

index 2d73d50..0d53396 100644 (file)
                        };
 
                        sdmmc2_b4_pins_a: sdmmc2-b4-0 {
-                               pins {
+                               pins1 {
                                        pinmux = <STM32_PINMUX('B', 14, AF9)>, /* SDMMC2_D0 */
                                                 <STM32_PINMUX('B', 15, AF9)>, /* SDMMC2_D1 */
                                                 <STM32_PINMUX('B', 3, AF9)>, /* SDMMC2_D2 */
                                                 <STM32_PINMUX('B', 4, AF9)>, /* SDMMC2_D3 */
-                                                <STM32_PINMUX('E', 3, AF9)>, /* SDMMC2_CK */
                                                 <STM32_PINMUX('G', 6, AF10)>; /* SDMMC2_CMD */
-                                       slew-rate = <3>;
+                                       slew-rate = <1>;
+                                       drive-push-pull;
+                                       bias-pull-up;
+                               };
+                               pins2 {
+                                       pinmux = <STM32_PINMUX('E', 3, AF9)>; /* SDMMC2_CK */
+                                       slew-rate = <2>;
                                        drive-push-pull;
                                        bias-pull-up;
                                };
                        };
 
+                       sdmmc2_b4_od_pins_a: sdmmc2-b4-od-0 {
+                               pins1 {
+                                       pinmux = <STM32_PINMUX('B', 14, AF9)>, /* SDMMC2_D0 */
+                                                <STM32_PINMUX('B', 15, AF9)>, /* SDMMC2_D1 */
+                                                <STM32_PINMUX('B', 3, AF9)>, /* SDMMC2_D2 */
+                                                <STM32_PINMUX('B', 4, AF9)>; /* SDMMC2_D3 */
+                                       slew-rate = <1>;
+                                       drive-push-pull;
+                                       bias-pull-up;
+                               };
+                               pins2 {
+                                       pinmux = <STM32_PINMUX('E', 3, AF9)>; /* SDMMC2_CK */
+                                       slew-rate = <2>;
+                                       drive-push-pull;
+                                       bias-pull-up;
+                               };
+                               pins3 {
+                                       pinmux = <STM32_PINMUX('G', 6, AF10)>; /* SDMMC2_CMD */
+                                       slew-rate = <1>;
+                                       drive-open-drain;
+                                       bias-pull-up;
+                               };
+                       };
+
+                       sdmmc2_b4_sleep_pins_a: sdmmc2-b4-sleep-0 {
+                               pins {
+                                       pinmux = <STM32_PINMUX('B', 14, ANALOG)>, /* SDMMC2_D0 */
+                                                <STM32_PINMUX('B', 15, ANALOG)>, /* SDMMC2_D1 */
+                                                <STM32_PINMUX('B', 3, ANALOG)>, /* SDMMC2_D2 */
+                                                <STM32_PINMUX('B', 4, ANALOG)>, /* SDMMC2_D3 */
+                                                <STM32_PINMUX('E', 3, ANALOG)>, /* SDMMC2_CK */
+                                                <STM32_PINMUX('G', 6, ANALOG)>; /* SDMMC2_CMD */
+                               };
+                       };
+
                        sdmmc2_d47_pins_a: sdmmc2-d47-0 {
                                pins {
                                        pinmux = <STM32_PINMUX('A', 8, AF9)>, /* SDMMC2_D4 */
                                                 <STM32_PINMUX('A', 9, AF10)>, /* SDMMC2_D5 */
                                                 <STM32_PINMUX('E', 5, AF9)>, /* SDMMC2_D6 */
                                                 <STM32_PINMUX('D', 3, AF9)>; /* SDMMC2_D7 */
-                                       slew-rate = <3>;
+                                       slew-rate = <1>;
                                        drive-push-pull;
                                        bias-pull-up;
                                };
                        };
 
+                       sdmmc2_d47_sleep_pins_a: sdmmc2-d47-sleep-0 {
+                               pins {
+                                       pinmux = <STM32_PINMUX('A', 8, ANALOG)>, /* SDMMC2_D4 */
+                                                <STM32_PINMUX('A', 9, ANALOG)>, /* SDMMC2_D5 */
+                                                <STM32_PINMUX('E', 5, ANALOG)>, /* SDMMC2_D6 */
+                                                <STM32_PINMUX('D', 3, ANALOG)>; /* SDMMC2_D7 */
+                               };
+                       };
+
                        spdifrx_pins_a: spdifrx-0 {
                                pins {
                                        pinmux = <STM32_PINMUX('G', 12, AF8)>; /* SPDIF_IN1 */
index 1ff681a..1104a70 100644 (file)
 
 &sdmmc2_b4_pins_a {
        u-boot,dm-spl;
-       pins {
+       pins1 {
+               u-boot,dm-spl;
+       };
+       pins2 {
                u-boot,dm-spl;
        };
 };
index 4953a0d..b2ac494 100644 (file)
 
 &sdmmc2_b4_pins_a {
        u-boot,dm-spl;
-       pins {
+       pins1 {
+               u-boot,dm-spl;
+       };
+       pins2 {
                u-boot,dm-spl;
        };
 };
index 73d07cf..bc4d7e1 100644 (file)
 };
 
 &sdmmc2 {
+       pinctrl-names = "default", "opendrain", "sleep";
        pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a>;
+       pinctrl-1 = <&sdmmc2_b4_od_pins_a &sdmmc2_d47_pins_a>;
+       pinctrl-2 = <&sdmmc2_b4_sleep_pins_a &sdmmc2_d47_sleep_pins_a>;
        non-removable;
        no-sd;
        no-sdio;
-       st,sig-dir;
        st,neg-edge;
        bus-width = <8>;
        vmmc-supply = <&v3v3>;
-       vqmmc-supply = <&vdd>;
+       vqmmc-supply = <&v3v3>;
+       mmc-ddr-3_3v;
        status = "okay";
 };