[openwrt/openwrt] mediatek: apply bootloader work-around for affected ASUS devices

LEDE Commits lede-commits at lists.infradead.org
Sat Feb 15 08:48:42 PST 2025


dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4387de94454913aa79bb88971eabcf1bfca78141

commit 4387de94454913aa79bb88971eabcf1bfca78141
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Mon Feb 10 23:18:46 2025 +0000

    mediatek: apply bootloader work-around for affected ASUS devices
    
    Apply "u-boot-dont-touch-spi-nand" to ASUS RT-AX59U, ASUS TUF-AX4200 as
    well as ASUS TUF-AX6000 routers to prevent U-Boot from wiping MTD
    child nodes from DT.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 target/linux/mediatek/dts/mt7986a-asus-rt-ax59u.dts   | 4 ++--
 target/linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts | 4 ++--
 target/linux/mediatek/dts/mt7986a-asus-tuf-ax6000.dts | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/target/linux/mediatek/dts/mt7986a-asus-rt-ax59u.dts b/target/linux/mediatek/dts/mt7986a-asus-rt-ax59u.dts
index 0034ad8284..7e0c05618f 100644
--- a/target/linux/mediatek/dts/mt7986a-asus-rt-ax59u.dts
+++ b/target/linux/mediatek/dts/mt7986a-asus-rt-ax59u.dts
@@ -210,7 +210,7 @@
 	status = "okay";
 
 	spi_nand: flash at 0 {
-		compatible = "spi-nand";
+		compatible = "u-boot-dont-touch-spi-nand";
 		reg = <0>;
 		#address-cells = <1>;
 		#size-cells = <1>;
@@ -224,7 +224,7 @@
 		 * Device Tree and by that also deletes all additional properties
 		 * needed for UBI and NVMEM-on-UBI.
 		 * Prevent this from happening by tricking the loader to delete and
-		 * replace a bait node instead.
+		 * replace a bait node instead (works with older bootloaders).
 		 */
 		partitions: dummy {
 			compatible = "u-boot-dummy-partitions";
diff --git a/target/linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts b/target/linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts
index 9f015cca9b..f055118398 100644
--- a/target/linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts
+++ b/target/linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts
@@ -217,7 +217,7 @@
 	status = "okay";
 
 	spi_nand_flash: flash at 0 {
-		compatible = "spi-nand";
+		compatible = "u-boot-dont-touch-spi-nand";
 		#address-cells = <1>;
 		#size-cells = <1>;
 		reg = <0>;
@@ -231,7 +231,7 @@
 		 * Device Tree and by that also deletes all additional properties
 		 * needed for UBI and NVMEM-on-UBI.
 		 * Prevent this from happening by tricking the loader to delete and
-		 * replace a bait node instead.
+		 * replace a bait node instead (works with older bootloaders).
 		 */
 		partitions: dummy {
 			compatible = "u-boot-dummy-partitions";
diff --git a/target/linux/mediatek/dts/mt7986a-asus-tuf-ax6000.dts b/target/linux/mediatek/dts/mt7986a-asus-tuf-ax6000.dts
index 957d8deebb..9a0f7594c9 100644
--- a/target/linux/mediatek/dts/mt7986a-asus-tuf-ax6000.dts
+++ b/target/linux/mediatek/dts/mt7986a-asus-tuf-ax6000.dts
@@ -231,7 +231,7 @@
 	status = "okay";
 
 	spi_nand_flash: flash at 0 {
-		compatible = "spi-nand";
+		compatible = "u-boot-dont-touch-spi-nand";
 		reg = <0>;
 		#address-cells = <1>;
 		#size-cells = <1>;
@@ -245,7 +245,7 @@
 		 * Device Tree and by that also deletes all additional properties
 		 * needed for UBI and NVMEM-on-UBI.
 		 * Prevent this from happening by tricking the loader to delete and
-		 * replace a bait node instead.
+		 * replace a bait node instead (works with older bootloaders).
 		 */
 		partitions: dummy {
 			compatible = "u-boot-dummy-partitions";




More information about the lede-commits mailing list