NAND flash interface is different with NOR flash, NOR flash is memory mapped device, NAND device is interfaced serially via a complicated I/O interface.
If you want to change to other NAND flash device, please pay attention to the following configuration in the header file include/configs/p1_p2_rdb_pc.h.
#define CONFIG_SYS_NAND_BASE 0xff800000
#define CONFIG_SYS_NAND_BLOCK_SIZE (16 * 1024)
#define CONFIG_SYS_NAND_BR_PRELIM (BR_PHYS_ADDR(CONFIG_SYS_NAND_BASE_PHYS) \
| (2<<BR_DECC_SHIFT) /* Use HW ECC */ \
| BR_PS_8 /* Port Size = 8 bit */ \
| BR_MS_FCM /* MSEL = FCM */ \
| BR_V) /* valid */
#define CONFIG_SYS_NAND_OR_PRELIM (OR_AM_32KB /* small page */ \
| OR_FCM_CSCT \
| OR_FCM_CST \
| OR_FCM_CHT \
| OR_FCM_SCY_1 \
| OR_FCM_TRLX \
| OR_FCM_EHTR)
Have a great day,
Yiping Wang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------