ONFI parameters parser breaks reading S34ML04G200TF100 data from old kernels
Rafał Miłecki
zajec5 at gmail.com
Mon Aug 31 15:03:17 PDT 2026
Hi!
I've Broadcom SoC with Broadcom NAND controller v7.1. It has NAND
flash S34ML04G200TF100 attached. Datasheet for S34ML04G2 that I found
claims that 4 Gbit (512 MiB) version has 128 B spare space.
U-Boot and kernels 5.4, 5.15, 6.6 believe that above chips has 64 B OOB:
Could not find a valid ONFI parameter page, trying bit-wise majority
to recover it
ONFI parameter recovery failed, aborting
nand: device found, Manufacturer ID: 0x01, Chip ID: 0xdc
nand: AMD/Spansion NAND 512MiB 3,3V 8-bit
nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
Kernel 6.12 however doesn't err about ONFI and detects 128 M OOB:
nand: device found, Manufacturer ID: 0x01, Chip ID: 0xdc
nand: AMD/Spansion S34ML04G2
nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 128
which results in:
[ 0.772002] bcmbca_nand ff801800.nand-controller: uncorrectable
error at 0x200
[ 0.780339] bcmbca_nand ff801800.nand-controller: uncorrectable
error at 0xa00
[ 0.788680] bcmbca_nand ff801800.nand-controller: uncorrectable
error at 0x1f800
[ 0.797201] bcmbca_nand ff801800.nand-controller: uncorrectable
error at 0x20000
I guess newer kernels do the right discovery thing but at the same
time they don't work with data written by U-Boot or older kernels.
I'm wondering if there is some sane way to deal with this? Assuming
there are devices in production with data written with old U-Boot and
Linux kernels?
--
Rafał
More information about the linux-mtd
mailing list