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 <daniel@makrotopia.org>
This commit is contained in:
Daniel Golle 2026-04-16 14:57:37 +01:00
parent 9bf606250d
commit 79c0127417
48 changed files with 589 additions and 1 deletions

View File

@ -1,3 +1,14 @@
From c46ccb69d17e584479df849a107423175a143c83 Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@nbd.name>
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 <nbd@nbd.name>
---
--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
@@ -1,7 +1,6 @@

View File

@ -1,3 +1,14 @@
From c46ccb69d17e584479df849a107423175a143c83 Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@nbd.name>
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 <nbd@nbd.name>
---
--- a/arch/arm/boot/dts/mediatek/mt7629-rfb.dts
+++ b/arch/arm/boot/dts/mediatek/mt7629-rfb.dts
@@ -18,6 +18,7 @@

View File

@ -1,3 +1,13 @@
From 99cd44487e2e7205e1521a52faf498dfda6f100c Mon Sep 17 00:00:00 2001
From: Chuanhong Guo <gch981213@gmail.com>
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 <gch981213@gmail.com>
---
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -575,6 +575,7 @@

View File

@ -1,3 +1,13 @@
From e1adb1fa39dd5ef97280ad1b2bb9e8ff4c43674f Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
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 <daniel@makrotopia.org>
---
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -135,6 +135,13 @@

View File

@ -1,3 +1,12 @@
From 50416c18dd309fec75b6911221905cd0c0139b25 Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@nbd.name>
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 <nbd@nbd.name>
---
--- 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 @@

View File

@ -1,3 +1,13 @@
From 25d9df670b850a4e3702e084ff249baa1670ae3f Mon Sep 17 00:00:00 2001
From: Mark-MC Lee (李明昌) <Mark-MC.Lee@mediatek.com>
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 (李明昌) <Mark-MC.Lee@mediatek.com>
---
--- 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 @@

View File

@ -1,3 +1,13 @@
From 25d9df670b850a4e3702e084ff249baa1670ae3f Mon Sep 17 00:00:00 2001
From: Mark-MC Lee (李明昌) <Mark-MC.Lee@mediatek.com>
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 (李明昌) <Mark-MC.Lee@mediatek.com>
---
--- 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 @@

View File

@ -1,3 +1,14 @@
From dfa0a38d1f4d5bbac768569e3769ae4438a57e73 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
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 <daniel@makrotopia.org>
---
--- 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 @@

View File

@ -1,3 +1,15 @@
From dfa0a38d1f4d5bbac768569e3769ae4438a57e73 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
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 <daniel@makrotopia.org>
---
--- 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 @@

View File

@ -1,3 +1,14 @@
From 8dd0215676a304456d25ff3ac4542c7303831a90 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
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 <daniel@makrotopia.org>
---
--- 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 @@

View File

@ -1,3 +1,14 @@
From 2138956bdc3145fac26d2ba8ac966f31d33cd290 Mon Sep 17 00:00:00 2001
From: Chuanhong Guo <gch981213@gmail.com>
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 <gch981213@gmail.com>
---
--- 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_

View File

@ -1,3 +1,14 @@
From d3f058db1cb9b2d43764cd0d84fdc2779f0abacf Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
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 <john@phrozen.org>
---
--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
@@ -558,6 +558,65 @@

View File

@ -1,3 +1,14 @@
From c46ccb69d17e584479df849a107423175a143c83 Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@nbd.name>
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 <nbd@nbd.name>
---
--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
@@ -599,7 +599,7 @@

View File

@ -1,3 +1,16 @@
From 127ad76311079a842578e788a8af364f3910c676 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
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 <john@phrozen.org>
---
--- a/arch/arm/boot/dts/mediatek/mt7623.dtsi
+++ b/arch/arm/boot/dts/mediatek/mt7623.dtsi
@@ -995,17 +995,15 @@

View File

@ -1,3 +1,14 @@
From 25d9df670b850a4e3702e084ff249baa1670ae3f Mon Sep 17 00:00:00 2001
From: Mark-MC Lee (李明昌) <Mark-MC.Lee@mediatek.com>
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 (李明昌) <Mark-MC.Lee@mediatek.com>
---
--- 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 @@

View File

@ -1,3 +1,14 @@
From 25d9df670b850a4e3702e084ff249baa1670ae3f Mon Sep 17 00:00:00 2001
From: Mark-MC Lee (李明昌) <Mark-MC.Lee@mediatek.com>
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 (李明昌) <Mark-MC.Lee@mediatek.com>
---
--- 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 @@

View File

@ -1,3 +1,12 @@
From 21c7a8593d86175c0764d23e77bb019fd9617f53 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
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 <daniel@makrotopia.org>
---
--- 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 @@

View File

@ -1,3 +1,13 @@
From 25d9df670b850a4e3702e084ff249baa1670ae3f Mon Sep 17 00:00:00 2001
From: Mark-MC Lee (李明昌) <Mark-MC.Lee@mediatek.com>
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 (李明昌) <Mark-MC.Lee@mediatek.com>
---
--- 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 @@

View File

@ -1,3 +1,14 @@
From 6368ed1ae5b628898b33273c8950f7b7575e4414 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
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 <daniel@makrotopia.org>
---
--- 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 @@

View File

@ -1,3 +1,13 @@
From e1adb1fa39dd5ef97280ad1b2bb9e8ff4c43674f Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
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 <daniel@makrotopia.org>
---
--- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
@@ -68,6 +68,14 @@

View File

@ -1,3 +1,15 @@
From 7a0ec001ff79b12beefb8f3773820bfedebbb340 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
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 <daniel@makrotopia.org>
---
--- 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 @@

View File

@ -1,3 +1,15 @@
From 61137a88952e125c574aa35209fd581591d8796a Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
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 <daniel@makrotopia.org>
---
--- 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 @@

View File

@ -1,3 +1,13 @@
From 4dd35ca6747a57261f3b10982a4a8cc765d6549f Mon Sep 17 00:00:00 2001
From: Lorenzo Bianconi <lorenzo@kernel.org>
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 <lorenzo@kernel.org>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
--- a/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
@@ -145,6 +145,32 @@

View File

@ -1,3 +1,15 @@
From 68d5efaa10cf0689521fe05e386e3a1e11d8cb29 Mon Sep 17 00:00:00 2001
From: Chuanhong Guo <gch981213@gmail.com>
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 <gch981213@gmail.com>
---
--- a/drivers/mtd/nand/spi/core.c
+++ b/drivers/mtd/nand/spi/core.c
@@ -19,6 +19,7 @@

View File

@ -1,3 +1,10 @@
From f9a28d216d65b55e1139e2c73d016c5e77d7fe0b Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@nbd.name>
Date: Sat, 4 Dec 2021 22:46:00 +0100
Subject: [PATCH] mediatek: enable bmt on mt7622-rfb1
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
@@ -572,6 +572,7 @@

View File

@ -1,3 +1,15 @@
From 127ad76311079a842578e788a8af364f3910c676 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
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 <john@phrozen.org>
---
--- 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

View File

@ -1,3 +1,15 @@
From 4841ac042e00df7e29d305eb92f68994ebc739fd Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
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 <john@phrozen.org>
---
--- a/drivers/crypto/inside-secure/safexcel.h
+++ b/drivers/crypto/inside-secure/safexcel.h
@@ -743,6 +743,9 @@ struct safexcel_priv_data {

View File

@ -1,3 +1,15 @@
From 66458c49aa14ebc9ba2e4f9b6a323b8ff122807b Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
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 <john@phrozen.org>
---
--- a/drivers/tty/serial/8250/8250.h
+++ b/drivers/tty/serial/8250/8250.h
@@ -86,6 +86,7 @@ struct serial8250_config {

View File

@ -1,3 +1,16 @@
From edc7cb910433e05eac61b13d94163f1e07fa6af4 Mon Sep 17 00:00:00 2001
From: Dim Fish <dimfish@gmail.com>
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 <dimfish@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17963
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
---
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

View File

@ -1,3 +1,14 @@
From c46ccb69d17e584479df849a107423175a143c83 Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@nbd.name>
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 <nbd@nbd.name>
---
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -443,6 +443,12 @@ config ROCKCHIP_PHY

View File

@ -1,3 +1,14 @@
From ade563ba84496406243b3699a27b3de7e08399e7 Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@nbd.name>
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 <nbd@nbd.name>
---
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -844,6 +844,12 @@

View File

@ -1,3 +1,15 @@
From 6a2e17d5c1451025396ba523e9f2d112212c7261 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
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 <daniel@makrotopia.org>
---
--- 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

View File

@ -1,3 +1,20 @@
From d0d6b8e1833c587d0c50cac4f6324aa93b0bc8fc Mon Sep 17 00:00:00 2001
From: John Audia <therealgraysky@proton.me>
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 <therealgraysky@proton.me>
Tested-by: Rui Salvaterra <rsalvaterra@gmail.com>
Tested-by: John Audia <therealgraysky@proton.me>
---
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -23,11 +23,17 @@

View File

@ -1,3 +1,12 @@
From ddfae94a14bf0fc301505da75825dfe473525a33 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
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 <john@phrozen.org>
---
--- a/drivers/net/pcs/pcs-mtk-usxgmii.c
+++ b/drivers/net/pcs/pcs-mtk-usxgmii.c
@@ -52,6 +52,12 @@

View File

@ -1,3 +1,15 @@
From d62fc50ff42223df2bd82c1ea0f1786ea26d3f08 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
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 <daniel@makrotopia.org>
---
--- a/drivers/net/phy/mediatek/mtk-2p5ge.c
+++ b/drivers/net/phy/mediatek/mtk-2p5ge.c
@@ -12,13 +12,77 @@

View File

@ -1,3 +1,15 @@
From 2595e31220f8e515714a71deb781e3fdf8c483ef Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
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 <daniel@makrotopia.org>
---
--- a/drivers/cpufreq/mediatek-cpufreq.c
+++ b/drivers/cpufreq/mediatek-cpufreq.c
@@ -741,6 +741,16 @@ static struct platform_driver mtk_cpufre

View File

@ -1,3 +1,15 @@
From 2595e31220f8e515714a71deb781e3fdf8c483ef Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
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 <daniel@makrotopia.org>
---
--- a/drivers/cpufreq/mediatek-cpufreq.c
+++ b/drivers/cpufreq/mediatek-cpufreq.c
@@ -35,6 +35,8 @@ struct mtk_cpufreq_platform_data {

View File

@ -1,3 +1,14 @@
From 2595e31220f8e515714a71deb781e3fdf8c483ef Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
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 <daniel@makrotopia.org>
---
--- a/drivers/cpufreq/mediatek-cpufreq.c
+++ b/drivers/cpufreq/mediatek-cpufreq.c
@@ -781,6 +781,12 @@ static const struct mtk_cpufreq_platform

View File

@ -1,3 +1,48 @@
From 957a0921e20257bd94b7f5ace6e07a68e8388499 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
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 <daniel@makrotopia.org>
---
--- /dev/null
+++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-respeaker-2mics.dtso
@@ -0,0 +1,65 @@

View File

@ -1,3 +1,16 @@
From b40f707f71d4e1fee9b2c20d62e235c5aba5533b Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
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 <daniel@makrotopia.org>
---
--- 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 @@

View File

@ -1,3 +1,17 @@
From c27279dc26a26b8ad054882d4c5f86a85526fd16 Mon Sep 17 00:00:00 2001
From: Yoonji Park <koreapyj@dcmys.kr>
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 <koreapyj@dcmys.kr>
---
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1505,6 +1505,14 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN

View File

@ -1,3 +1,17 @@
From 3a93704a63cf018187411108d241c35ec83992c0 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
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 <daniel@makrotopia.org>
---
--- 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 @@

View File

@ -1,3 +1,13 @@
From 208f6c1232901835708eb4ace44ae17628fc12f5 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
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 <daniel@makrotopia.org>
---
--- 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 @@

View File

@ -1,3 +1,34 @@
From 561e3cf678970ae29a719e559943d260a9ba18bb Mon Sep 17 00:00:00 2001
From: Daniel Pawlik <pawlik.dan@gmail.com>
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 <pawlik.dan@gmail.com>
---
--- /dev/null
+++ b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-wifi-be14.dtso
@@ -0,0 +1,280 @@

View File

@ -1,3 +1,15 @@
From 335c1e7cfdfd477a1106ca05c96ff8949ecd953f Mon Sep 17 00:00:00 2001
From: Furong Xu <xfr@outlook.com>
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 <xfr@outlook.com>
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
---
--- a/drivers/spi/spi-mt65xx.c
+++ b/drivers/spi/spi-mt65xx.c
@@ -1237,8 +1237,15 @@ static int mtk_spi_probe(struct platform

View File

@ -1,3 +1,13 @@
From a270f61c00c7d5a62664b85baa56a8ab1a242f8d Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
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 <daniel@makrotopia.org>
---
---
drivers/leds/Kconfig | 10 ++++++++++
drivers/leds/Makefile | 1 +

View File

@ -1,3 +1,17 @@
From 84fc59c0d5285a0a0fe50e3cb2a85f6224362c55 Mon Sep 17 00:00:00 2001
From: Jonas Jelonek <jelonek.jonas@gmail.com>
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 <jelonek.jonas@gmail.com>
---
--- 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 @@

View File

@ -1,4 +1,7 @@
arm64: dts: mediatek: mt7988: add trng node
From afcec128c572eb1064472b772ffba3f44e2dbfeb Mon Sep 17 00:00:00 2001
From: Marcos Alano <marcoshalano@gmail.com>
Date: Sun, 14 Sep 2025 22:32:12 -0300
Subject: [PATCH] mediatek: add support for trng on mt7988a
Add support for trng on mt7988a.