[openwrt/openwrt] arm-trusted-firmware-mediatek: add MT7987 DDR4 4BG images
LEDE Commits
lede-commits at lists.infradead.org
Wed Dec 10 15:58:58 PST 2025
ansuel pushed a commit to openwrt/openwrt.git, branch openwrt-25.12:
https://git.openwrt.org/4f889c2caad4fa797ef4714fd6b22a98b256fe2f
commit 4f889c2caad4fa797ef4714fd6b22a98b256fe2f
Author: Chukun Pan <amadeus at jmu.edu.cn>
AuthorDate: Mon Nov 10 18:16:30 2025 +0800
arm-trusted-firmware-mediatek: add MT7987 DDR4 4BG images
Add the DDR4_4BG_MODE option, which supports 4GB DDR4 RAM
for the MT7987 and 8GB DDR4 RAM for the MT7988. If this mode
is not enabled, bl2 can only recognize half the size of RAM.
Signed-off-by: Chukun Pan <amadeus at jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/21000
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
(cherry picked from commit f037a2e8bb86d0edd4a4913afd69d39b60a03062)
---
package/boot/arm-trusted-firmware-mediatek/Makefile | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/package/boot/arm-trusted-firmware-mediatek/Makefile b/package/boot/arm-trusted-firmware-mediatek/Makefile
index f90915ed67..24fa97e5ce 100644
--- a/package/boot/arm-trusted-firmware-mediatek/Makefile
+++ b/package/boot/arm-trusted-firmware-mediatek/Makefile
@@ -30,6 +30,7 @@ define Trusted-Firmware-A/Default
BOOT_DEVICE:=
DDR3_FLYBY:=
DDR3_FREQ_1866:=
+ DDR4_4BG_MODE:=
DDR_TYPE:=
NAND_TYPE:=
BOARD_QFN:=
@@ -410,6 +411,14 @@ define Trusted-Firmware-A/mt7987-emmc-comb
DRAM_USE_COMB:=1
endef
+define Trusted-Firmware-A/mt7987-emmc-ddr4-4bg
+ NAME:=MediaTek MT7987 (eMMC, DDR4 4GB)
+ BOOT_DEVICE:=emmc
+ BUILD_SUBTARGET:=filogic
+ PLAT:=mt7987
+ DDR4_4BG_MODE:=1
+endef
+
define Trusted-Firmware-A/mt7987-nor-comb
NAME:=MediaTek MT7987 (NOR)
BOOT_DEVICE:=nor
@@ -426,6 +435,14 @@ define Trusted-Firmware-A/mt7987-sdmmc-comb
DRAM_USE_COMB:=1
endef
+define Trusted-Firmware-A/mt7987-sdmmc-ddr4-4bg
+ NAME:=MediaTek MT7987 (SD card, DDR4 4GB)
+ BOOT_DEVICE:=sdmmc
+ BUILD_SUBTARGET:=filogic
+ PLAT:=mt7987
+ DDR4_4BG_MODE:=1
+endef
+
define Trusted-Firmware-A/mt7987-spim-nand0-ubi-comb
NAME:=MediaTek MT7987 (SPI-NAND via SPIM, UBI)
BOOT_DEVICE:=spim-nand
@@ -670,8 +687,10 @@ TFA_TARGETS:= \
mt7986-spim-nand-ubi-ddr4 \
mt7986-spim-nand-4k-ddr4 \
mt7987-emmc-comb \
+ mt7987-emmc-ddr4-4bg \
mt7987-nor-comb \
mt7987-sdmmc-comb \
+ mt7987-sdmmc-ddr4-4bg \
mt7987-spim-nand0-ubi-comb \
mt7987-spim-nand2-ubi-comb \
mt7987-ram-comb \
@@ -705,6 +724,7 @@ TFA_MAKE_FLAGS += \
HAVE_DRAM_OBJ_FILE=yes \
$(if $(DDR3_FLYBY),DDR3_FLYBY=1) \
$(if $(DDR3_FREQ_1866),DDR3_FREQ_1866=1) \
+ $(if $(DDR4_4BG_MODE),DDR4_4BG_MODE=1) \
$(if $(DRAM_USE_COMB),DRAM_USE_COMB=1) \
$(if $(RAM_BOOT_UART_DL),RAM_BOOT_UART_DL=1) \
$(if $(USE_UBI),UBI=1 $(if $(findstring mt7622,$(PLAT)),OVERRIDE_UBI_START_ADDR=0x80000)) \
More information about the lede-commits
mailing list