i.MX6SL eMMC boot

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX6SL eMMC boot

Jump to solution
2,988 Views
tomtranone
Contributor II

Hi all,

I saw a few threads out there regarding eMMC boot and using the MfgTool to program it.  Tried furiously to get this to work but not getting any traction.  I have also written a 'mmc config' command in u-boot to re-partition the eMMC, but after following Micron technical note on partitioning, the values aren't retained on the power cycle (another mystery).  To get things rolling, I just need to program the eMMC with uboot/linux/rootfs, but the MfgTool fails to create the primary partition because it cannot write the partition table to the first block.  When sfdisk goes to re-read the partition table, it fails so the partition device block  /dev/mmcblk0p1 (Linux) cannot be created, leading to errors in the remaining commands sent from MfgTool to target board.


 

UTP: received command '$ echo 1 > /sys/devices/platform/sdhci-esdhc-imx.1/mmc_host/mmc1/mmc1:0001/boot_config'

UTP: executing "echo 1 > /sys/devices/platform/sdhci-esdhc-imx.1/mmc_host/mmc1/mmc1:0001/boot_config"

sh: can't create /sys/devices/platform/sdhci-esdhc-imx.1/mmc_host/mmc1/mmc1:0001/boot_config: nonexistent directory

UTP: sending Non-success to kernel for command $ echo 1 > /sys/devices/platform/sdhci-esdhc-imx.1/mmc_host/mmc1/mmc1:0001/boot_config.

I got some of these lines from the MXQ MfgTool for burning eMMC but it doesn't exist in the uImage from the MX6SL.  Not sure how to get around all this.  Is there a specific eMMC release(uboot/linux) with the MfgTool setup to handle this process?

Regards,

Tom

Labels (1)
Tags (2)
0 Kudos
1 Solution
910 Views
tomtranone
Contributor II

The original Linux distribution for the iMX6SL EVK configured the SDMMC2 interface as a 4-Data line interface.  Our hardware uses the 8-Data line with CLK, CMD, and RST.


1) Make sure the IOMUX is configured correctly for the SDMMCx interface, i.e., SDMMC2.

In the IOMUX pad table, make sure it has the following like this, it might varies depending the the speed your interface support.

MX6SL_PAD_SD2_RST__USDHC2_RST,
MX6SL_PAD_SD2_CLK__USDHC2_CLK_50MHZ,
MX6SL_PAD_SD2_CMD__USDHC2_CMD_50MHZ,
MX6SL_PAD_SD2_DAT0__USDHC2_DAT0_50MHZ,
MX6SL_PAD_SD2_DAT1__USDHC2_DAT1_50MHZ,
MX6SL_PAD_SD2_DAT2__USDHC2_DAT2_50MHZ,
MX6SL_PAD_SD2_DAT3__USDHC2_DAT3_50MHZ,
MX6SL_PAD_SD2_DAT4__USDHC2_DAT4_50MHZ,
MX6SL_PAD_SD2_DAT5__USDHC2_DAT5_50MHZ,
MX6SL_PAD_SD2_DAT6__USDHC2_DAT6_50MHZ,
MX6SL_PAD_SD2_DAT7__USDHC2_DAT7_50MHZ,

In the board initialization file, i.e. board-mx6sl_evk.c

static const struct esdhc_platform_data mx6sl_sd2_data __initconst = {

  .cd_type = ESDHC_CD_PERMANENT,

  .always_present = 1,

  .support_8bit = 1,

  .keep_power_at_suspend = 1,

  .delay_line = 0,

  .support_18v = 0,

  .platform_pad_change = plt_sd_pad_change,

};

In the main initialization function, i.e.,

static void __init mx6_evk_init(void)

{

...

...

..

imx6q_add_sdhci_usdhc_imx(1, &mx6sl_sd2_data);

....

}

It is appropriately configured - you should see the mmcblk0, mmcblk0boot0, and mmcblk0boo1 block devices get enumerated once the Linux kernel is booted.

Not all the features are supported in the Linux distribution but at least writes/reads to the eMMC appropriately.  To boot from the eMMC once uboot, Linux, and root filesystem are stored on the device, you need to specify the correct boot pins to boot from the eMMC device.

View solution in original post

0 Kudos
2 Replies
910 Views
jimmychan
NXP TechSupport
NXP TechSupport

The MFGtool is like a batch processing that running the bundle of linux commands in the ucl script. I think you can try to boot the board with NFS. Then run the same commands in the ucl script to see what is the exactly problem and try to debug it. Maybe some commands or setting is missed. Then you can modify the ucl script to make it work again.

0 Kudos
911 Views
tomtranone
Contributor II

The original Linux distribution for the iMX6SL EVK configured the SDMMC2 interface as a 4-Data line interface.  Our hardware uses the 8-Data line with CLK, CMD, and RST.


1) Make sure the IOMUX is configured correctly for the SDMMCx interface, i.e., SDMMC2.

In the IOMUX pad table, make sure it has the following like this, it might varies depending the the speed your interface support.

MX6SL_PAD_SD2_RST__USDHC2_RST,
MX6SL_PAD_SD2_CLK__USDHC2_CLK_50MHZ,
MX6SL_PAD_SD2_CMD__USDHC2_CMD_50MHZ,
MX6SL_PAD_SD2_DAT0__USDHC2_DAT0_50MHZ,
MX6SL_PAD_SD2_DAT1__USDHC2_DAT1_50MHZ,
MX6SL_PAD_SD2_DAT2__USDHC2_DAT2_50MHZ,
MX6SL_PAD_SD2_DAT3__USDHC2_DAT3_50MHZ,
MX6SL_PAD_SD2_DAT4__USDHC2_DAT4_50MHZ,
MX6SL_PAD_SD2_DAT5__USDHC2_DAT5_50MHZ,
MX6SL_PAD_SD2_DAT6__USDHC2_DAT6_50MHZ,
MX6SL_PAD_SD2_DAT7__USDHC2_DAT7_50MHZ,

In the board initialization file, i.e. board-mx6sl_evk.c

static const struct esdhc_platform_data mx6sl_sd2_data __initconst = {

  .cd_type = ESDHC_CD_PERMANENT,

  .always_present = 1,

  .support_8bit = 1,

  .keep_power_at_suspend = 1,

  .delay_line = 0,

  .support_18v = 0,

  .platform_pad_change = plt_sd_pad_change,

};

In the main initialization function, i.e.,

static void __init mx6_evk_init(void)

{

...

...

..

imx6q_add_sdhci_usdhc_imx(1, &mx6sl_sd2_data);

....

}

It is appropriately configured - you should see the mmcblk0, mmcblk0boot0, and mmcblk0boo1 block devices get enumerated once the Linux kernel is booted.

Not all the features are supported in the Linux distribution but at least writes/reads to the eMMC appropriately.  To boot from the eMMC once uboot, Linux, and root filesystem are stored on the device, you need to specify the correct boot pins to boot from the eMMC device.

0 Kudos