Specifications

420000c0: 00000000 00000000 00000000 00000000 ................
420000d0: 00000000 00000000 00000000 00000000 ................
420000e0: 00000000 00000000 00000000 00000000 ................
420000f0: 00000000 00000000 00000000 00000000 ................
=>
5.9.9.2. NAND devices
U-Boot allows us to directly work with NAND devices attached directly or through a NAND controller. The
commands are grouped under the nand subsystem:
=> help nand
nand - NAND sub-system
Usage:
nand info - show available NAND devices
nand device [dev] - show or set current device
nand read - addr off|partition size
nand write - addr off|partition size
read/write 'size' bytes starting at offset 'off'
to/from memory address 'addr', skipping bad blocks.
nand read.raw - addr off|partition [count]
nand write.raw - addr off|partition [count]
Use read.raw/write.raw to avoid ECC and access the flash as-is.
nand erase[.spread] [clean] off size - erase 'size' bytes from offset 'off'
With '.spread', erase enough for given file size, otherwise,
'size' includes skipped bad blocks.
nand erase.part [clean] partition - erase entire mtd partition'
nand erase.chip [clean] - erase entire chip'
nand bad - show bad blocks
nand dump[.oob] off - dump page
nand scrub [-y] off size | scrub.part partition | scrub.chip
really clean NAND erasing bad blocks (UNSAFE)
nand markbad off [...] - mark bad block(s) at offset (UNSAFE)
nand biterr off - make a bit error at offset (UNSAFE)
=>
5.9.9.2.1. nand bad - show bad block information
As NAND devices can develop bad blocks over their lifetime and usually even are delivered with bad blocks
already, the NAND commands need to be aware of this fact. Getting information of the current bad block list
is easy:
=> nand bad
Device 0 bad blocks:
=>
5.9.9.2.2. nand erase - erase region
Ensuring that the NAND device functions properly, we will use the basic commands to construct a testpattern
in memory, write that to the device, of course erasing it first, and read the data back. A final comparison will
show if all data was transferred correctly.
We begin be erasing 64k at the start of the NAND device:
=> nand erase 0x00400000 0x10000
5.9.9.2. NAND devices 76