Cannot boot from NAND

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

Cannot boot from NAND

4,226 Views
HenriBragge
Contributor I

Hi,

I have i.MX53 SABRE for Automotive Infotainment (i.MX53 ARD) RevB and I'm trying to boot from a Micron NAND chip MT29F2G08ABAEA.

I cannot see any output from U-boot via serial console when booting. I have double checked dip settings (16bit ECC NAND). NAND is otherwise working, because I can read/write it from U-boot when I boot from SD card. Also the U-boot and serial console settings should be correct because it works when booting from SD card.

Is booting from this NAND chip unsupported? Is there compatibility list available somewhere?

Tags (1)
0 Kudos
13 Replies

2,904 Views
sanu
Contributor I

Hi

we are using imx53 loco board with micron MT29F8G08ABABA nand flash as boot device in EIM pads and  blown the fuses in order to boot from nand flash .Downloaded the image to nand flash using the mfg tool was successful. when reboot the device u-boot cannot able to identify the nand flash .

we have done some debugging when send the readid command to get nand info nothing is getting ..

u-boot log

U-Boot 2009.08 (Jul 30 2012 - 08:12:43)

CPU:   Freescale i.MX53 family 2.1V at 1000 MHz
mx53 pll1: 1000MHz
mx53 pll2: 400MHz
mx53 pll3: 432MHz
mx53 pll4: 455MHz
ipg clock     : 66666666Hz
ipg per clock : 33333333Hz
uart clock    : 66666666Hz
cspi clock    : 108000000Hz
ahb clock     : 133333333Hz
axi_a clock   : 400000000Hz
axi_b clock   : 200000000Hz
emi_slow clock: 133333333Hz
ddr clock     : 400000000Hz
esdhc1 clock  : 80000000Hz
esdhc2 clock  : 80000000Hz
esdhc3 clock  : 80000000Hz
esdhc4 clock  : 80000000Hz
nfc clock     : 33333333Hz
Board: MX53-LOCO 1.0 Rev. A
Boot Reason: [POR]
Boot Device: NAND
I2C:   ready
DRAM:   1 GB
NAND:  REG_NFC_INTRRUPT: 706D2EFF
REG_NFC_INTRRUPT: 706DAEFF
REG_NFC_SP_EN: FFE00000
REG_NFC_SP_EN: FFE00000
REG_NFC_ECC_EN 706DAEFF
REG_NFC_ECC_EN 706DAEFF
REG_NFC_ONE_CYCLE : 706DAEFF
REG_NFC_ONE_CYCLE : 706DAEFF
NFC_CONFIG3 20608
NFC_CONFIG3 20608
 nand_get_flash_type
send_cmd_atomic_else
send_cmd_atomic_fun
mxc_do_addr_cycle_atomic2
REG_NFC_OPS 0
 NAND device maf_id 0
 NAND device dev_id 0
send_cmd_atomic_else
send_cmd_atomic_fun
mxc_do_addr_cycle_atomic2
REG_NFC_OPS 0
 NAND device type -442503140
No NAND device found!!!
0 MiB
MMC:
relocate1:   *** Warning - bad CRC, using default environment

relocate2:   relocate_end:   In:    serial
Out:   serial
Err:   serial
Net:   got MAC address from IIM: 00:00:00:00:00:00
FEC0 [PRIME]
Hit any key to stop autoboot:  0
FEC: enable RMII gasket
PHY indentify @ 0x0 = 0x0181b8b0

0 Kudos

2,904 Views
peterliu1
Contributor I

Hi, the uboot cannot run is that i.MX53 ROM code requires the image size of UBOOT is NAND Flash page size aligned.

Note, the result is base on K9G8G08U0M, but for 29F8G08ABABA, following your advice the kernel cannot identify it yet. that is, use cat /proc/mtd, there is no result.

0 Kudos

2,904 Views
HenriBragge
Contributor I

Peter:

What do you mean you "cannot interact" with board? Can't type anything from serial port?

I had to copy the nand_device_info entry of my NAND chip (0x2c/0xda) to another table in linux/drivers/mtd/nand_device_info.c. After I had copied the entry to table_type_7, then Linux was able to recognize my NAND chip. I did exactly the same in U-boot too, so I could read kernel from NAND in U-boot.

0 Kudos

2,904 Views
peterliu1
Contributor I

Hi, following your advice and way, I meet the some problems in NAND boot based on iMx53 ARD RevB board,  but my Nand Chip is Samsung's K9G8G08UOM which is 4-bit ECC too.  When I power up the board, I get the logs from COM as attatched and cannot interact with board.

I can't find where are incorrect, can you give me some advice? thanks.

More, when I insert Nand Chip K9G8G08UOM, I cannot find this device form linux system, so I cannot download uboot.bin to it. Why can I not detect it? it need initialization firstly?

0 Kudos

2,904 Views
HenriBragge
Contributor I

I took a closer look at DIP settings, and I indeed had incorrect Page Size and ECC settings. With the following settings I was able to boot from my NAND chip:

BOOT_CFG1[7] / DIP 10: Boot Device Selection = 1 (NAND)
BOOT_CFG1[6] / DIP 9: Muxed on PATA/EIM = 1 (EIM)
BOOT_CFG1[5:4] / DIP 8:7: Interleaving scheme = 00 (No interleaving)
BOOT_CFG1[3:2] / DIP 6:R673: Address cycles = 10 (5)
BOOT_CFG2[7:6] / DIP 5:4: Page Size = 01 (2048 + 64 Bytes, 4-bit ECC)
BOOT_CFG2[5] / DIP 3: NAND if bus width = 0 (8bit)
BOOT_CFG3[5] / DIP 2: NAND R/B signals = 0 (no R/B)
BOOT_CFG3[4:3] DIP 1:R676: ECC / Spare select = 00 (4bit ECC)

In short form (from dip 0 to 10):
0001010011

0 Kudos

2,904 Views
HenriBragge
Contributor I

I think I will stay with SD boot for now instead of burning fuses. Thanks for all this information, you have both been very helpful!

0 Kudos

2,904 Views
mdc
Contributor V

Recommend you have a look at this post:

http://imxcommunity.org/group/imx53hardwaredesign/forum/topics/flashing-nand-with-ubifs-and-burning-...

The NAND referenced is not exactly the same as the one you're using, but pretty close and if you check the datasheets you might find the address cycles/page size/etc... are the same.

I was able to boot on the ARD with the NAND referenced at the above post (writing as described with kobs-ng) with the following boot settings:

BOOT_CFG1[3:2] = 10 (5 address cycles)

BOOT_CFG2[7:6] = 11 (Page size = 4kb + 218 bytes)

BOOT_CFG3[4:3] = 10 (ECC / Spare select = 16-bit ECC)

0 Kudos

2,904 Views
HenriBragge
Contributor I

I followed that guide (with a difference that I used "--chip_0_device_path=/dev/mtd0" instead of "--chip_0_device_path=/dev/mtd2", I should point that to bootloader shouldn't I?), but that lead to same result as in my previous message.

0 Kudos

2,904 Views
VladanJovanovic
NXP Employee
NXP Employee

Did you check file named README_MX53_NAND_BOOT.pdf in the documentation package for Linux BSP? I think there's quite detailed description of how to get started with NAND...

0 Kudos

2,904 Views
HenriBragge
Contributor I

Ok, I tried to init NAND with kobs-ng and the same u-boot binary. Now NAND seems to contain totally different data (definitely different than chapter 7.6 says). Boot is still not successful.

I attached the commands I used to erase and initialize NAND. What is it that I'm still doing wrong?

0 Kudos

2,904 Views
VladanJovanovic
NXP Employee
NXP Employee

I don't think writing binary from u-boot will work, as you'll be missing FCB and DBBT tables. You'll probably have to program it using kobs-ng tool from a running i.MX53 target. So boot from SD-card and use kobs-ng to write the correct binary to NAND.

0 Kudos

2,904 Views
HenriBragge
Contributor I

Thanks for quick response.

I attached file of commands I used for flashing U-boot binary to NAND (from U-boot). Nand dump output is similar when compared to hexdump of the binary file (with different endianness). Same binary works when flashed to SD card. To me the nand dump also looks similar to chapter 7.6, from what I can tell..

0 Kudos

2,904 Views
VladanJovanovic
NXP Employee
NXP Employee

How did you program the image to NAND? If you do a memory dump of NAND content, is it formatted as described in Chapter 7.6 of i.MX53 Ref. Manual?

0 Kudos