mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-13 19:48:16 +04:00
The FM25G01B/FM25G02B datasheets specify a single dummy byte for the
0xEB Quad I/O read-from-cache, but the generic read_cache_variants set
issues two. The extra dummy byte shifts the data phase and returns
corrupted data with no ECC error, breaking boot on NC-1812/KN-1812.
Use a dedicated read-from-cache variant set with ndummy=1 for 0xEB.
Both the FM25G{01,02}B support (d5a5c9eb2ee9) and this fix
(8211f2d74b35) were merged into the mtd tree (nand/next). Backport both
patches to backport-6.12 using the actual upstream commits, so they
apply to the OpenWrt kernel tree and upstream nand/next as is.
FM25G01B datasheet: https://www.fmsh.com/nvm/FM25G01B_ds_eng.pdf
FM25G02B datasheet: https://www.fmsh.com/nvm/FM25G02B_ds_eng.pdf
Signed-off-by: Aleksandr Mineev <sanderrrs@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24007
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
(cherry picked from commit 6b98618527)
[Adapted to the SPI-NAND read-from-cache op API used before the
SPINAND_PAGE_READ_FROM_CACHE_1S_4S_4S_OP-style rename: kernel 6.12
still uses SPINAND_PAGE_READ_FROM_CACHE_QUADIO_OP/_X4_OP/_DUALIO_OP/
_X2_OP/_OP instead.]
Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24781
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>