[openwrt/openwrt] mediatek: improve reliability of Fidelix/Dosilicon SPI-NAND

LEDE Commits lede-commits at lists.infradead.org
Wed Jun 5 13:06:07 PDT 2024


dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/84a527417d71bcad02b1d456bfd736e336cf19a3

commit 84a527417d71bcad02b1d456bfd736e336cf19a3
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Mon Apr 8 17:46:33 2024 +0100

    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 <daniel at makrotopia.org>
---
 .../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 <pantanastyle at gmail.com>
 +		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)




More information about the lede-commits mailing list