So I've been having some difficulties getting my board to boot from NAND.
I have a working customized u-boot that I can load and run just fine using the serial loader or through JTAG.
I have burned the fuses on to the i.mx536 to boot from NAND as follows:
0x80C BOOT_CFG1 = 0xC8 (boot from nand on EIM pins, no interleaving, 5 address cycles)
0x810 BOOT_CFG2 = 0x80 (4KB + 128B with 4-bit ECC, 8-bit bus width, AXI = DDR / 12)
0x814 BOOT_CFG3 = 0x02 (stride size = 1 block, non LBA, no R/B signals, automatic ECC, 64 pages / block)
0x804 BT_FUSE_SEL = 1
With these settings, I have previously hooked up my oscilloscopes digital signal inputs to the bus and I can see that the ROM appears to be correctly reading at least some of the data.
To write my u-boot to flash, I am use the following command on a pretty much virgin nand flash chip:
kobs-ng init -v u-boot.imx
This command completes and if I do a hexdump of /dev/mtd0 I see what looks like sensible data.
After rebooting the board to attempt to boot from flash, it seems like the ROM is loading the image and possibly attempting to run it, but I get no output on my serial console and it doesn't seem to boot. It also does not fall back to the serial boot, which seems to indicate that it is finding what it thinks is a valid image and attempting to run it unsuccessfully.
The strange thing is that when I connect my JTAG to the board that has tried to boot from flash, I cant get it to halt. The only way I can get it to boot again is to switch from Boot Mode 10 to boot mode 11 which allows me to serial boot again. Once booted if I go in and erase the flash and try to boot again from NAND, the ROM functions correctly and falls through to the serial boot when it doesn't find a valid FCB.
I suspect it might have something to do with the DCD. When I am booting from serial or from the JTAG, it first loads the DCD from the u-boot image and then loads the actual image into memory where it can then execute. How does this happen during NAND flash boot? How can the ROM load the program image to DDR memory when the memory has yet to be initialized?