mediatek: add work-around for ASUS bootloader MTD behavior
authorDaniel Golle <daniel@makrotopia.org>
Thu, 6 Feb 2025 05:17:54 +0000 (05:17 +0000)
committerDaniel Golle <daniel@makrotopia.org>
Sat, 15 Feb 2025 16:47:57 +0000 (16:47 +0000)
commitc48afca32ca875c4176b4c41be94335e61556783
tree536126a6858ee61e77c09925e787ec052a71f770
parent054bdc78772846bd9dee5544662bcaa47dc54fe9
mediatek: add work-around for ASUS bootloader MTD behavior

ASUS makes use of U-Boot's fdt_fixup_mtdparts() function which applies
the partitions defined in U-Boot's mtdparts and mtdids environment
variables to the devicetree passed over to Linux.

The undesired side-effect is that in this way also all additional
properties and child nodes get wiped, preventing NVMEM cells to be
defined for MTD partitions or UBI volumes.

To work-around this issue, add an additional compatible string
'u-boot-dont-touch-spi-nand' which can be used instead of 'spi-nand' in
case the replacement of the MTD partitions by U-Boot should be skipped
alltogether.

In practise this is mostly relevant for SPI-NAND which anyway comes only
with two partitions nowadays: 'Bootloader' and 'UBI_DEV'. Hence this
work-around is applicable for SPI-NAND only. Similar work-arounds for
other MTD devices can be created as well should they actually be needed.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
target/linux/mediatek/patches-6.6/960-asus-hack-u-boot-ignore-mtdparts.patch [new file with mode: 0644]