Skip to content

Instantly share code, notes, and snippets.

@naseef
naseef / gist:aa6890b30e48fb02adc8884f8447f6b3
Created February 6, 2026 06:26
422-mtd-nand-realtek-ecc-support-oob-size-override.patch
mtd: nand: realtek-ecc: support OOB size override from device tree
Some NAND chips have a physical OOB size larger than what vendor
firmware actually uses for its ECC layout. For example the Macronix
MX35LF1G24AD found in Netlink HG323DAC has 128 byte OOB but vendor
firmware only uses the first 64 bytes for the BCH6 ECC layout. The
Realtek ECC engine strictly validates flash geometry against its
supported configuration which causes probe failure on these chips.
Add support for a "realtek,ecc-oob-size" device tree property on the