From 84a527417d71bcad02b1d456bfd736e336cf19a3 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Mon, 8 Apr 2024 17:46:33 +0100 Subject: [PATCH] mediatek: improve reliability of Fidelix/Dosilicon SPI-NAND Prior to performing a PROGRAM LOAD RANDOM DATA operation, a WRITE ENABLE (06h) command must be issued to change the contents of the memory array. Following a WRITE ENABLE (06) command, **first a PROGRAM LOAD (02h or 32h) command must be issued to reset the cache**, then issue a PROGRAM LOAD RANDOM DATA (84h or 34h) command This is dirty fix provided to use by MediaTek engineer Sky Huang which may resolve the "OpenWrt Kiss of Death" issue we've been seeing on the Linksys E8450 aka. Belkin RT3200. However, it means that everything has to be re-written with that patch already applied, ie. we need to rebuild the installer once it is part of snapshot builds to have any effect. Users already on FIP-in-UBI layout are advised to re-write 'fip' UBI volume and 'bl2' MTD partition manually once from within Linux after this fix has been applied. A similar fix will also be required for U-Boot. Signed-off-by: Daniel Golle --- ...340-mtd-spinand-Add-support-for-the-Fidelix-FM35X1GA.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/mediatek/patches-6.6/340-mtd-spinand-Add-support-for-the-Fidelix-FM35X1GA.patch b/target/linux/mediatek/patches-6.6/340-mtd-spinand-Add-support-for-the-Fidelix-FM35X1GA.patch index 7188c254ba..22408b9273 100644 --- a/target/linux/mediatek/patches-6.6/340-mtd-spinand-Add-support-for-the-Fidelix-FM35X1GA.patch +++ b/target/linux/mediatek/patches-6.6/340-mtd-spinand-Add-support-for-the-Fidelix-FM35X1GA.patch @@ -57,8 +57,8 @@ Signed-off-by: Davide Fioravanti + 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 fm35x1ga_ooblayout_ecc(struct mtd_info *mtd, int section, + struct mtd_oob_region *region) -- 2.30.2