ARM: dts: stm32: add sdmmc3 node for STM32MP1 boards
authorYann Gautier <yann.gautier@st.com>
Fri, 15 Nov 2019 10:44:51 +0000 (11:44 +0100)
committerAlexandre Torgue <alexandre.torgue@st.com>
Mon, 9 Dec 2019 08:19:15 +0000 (09:19 +0100)
On STM32MP1 EVAL and DISCOVERY boards, the SDMMC3 internal peripheral
can be used through the GPIO extension connector. The sdmmc3 node is then
added in the boards DT files, and the required pins are also added.
The node status is disabled as there is no device connected by default.

Signed-off-by: Ludovic Barre <ludovic.barre@st.com>
Signed-off-by: Yann Gautier <yann.gautier@st.com>
arch/arm/boot/dts/stm32mp157-pinctrl.dtsi
arch/arm/boot/dts/stm32mp157a-dk1.dts
arch/arm/boot/dts/stm32mp157c-ev1.dts

index bdd4113..2b6d447 100644 (file)
                                };
                        };
 
+                       sdmmc3_b4_pins_a: sdmmc3-b4-0 {
+                               pins1 {
+                                       pinmux = <STM32_PINMUX('F', 0, AF9)>, /* SDMMC3_D0 */
+                                                <STM32_PINMUX('F', 4, AF9)>, /* SDMMC3_D1 */
+                                                <STM32_PINMUX('F', 5, AF9)>, /* SDMMC3_D2 */
+                                                <STM32_PINMUX('D', 7, AF10)>, /* SDMMC3_D3 */
+                                                <STM32_PINMUX('F', 1, AF9)>; /* SDMMC3_CMD */
+                                       slew-rate = <1>;
+                                       drive-push-pull;
+                                       bias-pull-up;
+                               };
+                               pins2 {
+                                       pinmux = <STM32_PINMUX('G', 15, AF10)>; /* SDMMC3_CK */
+                                       slew-rate = <2>;
+                                       drive-push-pull;
+                                       bias-pull-up;
+                               };
+                       };
+
+                       sdmmc3_b4_od_pins_a: sdmmc3-b4-od-0 {
+                               pins1 {
+                                       pinmux = <STM32_PINMUX('F', 0, AF9)>, /* SDMMC3_D0 */
+                                                <STM32_PINMUX('F', 4, AF9)>, /* SDMMC3_D1 */
+                                                <STM32_PINMUX('F', 5, AF9)>, /* SDMMC3_D2 */
+                                                <STM32_PINMUX('D', 7, AF10)>; /* SDMMC3_D3 */
+                                       slew-rate = <1>;
+                                       drive-push-pull;
+                                       bias-pull-up;
+                               };
+                               pins2 {
+                                       pinmux = <STM32_PINMUX('G', 15, AF10)>; /* SDMMC3_CK */
+                                       slew-rate = <2>;
+                                       drive-push-pull;
+                                       bias-pull-up;
+                               };
+                               pins3 {
+                                       pinmux = <STM32_PINMUX('F', 1, AF9)>; /* SDMMC2_CMD */
+                                       slew-rate = <1>;
+                                       drive-open-drain;
+                                       bias-pull-up;
+                               };
+                       };
+
+                       sdmmc3_b4_sleep_pins_a: sdmmc3-b4-sleep-0 {
+                               pins {
+                                       pinmux = <STM32_PINMUX('F', 0, ANALOG)>, /* SDMMC3_D0 */
+                                                <STM32_PINMUX('F', 4, ANALOG)>, /* SDMMC3_D1 */
+                                                <STM32_PINMUX('F', 5, ANALOG)>, /* SDMMC3_D2 */
+                                                <STM32_PINMUX('D', 7, ANALOG)>, /* SDMMC3_D3 */
+                                                <STM32_PINMUX('G', 15, ANALOG)>, /* SDMMC3_CK */
+                                                <STM32_PINMUX('F', 1, ANALOG)>; /* SDMMC3_CMD */
+                               };
+                       };
+
                        spdifrx_pins_a: spdifrx-0 {
                                pins {
                                        pinmux = <STM32_PINMUX('G', 12, AF8)>; /* SPDIF_IN1 */
index d4e37ab..2f9f8cf 100644 (file)
        status = "okay";
 };
 
+&sdmmc3 {
+       pinctrl-names = "default", "opendrain", "sleep";
+       pinctrl-0 = <&sdmmc3_b4_pins_a>;
+       pinctrl-1 = <&sdmmc3_b4_od_pins_a>;
+       pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>;
+       broken-cd;
+       st,neg-edge;
+       bus-width = <4>;
+       vmmc-supply = <&v3v3>;
+       status = "disabled";
+};
+
 &timers1 {
        /* spare dmas for other usage */
        /delete-property/dmas;
index a27db4e..2010f62 100644 (file)
        };
 };
 
+&sdmmc3 {
+       pinctrl-names = "default", "opendrain", "sleep";
+       pinctrl-0 = <&sdmmc3_b4_pins_a>;
+       pinctrl-1 = <&sdmmc3_b4_od_pins_a>;
+       pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>;
+       broken-cd;
+       st,neg-edge;
+       bus-width = <4>;
+       vmmc-supply = <&v3v3>;
+       status = "disabled";
+};
+
 &spi1 {
        pinctrl-names = "default";
        pinctrl-0 = <&spi1_pins_a>;