We have a custom board - largely based upon the NXP LS1043A-RGW Development board
Due to the parts availability, the NAND is 512MB instead of 128MB.
The device tree for the Development board puts the memory in a weird spot, this is the
u-boot version (difference with the linux version is that it defines the partition:
status = "okay";
#address-cells = <2>;
#size-cells = <1>;
/* NAND Flash on board 128MB */
ranges = <0x0 0x0 0x0 0x7e800000 0x00010000>;
compatible = "fsl,ifc-nand";
#address-cells = <1>;
#size-cells = <1>;
reg = <0x1 0x0 0x10000>;
Question 1: Maybe I don't understand something here - but 0x7e800000 + 512MB would put the
memory space into DDR?
But, U-Boot isn't using the NAND, so it continues to boot linux. This is the relevant part of the boot log for NAND
[ 2.588917] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xac
[ 2.595485] nand: Micron MT29F4G08ABBFAH4
[ 2.599746] nand: 512 MiB, SLC, erase size: 256 KiB, page size: 4096, OOB size: 256
[ 2.607423] nand: WARNING: 7e800000.flash: the ECC used on your system is too weak compared to the one required by the NAND chip
[ 2.620121] Bad block table not found for chip 0
[ 2.625787] Bad block table not found for chip 0
[ 2.630399] Scanning device for bad blocks
[ 2.634542] Bad eraseblock 0 at 0x000000000000
[ 2.639031] Bad eraseblock 1 at 0x000000040000
[ 12.241291] Bad eraseblock 2042 at 0x00001fe80000
[ 12.246040] Bad eraseblock 2043 at 0x00001fec0000
[ 12.250789] Bad eraseblock 2044 at 0x00001ff00000
[ 12.255538] Bad eraseblock 2045 at 0x00001ff40000
[ 12.260287] Bad eraseblock 2046 at 0x00001ff80000
[ 12.265035] Bad eraseblock 2047 at 0x00001ffc0000
[ 12.269734] No space left to write bad block table
[ 12.274518] nand_bbt: error while writing bad block table -28
[ 12.280270] fsl,ifc-nand: probe of 7e800000.nand failed with error -28
[ 12.287152] ------------[ cut here ]------------
[ 12.291758] kernel BUG at /home/tom/lsdk/packages/linux/linux/drivers/base/devres.c:105!
Question 2: Is this the result of not having the nand located correctly.
Question 3: If I need to change the location, I know I will have to change in device tree, but
it seems that 0x7e800000 is in config files (at least in u-boot).
Question 4: How do I change the size in the device tree for this NAND Device?
Thanks in advance!