From: Daniel Golle Date: Thu, 16 Apr 2026 13:57:37 +0000 (+0100) Subject: mediatek: add missing patch description X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;ds=inline;p=thirdparty%2Fopenwrt.git mediatek: add missing patch description Add missing patch description, so all patches of the mediatek target can be applied to a kernel tree using 'git am'. Signed-off-by: Daniel Golle --- diff --git a/target/linux/mediatek/patches-6.12/100-dts-update-mt7622-rfb1.patch b/target/linux/mediatek/patches-6.12/100-dts-update-mt7622-rfb1.patch index a9232c9b970..311e62983f8 100644 --- a/target/linux/mediatek/patches-6.12/100-dts-update-mt7622-rfb1.patch +++ b/target/linux/mediatek/patches-6.12/100-dts-update-mt7622-rfb1.patch @@ -1,3 +1,14 @@ +From c46ccb69d17e584479df849a107423175a143c83 Mon Sep 17 00:00:00 2001 +From: Felix Fietkau +Date: Sat, 24 Oct 2020 21:15:20 +0200 +Subject: [PATCH] arm64: dts: mediatek: mt7622-rfb1: update copyright, fix bootargs and GPIO polarity + +Update the copyright header, add an explicit console= argument to the +chosen/bootargs property, and fix the GPIO polarity flags on the +factory and WPS button keys to use GPIO_ACTIVE_LOW. + +Signed-off-by: Felix Fietkau +--- --- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts @@ -1,7 +1,6 @@ diff --git a/target/linux/mediatek/patches-6.12/101-dts-update-mt7629-rfb.patch b/target/linux/mediatek/patches-6.12/101-dts-update-mt7629-rfb.patch index 05dc2583bb9..058b7076b3e 100644 --- a/target/linux/mediatek/patches-6.12/101-dts-update-mt7629-rfb.patch +++ b/target/linux/mediatek/patches-6.12/101-dts-update-mt7629-rfb.patch @@ -1,3 +1,14 @@ +From c46ccb69d17e584479df849a107423175a143c83 Mon Sep 17 00:00:00 2001 +From: Felix Fietkau +Date: Sat, 24 Oct 2020 21:15:20 +0200 +Subject: [PATCH] arm: dts: mediatek: mt7629-rfb: add earlycon/console bootargs and MAC address nvmem cells + +Add earlycon= and console= to chosen/bootargs, and wire the two Ethernet +MACs (gmac0, gmac1) to their respective MAC address stored in the factory +partition via nvmem-cells. + +Signed-off-by: Felix Fietkau +--- --- a/arch/arm/boot/dts/mediatek/mt7629-rfb.dts +++ b/arch/arm/boot/dts/mediatek/mt7629-rfb.dts @@ -18,6 +18,7 @@ diff --git a/target/linux/mediatek/patches-6.12/104-mt7622-add-snor-irq.patch b/target/linux/mediatek/patches-6.12/104-mt7622-add-snor-irq.patch index d15d989e973..1150758de16 100644 --- a/target/linux/mediatek/patches-6.12/104-mt7622-add-snor-irq.patch +++ b/target/linux/mediatek/patches-6.12/104-mt7622-add-snor-irq.patch @@ -1,3 +1,13 @@ +From 99cd44487e2e7205e1521a52faf498dfda6f100c Mon Sep 17 00:00:00 2001 +From: Chuanhong Guo +Date: Sat, 30 Apr 2022 20:24:07 +0800 +Subject: [PATCH] mediatek: mt7622: add irq for spi-nor controller + +Save some CPU from unnecessary polling and make SPI flash reading +a tiny bit faster. + +Signed-off-by: Chuanhong Guo +--- --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi @@ -575,6 +575,7 @@ diff --git a/target/linux/mediatek/patches-6.12/105-dts-mt7622-enable-pstore.patch b/target/linux/mediatek/patches-6.12/105-dts-mt7622-enable-pstore.patch index 3e36a503ed2..04aff0d6560 100644 --- a/target/linux/mediatek/patches-6.12/105-dts-mt7622-enable-pstore.patch +++ b/target/linux/mediatek/patches-6.12/105-dts-mt7622-enable-pstore.patch @@ -1,3 +1,13 @@ +From e1adb1fa39dd5ef97280ad1b2bb9e8ff4c43674f Mon Sep 17 00:00:00 2001 +From: Daniel Golle +Date: Fri, 7 May 2021 16:53:09 +0100 +Subject: [PATCH] arm64: dts: mediatek: mt7622: reserve memory for ramoops/pstore + +Reserve 64KiB of memory for crashlogs and enable PSTORE feature in +kernel config for MT7622. + +Signed-off-by: Daniel Golle +--- --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi @@ -135,6 +135,13 @@ diff --git a/target/linux/mediatek/patches-6.12/106-dts-mt7622-disable_btif.patch b/target/linux/mediatek/patches-6.12/106-dts-mt7622-disable_btif.patch index ac8594b3963..9faf83d7ed3 100644 --- a/target/linux/mediatek/patches-6.12/106-dts-mt7622-disable_btif.patch +++ b/target/linux/mediatek/patches-6.12/106-dts-mt7622-disable_btif.patch @@ -1,3 +1,12 @@ +From 50416c18dd309fec75b6911221905cd0c0139b25 Mon Sep 17 00:00:00 2001 +From: Felix Fietkau +Date: Thu, 21 Dec 2023 21:20:17 +0100 +Subject: [PATCH] mediatek: disable btif for mt7622 devices + +It breaks built-in SoC WLAN. Can be re-enabled after we've figured out the cause + +Signed-off-by: Felix Fietkau +--- --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts @@ -109,10 +109,6 @@ diff --git a/target/linux/mediatek/patches-6.12/110-dts-fix-bpi2-console.patch b/target/linux/mediatek/patches-6.12/110-dts-fix-bpi2-console.patch index d96d3b95810..2b5b8069e20 100644 --- a/target/linux/mediatek/patches-6.12/110-dts-fix-bpi2-console.patch +++ b/target/linux/mediatek/patches-6.12/110-dts-fix-bpi2-console.patch @@ -1,3 +1,13 @@ +From 25d9df670b850a4e3702e084ff249baa1670ae3f Mon Sep 17 00:00:00 2001 +From: Mark-MC Lee (李明昌) +Date: Mon, 10 Feb 2020 09:33:15 +0100 +Subject: [PATCH] arm: dts: mediatek: mt7623n-bpi-r2: add console= to bootargs + +Add an explicit console=ttyS2,115200n8 argument to the chosen/bootargs +property so that a serial console is available during early boot. + +Signed-off-by: Mark-MC Lee (李明昌) +--- --- a/arch/arm/boot/dts/mediatek/mt7623n-bananapi-bpi-r2.dts +++ b/arch/arm/boot/dts/mediatek/mt7623n-bananapi-bpi-r2.dts @@ -19,6 +19,7 @@ diff --git a/target/linux/mediatek/patches-6.12/111-dts-fix-bpi64-console.patch b/target/linux/mediatek/patches-6.12/111-dts-fix-bpi64-console.patch index f77f10cb955..9d0c2d33e2e 100644 --- a/target/linux/mediatek/patches-6.12/111-dts-fix-bpi64-console.patch +++ b/target/linux/mediatek/patches-6.12/111-dts-fix-bpi64-console.patch @@ -1,3 +1,13 @@ +From 25d9df670b850a4e3702e084ff249baa1670ae3f Mon Sep 17 00:00:00 2001 +From: Mark-MC Lee (李明昌) +Date: Mon, 10 Feb 2020 09:33:15 +0100 +Subject: [PATCH] arm64: dts: mediatek: mt7622-bpi-r64: add console= to bootargs + +Add an explicit console=ttyS0,115200n1 argument to the chosen/bootargs +property so that a serial console is available during early boot. + +Signed-off-by: Mark-MC Lee (李明昌) +--- --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts @@ -24,7 +24,7 @@ diff --git a/target/linux/mediatek/patches-6.12/112-dts-fix-bpi64-lan-names.patch b/target/linux/mediatek/patches-6.12/112-dts-fix-bpi64-lan-names.patch index d83a89e3f7a..b94701eaa63 100644 --- a/target/linux/mediatek/patches-6.12/112-dts-fix-bpi64-lan-names.patch +++ b/target/linux/mediatek/patches-6.12/112-dts-fix-bpi64-lan-names.patch @@ -1,3 +1,14 @@ +From dfa0a38d1f4d5bbac768569e3769ae4438a57e73 Mon Sep 17 00:00:00 2001 +From: Daniel Golle +Date: Sat, 27 Feb 2021 14:17:09 +0000 +Subject: [PATCH] arm64: dts: mediatek: mt7622-bpi-r64: fix LAN port numbering and add ethernet alias + +Renumber the switch LAN port labels from lan0/lan1/lan2 to lan1/lan2/lan3 +to match the silkscreen labelling on the board, and add an ethernet0 alias +pointing to gmac0. + +Signed-off-by: Daniel Golle +--- --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts @@ -20,6 +20,7 @@ diff --git a/target/linux/mediatek/patches-6.12/113-dts-fix-bpi64-leds-and-buttons.patch b/target/linux/mediatek/patches-6.12/113-dts-fix-bpi64-leds-and-buttons.patch index 1cca6f35341..722c8efbcfb 100644 --- a/target/linux/mediatek/patches-6.12/113-dts-fix-bpi64-leds-and-buttons.patch +++ b/target/linux/mediatek/patches-6.12/113-dts-fix-bpi64-leds-and-buttons.patch @@ -1,3 +1,15 @@ +From dfa0a38d1f4d5bbac768569e3769ae4438a57e73 Mon Sep 17 00:00:00 2001 +From: Daniel Golle +Date: Sat, 27 Feb 2021 14:17:09 +0000 +Subject: [PATCH] arm64: dts: mediatek: mt7622-bpi-r64: add LED aliases, fix button labels and MMC aliases + +Add led-boot/led-failsafe/led-running/led-upgrade aliases pointing to +the system LEDs, add mmc0/mmc1 aliases for correct MMC device ordering, +rename the factory button to "reset" with KEY_RESTART, and update the +LED gpio-hog and label names to match their physical function. + +Signed-off-by: Daniel Golle +--- --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts @@ -21,6 +21,12 @@ diff --git a/target/linux/mediatek/patches-6.12/114-dts-bpi64-disable-rtc.patch b/target/linux/mediatek/patches-6.12/114-dts-bpi64-disable-rtc.patch index 05ef32f5042..caf969d648e 100644 --- a/target/linux/mediatek/patches-6.12/114-dts-bpi64-disable-rtc.patch +++ b/target/linux/mediatek/patches-6.12/114-dts-bpi64-disable-rtc.patch @@ -1,3 +1,14 @@ +From 8dd0215676a304456d25ff3ac4542c7303831a90 Mon Sep 17 00:00:00 2001 +From: Daniel Golle +Date: Sat, 6 Mar 2021 18:38:30 +0000 +Subject: [PATCH] mediatek: disable RTC on Bananapi R64 + +The in-SoC RTC of the Bananapi R64 is more disruptive than useful +without a battery connected. Disable it to not have Linux use the +RTC provided time 2000-01-01 00:00:00 after power-loss. + +Signed-off-by: Daniel Golle +--- --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts @@ -599,6 +599,10 @@ diff --git a/target/linux/mediatek/patches-6.12/121-hack-spi-nand-1b-bbm.patch b/target/linux/mediatek/patches-6.12/121-hack-spi-nand-1b-bbm.patch index a9ec57e8cef..21459e1c179 100644 --- a/target/linux/mediatek/patches-6.12/121-hack-spi-nand-1b-bbm.patch +++ b/target/linux/mediatek/patches-6.12/121-hack-spi-nand-1b-bbm.patch @@ -1,3 +1,14 @@ +From 2138956bdc3145fac26d2ba8ac966f31d33cd290 Mon Sep 17 00:00:00 2001 +From: Chuanhong Guo +Date: Thu, 7 Apr 2022 10:05:56 +0800 +Subject: [PATCH] mediatek: spi-nand: check for 1 byte BBM only + +the OOB layout in MTK SNFI uses the 2nd byte, and anything using OOB +will make the block a bad-block in spi-nand driver. +Hack it for now. We need a proper solution upstream. + +Signed-off-by: Chuanhong Guo +--- --- a/drivers/mtd/nand/spi/core.c +++ b/drivers/mtd/nand/spi/core.c @@ -924,7 +924,7 @@ static int spinand_mtd_write(struct mtd_ diff --git a/target/linux/mediatek/patches-6.12/131-dts-mt7622-add-snand-support.patch b/target/linux/mediatek/patches-6.12/131-dts-mt7622-add-snand-support.patch index 5f4735caa45..5293abc616a 100644 --- a/target/linux/mediatek/patches-6.12/131-dts-mt7622-add-snand-support.patch +++ b/target/linux/mediatek/patches-6.12/131-dts-mt7622-add-snand-support.patch @@ -1,3 +1,14 @@ +From d3f058db1cb9b2d43764cd0d84fdc2779f0abacf Mon Sep 17 00:00:00 2001 +From: John Crispin +Date: Fri, 27 Mar 2020 15:34:33 +0100 +Subject: [PATCH] arm64: dts: mediatek: mt7622-rfb1: add SPI-NAND flash node + +Add a spi-nand child node to the snfi controller with quad-IO bus widths, +an ECC engine reference, and a fixed-partitions layout covering the full +flash address space of the SPI-NAND device populated on the RFB1 board. + +Signed-off-by: John Crispin +--- --- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts @@ -558,6 +558,65 @@ diff --git a/target/linux/mediatek/patches-6.12/140-dts-fix-wmac-support-for-mt7622-rfb1.patch b/target/linux/mediatek/patches-6.12/140-dts-fix-wmac-support-for-mt7622-rfb1.patch index 7167d1a8ef9..6c9f5dc01a5 100644 --- a/target/linux/mediatek/patches-6.12/140-dts-fix-wmac-support-for-mt7622-rfb1.patch +++ b/target/linux/mediatek/patches-6.12/140-dts-fix-wmac-support-for-mt7622-rfb1.patch @@ -1,3 +1,14 @@ +From c46ccb69d17e584479df849a107423175a143c83 Mon Sep 17 00:00:00 2001 +From: Felix Fietkau +Date: Sat, 24 Oct 2020 21:15:20 +0200 +Subject: [PATCH] arm64: dts: mediatek: mt7622-rfb1: wire EEPROM to wmac from factory partition + +Label the factory partition node so it can be referenced by phandle, and +add a mediatek,mtd-eeprom property to the wmac node pointing at the +factory partition to supply the calibration data at offset 0x0000. + +Signed-off-by: Felix Fietkau +--- --- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts @@ -599,7 +599,7 @@ diff --git a/target/linux/mediatek/patches-6.12/150-dts-mt7623-eip97-inside-secure-support.patch b/target/linux/mediatek/patches-6.12/150-dts-mt7623-eip97-inside-secure-support.patch index d54e3ed1fde..9e96a5a09b5 100644 --- a/target/linux/mediatek/patches-6.12/150-dts-mt7623-eip97-inside-secure-support.patch +++ b/target/linux/mediatek/patches-6.12/150-dts-mt7623-eip97-inside-secure-support.patch @@ -1,3 +1,16 @@ +From 127ad76311079a842578e788a8af364f3910c676 Mon Sep 17 00:00:00 2001 +From: John Crispin +Date: Thu, 4 Jun 2020 14:20:34 +0200 +Subject: [PATCH] arm: dts: mediatek: mt7623: switch crypto to inside-secure,safexcel-eip97 + +Switch the DTS compatible string of the crypto engine node from +"mediatek,eip97-crypto" to "inside-secure,safexcel-eip97" to bind to +the upstream Inside Secure SafeXcel driver. Update the interrupt list +to match and add interrupt-names, and remove the now-unused power-domain +and clock-names properties. + +Signed-off-by: John Crispin +--- --- a/arch/arm/boot/dts/mediatek/mt7623.dtsi +++ b/arch/arm/boot/dts/mediatek/mt7623.dtsi @@ -995,17 +995,15 @@ diff --git a/target/linux/mediatek/patches-6.12/160-dts-mt7623-bpi-r2-earlycon.patch b/target/linux/mediatek/patches-6.12/160-dts-mt7623-bpi-r2-earlycon.patch index 5e02fb56ac8..85a8bb9cf3c 100644 --- a/target/linux/mediatek/patches-6.12/160-dts-mt7623-bpi-r2-earlycon.patch +++ b/target/linux/mediatek/patches-6.12/160-dts-mt7623-bpi-r2-earlycon.patch @@ -1,3 +1,14 @@ +From 25d9df670b850a4e3702e084ff249baa1670ae3f Mon Sep 17 00:00:00 2001 +From: Mark-MC Lee (李明昌) +Date: Mon, 10 Feb 2020 09:33:15 +0100 +Subject: [PATCH] arm: dts: mediatek: mt7623n-bpi-r2: add earlycon= to bootargs + +Add earlycon=uart8250,mmio32,0x11004000 to the chosen/bootargs property +so that kernel messages are available on the serial console before the +full UART driver is initialised. + +Signed-off-by: Mark-MC Lee (李明昌) +--- --- a/arch/arm/boot/dts/mediatek/mt7623n-bananapi-bpi-r2.dts +++ b/arch/arm/boot/dts/mediatek/mt7623n-bananapi-bpi-r2.dts @@ -19,7 +19,7 @@ diff --git a/target/linux/mediatek/patches-6.12/161-dts-mt7623-bpi-r2-mmc-device-order.patch b/target/linux/mediatek/patches-6.12/161-dts-mt7623-bpi-r2-mmc-device-order.patch index 4b482199667..eb9ba49a5a3 100644 --- a/target/linux/mediatek/patches-6.12/161-dts-mt7623-bpi-r2-mmc-device-order.patch +++ b/target/linux/mediatek/patches-6.12/161-dts-mt7623-bpi-r2-mmc-device-order.patch @@ -1,3 +1,14 @@ +From 25d9df670b850a4e3702e084ff249baa1670ae3f Mon Sep 17 00:00:00 2001 +From: Mark-MC Lee (李明昌) +Date: Mon, 10 Feb 2020 09:33:15 +0100 +Subject: [PATCH] arm: dts: mediatek: mt7623n-bpi-r2: add mmc device order aliases + +Add mmc0 and mmc1 aliases to fix the MMC controller enumeration order, +ensuring the SD card slot and eMMC are always assigned predictable +device numbers regardless of probe order. + +Signed-off-by: Mark-MC Lee (李明昌) +--- --- a/arch/arm/boot/dts/mediatek/mt7623n-bananapi-bpi-r2.dts +++ b/arch/arm/boot/dts/mediatek/mt7623n-bananapi-bpi-r2.dts @@ -15,6 +15,8 @@ diff --git a/target/linux/mediatek/patches-6.12/162-dts-mt7623-bpi-r2-led-aliases.patch b/target/linux/mediatek/patches-6.12/162-dts-mt7623-bpi-r2-led-aliases.patch index 2d02a760f03..11cb722151e 100644 --- a/target/linux/mediatek/patches-6.12/162-dts-mt7623-bpi-r2-led-aliases.patch +++ b/target/linux/mediatek/patches-6.12/162-dts-mt7623-bpi-r2-led-aliases.patch @@ -1,3 +1,12 @@ +From 21c7a8593d86175c0764d23e77bb019fd9617f53 Mon Sep 17 00:00:00 2001 +From: Daniel Golle +Date: Fri, 1 Oct 2021 23:25:48 +0100 +Subject: [PATCH] mediatek: mt7623: bpi-r2: add LED aliases + +Add aliases for LEDs in device tree of the BPi-R2. + +Signed-off-by: Daniel Golle +--- --- a/arch/arm/boot/dts/mediatek/mt7623n-bananapi-bpi-r2.dts +++ b/arch/arm/boot/dts/mediatek/mt7623n-bananapi-bpi-r2.dts @@ -17,6 +17,10 @@ diff --git a/target/linux/mediatek/patches-6.12/163-dts-mt7623-bpi-r2-ethernet-alias.patch b/target/linux/mediatek/patches-6.12/163-dts-mt7623-bpi-r2-ethernet-alias.patch index b7e4a8c5cc5..455f3b0a8d6 100644 --- a/target/linux/mediatek/patches-6.12/163-dts-mt7623-bpi-r2-ethernet-alias.patch +++ b/target/linux/mediatek/patches-6.12/163-dts-mt7623-bpi-r2-ethernet-alias.patch @@ -1,3 +1,13 @@ +From 25d9df670b850a4e3702e084ff249baa1670ae3f Mon Sep 17 00:00:00 2001 +From: Mark-MC Lee (李明昌) +Date: Mon, 10 Feb 2020 09:33:15 +0100 +Subject: [PATCH] arm: dts: mediatek: mt7623n-bpi-r2: add ethernet0 alias + +Add an ethernet0 alias pointing to gmac0 so that the primary Ethernet +interface is consistently named by the kernel. + +Signed-off-by: Mark-MC Lee (李明昌) +--- --- a/arch/arm/boot/dts/mediatek/mt7623n-bananapi-bpi-r2.dts +++ b/arch/arm/boot/dts/mediatek/mt7623n-bananapi-bpi-r2.dts @@ -15,6 +15,7 @@ diff --git a/target/linux/mediatek/patches-6.12/164-dts-mt7623-bpi-r2-rootdisk-for-fitblk.patch b/target/linux/mediatek/patches-6.12/164-dts-mt7623-bpi-r2-rootdisk-for-fitblk.patch index be1e1309055..91ef6786740 100644 --- a/target/linux/mediatek/patches-6.12/164-dts-mt7623-bpi-r2-rootdisk-for-fitblk.patch +++ b/target/linux/mediatek/patches-6.12/164-dts-mt7623-bpi-r2-rootdisk-for-fitblk.patch @@ -1,3 +1,14 @@ +From 6368ed1ae5b628898b33273c8950f7b7575e4414 Mon Sep 17 00:00:00 2001 +From: Daniel Golle +Date: Sat, 24 Feb 2024 03:00:27 +0000 +Subject: [PATCH] mediatek: mt7623: phase out uImage.FIT partition parser + +Use the new fitblk driver on the BananaPi R2 as well as UniElec U7623. +Introduce boot device selection for fitblk's /chosen/rootdisk +handle, similar to how it is already done on MT7622, MT7986 and MT7988. + +Signed-off-by: Daniel Golle +--- --- a/arch/arm/boot/dts/mediatek/mt7623n-bananapi-bpi-r2.dts +++ b/arch/arm/boot/dts/mediatek/mt7623n-bananapi-bpi-r2.dts @@ -26,7 +26,9 @@ diff --git a/target/linux/mediatek/patches-6.12/194-dts-mt7968a-add-ramoops.patch b/target/linux/mediatek/patches-6.12/194-dts-mt7968a-add-ramoops.patch index 161c1e75168..680c90a0f2c 100644 --- a/target/linux/mediatek/patches-6.12/194-dts-mt7968a-add-ramoops.patch +++ b/target/linux/mediatek/patches-6.12/194-dts-mt7968a-add-ramoops.patch @@ -1,3 +1,13 @@ +From e1adb1fa39dd5ef97280ad1b2bb9e8ff4c43674f Mon Sep 17 00:00:00 2001 +From: Daniel Golle +Date: Fri, 7 May 2021 16:53:09 +0100 +Subject: [PATCH] arm64: dts: mediatek: mt7986a: reserve memory for ramoops/pstore + +Reserve 64 KiB of memory at 0x42ff0000 in the MT7986a DTSI for the +ramoops/pstore driver so that kernel crash logs survive a reboot. + +Signed-off-by: Daniel Golle +--- --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi @@ -68,6 +68,14 @@ diff --git a/target/linux/mediatek/patches-6.12/195-dts-mt7986a-bpi-r3-leds-port-names-and-wifi-eeprom.patch b/target/linux/mediatek/patches-6.12/195-dts-mt7986a-bpi-r3-leds-port-names-and-wifi-eeprom.patch index 8423278033b..2554f88317d 100644 --- a/target/linux/mediatek/patches-6.12/195-dts-mt7986a-bpi-r3-leds-port-names-and-wifi-eeprom.patch +++ b/target/linux/mediatek/patches-6.12/195-dts-mt7986a-bpi-r3-leds-port-names-and-wifi-eeprom.patch @@ -1,3 +1,15 @@ +From 7a0ec001ff79b12beefb8f3773820bfedebbb340 Mon Sep 17 00:00:00 2001 +From: Daniel Golle +Date: Sun, 4 Jun 2023 15:56:15 +0100 +Subject: [PATCH] arm64: dts: mediatek: mt7986a-bpi-r3: fix LED/LAN port naming and wire WiFi EEPROM + +Add led-boot/led-failsafe/led-running/led-upgrade aliases pointing to +the green and blue system LEDs, renumber the switch LAN port labels from +lan0/lan1/lan2 to lan1/lan2/lan3 to match the board silkscreen, and wire +the built-in WiFi EEPROM from the factory partition. + +Signed-off-by: Daniel Golle +--- --- a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts +++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts @@ -23,6 +23,10 @@ diff --git a/target/linux/mediatek/patches-6.12/196-dts-mt7986a-bpi-r3-use-all-ubi-nand-layout.patch b/target/linux/mediatek/patches-6.12/196-dts-mt7986a-bpi-r3-use-all-ubi-nand-layout.patch index f2b9a7093a8..f2d19679346 100644 --- a/target/linux/mediatek/patches-6.12/196-dts-mt7986a-bpi-r3-use-all-ubi-nand-layout.patch +++ b/target/linux/mediatek/patches-6.12/196-dts-mt7986a-bpi-r3-use-all-ubi-nand-layout.patch @@ -1,3 +1,15 @@ +From 61137a88952e125c574aa35209fd581591d8796a Mon Sep 17 00:00:00 2001 +From: Daniel Golle +Date: Thu, 18 Jan 2024 22:15:35 +0000 +Subject: [PATCH] arm64: dts: mediatek: mt7986a-bpi-r3: add fitblk rootdisk for eMMC and NAND overlays + +Add GPT block partition and mmc-card nodes to the eMMC dtso overlay so +that fitblk can find the production partition via /chosen/rootdisk-emmc, +and update the NAND dtso overlay to wire up the UBI volume used as the +root filesystem via /chosen/rootdisk-nand. + +Signed-off-by: Daniel Golle +--- --- a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-emmc.dtso +++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-emmc.dtso @@ -21,5 +21,24 @@ diff --git a/target/linux/mediatek/patches-6.12/198-dts-mt7988a-enable-wed.patch b/target/linux/mediatek/patches-6.12/198-dts-mt7988a-enable-wed.patch index a78aba3cee4..45ae5962560 100644 --- a/target/linux/mediatek/patches-6.12/198-dts-mt7988a-enable-wed.patch +++ b/target/linux/mediatek/patches-6.12/198-dts-mt7988a-enable-wed.patch @@ -1,3 +1,13 @@ +From 4dd35ca6747a57261f3b10982a4a8cc765d6549f Mon Sep 17 00:00:00 2001 +From: Lorenzo Bianconi +Date: Thu, 17 Jul 2025 18:45:48 +0200 +Subject: [PATCH] target: mediatek: Enable WED for MT7988 devices running 6.12.x kernels + +Add WED related nodes to the device tree of the MT7988 SoC family. + +Signed-off-by: Lorenzo Bianconi +Signed-off-by: Daniel Golle +--- --- a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi @@ -145,6 +145,32 @@ diff --git a/target/linux/mediatek/patches-6.12/330-snand-mtk-bmt-support.patch b/target/linux/mediatek/patches-6.12/330-snand-mtk-bmt-support.patch index 2dc81292ec4..28e63ebeeed 100644 --- a/target/linux/mediatek/patches-6.12/330-snand-mtk-bmt-support.patch +++ b/target/linux/mediatek/patches-6.12/330-snand-mtk-bmt-support.patch @@ -1,3 +1,15 @@ +From 68d5efaa10cf0689521fe05e386e3a1e11d8cb29 Mon Sep 17 00:00:00 2001 +From: Chuanhong Guo +Date: Thu, 7 Apr 2022 10:16:47 +0800 +Subject: [PATCH] mtd: spinand: attach/detach MTK BMT on probe/remove + +Call mtk_bmt_attach() after the MTD device is registered in +spinand_probe() and mtk_bmt_detach() before it is unregistered in +spinand_remove() to enable the MediaTek bad block management table for +SPI-NAND devices. + +Signed-off-by: Chuanhong Guo +--- --- a/drivers/mtd/nand/spi/core.c +++ b/drivers/mtd/nand/spi/core.c @@ -19,6 +19,7 @@ diff --git a/target/linux/mediatek/patches-6.12/331-mt7622-rfb1-enable-bmt.patch b/target/linux/mediatek/patches-6.12/331-mt7622-rfb1-enable-bmt.patch index 81136c9a3b3..d1bc35f1f28 100644 --- a/target/linux/mediatek/patches-6.12/331-mt7622-rfb1-enable-bmt.patch +++ b/target/linux/mediatek/patches-6.12/331-mt7622-rfb1-enable-bmt.patch @@ -1,3 +1,10 @@ +From f9a28d216d65b55e1139e2c73d016c5e77d7fe0b Mon Sep 17 00:00:00 2001 +From: Felix Fietkau +Date: Sat, 4 Dec 2021 22:46:00 +0100 +Subject: [PATCH] mediatek: enable bmt on mt7622-rfb1 + +Signed-off-by: Felix Fietkau +--- --- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts @@ -572,6 +572,7 @@ diff --git a/target/linux/mediatek/patches-6.12/400-crypto-add-eip97-inside-secure-support.patch b/target/linux/mediatek/patches-6.12/400-crypto-add-eip97-inside-secure-support.patch index 5808a934955..5727f5ecec0 100644 --- a/target/linux/mediatek/patches-6.12/400-crypto-add-eip97-inside-secure-support.patch +++ b/target/linux/mediatek/patches-6.12/400-crypto-add-eip97-inside-secure-support.patch @@ -1,3 +1,15 @@ +From 127ad76311079a842578e788a8af364f3910c676 Mon Sep 17 00:00:00 2001 +From: John Crispin +Date: Thu, 4 Jun 2020 14:20:34 +0200 +Subject: [PATCH] crypto: inside-secure: set TX max commands for EIP97 HW2.1/2.3 + +EIP97 HW2.1 and HW2.3 use a different register field for the maximum +number of TX commands than EIP197. Add an else branch to set +EIP97_MST_CTRL_TX_MAX_CMD(4) (16 commands) for the EIP97 hardware +variant, and add the corresponding EIP97_MST_CTRL_TX_MAX_CMD() macro. + +Signed-off-by: John Crispin +--- --- a/drivers/crypto/inside-secure/safexcel.c +++ b/drivers/crypto/inside-secure/safexcel.c @@ -608,6 +608,14 @@ static int safexcel_hw_init(struct safex diff --git a/target/linux/mediatek/patches-6.12/401-crypto-fix-eip97-cache-incoherent.patch b/target/linux/mediatek/patches-6.12/401-crypto-fix-eip97-cache-incoherent.patch index bd22b3699b5..eb15990d090 100644 --- a/target/linux/mediatek/patches-6.12/401-crypto-fix-eip97-cache-incoherent.patch +++ b/target/linux/mediatek/patches-6.12/401-crypto-fix-eip97-cache-incoherent.patch @@ -1,3 +1,15 @@ +From 4841ac042e00df7e29d305eb92f68994ebc739fd Mon Sep 17 00:00:00 2001 +From: John Crispin +Date: Tue, 1 Sep 2020 09:09:13 +0200 +Subject: [PATCH] crypto: inside-secure: align ahash state and len to cache line size + +On non-coherent DMA systems the ahash request state[] array and the len +field must each be aligned to the system cache line size (64 bytes) to +prevent DMA coherency issues. Add SYSTEM_CACHELINE_SIZE (64) and use it +as the alignment for both fields. + +Signed-off-by: John Crispin +--- --- a/drivers/crypto/inside-secure/safexcel.h +++ b/drivers/crypto/inside-secure/safexcel.h @@ -743,6 +743,9 @@ struct safexcel_priv_data { diff --git a/target/linux/mediatek/patches-6.12/410-bt-mtk-serial-fix.patch b/target/linux/mediatek/patches-6.12/410-bt-mtk-serial-fix.patch index ddbdc981a3b..cce3dcadf8f 100644 --- a/target/linux/mediatek/patches-6.12/410-bt-mtk-serial-fix.patch +++ b/target/linux/mediatek/patches-6.12/410-bt-mtk-serial-fix.patch @@ -1,3 +1,15 @@ +From 66458c49aa14ebc9ba2e4f9b6a323b8ff122807b Mon Sep 17 00:00:00 2001 +From: John Crispin +Date: Fri, 2 Aug 2019 10:33:28 +0200 +Subject: [PATCH] serial: 8250: add UART_CAP_NMOD flag to skip set_termios for MT Bluetooth UART + +The Bluetooth UART on MediaTek SoCs does not support termios +configuration. Add a new UART_CAP_NMOD capability flag and set it on +PORT_NPCM so that serial8250_do_set_termios() returns immediately +without touching the hardware when this flag is present. + +Signed-off-by: John Crispin +--- --- a/drivers/tty/serial/8250/8250.h +++ b/drivers/tty/serial/8250/8250.h @@ -86,6 +86,7 @@ struct serial8250_config { diff --git a/target/linux/mediatek/patches-6.12/411-mtd-spinand-fix-support-for-FORESEE.patch b/target/linux/mediatek/patches-6.12/411-mtd-spinand-fix-support-for-FORESEE.patch index 48a6515b56a..b88c1380828 100644 --- a/target/linux/mediatek/patches-6.12/411-mtd-spinand-fix-support-for-FORESEE.patch +++ b/target/linux/mediatek/patches-6.12/411-mtd-spinand-fix-support-for-FORESEE.patch @@ -1,3 +1,16 @@ +From edc7cb910433e05eac61b13d94163f1e07fa6af4 Mon Sep 17 00:00:00 2001 +From: Dim Fish +Date: Thu, 3 Jul 2025 18:06:18 +0300 +Subject: [PATCH] mediatek: spinand: 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 +--- 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 diff --git a/target/linux/mediatek/patches-6.12/500-gsw-rtl8367s-mt7622-support.patch b/target/linux/mediatek/patches-6.12/500-gsw-rtl8367s-mt7622-support.patch index 60643e26575..c558ce3537f 100644 --- a/target/linux/mediatek/patches-6.12/500-gsw-rtl8367s-mt7622-support.patch +++ b/target/linux/mediatek/patches-6.12/500-gsw-rtl8367s-mt7622-support.patch @@ -1,3 +1,14 @@ +From c46ccb69d17e584479df849a107423175a143c83 Mon Sep 17 00:00:00 2001 +From: Felix Fietkau +Date: Sat, 24 Oct 2020 21:15:20 +0200 +Subject: [PATCH] net: phy: add RTL8367S gigabit switch Kconfig/Makefile entry for MT7622 + +Add a CONFIG_RTL8367S_GSW Kconfig option and the corresponding +obj-$(CONFIG_RTL8367S_GSW) Makefile entry to allow building the +out-of-tree RTL8367S gigabit switch driver used on MT7622 boards. + +Signed-off-by: Felix Fietkau +--- --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig @@ -443,6 +443,12 @@ config ROCKCHIP_PHY diff --git a/target/linux/mediatek/patches-6.12/602-arm64-dts-mediatek-add-mt7622-pcie-slot-node.patch b/target/linux/mediatek/patches-6.12/602-arm64-dts-mediatek-add-mt7622-pcie-slot-node.patch index d58082aa6f0..764fe763e15 100644 --- a/target/linux/mediatek/patches-6.12/602-arm64-dts-mediatek-add-mt7622-pcie-slot-node.patch +++ b/target/linux/mediatek/patches-6.12/602-arm64-dts-mediatek-add-mt7622-pcie-slot-node.patch @@ -1,3 +1,14 @@ +From ade563ba84496406243b3699a27b3de7e08399e7 Mon Sep 17 00:00:00 2001 +From: Felix Fietkau +Date: Sun, 27 Mar 2022 12:54:03 +0200 +Subject: [PATCH] arm64: dts: mediatek: mt7622: add PCIe slot child nodes + +Add named slot0 and slot1 child nodes to the pcie0 and pcie1 host +controllers in mt7622.dtsi so that device tree overlays can target +specific PCIe slots by phandle. + +Signed-off-by: Felix Fietkau +--- --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi @@ -844,6 +844,12 @@ diff --git a/target/linux/mediatek/patches-6.12/611-pcie-mediatek-gen3-PERST-for-100ms.patch b/target/linux/mediatek/patches-6.12/611-pcie-mediatek-gen3-PERST-for-100ms.patch index 72437320a0b..f3d308a2944 100644 --- a/target/linux/mediatek/patches-6.12/611-pcie-mediatek-gen3-PERST-for-100ms.patch +++ b/target/linux/mediatek/patches-6.12/611-pcie-mediatek-gen3-PERST-for-100ms.patch @@ -1,3 +1,15 @@ +From 6a2e17d5c1451025396ba523e9f2d112212c7261 Mon Sep 17 00:00:00 2001 +From: Daniel Golle +Date: Tue, 3 Oct 2023 02:32:35 +0100 +Subject: [PATCH] mediatek: fix PCIe #PERST being de-asserted too early + +The driver for MediaTek gen3 PCIe hosts de-asserts all reset +signals at the same time using a single register write operation. +Delay the de-assertion of the #PERST signal by 100ms as some PCIe +devices fail to come up otherwise. + +Signed-off-by: Daniel Golle +--- --- a/drivers/pci/controller/pcie-mediatek-gen3.c +++ b/drivers/pci/controller/pcie-mediatek-gen3.c @@ -416,7 +416,13 @@ static int mtk_pcie_startup_port(struct diff --git a/target/linux/mediatek/patches-6.12/722-remove-300Hz-to-prevent-freeze.patch b/target/linux/mediatek/patches-6.12/722-remove-300Hz-to-prevent-freeze.patch index 52069496ca8..003e8b6aaa3 100644 --- a/target/linux/mediatek/patches-6.12/722-remove-300Hz-to-prevent-freeze.patch +++ b/target/linux/mediatek/patches-6.12/722-remove-300Hz-to-prevent-freeze.patch @@ -1,3 +1,20 @@ +From d0d6b8e1833c587d0c50cac4f6324aa93b0bc8fc Mon Sep 17 00:00:00 2001 +From: John Audia +Date: Wed, 6 Jul 2022 11:49:50 -0400 +Subject: [PATCH] mt7622: remove 300 MHz from dts + +Due to the bug described here[1], remove the 300 MHz clock to avoid a low +voltage condition that can cause a hang when rebooting the RT3200/E8450. + +This solution is probably better than the script-based work-around[2]. + +1. https://forum.openwrt.org/t/belkin-rt3200-linksys-e8450-wifi-ax-discussion/94302/1490 +2. https://github.com/openwrt/openwrt/pull/5025 + +Signed-off-by: John Audia +Tested-by: Rui Salvaterra +Tested-by: John Audia +--- --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi @@ -23,11 +23,17 @@ diff --git a/target/linux/mediatek/patches-6.12/736-net-pcs-mtk_usxgmii-add-polarity-control.patch b/target/linux/mediatek/patches-6.12/736-net-pcs-mtk_usxgmii-add-polarity-control.patch index 68ee609aace..3b0b06bc108 100644 --- a/target/linux/mediatek/patches-6.12/736-net-pcs-mtk_usxgmii-add-polarity-control.patch +++ b/target/linux/mediatek/patches-6.12/736-net-pcs-mtk_usxgmii-add-polarity-control.patch @@ -1,3 +1,12 @@ +From ddfae94a14bf0fc301505da75825dfe473525a33 Mon Sep 17 00:00:00 2001 +From: John Crispin +Date: Tue, 29 Oct 2024 13:40:11 +0100 +Subject: [PATCH] mediatek: add support for swapping the polarity on usxgmii interfaces + +This patch comes from the MTK SDK. + +Signed-off-by: John Crispin +--- --- a/drivers/net/pcs/pcs-mtk-usxgmii.c +++ b/drivers/net/pcs/pcs-mtk-usxgmii.c @@ -52,6 +52,12 @@ diff --git a/target/linux/mediatek/patches-6.12/752-net-phy-mediatek-i2p5g-add-support-for-mt7987.patch b/target/linux/mediatek/patches-6.12/752-net-phy-mediatek-i2p5g-add-support-for-mt7987.patch index eea7f6e79ac..54a5ae3d86e 100644 --- a/target/linux/mediatek/patches-6.12/752-net-phy-mediatek-i2p5g-add-support-for-mt7987.patch +++ b/target/linux/mediatek/patches-6.12/752-net-phy-mediatek-i2p5g-add-support-for-mt7987.patch @@ -1,3 +1,15 @@ +From d62fc50ff42223df2bd82c1ea0f1786ea26d3f08 Mon Sep 17 00:00:00 2001 +From: Daniel Golle +Date: Sun, 5 Oct 2025 03:39:52 +0100 +Subject: [PATCH] net: phy: mediatek: add 2.5G PHY support for MT7987 + +Add MT7987 PHY ID, firmware file paths (PMB and DSPBitTb blobs), and the +necessary PMD/XBZ register definitions. Extend the driver probe path to +load and initialise the MT7987-specific firmware and configure the +internal 2.5G PHY hardware. + +Signed-off-by: Daniel Golle +--- --- a/drivers/net/phy/mediatek/mtk-2p5ge.c +++ b/drivers/net/phy/mediatek/mtk-2p5ge.c @@ -12,13 +12,77 @@ diff --git a/target/linux/mediatek/patches-6.12/841-cpufreq-add-cpu-volt-correction-support-for-mt7988.patch b/target/linux/mediatek/patches-6.12/841-cpufreq-add-cpu-volt-correction-support-for-mt7988.patch index 43397d85299..a6422b64022 100644 --- a/target/linux/mediatek/patches-6.12/841-cpufreq-add-cpu-volt-correction-support-for-mt7988.patch +++ b/target/linux/mediatek/patches-6.12/841-cpufreq-add-cpu-volt-correction-support-for-mt7988.patch @@ -1,3 +1,15 @@ +From 2595e31220f8e515714a71deb781e3fdf8c483ef Mon Sep 17 00:00:00 2001 +From: Daniel Golle +Date: Sun, 5 Oct 2025 03:42:19 +0100 +Subject: [PATCH] cpufreq: mediatek: add nvmem-based CPU voltage correction for MT7988 + +Add mt7988_volt_corr_data[] with correction parameters for the 1800 MHz +OPP and enable the nvmem_volt_corr path in the MT7988 platform data, +allowing the CPU voltage to be adjusted based on calibration values read +from the efuse. Raise proc_max_volt to 1120000 uV accordingly. + +Signed-off-by: Daniel Golle +--- --- a/drivers/cpufreq/mediatek-cpufreq.c +++ b/drivers/cpufreq/mediatek-cpufreq.c @@ -741,6 +741,16 @@ static struct platform_driver mtk_cpufre diff --git a/target/linux/mediatek/patches-6.12/843-cpufreq-add-support-to-fix-voltage-cpu.patch b/target/linux/mediatek/patches-6.12/843-cpufreq-add-support-to-fix-voltage-cpu.patch index b9f67c9faf9..8185cdaf3ab 100644 --- a/target/linux/mediatek/patches-6.12/843-cpufreq-add-support-to-fix-voltage-cpu.patch +++ b/target/linux/mediatek/patches-6.12/843-cpufreq-add-support-to-fix-voltage-cpu.patch @@ -1,3 +1,15 @@ +From 2595e31220f8e515714a71deb781e3fdf8c483ef Mon Sep 17 00:00:00 2001 +From: Daniel Golle +Date: Sun, 5 Oct 2025 03:42:19 +0100 +Subject: [PATCH] cpufreq: mediatek: add proc_fixed_volt flag to skip voltage scaling + +Add a proc_fixed_volt boolean to mtk_cpufreq_platform_data. When set, +mtk_cpufreq_set_voltage() returns immediately without programming the +regulator, for SoCs where the CPU core voltage is fixed in hardware and +must not be touched by software. + +Signed-off-by: Daniel Golle +--- --- a/drivers/cpufreq/mediatek-cpufreq.c +++ b/drivers/cpufreq/mediatek-cpufreq.c @@ -35,6 +35,8 @@ struct mtk_cpufreq_platform_data { diff --git a/target/linux/mediatek/patches-6.12/844-cpufreq-mediatek-Add-support-for-MT7987.patch b/target/linux/mediatek/patches-6.12/844-cpufreq-mediatek-Add-support-for-MT7987.patch index e0c8c474005..5901b45b9be 100644 --- a/target/linux/mediatek/patches-6.12/844-cpufreq-mediatek-Add-support-for-MT7987.patch +++ b/target/linux/mediatek/patches-6.12/844-cpufreq-mediatek-Add-support-for-MT7987.patch @@ -1,3 +1,14 @@ +From 2595e31220f8e515714a71deb781e3fdf8c483ef Mon Sep 17 00:00:00 2001 +From: Daniel Golle +Date: Sun, 5 Oct 2025 03:42:19 +0100 +Subject: [PATCH] cpufreq: mediatek: add platform data and DT match for MT7987 + +Add mt7987_platform_data with proc_max_volt=1023000 uV and +proc_fixed_volt=true (the MT7987 CPU voltage is not software- +controllable), and register it for the "mediatek,mt7987" DT compatible. + +Signed-off-by: Daniel Golle +--- --- a/drivers/cpufreq/mediatek-cpufreq.c +++ b/drivers/cpufreq/mediatek-cpufreq.c @@ -781,6 +781,12 @@ static const struct mtk_cpufreq_platform diff --git a/target/linux/mediatek/patches-6.12/864-arm64-dts-mt7986-add-sound-overlay-for-bpi-r3.patch b/target/linux/mediatek/patches-6.12/864-arm64-dts-mt7986-add-sound-overlay-for-bpi-r3.patch index af47255c78f..dd21397db2a 100644 --- a/target/linux/mediatek/patches-6.12/864-arm64-dts-mt7986-add-sound-overlay-for-bpi-r3.patch +++ b/target/linux/mediatek/patches-6.12/864-arm64-dts-mt7986-add-sound-overlay-for-bpi-r3.patch @@ -1,3 +1,48 @@ +From 957a0921e20257bd94b7f5ace6e07a68e8388499 Mon Sep 17 00:00:00 2001 +From: Daniel Golle +Date: Sun, 10 Dec 2023 23:09:00 +0000 +Subject: [PATCH] mediatek: bananapi-r3: add overlay for ReSpeaker 2-mic hat + +Add DT overlay to allow using the ReSpeaker 2-mic hat connected to +the 26-pin header of the BananaPi BPi-R3. + +Supported sample formats: S16_LE, S24_LE, S32_LE +Supported sample rates: 8/12/16/24/32/48/96/192 kHz + + | BPi-R3 | ReSpeaker 2-mic + Signal | 26-pin | 40-pin +----------+----------+------------------- + VCC 5V | 2 | 2 + I2C SDA | 3 | 3 + I2C SCL | 5 | 5 + GND | 6 | 6 + PCM CLK | 12 | 12 + PCM FS | 15 | 35 + PCM DIN | 26 | 38 + GND | 25 | 39 + PCM DOUT | 22 | 40 + +Once connected, install the driver and tell U-Boot to apply the DT +overlay: + +opkg kmod-sound-soc-mt7986-wm8960 +fw_setenv bootconf_base "config-mt7986a-bananapi-bpi-r3#mt7986a-bananapi-bpi-r3-respeaker-2mics" +reboot + +To setup the ReSpeaker for Stereo out on the Headphone plug: + +amixer sset 'Right Output Mixer PCM' on +amixer sset 'Left Output Mixer PCM' on +amixer sset 'PCM Playback -6dB' off +amixer sset 'O018 I150_Switch' on +amixer sset 'O019 I151_Switch' on +amixer sset 'O124 I032_Switch' on +amixer sset 'O125 I033_Switch' on +amixer sset 'Headphone' 121 +amixer sset 'Playback' 255 + +Signed-off-by: Daniel Golle +--- --- /dev/null +++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-respeaker-2mics.dtso @@ -0,0 +1,65 @@ diff --git a/target/linux/mediatek/patches-6.12/900-dts-mt7622-bpi-r64-aliases-for-dtoverlay.patch b/target/linux/mediatek/patches-6.12/900-dts-mt7622-bpi-r64-aliases-for-dtoverlay.patch index 5bf729f5b92..03038d35d4a 100644 --- a/target/linux/mediatek/patches-6.12/900-dts-mt7622-bpi-r64-aliases-for-dtoverlay.patch +++ b/target/linux/mediatek/patches-6.12/900-dts-mt7622-bpi-r64-aliases-for-dtoverlay.patch @@ -1,3 +1,16 @@ +From b40f707f71d4e1fee9b2c20d62e235c5aba5533b Mon Sep 17 00:00:00 2001 +From: Daniel Golle +Date: Wed, 17 Mar 2021 17:36:54 +0000 +Subject: [PATCH] arm64: dts: mediatek: mt7622-bpi-r64: add SATA/PCIe1 DT overlays + +The Bananapi BPi-R64 got a SATA interface which cannot be used at the +same time as the second mPCIe slot. The decission is made by hogging +GPIO 90. +Embed two addtional DT overlay blobs into the image to allow bootloader +selection of either SATA or PCIE1 feature. + +Signed-off-by: Daniel Golle +--- --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts @@ -323,7 +323,7 @@ diff --git a/target/linux/mediatek/patches-6.12/901-arm-add-cmdline-override.patch b/target/linux/mediatek/patches-6.12/901-arm-add-cmdline-override.patch index a79ac703b90..b127b0e3489 100644 --- a/target/linux/mediatek/patches-6.12/901-arm-add-cmdline-override.patch +++ b/target/linux/mediatek/patches-6.12/901-arm-add-cmdline-override.patch @@ -1,3 +1,17 @@ +From c27279dc26a26b8ad054882d4c5f86a85526fd16 Mon Sep 17 00:00:00 2001 +From: Yoonji Park +Date: Mon, 6 Jun 2022 07:44:48 +0000 +Subject: [PATCH] arm: arm64: of: add CMDLINE_OVERRIDE to support chosen/bootargs-override + +Add a CONFIG_CMDLINE_OVERRIDE Kconfig option for both ARM and ARM64 and +handle the corresponding "bootargs-override" property in +early_init_dt_scan_chosen(). When the property is present in the DT +chosen node its value fully replaces the kernel command line, which is +useful on devices where the bootloader sets bootargs that cannot be +edited. + +Signed-off-by: Yoonji Park +--- --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1505,6 +1505,14 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN diff --git a/target/linux/mediatek/patches-6.12/910-dts-mt7622-bpi-r64-wifi-eeprom.patch b/target/linux/mediatek/patches-6.12/910-dts-mt7622-bpi-r64-wifi-eeprom.patch index e6cb16c3d6c..0e6eb3eac34 100644 --- a/target/linux/mediatek/patches-6.12/910-dts-mt7622-bpi-r64-wifi-eeprom.patch +++ b/target/linux/mediatek/patches-6.12/910-dts-mt7622-bpi-r64-wifi-eeprom.patch @@ -1,3 +1,17 @@ +From 3a93704a63cf018187411108d241c35ec83992c0 Mon Sep 17 00:00:00 2001 +From: Daniel Golle +Date: Fri, 20 Aug 2021 18:31:48 +0100 +Subject: [PATCH] mediatek: add EEPROM data for BPi-R64 2.4GHz wmac + +EEPROM data extracted from vendor image found at +http://forum.banana-pi.org/t/bpi-r64-mt7622-mac80211-wifi-driver/10246/77 +http://forum.banana-pi.org/uploads/short-url/jworbyBYpvrw9VQ2sx92B9z6DWS.bin + +MAC address in the EEPROM has been zero'd which results in random +address on boot. + +Signed-off-by: Daniel Golle +--- --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts @@ -650,5 +650,28 @@ diff --git a/target/linux/mediatek/patches-6.12/911-dts-mt7622-bpi-r64-add-rootdisk.patch b/target/linux/mediatek/patches-6.12/911-dts-mt7622-bpi-r64-add-rootdisk.patch index 28c26db0ed8..c6c50454cb1 100644 --- a/target/linux/mediatek/patches-6.12/911-dts-mt7622-bpi-r64-add-rootdisk.patch +++ b/target/linux/mediatek/patches-6.12/911-dts-mt7622-bpi-r64-add-rootdisk.patch @@ -1,3 +1,13 @@ +From 208f6c1232901835708eb4ace44ae17628fc12f5 Mon Sep 17 00:00:00 2001 +From: Daniel Golle +Date: Sun, 21 Jan 2024 23:50:02 +0000 +Subject: [PATCH] mediatek: mt7622: convert BPi-R64 to all-UBI layout and fitblk + +Modernize bootloader and flash memory layout of the BPi-R64 similar to +how it has also been done for the BPi-R3. + +Signed-off-by: Daniel Golle +--- --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts @@ -32,6 +32,9 @@ diff --git a/target/linux/mediatek/patches-6.12/911-dts-mt7988a-bpi-r4-be14-wifi-eeprom.patch b/target/linux/mediatek/patches-6.12/911-dts-mt7988a-bpi-r4-be14-wifi-eeprom.patch index 87041d4693a..752303394fa 100644 --- a/target/linux/mediatek/patches-6.12/911-dts-mt7988a-bpi-r4-be14-wifi-eeprom.patch +++ b/target/linux/mediatek/patches-6.12/911-dts-mt7988a-bpi-r4-be14-wifi-eeprom.patch @@ -1,3 +1,34 @@ +From 561e3cf678970ae29a719e559943d260a9ba18bb Mon Sep 17 00:00:00 2001 +From: Daniel Pawlik +Date: Mon, 16 Mar 2026 14:26:51 +0100 +Subject: [PATCH] mediatek: device tree overlay for BPI-R4 with BE14 module + +Some Banana Pi BPI-R4 BE14 WiFi modules are shipped with zeroed +tx_power fields in EEPROM (2G/5G/6G). This leads to low transmit power +on affected bands. +This overlay provides known-good EEPROM data (including correct tx_power +values for 2G/5G/6G bands) dumped from a working BE14 module. + +To enable BE14 overlay, add into u-boot bootconf_extra +parameter: 'mt7988a-bananapi-bpi-r4-wifi-be14'. +You can use example script: + + overlay="mt7988a-bananapi-bpi-r4-wifi-be14" + current="$(fw_printenv -n bootconf_extra 2>/dev/null)" + if [ -n "${current}" ]; then + fw_setenv bootconf_extra "${current}#${overlay}" + else + fw_setenv bootconf_extra "${overlay}" + fi + +Earlier proposal proposed in [1] was fallback to default values if +invalid EEPROM content is detected. + +[1] https://github.com/openwrt/openwrt/pull/19503/ + +Fixes: https://github.com/openwrt/openwrt/issues/17489 +Signed-off-by: Daniel Pawlik +--- --- /dev/null +++ b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-wifi-be14.dtso @@ -0,0 +1,280 @@ diff --git a/target/linux/mediatek/patches-6.12/930-spi-mt65xx-enable-sel-clk.patch b/target/linux/mediatek/patches-6.12/930-spi-mt65xx-enable-sel-clk.patch index 52942c20697..b15dde1c3b1 100644 --- a/target/linux/mediatek/patches-6.12/930-spi-mt65xx-enable-sel-clk.patch +++ b/target/linux/mediatek/patches-6.12/930-spi-mt65xx-enable-sel-clk.patch @@ -1,3 +1,15 @@ +From 335c1e7cfdfd477a1106ca05c96ff8949ecd953f Mon Sep 17 00:00:00 2001 +From: Furong Xu +Date: Fri, 16 Dec 2022 21:13:37 +0800 +Subject: [PATCH] mediatek: enable sel_clk for spi-mt65xx + +Without explicitly enabling sel_clk, clk_disable_unused() will disable +it when boot is done, causing CPU hang on SPI1 register access on MT7986. +Explicitly enable sel_clk to make SPI1 functional. + +Signed-off-by: Furong Xu +Signed-off-by: Chuanhong Guo +--- --- a/drivers/spi/spi-mt65xx.c +++ b/drivers/spi/spi-mt65xx.c @@ -1237,8 +1237,15 @@ static int mtk_spi_probe(struct platform diff --git a/target/linux/mediatek/patches-6.12/950-smartrg-i2c-led-driver.patch b/target/linux/mediatek/patches-6.12/950-smartrg-i2c-led-driver.patch index 95f39f1a2a5..5bc3debc825 100644 --- a/target/linux/mediatek/patches-6.12/950-smartrg-i2c-led-driver.patch +++ b/target/linux/mediatek/patches-6.12/950-smartrg-i2c-led-driver.patch @@ -1,3 +1,13 @@ +From a270f61c00c7d5a62664b85baa56a8ab1a242f8d Mon Sep 17 00:00:00 2001 +From: Daniel Golle +Date: Fri, 17 Nov 2023 02:01:34 +0000 +Subject: [PATCH] mediatek: import driver for Adtran SmartRG RGBW LED + +Import driver for I2C-connected HolTek MCU controlling the RGBW LED +found in Adtran SmartRG devices. + +Signed-off-by: Daniel Golle +--- --- drivers/leds/Kconfig | 10 ++++++++++ drivers/leds/Makefile | 1 + diff --git a/target/linux/mediatek/patches-6.12/955-dts-mt7968a-bpi-r3-add-label-to-gmac-for-sfp1-port.patch b/target/linux/mediatek/patches-6.12/955-dts-mt7968a-bpi-r3-add-label-to-gmac-for-sfp1-port.patch index f11cf016868..b0c3bc018a0 100644 --- a/target/linux/mediatek/patches-6.12/955-dts-mt7968a-bpi-r3-add-label-to-gmac-for-sfp1-port.patch +++ b/target/linux/mediatek/patches-6.12/955-dts-mt7968a-bpi-r3-add-label-to-gmac-for-sfp1-port.patch @@ -1,3 +1,17 @@ +From 84fc59c0d5285a0a0fe50e3cb2a85f6224362c55 Mon Sep 17 00:00:00 2001 +From: Jonas Jelonek +Date: Sun, 10 Nov 2024 00:43:23 +0000 +Subject: [PATCH] mediatek: filogic: bpi-r3: set netdev-name for sfp1 port + +Sets openwrt,netdev-name for the gmac1 node in the dts of BPI-R3, which +corresponds to the sfp1 slot, to have a proper naming and match the +label on the official BPI-R3 metal case. This renames the port from eth1 +to sfp1. +The COMPAT_VERSION is increased to denote that configuration has to be +adjusted manually. + +Signed-off-by: Jonas Jelonek +--- --- a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts +++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts @@ -195,6 +195,7 @@ diff --git a/target/linux/mediatek/patches-6.12/965-dts-mt7988a-add-trng-support.patch b/target/linux/mediatek/patches-6.12/965-dts-mt7988a-add-trng-support.patch index 77bd503437e..a04a36dd90b 100644 --- a/target/linux/mediatek/patches-6.12/965-dts-mt7988a-add-trng-support.patch +++ b/target/linux/mediatek/patches-6.12/965-dts-mt7988a-add-trng-support.patch @@ -1,4 +1,7 @@ -arm64: dts: mediatek: mt7988: add trng node +From afcec128c572eb1064472b772ffba3f44e2dbfeb Mon Sep 17 00:00:00 2001 +From: Marcos Alano +Date: Sun, 14 Sep 2025 22:32:12 -0300 +Subject: [PATCH] mediatek: add support for trng on mt7988a Add support for trng on mt7988a.