From 94f043bf87de3aa16d45b40bcb7a186d03dd8016 Mon Sep 17 00:00:00 2001 From: Dim Fish Date: Fri, 4 Jul 2025 11:50:35 +0300 Subject: [PATCH] uboot-mediatek: force update_cache_variants to use reset for Foresee NAND Force update_cache_variantsvariants to use reset for Foresee NAND with bad blocks. Tested on Xiaomi AX3000T + F35SQA001G with bad blocks and without bad blocks Signed-off-by: Dim Fish Link: https://github.com/openwrt/openwrt/pull/17963 Signed-off-by: Chuanhong Guo --- ...-mtd-spinand-fix-support-for-FORESEE.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 package/boot/uboot-mediatek/patches/101-03-mtd-spinand-fix-support-for-FORESEE.patch diff --git a/package/boot/uboot-mediatek/patches/101-03-mtd-spinand-fix-support-for-FORESEE.patch b/package/boot/uboot-mediatek/patches/101-03-mtd-spinand-fix-support-for-FORESEE.patch new file mode 100644 index 00000000000..48a6515b56a --- /dev/null +++ b/package/boot/uboot-mediatek/patches/101-03-mtd-spinand-fix-support-for-FORESEE.patch @@ -0,0 +1,19 @@ +Force update_cache_variants to use reset for Foresee NAND with bad blocks + +Tested on Xiaomi AX3000T + F35SQA001G with bad blocks and without bad blocks + +Signed-off-by: Dim Fish + +--- a/drivers/mtd/nand/spi/foresee.c ++++ b/drivers/mtd/nand/spi/foresee.c +@@ -22,8 +22,8 @@ static SPINAND_OP_VARIANTS(write_cache_v + SPINAND_PROG_LOAD(true, 0, NULL, 0)); + + static SPINAND_OP_VARIANTS(update_cache_variants, +- SPINAND_PROG_LOAD_X4(false, 0, NULL, 0), +- SPINAND_PROG_LOAD(false, 0, NULL, 0)); ++ SPINAND_PROG_LOAD_X4(true, 0, NULL, 0), ++ SPINAND_PROG_LOAD(true, 0, NULL, 0)); + + static int f35sqa002g_ooblayout_ecc(struct mtd_info *mtd, int section, + struct mtd_oob_region *region)