include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
-PKG_VERSION:=2026.04
-PKG_HASH:=ac7c04b8b7004923b00a4e5d6699c5df4d21233bac9fda690d8cfbc209fff2fd
+PKG_VERSION:=2026.07
+PKG_HASH:=78e8bfc382fe388f9b55aa1daf8c563522a037779b5d4c349d1415e381f1243e
PKG_BUILD_DEPENDS:=!(TARGET_ramips||TARGET_mediatek_mt7623):arm-trusted-firmware-tools/host
ifdef CONFIG_TARGET_ramips
+++ /dev/null
-From b681f2be8cc81de83fdd4c56cdb35755ca0409eb Mon Sep 17 00:00:00 2001
-From: Shiji Yang <yangshiji66@outlook.com>
-Date: Sat, 31 Jan 2026 10:33:50 +0800
-Subject: [PATCH] pinctrl: mediatek: set MT798x rev as MTK_PINCTRL_V1
-
-The MT798x series SoCs have IES regiter definitions. They should
-belong to the pinctrl v1 revision.
-
-Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
----
- drivers/pinctrl/mediatek/pinctrl-mt7981.c | 1 +
- drivers/pinctrl/mediatek/pinctrl-mt7986.c | 1 +
- drivers/pinctrl/mediatek/pinctrl-mt7987.c | 1 +
- drivers/pinctrl/mediatek/pinctrl-mt7988.c | 1 +
- 4 files changed, 4 insertions(+)
-
---- a/drivers/pinctrl/mediatek/pinctrl-mt7981.c
-+++ b/drivers/pinctrl/mediatek/pinctrl-mt7981.c
-@@ -1070,6 +1070,7 @@ static const struct mtk_pinctrl_soc mt79
- .gpio_mode = 0,
- .base_names = mt7981_pinctrl_register_base_names,
- .nbase_names = ARRAY_SIZE(mt7981_pinctrl_register_base_names),
-+ .rev = MTK_PINCTRL_V1,
- .base_calc = 1,
- };
-
---- a/drivers/pinctrl/mediatek/pinctrl-mt7986.c
-+++ b/drivers/pinctrl/mediatek/pinctrl-mt7986.c
-@@ -755,6 +755,7 @@ static const struct mtk_pinctrl_soc mt79
- .gpio_mode = 0,
- .base_names = mt7986_pinctrl_register_base_names,
- .nbase_names = ARRAY_SIZE(mt7986_pinctrl_register_base_names),
-+ .rev = MTK_PINCTRL_V1,
- .base_calc = 1,
- };
-
---- a/drivers/pinctrl/mediatek/pinctrl-mt7987.c
-+++ b/drivers/pinctrl/mediatek/pinctrl-mt7987.c
-@@ -712,6 +712,7 @@ static const struct mtk_pinctrl_soc mt79
- .gpio_mode = 0,
- .base_names = mt7987_pinctrl_register_base_names,
- .nbase_names = ARRAY_SIZE(mt7987_pinctrl_register_base_names),
-+ .rev = MTK_PINCTRL_V1,
- .base_calc = 1,
- };
-
---- a/drivers/pinctrl/mediatek/pinctrl-mt7988.c
-+++ b/drivers/pinctrl/mediatek/pinctrl-mt7988.c
-@@ -1250,6 +1250,7 @@ static const struct mtk_pinctrl_soc mt79
- .gpio_mode = 0,
- .base_names = mt7988_pinctrl_register_base_names,
- .nbase_names = ARRAY_SIZE(mt7988_pinctrl_register_base_names),
-+ .rev = MTK_PINCTRL_V1,
- .base_calc = 1,
- };
-
+++ /dev/null
-From 8ef8dee4f3a2b2021decfefd853dbd2a1632b77f Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Jo=C3=A3o=20Marcos=20Costa?= <joaomarcos.costa@bootlin.com>
-Date: Wed, 29 Apr 2026 16:46:15 +0200
-Subject: [PATCH] scripts/dtc: drop yaml in DT validation
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The build issues found in dtc/yamltree were partially mitigated by a
-previous commit (807bcd844a: "scripts/dtc: Fix pkg-config behavior under
-sysroot"), but upstream dtc simply disabled yaml, and the same should be
-done here in order to permanently avoid those issues.
-
-Backport the change below from Linux v5.18 [1]:
-
-ef8795f3f1c ("dt-bindings: kbuild: Use DTB files for validation")
-
-I tested this patch with a couple Yocto builds: u-boot and u-boot-tools,
-using the current master branch (rev. "c53b0708f9"), having removed
-libyaml-native from u-boot-tools's dependencies.
-
-[1] https://git.kernel.org/linus/ef8795f3f1ce
-
-Signed-off-by: João Marcos Costa <joaomarcos.costa@bootlin.com>
-Acked-by: Quentin Schulz <quentin.schulz@cherry.de>
----
- scripts/Makefile.lib | 6 ------
- scripts/dtc/Makefile | 8 --------
- scripts/dtc/update-dtc-source.sh | 2 +-
- 3 files changed, 1 insertion(+), 15 deletions(-)
-
---- a/scripts/Makefile.lib
-+++ b/scripts/Makefile.lib
-@@ -86,12 +86,6 @@ base-dtb-y := $(foreach m, $(multi-dtb-y
- extra-y += $(dtb-y)
- extra-$(CONFIG_OF_ALL_DTBS) += $(dtb-)
-
--# U-Boot specific
--ifneq ($(CHECK_DTBS),)
--extra-y += $(patsubst %.dtb,%.dt.yaml, $(dtb-y))
--extra-$(CONFIG_OF_ALL_DTBS) += $(patsubst %.dtb,%.dt.yaml, $(dtb-))
--endif
--
- # Add subdir path
-
- extra-y := $(addprefix $(obj)/,$(extra-y))
---- a/scripts/dtc/Makefile
-+++ b/scripts/dtc/Makefile
-@@ -17,15 +17,7 @@ fdtoverlay-objs := $(libfdt) fdtoverlay.
- # Source files need to get at the userspace version of libfdt_env.h to compile
- HOST_EXTRACFLAGS := -I$(srctree)/$(src)/libfdt
-
--ifeq ($(wildcard $(PKG_CONFIG_SYSROOT_DIR)/usr/include/yaml.h),)
- HOST_EXTRACFLAGS += -DNO_YAML
--else
--dtc-objs += yamltree.o
--# To include <yaml.h> installed in a non-default path
--HOSTCFLAGS_yamltree.o := $(shell pkg-config --cflags yaml-0.1)
--# To link libyaml installed in a non-default path
--HOSTLDLIBS_dtc := $(shell pkg-config --libs yaml-0.1)
--endif
-
- # Generated files need one more search path to include headers in source tree
- HOSTCFLAGS_dtc-lexer.lex.o := -I$(src)
---- a/scripts/dtc/update-dtc-source.sh
-+++ b/scripts/dtc/update-dtc-source.sh
-@@ -32,7 +32,7 @@ DTC_UPSTREAM_PATH=`pwd`/../dtc
- DTC_LINUX_PATH=`pwd`/scripts/dtc
-
- DTC_SOURCE="checks.c data.c dtc.c dtc.h flattree.c fstree.c livetree.c srcpos.c \
-- srcpos.h treesource.c util.c util.h version_gen.h yamltree.c \
-+ srcpos.h treesource.c util.c util.h version_gen.h \
- dtc-lexer.l dtc-parser.y"
- LIBFDT_SOURCE="fdt.c fdt.h fdt_addresses.c fdt_empty_tree.c \
- fdt_overlay.c fdt_ro.c fdt_rw.c fdt_strerror.c fdt_sw.c \
+++ /dev/null
-From de79075f0f6b8795d1f9e30ff36435583b1a119a Mon Sep 17 00:00:00 2001
-From: Shiji Yang <yangshiji66@outlook.com>
-Date: Sun, 12 Apr 2026 20:12:25 +0800
-Subject: [PATCH] mips: mtmips: align MT7621 image blobs to 8-byte boundary
-
-MT7621 doesn't boot on u-boot v2026.04. Fix it by correcting the
-u-boot aligned offset.
-
-Fixes: d9e183a04c92 ("MIPS: Assure end of U-Boot is at 8-byte aligned offset")
-Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
-Reviewed-by: Weijie Gao <weijie.gao@mediatek.com>
----
- arch/mips/dts/mt7621-u-boot.dtsi | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
---- a/arch/mips/dts/mt7621-u-boot.dtsi
-+++ b/arch/mips/dts/mt7621-u-boot.dtsi
-@@ -47,13 +47,13 @@
-
- &binman {
- u-boot-spl-ddr {
-- align = <4>;
-- align-size = <4>;
-+ align = <8>;
-+ align-size = <8>;
- filename = "u-boot-spl-ddr.bin";
- pad-byte = <0xff>;
-
- u-boot-spl {
-- align-end = <4>;
-+ align-end = <8>;
- filename = "u-boot-spl.bin";
- };
-
-@@ -90,7 +90,7 @@
-
- #ifndef CONFIG_MT7621_BOOT_FROM_NAND
- u-boot-tpl {
-- align-end = <4>;
-+ align-end = <8>;
- filename = "u-boot-tpl.bin";
- };
- #endif
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
-@@ -1130,6 +1130,9 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
+@@ -1109,6 +1109,9 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
mt7986b-sd-rfb.dtb \
mt7986a-emmc-rfb.dtb \
mt7986b-emmc-rfb.dtb \
--- /dev/null
+scripts: Makefile.lib: drop -Wno-graph_child_address
+
+The graph_child_address check was removed from upstream dtc and is no
+longer present in dtc bundled with Linux 6.18 or in dtc 1.8.x. Passing
+-Wno-graph_child_address to such dtc aborts the build:
+
+ FATAL ERROR: Unrecognized check name "graph_child_address"
+
+Drop the flag. Older dtc versions which still implement the check will
+at most emit warnings for affected device trees.
+
+--- a/scripts/Makefile.lib
++++ b/scripts/Makefile.lib
+@@ -357,7 +357,6 @@
+ -Wno-unit_address_format \
+ -Wno-avoid_unnecessary_addr_size \
+ -Wno-alias_paths \
+- -Wno-graph_child_address \
+ -Wno-simple_bus_reg \
+ -Wno-unique_unit_address \
+ -Wno-pci_device_reg
--- a/common/board_r.c
+++ b/common/board_r.c
-@@ -398,6 +398,20 @@ static int initr_nand(void)
+@@ -397,6 +397,20 @@ static int initr_nand(void)
}
#endif
#if defined(CONFIG_CMD_ONENAND)
/* go init the NAND */
static int initr_onenand(void)
-@@ -706,6 +720,9 @@ static void initcall_run_r(void)
+@@ -700,6 +714,9 @@ static void initcall_run_r(void)
#if CONFIG_IS_ENABLED(CMD_ONENAND)
INITCALL(initr_onenand);
#endif
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
-@@ -1624,6 +1624,12 @@ config CMD_NAND_WATCH
+@@ -1639,6 +1639,12 @@ config CMD_NAND_WATCH
endif # CMD_NAND
depends on NVME
--- a/cmd/Makefile
+++ b/cmd/Makefile
-@@ -132,6 +132,7 @@ obj-y += legacy-mtd-utils.o
+@@ -131,6 +131,7 @@ obj-y += legacy-mtd-utils.o
endif
obj-$(CONFIG_CMD_MUX) += mux.o
obj-$(CONFIG_CMD_NAND) += nand.o
+obj-$(CONFIG_CMD_NMBM) += nmbm.o
- ifdef CONFIG_NET
+ ifdef CONFIG_NET_LEGACY
obj-$(CONFIG_CMD_NET) += net.o net-common.o
else ifdef CONFIG_NET_LWIP
--- /dev/null
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
-@@ -1624,6 +1624,14 @@ config CMD_NAND_WATCH
+@@ -1639,6 +1639,14 @@ config CMD_NAND_WATCH
endif # CMD_NAND
bool "nmbm"
--- a/cmd/Makefile
+++ b/cmd/Makefile
-@@ -132,6 +132,7 @@ obj-y += legacy-mtd-utils.o
+@@ -131,6 +131,7 @@ obj-y += legacy-mtd-utils.o
endif
obj-$(CONFIG_CMD_MUX) += mux.o
obj-$(CONFIG_CMD_NAND) += nand.o
+obj-$(CONFIG_CMD_NAND_EXT) += nand-ext.o
obj-$(CONFIG_CMD_NMBM) += nmbm.o
- ifdef CONFIG_NET
+ ifdef CONFIG_NET_LEGACY
obj-$(CONFIG_CMD_NET) += net.o net-common.o
--- /dev/null
+++ b/cmd/nand-ext.c
select ENV_IS_NOWHERE
config ENV_IS_NOWHERE
-@@ -293,6 +294,21 @@ config ENV_IS_IN_SCSI
- Define this if you have an SCSI device which you want to use for the
- environment.
+@@ -311,6 +312,21 @@ config ENV_IS_IN_SCSI
+ UUID of the SCSI partition where the environment is stored.
+
+config ENV_IS_IN_NMBM
+ bool "Environment in a NMBM upper MTD layer"
config ENV_RANGE
hex "Length of the region in which the environment can be written"
depends on ENV_IS_IN_NAND
-@@ -603,7 +619,7 @@ config ENV_ADDR_REDUND
+@@ -621,7 +637,7 @@ config ENV_ADDR_REDUND
config ENV_OFFSET
hex "Environment offset"
depends on ENV_IS_IN_EEPROM || ENV_IS_IN_MMC || ENV_IS_IN_NAND || \
static int spi_nor_hwcaps2cmd(u32 hwcaps, const int table[][2], size_t size)
{
size_t i;
-@@ -4488,6 +4582,7 @@ int spi_nor_scan(struct spi_nor *nor)
+@@ -4589,6 +4683,7 @@ int spi_nor_scan(struct spi_nor *nor)
nor->write = spi_nor_write_data;
nor->read_reg = spi_nor_read_reg;
nor->write_reg = spi_nor_write_reg;
+ status = "disabled";
+ };
+
- snor: snor@11014000 {
+ snor: spi@11014000 {
compatible = "mediatek,mtk-snor";
reg = <0x11014000 0x1000>;
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
-@@ -1120,6 +1120,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
+@@ -1099,6 +1099,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
mt7622-bananapi-bpi-r64.dtb \
mt7623n-bananapi-bpi-r2.dtb \
mt7981-rfb.dtb \
--- a/drivers/mtd/spi/spi-nor-ids.c
+++ b/drivers/mtd/spi/spi-nor-ids.c
-@@ -83,7 +83,10 @@ const struct flash_info spi_nor_ids[] =
+@@ -94,7 +94,10 @@ const struct flash_info spi_nor_ids[] =
{ INFO("en25q32b", 0x1c3016, 0, 64 * 1024, 64, 0) },
{ INFO("en25q64", 0x1c3017, 0, 64 * 1024, 128, SECT_4K) },
{ INFO("en25q128b", 0x1c3018, 0, 64 * 1024, 256, 0) },
+ { INFO("en25qx256a", 0x1c7119, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) },
{ INFO("en25s64", 0x1c3817, 0, 64 * 1024, 128, SECT_4K) },
#endif
- #ifdef CONFIG_SPI_FLASH_GIGADEVICE /* GIGADEVICE */
-@@ -149,6 +152,11 @@ const struct flash_info spi_nor_ids[] =
+ #ifdef CONFIG_SPI_FRAM_FUJITSU
+@@ -173,6 +176,11 @@ const struct flash_info spi_nor_ids[] =
{INFO("gd55x02g", 0xc8481C, 0, 64 * 1024, 4096, SECT_4K |
SPI_NOR_OCTAL_READ | SPI_NOR_4B_OPCODES)},
{
INFO("gd25lq128", 0xc86018, 0, 64 * 1024, 256,
SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
-@@ -257,6 +265,7 @@ const struct flash_info spi_nor_ids[] =
+@@ -315,6 +323,7 @@ const struct flash_info spi_nor_ids[] =
{ INFO("mx25u3235f", 0xc22536, 0, 4 * 1024, 1024, SECT_4K) },
{ INFO("mx25u6435f", 0xc22537, 0, 64 * 1024, 128, SECT_4K) },
{ INFO("mx25l12805d", 0xc22018, 0, 64 * 1024, 256, SECT_4K) },
+ { INFO("mx25l12833f", 0xc22018, 0, 64 * 1024, 256, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
- { INFO("mx25u12835f", 0xc22538, 0, 64 * 1024, 256, SECT_4K) },
+ { INFO("mx25u12835f", 0xc22538, 0, 64 * 1024, 256, SECT_4K |
+ SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
{ INFO("mx25u51245g", 0xc2253a, 0, 64 * 1024, 1024, SECT_4K |
- SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) },
-@@ -265,6 +274,7 @@ const struct flash_info spi_nor_ids[] =
+@@ -324,6 +333,7 @@ const struct flash_info spi_nor_ids[] =
{ INFO("mx25u25635f", 0xc22539, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_4B_OPCODES) },
{ INFO("mx25v8035f", 0xc22314, 0, 64 * 1024, 16, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
{ INFO("mx25r1635f", 0xc22815, 0, 64 * 1024, 32, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
{ INFO("mx25l25655e", 0xc22619, 0, 64 * 1024, 512, 0) },
{ INFO("mx66l51235l", 0xc2201a, 0, 64 * 1024, 1024, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) },
{ INFO("mx66u51235f", 0xc2253a, 0, 64 * 1024, 1024, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) },
-@@ -525,6 +535,16 @@ const struct flash_info spi_nor_ids[] =
+@@ -595,6 +605,16 @@ const struct flash_info spi_nor_ids[] =
SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
},
{
INFO("w25q128jw", 0xef8018, 0, 64 * 1024, 256,
SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
-@@ -588,6 +608,11 @@ const struct flash_info spi_nor_ids[] =
+@@ -653,6 +673,11 @@ const struct flash_info spi_nor_ids[] =
SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
},
{ INFO("w25q256", 0xef4019, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
--- a/drivers/mmc/Kconfig
+++ b/drivers/mmc/Kconfig
-@@ -863,6 +863,14 @@ config MMC_MTK
+@@ -865,6 +865,14 @@ config MMC_MTK
This is needed if support for any SD/SDIO/MMC devices is required.
If unsure, say N.
--- a/env/Kconfig
+++ b/env/Kconfig
-@@ -714,6 +714,12 @@ config ENV_UBI_VOLUME_REDUND
+@@ -732,6 +732,12 @@ config ENV_UBI_VOLUME_REDUND
help
Name of the redundant volume that you want to store the environment in.
depends on ENV_IS_IN_UBI
--- a/env/ubi.c
+++ b/env/ubi.c
-@@ -105,6 +105,18 @@ static int env_ubi_save(void)
+@@ -103,6 +103,18 @@ static int env_ubi_save(void)
+ }
#endif /* CONFIG_ENV_REDUNDANT */
- #endif /* CONFIG_CMD_SAVEENV */
+int __weak env_ubi_volume_create(const char *volume)
+{
#ifdef CONFIG_ENV_REDUNDANT
static int env_ubi_load(void)
{
-@@ -134,6 +146,11 @@ static int env_ubi_load(void)
+@@ -132,6 +144,11 @@ static int env_ubi_load(void)
return -EIO;
}
read1_fail = ubi_volume_read(CONFIG_ENV_UBI_VOLUME, (void *)tmp_env1, 0,
CONFIG_ENV_SIZE);
if (read1_fail)
-@@ -171,6 +188,9 @@ static int env_ubi_load(void)
+@@ -169,6 +186,9 @@ static int env_ubi_load(void)
return -EIO;
}
+ };
+ };
+
- snfi: snfi@1100d000 {
+ snfi: spi@1100d000 {
compatible = "mediatek,mtk-snfi-spi";
reg = <0x1100d000 0x2000>;
CONFIG_DM_MTD=y
CONFIG_MTD_SPI_NAND=y
+CONFIG_MTD_UBI_FASTMAP=y
- CONFIG_PHY_FIXED=y
CONFIG_MEDIATEK_ETH=y
+ CONFIG_PHY_FIXED=y
+CONFIG_PCIE_MEDIATEK=y
+CONFIG_PHY=y
+CONFIG_PHY_MTK_TPHY=y
CONFIG_SPI_FLASH_XTX=y
CONFIG_SPI_FLASH_MTD=y
+CONFIG_MTD_UBI_FASTMAP=y
- CONFIG_PHY_FIXED=y
CONFIG_MEDIATEK_ETH=y
+ CONFIG_PHY_FIXED=y
+CONFIG_PCIE_MEDIATEK=y
+CONFIG_PHY=y
+CONFIG_PHY_MTK_TPHY=y
+CONFIG_LED_GPIO=y
CONFIG_MMC_HS200_SUPPORT=y
CONFIG_MMC_MTK=y
- CONFIG_PHY_FIXED=y
+ CONFIG_MEDIATEK_ETH=y
@@ -56,7 +83,10 @@ CONFIG_POWER_DOMAIN=y
CONFIG_MTK_POWER_DOMAIN=y
CONFIG_DM_REGULATOR=y
+CONFIG_LED_GPIO=y
CONFIG_MMC_HS200_SUPPORT=y
CONFIG_MMC_MTK=y
- CONFIG_PHY_FIXED=y
+ CONFIG_MEDIATEK_ETH=y
@@ -56,7 +83,10 @@ CONFIG_POWER_DOMAIN=y
CONFIG_MTK_POWER_DOMAIN=y
CONFIG_DM_REGULATOR=y
+++ /dev/null
-From 2b4d8df6054acb13cae20889c40102c93df2edd6 Mon Sep 17 00:00:00 2001
-From: developer <developer@mediatek.com>
-Date: Tue, 6 Jan 2026 19:52:11 +0800
-Subject: [PATCH] pinctrl: mediatek: MT7981: some register map fixes
-
-Fix mt7981 pinctrl setting mistake including:
-1) Wrong pinctrl bits length
-2) Wrong pinctrl register offset
-
-Link: https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/+/52579dd19e62df5aff784462e133e14bfe4a7726
-Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
----
- drivers/pinctrl/mediatek/pinctrl-mt7981.c | 16 ++++++++--------
- 1 file changed, 8 insertions(+), 8 deletions(-)
-
---- a/drivers/pinctrl/mediatek/pinctrl-mt7981.c
-+++ b/drivers/pinctrl/mediatek/pinctrl-mt7981.c
-@@ -106,7 +106,7 @@ static const struct mtk_pin_field_calc m
-
- PIN_FIELD_BASE(9, 9, 5, 0x20, 0x10, 9, 1),
- PIN_FIELD_BASE(10, 10, 5, 0x20, 0x10, 8, 1),
-- PIN_FIELD_BASE(11, 11, 5, 0x40, 0x10, 10, 1),
-+ PIN_FIELD_BASE(11, 11, 5, 0x20, 0x10, 10, 1),
- PIN_FIELD_BASE(12, 12, 5, 0x20, 0x10, 7, 1),
- PIN_FIELD_BASE(13, 13, 5, 0x20, 0x10, 11, 1),
-
-@@ -215,7 +215,7 @@ static const struct mtk_pin_field_calc m
- PIN_FIELD_BASE(41, 41, 7, 0x70, 0x10, 0, 1),
- PIN_FIELD_BASE(42, 42, 7, 0x70, 0x10, 9, 1),
- PIN_FIELD_BASE(43, 43, 7, 0x70, 0x10, 7, 1),
-- PIN_FIELD_BASE(44, 44, 7, 0x30, 0x10, 8, 1),
-+ PIN_FIELD_BASE(44, 44, 7, 0x70, 0x10, 8, 1),
- PIN_FIELD_BASE(45, 45, 7, 0x70, 0x10, 3, 1),
- PIN_FIELD_BASE(46, 46, 7, 0x70, 0x10, 4, 1),
- PIN_FIELD_BASE(47, 47, 7, 0x70, 0x10, 5, 1),
-@@ -279,8 +279,8 @@ static const struct mtk_pin_field_calc m
-
- PIN_FIELD_BASE(2, 2, 5, 0x00, 0x10, 18, 3),
-
-- PIN_FIELD_BASE(3, 3, 4, 0x00, 0x10, 18, 1),
-- PIN_FIELD_BASE(4, 4, 4, 0x00, 0x10, 6, 1),
-+ PIN_FIELD_BASE(3, 3, 4, 0x00, 0x10, 18, 3),
-+ PIN_FIELD_BASE(4, 4, 4, 0x00, 0x10, 6, 3),
- PIN_FIELD_BASE(5, 5, 4, 0x00, 0x10, 3, 3),
- PIN_FIELD_BASE(6, 6, 4, 0x00, 0x10, 9, 3),
- PIN_FIELD_BASE(7, 7, 4, 0x00, 0x10, 0, 3),
-@@ -288,9 +288,9 @@ static const struct mtk_pin_field_calc m
-
- PIN_FIELD_BASE(9, 9, 5, 0x00, 0x10, 27, 3),
- PIN_FIELD_BASE(10, 10, 5, 0x00, 0x10, 24, 3),
-- PIN_FIELD_BASE(11, 11, 5, 0x00, 0x10, 0, 3),
-+ PIN_FIELD_BASE(11, 11, 5, 0x10, 0x10, 0, 3),
- PIN_FIELD_BASE(12, 12, 5, 0x00, 0x10, 21, 3),
-- PIN_FIELD_BASE(13, 13, 5, 0x00, 0x10, 3, 3),
-+ PIN_FIELD_BASE(13, 13, 5, 0x10, 0x10, 3, 3),
-
- PIN_FIELD_BASE(14, 14, 4, 0x00, 0x10, 27, 3),
-
-@@ -302,7 +302,7 @@ static const struct mtk_pin_field_calc m
- PIN_FIELD_BASE(20, 20, 2, 0x00, 0x10, 9, 3),
- PIN_FIELD_BASE(21, 21, 2, 0x00, 0x10, 18, 3),
- PIN_FIELD_BASE(22, 22, 2, 0x00, 0x10, 21, 3),
-- PIN_FIELD_BASE(23, 23, 2, 0x00, 0x10, 0, 3),
-+ PIN_FIELD_BASE(23, 23, 2, 0x10, 0x10, 0, 3),
- PIN_FIELD_BASE(24, 24, 2, 0x00, 0x10, 27, 3),
- PIN_FIELD_BASE(25, 25, 2, 0x00, 0x10, 24, 3),
-
-@@ -368,7 +368,7 @@ static const struct mtk_pin_field_calc m
- PIN_FIELD_BASE(17, 17, 2, 0x30, 0x10, 5, 1),
- PIN_FIELD_BASE(18, 18, 2, 0x30, 0x10, 4, 1),
- PIN_FIELD_BASE(19, 19, 2, 0x30, 0x10, 2, 1),
-- PIN_FIELD_BASE(20, 20, 2, 0x90, 0x10, 3, 1),
-+ PIN_FIELD_BASE(20, 20, 2, 0x30, 0x10, 3, 1),
- PIN_FIELD_BASE(21, 21, 2, 0x30, 0x10, 6, 1),
- PIN_FIELD_BASE(22, 22, 2, 0x30, 0x10, 7, 1),
- PIN_FIELD_BASE(23, 23, 2, 0x30, 0x10, 10, 1),
--- a/Makefile
+++ b/Makefile
-@@ -1353,7 +1353,7 @@ quiet_cmd_pad_cat = CAT $@
+@@ -1354,7 +1354,7 @@ quiet_cmd_pad_cat = CAT $@
cmd_pad_cat = $(cmd_objcopy) && $(append) || { rm -f $@; false; }
quiet_cmd_lzma = LZMA $@
--- /dev/null
+From: Shiji Yang <yangshiji66@outlook.com>
+Date: Tue, 9 Jun 2026 20:12:13 +0800
+Subject: [PATCH] arm: dts: mediatek: exclude some unnecessary dtbs from build
+
+This can help avoid building dtc tools.
+
+Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
+---
+ arch/arm/dts/Makefile | 10 +---------
+ 1 file changed, 1 insertion(+), 9 deletions(-)
+
+--- a/arch/arm/dts/Makefile
++++ b/arch/arm/dts/Makefile
+@@ -1114,15 +1114,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
+ mt7987a-rfb.dtb \
+ mt7987a-sd-rfb.dtb \
+ mt7988-rfb.dtb \
+- mt7988-sd-rfb.dtb \
+- mt8183-pumpkin.dtb \
+- mt8371-genio-520-evk.dtb \
+- mt8371-genio-520-evk-ufs.dtb \
+- mt8391-genio-720-evk.dtb \
+- mt8391-genio-720-evk-ufs.dtb \
+- mt8512-bm1-emmc.dtb \
+- mt8516-pumpkin.dtb \
+- mt8518-ap1-emmc.dtb
++ mt7988-sd-rfb.dtb
+
+ dtb-$(CONFIG_ARCH_NPCM7xx) += nuvoton-npcm750-evb.dtb
+ dtb-$(CONFIG_ARCH_NPCM8XX) += nuvoton-npcm845-evb.dtb
board/mediatek/mt7986/mt7986_rfb.c | 54 ++++++++++++++++++++++++++++++
4 files changed, 182 insertions(+)
---- a/board/mediatek/mt7622/mt7622_rfb.c
-+++ b/board/mediatek/mt7622/mt7622_rfb.c
-@@ -9,4 +9,42 @@
- #include <init.h>
- #include <asm/global_data.h>
+--- a/board/mediatek/mt7622/Makefile
++++ b/board/mediatek/mt7622/Makefile
+@@ -1,3 +1,3 @@
+ # SPDX-License-Identifier: GPL-2.0
+-obj-y +=
++obj-y += mt7622_rfb.o
+--- /dev/null
++++ b/board/mediatek/mt7622/mt7622_rfb.c
+@@ -0,0 +1,46 @@
++// SPDX-License-Identifier: GPL-2.0
++
++#include <config.h>
++#include <env.h>
++#include <init.h>
++#include <asm/global_data.h>
++
+#include <mtd.h>
+#include <linux/mtd/mtd.h>
+#include <nmbm/nmbm.h>
+#include <nmbm/nmbm-mtd.h>
+
- DECLARE_GLOBAL_DATA_PTR;
++DECLARE_GLOBAL_DATA_PTR;
+
+int board_nmbm_init(void)
+{
+ clock-names = "rng";
+ };
+
- topckgen: topckgen@10210000 {
+ topckgen: clock-controller@10210000 {
compatible = "mediatek,mt7622-topckgen";
reg = <0x10210000 0x1000>;
--- a/cmd/bootm.c
+++ b/cmd/bootm.c
-@@ -260,6 +260,76 @@ U_BOOT_CMD(
+@@ -257,6 +257,76 @@ U_BOOT_CMD(
/* iminfo - print header info for a requested image */
/*******************************************************************/
#if defined(CONFIG_CMD_IMI)
puts(ANSI_CLEAR_LINE_TO_END);
printf(ANSI_CURSOR_POSITION, 3, 1);
puts(ANSI_CLEAR_LINE);
-@@ -573,6 +577,7 @@ static enum bootmenu_ret bootmenu_show(i
+@@ -569,6 +573,7 @@ static enum bootmenu_ret bootmenu_show(i
return BOOTMENU_RET_FAIL;
}
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
-@@ -732,6 +732,12 @@ config CMD_ENV_EXISTS
+@@ -746,6 +746,12 @@ config CMD_ENV_EXISTS
Check if a variable is defined in the environment for use in
shell scripting.
--- a/board/mediatek/mt7622/mt7622_rfb.c
+++ b/board/mediatek/mt7622/mt7622_rfb.c
-@@ -5,9 +5,16 @@
- */
+@@ -1,9 +1,16 @@
+ // SPDX-License-Identifier: GPL-2.0
#include <config.h>
+#include <dm.h>
#include <mtd.h>
#include <linux/mtd/mtd.h>
-@@ -16,6 +23,28 @@
+@@ -12,6 +19,28 @@
DECLARE_GLOBAL_DATA_PTR;
#ifdef CONFIG_ENABLE_NAND_NMBM
--- a/arch/arm/mach-mediatek/Kconfig
+++ b/arch/arm/mach-mediatek/Kconfig
-@@ -173,4 +173,11 @@ config MTK_TZ_MOVABLE
+@@ -215,4 +215,11 @@ config MTK_TZ_MOVABLE
select OF_SYSTEM_SETUP
bool
--- a/board/mediatek/mt7622/mt7622_rfb.c
+++ b/board/mediatek/mt7622/mt7622_rfb.c
-@@ -10,7 +10,9 @@
+@@ -6,7 +6,9 @@
#include <env.h>
#include <init.h>
#include <asm/global_data.h>
#ifndef CONFIG_RESET_BUTTON_LABEL
#define CONFIG_RESET_BUTTON_LABEL "reset"
-@@ -21,8 +23,46 @@
+@@ -17,8 +19,46 @@
#include <nmbm/nmbm.h>
#include <nmbm/nmbm-mtd.h>
int board_late_init(void)
{
struct udevice *dev;
-@@ -77,3 +117,84 @@ int board_nmbm_init(void)
+@@ -73,3 +113,84 @@ int board_nmbm_init(void)
return 0;
}
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_MMC_HS400_SUPPORT=y
CONFIG_MMC_MTK=y
- CONFIG_PHY_FIXED=y
CONFIG_MEDIATEK_ETH=y
+ CONFIG_PHY_FIXED=y
+CONFIG_PCIE_MEDIATEK=y
+CONFIG_PHY=y
CONFIG_PINCTRL=y
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_MMC_HS400_SUPPORT=y
CONFIG_MMC_MTK=y
- CONFIG_PHY_FIXED=y
CONFIG_MEDIATEK_ETH=y
+ CONFIG_PHY_FIXED=y
+CONFIG_PCIE_MEDIATEK=y
+CONFIG_PHY=y
CONFIG_PINCTRL=y
--- a/arch/arm/mach-mediatek/Kconfig
+++ b/arch/arm/mach-mediatek/Kconfig
-@@ -166,7 +166,7 @@ config MTK_BROM_HEADER_INFO
+@@ -208,7 +208,7 @@ config MTK_BROM_HEADER_INFO
string
default "media=nor" if TARGET_MT8518 || TARGET_MT8512 || TARGET_MT7629
- default "media=emmc" if TARGET_MT8516 || TARGET_MT8365 || TARGET_MT8183 || TARGET_MT8188
+ default "media=emmc" if TARGET_MT8516 || TARGET_MT8365 || TARGET_MT8183 || TARGET_MT8188 || TARGET_MT8189 || TARGET_MT8195
- default "lk=1" if TARGET_MT7623
+ default "lk=1" if TARGET_MT7622 || TARGET_MT7623
+};
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
-@@ -1118,6 +1118,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
+@@ -1097,6 +1097,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
mt7622-rfb.dtb \
mt7623a-unielec-u7623-02-emmc.dtb \
mt7622-bananapi-bpi-r64.dtb \
+};
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
-@@ -1119,6 +1119,8 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
+@@ -1098,6 +1098,8 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
mt7623a-unielec-u7623-02-emmc.dtb \
mt7622-bananapi-bpi-r64.dtb \
mt7622-linksys-e8450-ubi.dtb \
+_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title \e[33m$ver\e[0m"
--- a/common/board_r.c
+++ b/common/board_r.c
-@@ -66,6 +66,7 @@
+@@ -65,6 +65,7 @@
#include <wdt.h>
#include <asm-generic/gpio.h>
#include <relocate.h>
DECLARE_GLOBAL_DATA_PTR;
-@@ -422,6 +423,20 @@ static int initr_onenand(void)
+@@ -421,6 +422,20 @@ static int initr_onenand(void)
}
#endif
#ifdef CONFIG_MMC
static int initr_mmc(void)
{
-@@ -723,6 +738,9 @@ static void initcall_run_r(void)
+@@ -717,6 +732,9 @@ static void initcall_run_r(void)
#if CONFIG_IS_ENABLED(NMBM_MTD)
INITCALL(initr_nmbm);
#endif
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
-@@ -1121,6 +1121,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
+@@ -1100,6 +1100,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
mt7622-linksys-e8450-ubi.dtb \
mt7622-ubnt-unifi-6-lr.dtb \
mt7622-ubnt-unifi-6-lr-v3.dtb \
--- a/common/board_r.c
+++ b/common/board_r.c
-@@ -694,19 +694,13 @@ static void initcall_run_r(void)
+@@ -688,19 +688,13 @@ static void initcall_run_r(void)
INITCALL(serial_initialize);
INITCALL(initr_announce);
INITCALL(dm_announce);
#if CONFIG_IS_ENABLED(PCI_INIT_R) && CONFIG_IS_ENABLED(SYS_EARLY_PCI_INIT)
/*
* Do early PCI configuration _before_ the flash gets initialised,
-@@ -721,7 +715,6 @@ static void initcall_run_r(void)
+@@ -715,7 +709,6 @@ static void initcall_run_r(void)
#if CONFIG_IS_ENABLED(MTD_NOR_FLASH)
INITCALL(initr_flash);
#endif
- WATCHDOG_RESET();
- #if CONFIG_IS_ENABLED(PPC) || CONFIG_IS_ENABLED(M68K) || CONFIG_IS_ENABLED(X86)
+ #if IS_ENABLED(CONFIG_PPC) || CONFIG_IS_ENABLED(M68K) || CONFIG_IS_ENABLED(X86)
/* initialize higher level parts of CPU like time base and timers */
INITCALL(cpu_init_r);
-@@ -750,6 +743,10 @@ static void initcall_run_r(void)
+@@ -744,6 +737,10 @@ static void initcall_run_r(void)
#if CONFIG_IS_ENABLED(PVBLOCK)
INITCALL(initr_pvblock);
#endif
+};
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
-@@ -1137,6 +1137,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
+@@ -1116,6 +1116,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
mt7986b-emmc-rfb.dtb \
mt7987a-emmc-rfb.dtb \
mt7987a-rfb.dtb \
+ mt7987a-routerich_be7200.dtb \
mt7987a-sd-rfb.dtb \
mt7988-rfb.dtb \
- mt7988-sd-rfb.dtb \
+ mt7988-sd-rfb.dtb
--- /dev/null
+++ b/arch/arm/dts/mt7987a-routerich_be7200-u-boot.dtsi
@@ -0,0 +1,84 @@
+#include "mt7987-emmc.dtsi"
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
-@@ -1135,6 +1135,9 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
+@@ -1114,6 +1114,9 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
mt7986b-sd-rfb.dtb \
mt7986a-emmc-rfb.dtb \
mt7986b-emmc-rfb.dtb \
CONFIG_SPI_FLASH_MTD=y
CONFIG_MTD_UBI=y
+CONFIG_OF_LIBFDT_OVERLAY=y
- CONFIG_PHY_ETHERNET_ID=y
CONFIG_MEDIATEK_ETH=y
+ CONFIG_PHY_ETHERNET_ID=y
CONFIG_PINCTRL=y
--- a/configs/mt7987_emmc_rfb_defconfig
+++ b/configs/mt7987_emmc_rfb_defconfig
CONFIG_SPI_FLASH_MTD=y
CONFIG_MTD_UBI=y
+CONFIG_OF_LIBFDT_OVERLAY=y
- CONFIG_PHY_ETHERNET_ID=y
CONFIG_MEDIATEK_ETH=y
+ CONFIG_PHY_ETHERNET_ID=y
CONFIG_PINCTRL=y
--- a/configs/mt7987_sd_rfb_defconfig
+++ b/configs/mt7987_sd_rfb_defconfig
CONFIG_SPI_FLASH_MTD=y
CONFIG_MTD_UBI=y
+CONFIG_OF_LIBFDT_OVERLAY=y
- CONFIG_PHY_ETHERNET_ID=y
CONFIG_MEDIATEK_ETH=y
+ CONFIG_PHY_ETHERNET_ID=y
CONFIG_PINCTRL=y