imx6ull custom board is failing to boot from emmc

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

imx6ull custom board is failing to boot from emmc

2,416 Views
pankajjoshi
Contributor I

b45499

Yuri

igorpadykov

Hi All,

I am trying to bring up the custom imx6ull based board. I am able to flash the modified u-boot via mfgtool2. I have modified "mx6ullevk files : mx6ullevk.h & mx6ullevk.c" since our board is same as evaluation board, only eMMC(5.1 - 8 GB) is added. We changed the boot configurations and we used 

0x0000c86d - As per our shcematic and same as imx6ull evaluation board boot configurations.

BOOT_CFG1: 6d

BOOT_CFG2: c8

BOOT_CFG3: 00

BOOT_CFG4: 00

Regular Boot , SD/MMC Speed Normal, Bus Width 8-bit , eSDHC2.

I also added padding for eMMC in u-boot for eSDHC2.

I am able to flash u-boot, dtb, zImage and rootfs built via "yocto imx-morty release". 

After flashing, board is going always in HID mode. If again, i flash only u-boot in RAM via mfgtool and break it using keyboard and then when i do a normal boot "command: boot", i see that the kernel and rootfs boot from the mmc correctly and get the prompt on console. 

Can anyone please help in letting me know, how can we boot from eMMC.

Also we have new DDR3L - 4 GB, but we have not changed DCD file yet. Is it mandatory to change for now. We are able to work with 512MB DDR configurations default for imx6ullevk board and see U-BOOT coming up. We are close to the solution but hard to find what we missed. Any help is highly appreciated !

0 Kudos
9 Replies

1,711 Views
BiyongSUN
NXP Employee
NXP Employee

“I also added padding for eMMC in u-boot for eSDHC2”

Suppose padding here is pad. 

The boot pin/pad is not for "add". It is dedicated. 

Untitled.png

0 Kudos

1,711 Views
BiyongSUN
NXP Employee
NXP Employee

You can check the clk from pad NAND_RE_B first.

DCD is mandatory to change according to the hardware. 

0 Kudos

1,711 Views
pankajjoshi
Contributor I

Thanks Biyong for replying. I had made changes with respect to DCD. I still think padding is not required as it was taken care in device tree in kernel. Please correct if my understanding is wrong. Padding may be required if you have only u-boot. I had the complete program image. My problem was the boot_cfg, as they need to be changed as per our eMMC. So i could change it using mmc command from u-boot prompt. And it worked for me.

0 Kudos

1,711 Views
BiyongSUN
NXP Employee
NXP Employee

Boot from the emmc boot0 and boot1 or use partition are exactly the same. 

if you use the u-boot.imx, just change the a little.

ucl2.xml

emmc boot0

dd if=$FILE of=/dev/mmcblk%mmc%boot0 bs=512 seek=2

emmc boot1 

dd if=$FILE of=/dev/mmcblk%mmc%boot1 bs=512 seek=2

emmc user partition:

dd if=$FILE of=/dev/mmcblk%mmc  bs=512 seek=2

The key line for emmc burning is the following:

 <CMD state="Updater" type="push" body="$ mmc bootpart enable 1 1 /dev/mmcblk%mmc%">enable boot partion 1 to boot</CMD>

Please double confirm you use the eMMC list to burn the board.

The uboot has few operation for mmc  command. 

Please go to Linux by mfg tool.

Add the line in BOLD for the mfg tool xml list of eMMC

<CMD state="BootStrap" type="jump" > Jumping to OS image. </CMD>

<CMD state="Updater" type="push" body="$ sh"> SHELL</CMD>

 <!-- create partition -->
 <CMD state="Updater" type="push" body="send" file="mksdcard.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.sh /dev/mmcblk%mmc%"> Partitioning...</CMD>
You will get a console for Linux shell. 
The you can use the mmc command in Linux shell
 mmc  extcsd read /dev/mmcblk3
Command set [CMD_SET: 0x00]
Command set revision [CMD_SET_REV: 0x00]
Power class [POWER_CLASS: 0x00]
High-speed interface timing [HS_TIMING: 0x01]
Erased memory content [ERASED_MEM_CONT: 0x00]
Boot configuration bytes [PARTITION_CONFIG: 0x48]
 Boot Partition 1 enabled
 No access to boot partition
Boot config protection [BOOT_CONFIG_PROT: 0x00]
Boot bus Conditions [BOOT_BUS_CONDITIONS: 0x00]
High-density erase group definition [ERASE_GROUP_DEF: 0x00]
Boot write protection status registers [BOOT_WP_STATUS]: 0x00
Boot Area Write protection [BOOT_WP]: 0x00
 Power ro locking: possible
0 Kudos

1,711 Views
igorpadykov
NXP Employee
NXP Employee

Hi Pankaj

from your text : 'If again, i flash only u-boot in RAM via mfgtool and break
it using keyboard and then when i do a normal boot "command: boot", i see that the
kernel and rootfs boot from the mmc correctly and get the prompt on console. "
- could you clarify this procedure in more details ?
So when booting emmc, do you see with oscilloscope signals on all emmc lines ?
Had you checked SRC_SBMR1,2 registers with jtag after processor entered
serial downloader, had their content corresponded to boot pin configuartion ?

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,711 Views
pankajjoshi
Contributor I

Hi Igor,

igorpadykov

I tried to setup Jtag (Segger JLink). While doing that, i used the attached JLink script to initialize clock and ddr and passed it to JLinkExe. It was successful. Then when i try to connect to the device, i get below error :

  1. Invalid ROM table component ID 0x2F0F0F02 @ 0x20001EF0 (expected 0xB105100D). Trying again at alternative offset.
  2. https://forum.segger.com/index.php/Thread/4681-SOLVED-J-Link-and-Windows-10-issues/#codeLine_50_9e5c...Invalid ROM table component ID 0x2F0F0F02 @ 0x60000FF0 (expected 0xB105100D). Trying again at alternative offset.
  3. cannot connect to target.

I passed the device - MCIMX6Y2 since we are using imx6ull. Is it something related to ddr initialization. My thought was to intialize ddr and then load the u-boot.bin and debug using JLinkGDBServer.

Can you please guide?

Thanks,

Pankaj 

JLink Script

0 Kudos

1,711 Views
igorpadykov
NXP Employee
NXP Employee

Hi Pankaj

please post this to segger support, as this may be specific segger jtag issue.

Because in past there were reported issues specific with this type of debugger.

Or try with other jtag tool.

Best regards
igor

0 Kudos

1,711 Views
pankajjoshi
Contributor I

I am able to boot the board from eMMC by changing the boot config parameters from the u-boot prompt. Below are the commands i had to change

u-boot>mmc partconf 1 1 7 0  //select device 1 and configure the user-area (7) for boot mode operation with ACK and no access to boot-partition.
u-boot>mmc bootbus 1 2 0 2 //select device 1, set 8-bit and DDR transfer rate

0 Kudos

1,711 Views
pankajjoshi
Contributor I

When we start mfgtool,  first it loads u-boot in RAM and run it from there. As the mfgtool load u-boot in RAM, i pressed keys to stop auto boot. I believe till now u-boot has not boooted from eMMC but it is loaded and running from RAM. Now when on the u-boot prompt, i give command "boot", i see normal booting of linux from eMMC. I believe, i have everything copied in eMMC but when i reboot, i do not see any booting from eMMC. I hope this elaborates the procedure i am following.

I am yet to check the SRC_SBMR1,2 registers with jtag, that is what i am going to do now and check the boot pin configuration. 

Thanks for reply !

0 Kudos