From 7659fe414d37861050ec909bb2d27c4bfca87d27 Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Thu, 21 Sep 2017 18:51:12 +0200 Subject: imx6qdl-colibri.dtsi: fix sd card on v1.1a hw, optional uhs-i support Unfortunately the SD card power rail VGEN3 got disabled upon boot which is reported as follows: VGEN3: disabling Subsequent SD card operation fails as follows: mmcblk1: error -110 sending status command, aborting This commit fixes this by making sure VGEN3 is always powered and optionally allows that rail to be automatically switched to 1.8 volts for proper UHS-I operation potentially massively increasing speeds. Signed-off-by: Marcel Ziswiler Acked-by: Max Krummenacher --- arch/arm/boot/dts/imx6qdl-colibri.dtsi | 54 ++++++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/imx6qdl-colibri.dtsi b/arch/arm/boot/dts/imx6qdl-colibri.dtsi index 7eea47ead55d..2674b692a527 100644 --- a/arch/arm/boot/dts/imx6qdl-colibri.dtsi +++ b/arch/arm/boot/dts/imx6qdl-colibri.dtsi @@ -276,6 +276,13 @@ regulator-always-on; }; + vgen3_reg: vgen3 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + regulator-always-on; + }; + vgen4_reg: vgen4 { regulator-min-microvolt = <1800000>; regulator-max-microvolt = <3300000>; @@ -764,6 +771,28 @@ MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x17071 >; }; + + pinctrl_usdhc1_100mhz: usdhc1grp100mhz { + fsl,pins = < + MX6QDL_PAD_SD1_CMD__SD1_CMD 0x170b1 + MX6QDL_PAD_SD1_CLK__SD1_CLK 0x100b1 + MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x170b1 + MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x170b1 + MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x170b1 + MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x170b1 + >; + }; + + pinctrl_usdhc1_200mhz: usdhc1grp200mhz { + fsl,pins = < + MX6QDL_PAD_SD1_CMD__SD1_CMD 0x170f1 + MX6QDL_PAD_SD1_CLK__SD1_CLK 0x100f1 + MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x170f1 + MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x170f1 + MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x170f1 + MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x170f1 + >; + }; }; weim { @@ -985,15 +1014,34 @@ status = "disabled"; }; -/* MMC */ +/* + * MMC + * + * The define SD_1_8 allows to use the SD interface at a higher speed mode + * if the card supports it. For this the signaling voltage is switched from + * 3.3V to 1.8V under the usdhc1's drivers control which is supported starting + * with hardware revision V1.1A. + */ +/* #define SD_1_8 */ &usdhc1 { label = "MMC1"; +#ifdef SD_1_8 + pinctrl-names = "default", "state_100mhz", "state_200mhz"; + pinctrl-0 = <&pinctrl_usdhc1 &pinctrl_mmc_cd>; + pinctrl-1 = <&pinctrl_usdhc1_100mhz &pinctrl_mmc_cd>; + pinctrl-2 = <&pinctrl_usdhc1_200mhz &pinctrl_mmc_cd>; + vqmmc-supply = <&vgen3_reg>; +#else pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usdhc1 &pinctrl_mmc_cd>; - cd-gpios = <&gpio2 5 0>; + no-1-8-v; +#endif + cd-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>; + disable-wp; + enable-sdio-wakeup; + keep-power-in-suspend; vmmc-supply = <®_3p3v>; bus-width = <4>; - no-1-8-v; status = "disabled"; }; -- cgit v1.2.3