ARM: dts: imx6dl-colibri: Add usdhc1 sleep pin configuration
authorMax Krummenacher <max.krummenacher@toradex.com>
Mon, 11 Apr 2022 15:22:31 +0000 (17:22 +0200)
committerShawn Guo <shawnguo@kernel.org>
Tue, 19 Apr 2022 00:43:08 +0000 (08:43 +0800)
The Toradex board Iris V2 has a SD-card slot with switchable
power.
Add a pinctrl sleep used when the card power is off to avoid
backfeeding to the card and add the "sleep" pinctrl to the
usdhc1 controller.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm/boot/dts/imx6qdl-colibri.dtsi

index 1c3c34b..c383e0e 100644 (file)
        bus-width = <4>;
        no-1-8-v;
        disable-wp;
-       pinctrl-names = "default", "state_100mhz", "state_200mhz";
+       pinctrl-names = "default", "state_100mhz", "state_200mhz", "sleep";
        pinctrl-0 = <&pinctrl_usdhc1 &pinctrl_mmc_cd>;
        pinctrl-1 = <&pinctrl_usdhc1_100mhz &pinctrl_mmc_cd>;
        pinctrl-2 = <&pinctrl_usdhc1_200mhz &pinctrl_mmc_cd>;
+       pinctrl-3 = <&pinctrl_usdhc1_sleep &pinctrl_mmc_cd_sleep>;
        vmmc-supply = <&reg_module_3v3>;
        vqmmc-supply = <&vgen3_reg>;
        status = "disabled";
                >;
        };
 
+       pinctrl_mmc_cd_sleep: mmccdslpgrp {
+               fsl,pins = <
+                       MX6QDL_PAD_NANDF_D5__GPIO2_IO05 0x0
+               >;
+       };
+
        pinctrl_pwm1: pwm1grp {
                fsl,pins = <
                        MX6QDL_PAD_GPIO_9__PWM1_OUT     0x1b0b1
                >;
        };
 
+       /* avoid backfeeding with removed card power */
+       pinctrl_usdhc1_sleep: usdhc1sleepgrp {
+               fsl,pins = <
+                       MX6QDL_PAD_SD1_CMD__SD1_CMD     0x3000
+                       MX6QDL_PAD_SD1_CLK__SD1_CLK     0x3000
+                       MX6QDL_PAD_SD1_DAT0__SD1_DATA0  0x3000
+                       MX6QDL_PAD_SD1_DAT1__SD1_DATA1  0x3000
+                       MX6QDL_PAD_SD1_DAT2__SD1_DATA2  0x3000
+                       MX6QDL_PAD_SD1_DAT3__SD1_DATA3  0x3000
+               >;
+       };
+
        pinctrl_usdhc3: usdhc3grp {
                fsl,pins = <
                        MX6QDL_PAD_SD3_CMD__SD3_CMD     0x17059