I has modified i.mx53 u-boot(mx53_loco) SD3 to NandF, delete the SD3's initialization and add the NandF initialization, the codes like this:
mxc_request_iomux(MX53_PIN_NANDF_WE_B, IOMUX_CONFIG_ALT0);
mxc_request_iomux(MX53_PIN_NANDF_RE_B, IOMUX_CONFIG_ALT0);
mxc_request_iomux(MX53_PIN_NANDF_CLE, IOMUX_CONFIG_ALT0);
mxc_request_iomux(MX53_PIN_NANDF_ALE, IOMUX_CONFIG_ALT0);
mxc_request_iomux(MX53_PIN_NANDF_WP_B, IOMUX_CONFIG_ALT0);
mxc_request_iomux(MX53_PIN_NANDF_RB0, IOMUX_CONFIG_ALT0);
mxc_request_iomux(MX53_PIN_NANDF_CS0, IOMUX_CONFIG_ALT0);
mxc_request_iomux(MX53_PIN_ATA_DATA0, IOMUX_CONFIG_ALT3);
mxc_request_iomux(MX53_PIN_ATA_DATA1, IOMUX_CONFIG_ALT3);
mxc_request_iomux(MX53_PIN_ATA_DATA2, IOMUX_CONFIG_ALT3);
mxc_request_iomux(MX53_PIN_ATA_DATA3, IOMUX_CONFIG_ALT3);
mxc_request_iomux(MX53_PIN_ATA_DATA4, IOMUX_CONFIG_ALT3);
mxc_request_iomux(MX53_PIN_ATA_DATA5, IOMUX_CONFIG_ALT3);
mxc_request_iomux(MX53_PIN_ATA_DATA6, IOMUX_CONFIG_ALT3);
mxc_request_iomux(MX53_PIN_ATA_DATA7, IOMUX_CONFIG_ALT3);
Then I connect a nandflash K9F2G08U0A with Samsung. Launch the board, we can see the nandflash's message like this:
NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-bit)
Manufacturer : Samsung (0xec)
Device Code : 0xda
Cell Technology : SLC
Chip Size : 256 MiB
Pages per Block : 64
Page Geometry : 2048+64
ECC Strength : 4 bits
ECC Size : 512 B
Data Setup Time : 20 ns
Data Hold Time : 10 ns
Address Setup Time: 20 ns
GPMI Sample Delay : 6 ns
tREA : Unknown
tRLOH : Unknown
tRHOH : Unknown
Description : K9F2G08U0A
Bad block table found at page 131008, version 0x01
Bad block table found at page 130944, version 0x01
nand_read_bbt: Bad block at 0x00000f840000
256 MiB
But when SD1 read, the system has halted. If I disconnect the nandflash the system has normally to go to the kernel. What is the problem? Thanks!
Solved! Go to Solution.
Please read the attached document about NAND support in i.MX53. In u-boot source code, there is a patch called 0170-ENGR00132617-MX53-add-NAND-support.patch. It adds the NAND support for i.MX53EVK and i.MX53ARD boards. So you can read the patch contents and read the mx53_ard.c. This will help you to know how to add the NAND support for your own board.
Please read the attached document about NAND support in i.MX53. In u-boot source code, there is a patch called 0170-ENGR00132617-MX53-add-NAND-support.patch. It adds the NAND support for i.MX53EVK and i.MX53ARD boards. So you can read the patch contents and read the mx53_ard.c. This will help you to know how to add the NAND support for your own board.