MLK-22851-3 imx8mq: Enable eMMC HS400 and SD UHS mode on EVK
authorYe Li <ye.li@nxp.com>
Fri, 25 Oct 2019 08:28:48 +0000 (01:28 -0700)
committerYe Li <ye.li@nxp.com>
Mon, 28 Oct 2019 08:14:41 +0000 (01:14 -0700)
iMX8MQ EVK board has a eMMC5.0 chip and supports SD3.0, so enable the UHS
and HS400 configs to enhance the eMMC/SD access.

The change also needs to set usdhc clock to 400Mhz, and add the off-on-delay-us
to SD reset pin, otherwise some SD cards will fail to select UHS mode in
re-initialization.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 57e1bc5f634be231b2bfd10cf0cbbff86dadd2e1)

arch/arm/dts/fsl-imx8mq-evk.dts
arch/arm/mach-imx/imx8m/clock_imx8mq.c
configs/imx8mq_evk_defconfig

index 77b46f3..7671a09 100644 (file)
@@ -37,6 +37,7 @@
                        regulator-min-microvolt = <3300000>;
                        regulator-max-microvolt = <3300000>;
                        gpio = <&gpio2 19 GPIO_ACTIVE_HIGH>;
+                       u-boot,off-on-delay-us = <20000>;
                        enable-active-high;
                };
        };
index 9578f4e..b6175d8 100644 (file)
@@ -471,15 +471,13 @@ void init_clk_usdhc(u32 index)
        case 0:
                clock_enable(CCGR_USDHC1, 0);
                clock_set_target_val(USDHC1_CLK_ROOT, CLK_ROOT_ON |
-                                    CLK_ROOT_SOURCE_SEL(1) |
-                                    CLK_ROOT_POST_DIV(CLK_ROOT_POST_DIV2));
+                                    CLK_ROOT_SOURCE_SEL(1));
                clock_enable(CCGR_USDHC1, 1);
                return;
        case 1:
                clock_enable(CCGR_USDHC2, 0);
                clock_set_target_val(USDHC2_CLK_ROOT, CLK_ROOT_ON |
-                                    CLK_ROOT_SOURCE_SEL(1) |
-                                    CLK_ROOT_POST_DIV(CLK_ROOT_POST_DIV2));
+                                    CLK_ROOT_SOURCE_SEL(1));
                clock_enable(CCGR_USDHC2, 1);
                return;
        default:
index 263ee8d..2c832fe 100644 (file)
@@ -30,6 +30,9 @@ CONFIG_DM_GPIO=y
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_MXC=y
 CONFIG_DM_MMC=y
+CONFIG_MMC_IO_VOLTAGE=y
+CONFIG_MMC_UHS_SUPPORT=y
+CONFIG_MMC_HS400_SUPPORT=y
 CONFIG_DM_ETH=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX8M=y