arm: dts: imx7: colibri: add usdhci peripherals to device tree
authorStefan Agner <stefan.agner@toradex.com>
Tue, 8 Jan 2019 11:42:32 +0000 (12:42 +0100)
committerStefano Babic <sbabic@denx.de>
Mon, 28 Jan 2019 12:02:08 +0000 (13:02 +0100)
Add usdhci peripherals to device tree. This allows to use DM_MMC
for Colibri iMX7 devices.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
arch/arm/dts/imx7-colibri-emmc.dts
arch/arm/dts/imx7-colibri.dtsi

index 295ca059168a638749367ab98023bad8f758114a..efd600091dab9fc2009a99c12391bfb0b4dea182 100644 (file)
        model = "Toradex Colibri iMX7D 1GB (eMMC)";
        compatible = "toradex,imx7d-colibri-emmc", "fsl,imx7d";
 
+       aliases {
+               mmc0 = &usdhc3;
+               mmc1 = &usdhc1;
+       };
+
        chosen {
                stdout-path = &uart1;
        };
 };
+
+&usdhc3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usdhc3>;
+       bus-width = <8>;
+       non-removable;
+       status = "okay";
+};
+
+&iomuxc {
+       pinctrl_usdhc3: usdhc3grp {
+               fsl,pins = <
+                       MX7D_PAD_SD3_CMD__SD3_CMD               0x59
+                       MX7D_PAD_SD3_CLK__SD3_CLK               0x19
+                       MX7D_PAD_SD3_DATA0__SD3_DATA0           0x59
+                       MX7D_PAD_SD3_DATA1__SD3_DATA1           0x59
+                       MX7D_PAD_SD3_DATA2__SD3_DATA2           0x59
+                       MX7D_PAD_SD3_DATA3__SD3_DATA3           0x59
+                       MX7D_PAD_SD3_DATA4__SD3_DATA4           0x59
+                       MX7D_PAD_SD3_DATA5__SD3_DATA5           0x59
+                       MX7D_PAD_SD3_DATA6__SD3_DATA6           0x59
+                       MX7D_PAD_SD3_DATA7__SD3_DATA7           0x59
+                       MX7D_PAD_SD3_STROBE__SD3_STROBE         0x19
+               >;
+       };
+};
index 47295117aaa749415d305d6f90d68f2367904f28..a85702f5194783183487339c25d2a30b094edb26 100644 (file)
        status = "okay";
 };
 
+&usdhc1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usdhc1 &pinctrl_cd_usdhc1>;
+       no-1-8-v;
+       cd-gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
+       disable-wp;
+       status = "okay";
+};
+
 &iomuxc {
        pinctrl_i2c4: i2c4-grp {
                fsl,pins = <
                        MX7D_PAD_SD2_DATA0__GPIO5_IO14          0x14 /* DTR */
                >;
        };
+
+       pinctrl_usdhc1: usdhc1-grp {
+               fsl,pins = <
+                       MX7D_PAD_SD1_CMD__SD1_CMD       0x59
+                       MX7D_PAD_SD1_CLK__SD1_CLK       0x19
+                       MX7D_PAD_SD1_DATA0__SD1_DATA0   0x59
+                       MX7D_PAD_SD1_DATA1__SD1_DATA1   0x59
+                       MX7D_PAD_SD1_DATA2__SD1_DATA2   0x59
+                       MX7D_PAD_SD1_DATA3__SD1_DATA3   0x59
+               >;
+       };
 };
 
 &iomuxc_lpsr {
                        MX7D_PAD_LPSR_GPIO1_IO04__GPIO1_IO4     0x4000007f
                >;
        };
+
+       pinctrl_cd_usdhc1: usdhc1-cd-grp {
+               fsl,pins = <
+                       MX7D_PAD_LPSR_GPIO1_IO00__GPIO1_IO0     0x59 /* CD */
+               >;
+       };
 };