[U-Boot] omap3 nand boot issue
Maxim Podbereznyy
lisarden at gmail.com
Tue Aug 12 19:32:21 CEST 2014
Hi!
I have a custom board based on OMAP3530 with Micron MT29F2G16ABBEAH4-IT:E
nand flash installed. The problem is that when I flash MLO/u-boot.img to
NAND the CPU does not boot from this NAND although it boots fine from a 2Gb
NAND used in previous configurations.
Here is what u-boot knows about the new NAND:
Device 0: nand0, sector size 256 KiB
Page size 4096 b
OOB size 128 b
Erase size 262144 b
When looking at the configuration file "include/configs/omap3_beagle.h" I
can see the following about the NAND configuration:
/* NAND boot config */
#define CONFIG_SYS_NAND_5_ADDR_CYCLE
#define CONFIG_SYS_NAND_PAGE_COUNT 64
#define CONFIG_SYS_NAND_PAGE_SIZE 2048
#define CONFIG_SYS_NAND_OOBSIZE 64
#define CONFIG_SYS_NAND_BLOCK_SIZE (128*1024)
#define CONFIG_SYS_NAND_BAD_BLOCK_POS 0
#define CONFIG_SYS_NAND_ECCPOS {2, 3, 4, 5, 6, 7, 8, 9,\
10, 11, 12, 13}
#define CONFIG_SYS_NAND_ECCSIZE 512
#define CONFIG_SYS_NAND_ECCBYTES 3
#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE
#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000
Apparently this configuration is absolutely wrong because my NAND has the
following organization (the nand is x16):
– Page size x8: 4320 bytes (4096 + 224 bytes)
– Page size x16: 2160 words (2048 + 112 words)
– Block size: 64 pages (256K + 14K bytes)
– Plane size: 2 planes x 2048 blocks per plane
– Device size: 8Gb: 4096 blocks
– Device size: 16Gb: 8192 blocks
As I understand the omap3 BOOT ROM simply ignores the NAND for an unknown
reason. I expect the ECC written along with MLO file is wrong and therefore
BOOT ROM ignores it. However I frankly have no idea if BOOT ROM actually
calculates the ECC. I guess it should so as not to run garbage code which
can jump to nowhere.
Can anybody recommend how to fix the current NAND code so as it gets
support for NAND with blocks 256k and pages 4k?
--
LinkedIn - http://www.linkedin.com/in/maximpodbereznyy
Company - http://www.linkedin.com/company/mentorel
Facebook - https://www.facebook.com/mentorel.company
More information about the U-Boot
mailing list