In our reference design board the eMMC IC is Sandisk SDIN5C2-8 (4.41), and in i.MX6 Reference manual and datasheet we can known that it compatible with the MMC System Specification version 4.2/4.3/4.4, and details in datasheet declare that the uSDHC module is "fully compliant with the MMC command/response sets and Physical Layer as defined in the Multimedia Card System Specification, v4.2/4.3/4.4/4.41, including high-capacity (> 2 GB) HC MMC cards." EMMC4.4/4.41 of cause can work in our released BSP.
But eMMC 4.4 has been discontinued and there is a possibility eMMC 4.41 will be discontinued. And many of our customers will choose the eMMC 4.5 or high verison EMMC 5.0 and EMMC 5.1. And how to make the eMMC 4.5 , EMMC 5.0 and EMMC 5.1 work on i.MX6 ?
The EMMC 4.5 or EMMC 5.0 /5.1 is backward-compatible with eMMC4.4, we can use it in eMMC4.4 mode to enable eMMC4.4 functionality and performance on the i.MX6 platform. Booting from a eMMC 4.5 device or high version is not supported, boot ROM will fall back to the eMMC4.4 standard when a eMMC4.5 or high version capable device is detected. In BSP it is possible to bypass eMMC version checking, so that eMMC v4.5 or high version can work as eMMC v4.4 cards, no specific v4.5 feature supported. Only basic read/write operations 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 as an eMMC4.4 card. Change the value of card->ext_csd.rev 5 to 6, now eMMC 5.0 can work as an eMMC 4.4. The code drivers/mmc/core/mmc.c:
And for the EMMC 5.0 and EMMC5.1, modify the kernel to 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 replaced with '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;
}
After modifying the code we need to rebuild the the firmware uImage used for MfgTool . Update the uImage in Mfgtool , and it can flash successful.
Then the eMMC version 5.0 and 5.1 can be used with IMX6 based boards.
Hello Rahul Soni,
You can ignore the signal you mentioned above, in the hardware design there is no Data Strobe signal pin. The hardware design without change. You can continue refer to our reference design. Hope this reply can help you.
Have a nice day
Rita
Hi Rita,
As you instructed, I have left the DS pin not connected. I'm going to use THGBMHG7C1LBAIL from Toshiba which supports eMMC5.1 interface. I understand that The '6' has to be replaced with '8' For EMMC5.1 to work with i.MX6S. I have only one doubt-
Will there be any issue when I boot using eMMC5.1 as you have mentioned above "Booting from a eMMC 4.5 device or high version is not supported".
Hi Rahul Soni,
By now the high version emmc is not support, here we change the card->ext_csd.rev just to make the emmc 5.0/5.1 to work on emmc4.4 mode. Then the high version emmc can work on i.mx6. Some of my customer have tired, and it works. Hope this can help you.
Best Regards
Rita
我有一块客户定制的imx6dl sabresd开发板,emmc5.0, OS为Android JB4.2.2。我修改了/drivers/mmc/core/mmc.c如下:
// The '6' has to be replaced with '7' For EMMC5.0
if (card->ext_csd.rev > 7) {
printk(KERN_ERR "%s: unrecognised EXT_CSD revision %d\n",
mmc_hostname(card->host), card->ext_csd.rev);
err = -EINVAL;
goto out;
}
修改后,我用make uImage 得到uImage,并将其替换到
Mfgtools-Rel-4.1.0_130816_MX6DL_UPDATER\Profiles\MX6DL Linux Update\OS Firmware\
但是,烧写时,串口控制台输出如下:
## Booting kernel from Legacy Image at 10800000 ...
Image Name: Linux-3.0.35
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4504772 Bytes = 4.3 MB
Load Address: 10008000
Entry Point: 10008000
Verifying Checksum ... Bad Data CRC
ERROR: can't get kernel image!
请问,是不是我生成uImage的方法有问题?
How to rebuild the the firmware uImage used for MfgTool?
首先非常感谢你的回答。
可能我没有交代清楚。我觉得如果想得到mfgtool用的uImage,
应该先执行类似 make ARCH=arm CROSS_COMPILE=arm-eabi- imx6_mfg_defconfig。
但是确认4.2.2的源码,configs里没有类似带mfg的config
所以不知道如何去得到mfgtools专用的uImage
另外,这里和板子上跑的image还没有关系,在烧写“在板子上跑的image”之前,也就是
构建小的linux环境的时候就已经发生了错误。
你这里使用的是OS为Android JB4.2.2,编译uImage for mfgtool:
# make imx6_updater_defconfig
# make menuconfig (Save customer’s Configuration and Exit, Begin to compile kernel)
# make uImage
compile an OS Firmware uboot for MFG
# export ARCH=arm
# export CROSS_COMPILE=~/myandroid/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-
# make mx6q_boardname_mfg_config
# make
u-boot.bin use for mgtool.
Hi All,
We are starting our new project based on IMX6 dual lite and need to decide which eMMC to select.
In this we have two options:
A. eMMC 4.41 4GB
B. eMMC 5.0 8GB
Is there any performance difference if we use eMMC5.0?
As per my understanding IMX6 support 4.41 and even if we use eMMC5.0 it will fallback to 4.41 and no performance gain. Is this understanding correct.
Please let me know your comments on this.
Thanks,
Raviraj
Hi Rita,
we are currently using a i.MX6Q on a custom board.
In the past we produced several boards ( > 2k ) using a MTFC4GMDEA-4M IT, JEDEC/MMC standard version 4.41-compliant, and everything went fine.
Now this part has been obsoleted by Micron, so on the latest production ( 700 boards ) we switched to the MTFC4GACAJCN-1M, JEDEC/MMC standard version 5.0-compliant.
All of the boards of the latest production don't boot, the boot loader doesn't start at all.
We are currently investigating, and seems that after few milliseconds of activity ( some 5 mSec. ) the boot stops and the device goes in serial boot mode.
The 4.41 device lasts for some 50 mSec. of activity and the boot sequence shows up the u-boot prompt on the serial port.
On these boards we use the 3.10 kernel, and to use the new 5.0 eMMC we introduced the patch you described above, the device can be accessed from the kernel and can be correctly written but the problem is still the boot.
We boot from boot0 area, and we have verified the contents of the boot0 area and it's the same as the boot.imx file, so the eMMC seems correctly written.
We have tested with u-boot versions 2014.10 , 2015.6 and 2016.3, all behaves as described above : with the 4.41 device the boards boot, with the 5.0 device the boards don't.
As indicated in other posts we don't have power supply problems ( no D0 toggle ), we have a POR time of 570 mSec. after power are stabilezed and the analysis on the eMMC power tells us the power is good.
We have pul down on BT_CFG1_1 , BT_CFG1_3 and BT_CFG1_4, and with the 4.41 device they are fine.
Have you any hints on how to proceed, as we are stucked on this?
Regards
Filippo
Hi Rita.
请教下,我目前使用 IMX6Q 在 Android 5.0.1上面,(kernel 3.10.53),使用你的方法,可以识别到 EMMC 5.1 但是会引起,MFGTOOl 烧录很慢.
通过添加参数 -E nodiscard 解决.
然后又发现 Back UP & Reset 出问题,然后检查代码,不使用 wipe_block_device 可以解决.
然后又发现 OTA升级的时候,又出现过程很慢,请问 这个如何解决,你没有遇到过这些问题吗?
Hi Rita,
I'm working on a new hardware design with i.MX6SoloLite. Does your solution work for eMMC 4.5 and 5.0 for this processor?
Hello,
does this applies on i.MX7D. I plan to use e.MMC 5.1 up to 128GB for data and for boot?
Thanks.
So you dont know would it boot from emmc5.1. I found in i.MX7D Security reference manual that boot code supports these standards:
• MMCv4.4 or less
• eMMCv4.4 or less
• SDv2.0 or less
• eSDv2.10 rev-0.9, with or without FAST_BOOT
• SDXCv3.0
and right now I dont have a way to try it. But as soon as I get 5.1 eMMC I will put it on SABRE board and try it.
Thanks Rita.
Hello b45499,
Sorry my small question.
In this thread, you say that
"The EMMC 4.5 or EMMC 5.0 /5.1 is backward-compatible with eMMC4.4, we can use it in eMMC4.4 mode to enable eMMC4.4 functionality and performance on the i.MX6 platform. Booting from a eMMC 4.5 device or high version is not supported, boot ROM will fall back to the eMMC4.4 standard when a eMMC4.5 or high version capable device is detected."
As conclusion,
1) i.MX6 can boot from EMMC v4.5 or higher version device as eMMC 4.4 device by eMMC4.4 mode function.
2) i.MX6 can't boot from EMMC v4.5 or higher version because boot ROM support eMMC4.4 or later.
Which is a correct answer?
The other hand, how about i.MX6 QuadPlus?
My customer plan to use i.MX6 QuadPlus.
Does it work in the same way as i.MX6 Quad?
Best regards,
Ishii.
你好,关于make imx6_updater_defconfig
我在4.2.2的源码上测试过,遗憾的是make uImage会出错
make uImage
出错
drivers/built-in.o: In function `mxc_hdmi_remove':
clkdev.c:(.text+0x1078c): undefined reference to `switch_dev_unregister'
clkdev.c:(.text+0x10798): undefined reference to `switch_dev_unregister'
drivers/built-in.o: In function `hotplug_worker':
clkdev.c:(.text+0x126ec): undefined reference to `switch_set_state'
clkdev.c:(.text+0x126fc): undefined reference to `switch_set_state'
clkdev.c:(.text+0x12870): undefined reference to `switch_set_state'
clkdev.c:(.text+0x12880): undefined reference to `switch_set_state'
drivers/built-in.o: In function `mxc_hdmi_probe':
clkdev.c:(.devinit.text+0x3c8): undefined reference to `switch_dev_register'
clkdev.c:(.devinit.text+0x3d4): undefined reference to `switch_dev_register'
make: *** [.tmp_vmlinux1] 错误 1
所以我想了个折中的办法,即用安卓5.1.1的mfgtools去烧写4.2.2的固件,
在6DL上验证ok,但是在6Q上却未能成功,
启动用的vbs只保留了:mfgtool2-android-mx6q-sabresd-emmc.vbs,
以下是烧写6Q时的ucl2.xml,只保留了eMMC-Android这一个LIST
--------------------------------------------------
<LIST name="eMMC-Android" desc="Choose eMMC as media">
<CMD state="BootStrap" type="boot" body="BootStrap" file ="firmware/u-boot-imx6q%plus%%board%_sd.imx" ifdev="MX6Q">Loading U-boot</CMD>
<CMD state="BootStrap" type="boot" body="BootStrap" file ="firmware/u-boot-imx6dl%board%_sd.imx" ifdev="MX6D">Loading U-boot</CMD>
<CMD state="BootStrap" type="load" file="firmware/zImage" address="0x12000000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6Q MX6D">Loading Kernel.</CMD>
<CMD state="BootStrap" type="load" file="firmware/%initramfs%" address="0x12C00000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6Q MX6D">Loading Initramfs.</CMD>
<CMD state="BootStrap" type="load" file="firmware/zImage-imx6q%plus%-%board%%ldo%.dtb" address="0x18000000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6Q">Loading device tree.</CMD>
<CMD state="BootStrap" type="load" file="firmware/zImage-imx6dl-%board%%ldo%.dtb" address="0x18000000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6D">Loading device tree.</CMD>
<CMD state="BootStrap" type="jump" > Jumping to OS image. </CMD>
<!-- create partition -->
<CMD state="Updater" type="push" body="send" file="mksdcard-android%data_type%.sh.tar">Sending partition shell</CMD>
<CMD state="Updater" type="push" body="$ tar xf $FILE "> Partitioning...</CMD>
<CMD state="Updater" type="push" body="$ sh mksdcard-android%data_type%.sh /dev/mmcblk%mmc%"> Partitioning...</CMD>
<!-- burn uboot -->
<!-- 修改bs,seek,count -->
<!-- <CMD state="Updater" type="push" body="$ dd if=/dev/zero of=/dev/mmcblk%mmc% bs=1k seek=384 conv=fsync count=129">clear u-boot arg</CMD> -->
<CMD state="Updater" type="push" body="$ dd if=/dev/zero of=/dev/mmcblk%mmc% bs=512 seek=1536 conv=fsync count=16">clear u-boot arg</CMD>
<CMD state="Updater" type="push" body="$ echo 0 > /sys/block/mmcblk%mmc%boot0/force_ro">access boot partition 1</CMD>
<!-- 修改uboot文件名 -->
<CMD state="Updater" type="push" body="send" file="files/android/%folder%/u-boot-6q.bin" >Sending u-boot.bin</CMD>
<!-- 添加 skip=2 -->
<CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mmcblk%mmc%boot0 bs=512 seek=2 skip=2">write U-Boot to sd card</CMD>
<CMD state="Updater" type="push" body="$ echo 1 > /sys/block/mmcblk%mmc%boot0/force_ro"> re-enable read-only access </CMD>
<CMD state="Updater" type="push" body="$ mmc bootpart enable 1 1 /dev/mmcblk%mmc%">enable boot partion 1 to boot</CMD>
<CMD state="Updater" type="push" body="$ ls -l /dev/mmc* ">Formatting sd partition</CMD>
<!-- 修改boot文件名 -->
<CMD state="Updater" type="push" body="send" file="files/android/%folder%/boot.img" >Sending and writting boot.img</CMD>
<CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mmcblk%mmc%p1">write boot.img</CMD>
<CMD state="Updater" type="push" body="$ mkfs.ext4 -E nodiscard /dev/mmcblk%mmc%p5">Formatting system partition</CMD>
<CMD state="Updater" type="push" body="$ mkfs.ext4 -E nodiscard /dev/mmcblk%mmc%p6">Formatting cache partition</CMD>
<CMD state="Updater" type="push" body="$ mkfs.ext4 -E nodiscard /dev/mmcblk%mmc%p7">Formatting device partition</CMD>
<!-- 这行拷贝自4.2.2的mfgtool,文件名和设备名修改了 -->
<CMD state="Updater" type="push" body="pipe dd of=/dev/mmcblk%mmc%p5 bs=512" file="files/android/%folder%/system.img">Sending and writting system.img</CMD>
<!-- 注释下面三行 -->
<!-- <CMD state="Updater" type="push" body="$ mount -o remount,size=512M rootfs /">change size of tmpfs</CMD> -->
<!-- <CMD state="Updater" type="push" body="send" file="files/android/%folder%/system.img" >Sending system.img</CMD> -->
<!-- <CMD state="Updater" type="push" body="$ simg2img $FILE /dev/mmcblk%mmc%p5">writting sparse system.img</CMD> -->
<!-- Write userdata.img is optional, for some customer this is needed, but it's optional. -->
<!-- Also, userdata.img will have android unit test, you can use this to do some auto test. -->
<!-- <CMD state="Updater" type="push" onError="ignore" body="pipe dd of=/dev/mmcblk0p7" file="file/android/userdate.img"> Sending userdata.img(optional) </CMD>
<CMD state="Updater" type="push" body="frf">flush the memory.</CMD> -->
<!-- 修改recovery文件名 -->
<CMD state="Updater" type="push" body="pipe dd of=/dev/mmcblk%mmc%p2 bs=512" file="files/android/%folder%/recovery.img">Sending and writting recovery.img</CMD>
<CMD state="Updater" type="push" body="$ sync">Sync file system</CMD>
<CMD state="Updater" type="push" body="frf">Finishing rootfs write</CMD>
<CMD state="Updater" type="push" body="$ echo Update Complete!">Done</CMD>
</LIST>
烧写时,会停在Jumping to OS image,
等一会,又变为Loading U-boot。
这时中断后,重启刚才烧写的主板,会发现原固件仍在,也就是烧写似乎没有进行。
请FAE帮忙看看我改写的ucl2.xml是否有问题?
Hi Rita Wang
I am using 4.9.154 kernel on IMX6solox platform, do i need this changes if we are using emmc 4.5 , emmc 5.0 or emmc 5.1 chips on our board.
or is it already handled in 4.9 kernel