32G emmc can not boot entire uboot on sd3

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

32G emmc can not boot entire uboot on sd3

2,199 次查看
echozeng
Contributor III

Dera all,

      32G emmc can not boot entire uboot base on SD3.

      SW env: uboot 2009, android 4.2.2, kernel:3.0.35

       HW env: 4G emmc(8 data  pin) on SD4, 32G emmc(4  data pin) on SD3.

      1, OK boot from SD4 with android and SD3 work fine(read,write and delete file fine, fat32 format).

      2,'dd if=/mnt/sdcard/u-boot.bin of=/dev/block/mmcblk1 bs=512 skip=2 seek=2' ok, and 'dd if=/dev/block/mmcblk1 of=/mnt/sdcard/uboot_read_check.bin bs=512 skip=2 count=600' ok, the result  of compare uboot_read_check.bin and u-boot.bin is same.

      3,log  of boot from SD3  is:

===========log=======================

U-Boot 2009.08-dirty ( 6æ 30 2016 - 14:53:52)

CPU: Freescale i.MX6 family TO1.5 at 792 MHz

Thermal sensor with ratio = 189

Temperature:   47 C, calibration data 0x5ab4ed7d

mx6q pll1: 792MHz

mx6q pll2: 528MHz

mx6q pll3: 480MHz

mx6q pll8: 50MHz

ipg clock     : 66000000Hz

ipg per clock : 66000000Hz

uart clock    : 80000000Hz

cspi clock    : 60000000Hz

ahb clock     : 132000000Hz

axi clock   : 264000000Hz

emi_slow clock: 132000000Hz

ddr clock     : 528000000Hz

usdhc1 clock  : 198000000Hz

usdhc2 clock  : 198000000Hz

usdhc3 clock  : 198000000Hz

usdhc4 clock  : 198000000Hz

nfc clock     : 24000000Hz

Board: i.MX6Q-SABRESD: unknown-board Board: 0x63015 [POR ]

Boot Device: MMC

I2C:   ready

DRAM:   1 GB

MMC:   FSL_USDHC: 0,FSL_USDHC: 1,FSL_USDHC: 2,FSL_USDHC: 3

===========log=======================

look like crach of uboot run.

4, replace emmc with sd card on SD3, all ok.

I want to know what problem is?

thanks.

标签 (2)
0 项奖励
回复
7 回复数

1,552 次查看
lily_zhang
NXP Employee
NXP Employee

In addition, please check U-boot drivers/mmc/fsl_esdhc.c and ensure some important fixes are added. For example:
commit 05a7a07a92a98e6388b349b79033bd151a14938f
Author: Ye.Li <B37916@freescale.com>
Date:   Mon Dec 14 17:07:46 2015 +0800

    MLK-12001 MMC:USDHC: Clear DLL_CTRL delay line settings at driver init

    Clear DLL_CTRL delay line settings at USDHC initialization to eliminate the
    pre-settings from boot rom. U-boot should re-init the USDHC not reply on the
    value set by boot from.

    On MX6DL, the ROM has set the default delay line(DLLCTRL) to 0x1000021,
    when eMMC works on DDR mode in kernel, it will possibly cause data CRC errors.
    Even u-boot always use eMMC in SDR mode, for safety sake, it is better to clear it too.

    Signed-off-by: Ye.Li <B37916@freescale.com>

diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index 6356bc5..7d002b5 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -530,6 +530,9 @@ static int esdhc_init(struct mmc *mmc)

        /* Put VEND_SPEC to default value */
        esdhc_write32(&regs->vendorspec, VENDORSPEC_INIT);
+
+       /* Disable DLL_CTRL delay line */
+       esdhc_write32(&regs->dllctrl, 0x0);
#endif

0 项奖励
回复

1,552 次查看
lily_zhang
NXP Employee
NXP Employee

From description, it seems U-boot has some issues on SD3 operations:

Please try the following debug suggestion:

- Boot from SD4 and then check whether SD3 eMMC can read/write normally.

- Change U-boot SD3 as 1 bit or 4 bit and see whether it works normally

- Increase SD3 DATA pin drive strength for trial..

- Compare whether U-boot SD3 pin configurations  are aligned with kernel setting because kernel can work normally.

1,552 次查看
echozeng
Contributor III

According to your suggestion, modify SD3 bits width, crashed issue is fixed.

Thanks.

0 项奖励
回复

1,552 次查看
glowned
Contributor I

Why are you doing the "skip=2" in the dd command?

The "seek=2" is needed to put the image in the place that the ROM expects, but the "skip=2" would skip 1K of the u-boot.bin file, which is not what you want, I think.

0 项奖励
回复

1,552 次查看
tonyzheng
NXP Employee
NXP Employee

Do you mean it fails to boot from 32G emmc(4bit) , but succeeds to boot from 8G emmc(8bit)?

From you log, we can know it crashed at uboot, but kernel is OK. So, it is best to add some logs into drivers/mmc/imx_esdhc.c or use trace32 to find out where it crashed.

In addition, can you test to boot from 8G emmc(4bit)?

0 项奖励
回复

1,552 次查看
echozeng
Contributor III

It fails to boot from 32GB sandisk emmc 4.51(4bit) on sdhci-esdhc-imx.2, but succeds to  boot from 4GB emmc(4bit or 8bit, not sure) on sdhci-esdhc-imx.3.

If replace 32GB emmc with 2G sd card, uboot (same as 32GB used) and kernel work fine.

We have no 8GB emmc to test now.

According to my log, it just show uboot crash. Kernel does not be loaded  to ram ,so I think the point is why uboot crash.

Do we confirmed that the uboot img  is loaded to ram successfully?

0 项奖励
回复

1,552 次查看
lily_zhang
NXP Employee
NXP Employee

We will check it. tonyzheng​, FYI.

0 项奖励
回复