Hui Shao

U-boot Can't Access NAND on QSB based Customized Board

Discussion created by Hui Shao on Jun 22, 2012
Latest reply on Jun 25, 2012 by Hui Shao

Hi-

 

On a QSB based design, I have problem accessing NAND from u-boot command line.

 

NAND chip:

MT29F2G08ABBEAH4

• Single-level cell (SLC) technology

• Organization

– Page size x8: 2112 bytes (2048 + 64 bytes)

– Page size x16: 1056 words (1024 + 32 words)

– Block size: 64 pages (128K + 4K bytes)

– Plane size: 2 planes x 1024 blocks per plane

– Device size: 2Gb: 2048 blocks

 

iMX53 I/F:

PATA, WP# is tied to ground via 4k7, R/B# is pulled up to 1V8 via 4k7.

 

 

 

U-boot patched:

Patched u-boot source code by patches #0170-#0174.

 

In addition, I added the nand_device_info entry of my NAND chip (0x2c/0xaa) to table_type_7[] table in /drivers/mtd/nand/nand_device_info.c:

{
.end_of_table = false,
.manufacturer_code = 0x2c,
.device_code = 0xaa,
.cell_technology = NAND_DEVICE_CELL_TECH_SLC,
.chip_size_in_bytes = 256LL*SZ_1M,
.block_size_in_pages = 64,
.page_total_size_in_bytes = 2*SZ_1K + 64,
.ecc_strength_in_bits = 4,
.ecc_size_in_bytes = 512,
.data_setup_in_ns = 10,
.data_hold_in_ns = 5,
.address_setup_in_ns = 10,
.gpmi_sample_delay_in_ns = 6,
.tREA_in_ns = -1,
.tRLOH_in_ns = -1,
.tRHOH_in_ns = -1,
"MT29F2G08",
},

 

After bootup from SD card, I got:

MX53-CSSU U-Boot > nand device

Device 0: NAND 256MiB 1,8V 8-bit, sector size 128 KiB

 

However, I got following errors:

MX53-CSSU U-Boot > nand erase 0x20000 0x20000

NAND erase: device 0 offset 0x20000, size 0x20000

NAND 256MiB 1,8V 8-bit: MTD Erase failure: -5

OK

 

MX53-CSSU U-Boot > nand write 0xf8006000 0x0 0x20000

NAND write: device 0 offset 0x0, size 0x20000

nand_do_write_ops: Device is write protected

NAND write to offset 0 failed -5

0 bytes written: ERROR

 

MX53-CSSU U-Boot > nand read 0xf8006000 0x0 0x20000

NAND read: device 0 offset 0x0, size 0x20000

UnCorrectable RS-ECC Error

UnCorrectable RS-ECC Error

UnCorrectable RS-ECC Error

UnCorrectable RS-ECC Error

...

UnCorrectable RS-ECC Error

131072 bytes read: OK

 

Can anybody offer some hints on the problems above?

 

Thanks!


 

Outcomes