2010-03-27 08:51:15     Micron 2Gb (256MB) NAND flash problem

Document created by Aaronwu Employee on Sep 25, 2013
Version 1Show Document
  • View in full screen mode

2010-03-27 08:51:15     Micron 2Gb (256MB) NAND flash problem

Muhammad Ali (PAKISTAN)

Message: 87757   


i have a custom bf537 board, with 256MB Nand flash from Micron (MT29F2G08AABWP), am using u-boot 2009.11.1 .


I ported it for my board using STAMP Bf537 board configs as reference and following the guide as given on documentation pages.


All is fine except that my NAND flash sometimes get recognized but sometimes it fails to do so, i've traced it to that double identity read in nand_get_flash_type() function in nand_base.c . can anyone tell whats going wrong ?




relevant part of my config file is :






#define CONFIG_SYS_NAND_BASE 0x20000000



#define BFIN_NAND_CLE(chip) ((unsigned long)(chip)->IO_ADDR_W | (1 << 2))

#define BFIN_NAND_ALE(chip) ((unsigned long)(chip)->IO_ADDR_W | (1 << 1))


#define BFIN_NAND_WRITE(addr, cmd) \

do { \

bfin_write8(addr, cmd); \

SSYNC(); \

} while (0)


#define NAND_PLAT_WRITE_CMD(chip, cmd) BFIN_NAND_WRITE(BFIN_NAND_CLE(chip), cmd)

#define NAND_PLAT_WRITE_ADR(chip, cmd) BFIN_NAND_WRITE(BFIN_NAND_ALE(chip), cmd)

#define NAND_PLAT_DEV_READY(chip) (bfin_read_PORTFIO() & BFIN_NAND_READY)

#define NAND_PLAT_INIT() \

do { \

bfin_write_PORTF_FER(bfin_read_PORTF_FER() & ~BFIN_NAND_READY); \

bfin_write_PORTFIO_DIR(bfin_read_PORTFIO_DIR() & ~BFIN_NAND_READY); \

bfin_write_PORTFIO_INEN(bfin_read_PORTFIO_INEN() | BFIN_NAND_READY); \

} while (0)



also, how do i disable NOR flash thats in stamp config file ?  if i use CONFIG_SYS_NO_FLASH , it never compiles.




2010-03-27 15:00:05     Re: Micron 2Gb (256MB) NAND flash problem

Mike Frysinger (UNITED STATES)

Message: 87759   


if enabling the debug code in the common NAND drivers doesnt really help, then you might want to ask the NAND maintainer via the u-boot mailing list.  we dont really poke that layer of code too often.


as for the parallel flash, please read the documentation: