LS1043ARDB NAND not booting if program with cwflash.py
If boot from NOR and program NAND from uboot, it can boot from NAND without problem. Same NAND uboot image file (firmware_ls1043ardb_uboot_nandboot.img) is used for both scenario.
If program NOR with cwflash.py, it can boot from NOR.
Commands used are:
fl_erase 0x0 0x3214e40
fl_write 0x0 firmware_ls1043ardb_uboot_nandboot.img
My LS1043ARDB is SCH-39019 REV F. According to schematic, the NAND is MT29F4G08ABBDA. The dmesg also shows it's MT29F4G08ABBDA.
However, in Freescale\CW4NET_v2020.06\CW_ARMv8\Config\boards\LS1043A_RDB_init.py, it has an option
BOARD_REV_PD = True
with comment "LS1043A RDB-PD uses a new NAND flash device"
If BOARD_REV_PD = True, it use MT29F4G08ABBFAv1 instead of MT29F4G08ABBDAv1.
If BOARD_REV_PD = False, it use MT29F4G08ABBDAv1.
If BOARD_REV_PD = True is used, NAND program success (but verify failed) but unable to boot.
If BOARD_REV_PD = False is used, NAND program failed with error [FP: found bad block]