ARM: DTS: stm32: add SDMMC support for stm32h743 disco
authorPatrice Chotard <patrice.chotard@st.com>
Tue, 3 Oct 2017 13:54:56 +0000 (15:54 +0200)
committerTom Rini <trini@konsulko.com>
Sun, 8 Oct 2017 20:19:56 +0000 (16:19 -0400)
Add pinctrl and sdmmc nodes to add MMC support for
STM32H743 discovery board.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
arch/arm/dts/stm32h743-pinctrl.dtsi
arch/arm/dts/stm32h743.dtsi
arch/arm/dts/stm32h743i-disco.dts

index d3e11d53ab40e438ce58702da47f721a6379ce05..d6a79aefb4ccb2403e8744134b1fd2fec8e98f46 100644 (file)
                                          slew-rate = <3>;
                                };
                        };
+
+                       sdmmc1_pins: sdmmc@0 {
+                               pins {
+                                       pinmux = <STM32H7_PC8_FUNC_SDMMC1_D0>,
+                                                <STM32H7_PC9_FUNC_SDMMC1_D1>,
+                                                <STM32H7_PC10_FUNC_SDMMC1_D2>,
+                                                <STM32H7_PC11_FUNC_SDMMC1_D3>,
+                                                <STM32H7_PC12_FUNC_SDMMC1_CK>,
+                                                <STM32H7_PD2_FUNC_SDMMC1_CMD>;
+
+                                       slew-rate = <3>;
+                                       drive-push-pull;
+                                       bias-disable;
+                               };
+                       };
                };
        };
 };
index a413866bf6d880e5b86822c6abc5d4f902ed5831..d5b8d879ee2ac112705504ac8032b411995aa9d4 100644 (file)
@@ -43,6 +43,7 @@
 #include "skeleton.dtsi"
 #include "armv7-m.dtsi"
 #include <dt-bindings/clock/stm32h7-clks.h>
+#include <dt-bindings/mfd/stm32h7-rcc.h>
 
 / {
        clocks {
                        compatible = "fixed-clock";
                        clock-frequency = <4000000>;
                };
+
+               sdmmc1: sdmmc@52007000 {
+                       compatible = "st,stm32-sdmmc2";
+                       reg = <0x52007000 0x1000>;
+                       interrupts = <49>;
+                       clocks = <&rcc SDMMC1_CK>;
+                       resets = <&rcc STM32H7_AHB3_RESET(SDMMC1)>;
+                       st,idma = <1>;
+                       cap-sd-highspeed;
+                       cap-mmc-highspeed;
+                       status = "disabled";
+               };
        };
 };
 
index bef7e90f20683702b6e128727d5e4c40e17d709c..917a859a09f0fc7341c7d0fe4867f044b550c33a 100644 (file)
@@ -60,6 +60,7 @@
 
        aliases {
                serial0 = &usart2;
+               mmc0 = &sdmmc1;
                gpio0 = &gpioa;
                gpio1 = &gpiob;
                gpio2 = &gpioc;
                st,sdram-refcount = <1539>;
        };
 };
+
+&sdmmc1 {
+       status = "okay";
+       pinctrl-0 = <&sdmmc1_pins>;
+       pinctrl-names = "default";
+       bus-width = <4>;
+       cd-gpios = <&gpioi 8 1>;
+};