EMMC 5.0 and EMMC 5.1 work on i.MX6

分享到:

在我们i.MX6Q/Dual Sabre Board的参考设计中eMMC IC 使用的是Sandisk SDIN5C2-8 (4.41),在i.MX6的Reference manual 和datasheet我们知道compatible with the MMCSystem Specification version 4.2/4.3/4.4,而且在datasheet中有关于uSDHCmodule详细的细节描述,在手册中可以看到“fullycompliant with the MMC command/response sets and Physical Layer as defined inthe Multimedia Card System Specification, v4.2/4.3/4.4/4.41, includinghigh-capacity (> 2 GB) HC MMC cards.”EMMC4.4/4.41在我们默认的BSP是支持,而且在我们新released的BSP是有支持eMMC4.5的。

随着技术的发展,但是eMMC4.4有可能会停产,被Emmc4.5甚至是更高版本的EMMC5.0 和EMMC5.1。更多的客户也会选择更高的版本替代。那 How to make the eMMC 4.5 , EMMC 5.0 and EMMC 5.1 work on i.MX6 ?

如果EMMC4.5 或者EMMC5.0 /5.1 能向下和eMMC4.4兼容的话,那么它可以工作在eMMC4.4模式下,这样eMMC4.5和eMMC5.0 /5.1就可以在i.MX6上工作了。Booting from a eMMC 4.5 device or high version isnot supported,  boot ROM will fall back to the eMMC4.4  standard whena eMMC4.5 or high version capable device is detected. In BSP it is possible tobypass eMMC version checking, so that eMMC v4.5 or high version can work aseMMC v4.4 cards, no specific v4.5 feature supported. Only basic read/writeoperations are supported.

在源码中,我们可以看到:
In the source code we can change check value of card->ext_csd.rev.
Take the eMMC 4.5 work as example, the current i.MX6 Linux BSP(L3.0.35_4.1.0) has added code to interface with an eMMC4.5 card to operate asan eMMC4.4 card. Change the value of card->ext_csd.rev5 to 6, now eMMC 5.0 can work as an eMMC 4.4. The code drivers/mmc/core/mmc.c:
EMMC4.5

And for the EMMC 5.0 and EMMC5.1, modify the kernelto support eMMC 5.0 and 5.1 extended CSD revisions, as shown below:
/drivers/mmc/core/mmc.c :
if (card->ext_csd.rev > 6){              //The '6' has to be replaced with '7' For EMMC5.0
                                                          //  The '6' has to be replacedwith '8'  For EMMC5.1
               pr_err("%s: unrecognised EXT_CSD revision %d\n",
                       mmc_hostname(card->host), card->ext_csd.rev);
                err = -EINVAL;
                goto out;
         }
EMMC5.0
After modifying the code we need to rebuild the thefirmware uImage used for MfgTool . Update the uImage in Mfgtool , and it canflash successful.

Then the eMMC version 5.0 and 5.1 can be used with i.MX6 based boards.

 

更多恩智浦(NXP)及科技资讯请关注:
NXP中文官方:http://www.nxp.com/zh-Hans/
NXP中文技术论坛:http://www.nxpic.org/