Incorrect detection of Micron MT29F32G08

Gupta, Pekon pekon at ti.com
Tue Sep 17 08:30:34 EDT 2013


> 
> Hi,
> I've faced a problem with the Micron NAND MT29F32G08,
> which is 4GiBs, 8K blocks per LUN, 224b OOB, 512K erase size,
> has two planes 4k blocks each. In the kernel (I use v3.0.35)
> it is detected as 2GiB device. Only when I disable part of the
> code which belongs to ONFI detection, add definition for this
> device in nand_ids.c (device has id=0x48), add 224b OOB table,
> I can see that it's a 4GiBs device, but when I'm trying formatting
> the largest partition (I have 4 partitions - barebox, env, kernel,
> rootfs <- the largest) - it drops an I/O error about bad blocks
> (I did scan and mark all bad blocks before)...
> It seems to me that the amount of pages per lun is not detected
> correctly which leads to incorrect detection of device's size etc. Bad
> thing is that the datasheet for a/m NAND doesn't contain what
> are the values from NAND-device registers mean (or I missed something).
> Could you please suggest where to dig?
> 
You can try printing values of following towards end of
nand_scan_tail() in drivers/mtd/nand/nand_base.c
- mtd->writesize
- mtd->erasesize
- mtd->oobsize

Too many bad block on new device usually happen due to:
(1) wrong ecc.layout in nand driver
	Use following command to dump ecc.layout
	'nanddump -p -N -n -s <offset> -l <page_size> </dev/mtdx>

(2) incorrect pin-mux (like muxing only AD[7:0] instead of AD[15:0]
	(usually case with x16 devices, but yours is x8)

However, once bad-blocks are detected, they are marked
permanently, So you need to use 'nand scrub' command at u-boot to
clear off all Bad-block markers before testing next time.

with regards, pekon



More information about the linux-mtd mailing list