openwrt-6.x/package/boot/arm-trusted-firmware-mediatek/patches/0007-hack-mt7987-bl2-move-FIP-offset-to-0x100000.patch
Daniel Golle de8fc8b2f9 arm-trusted-firmware-mediatek: add builds for MT7987
Build TF-A for the MediaTek MT7987 SoC family.
Add necessary downstream patches in preparation for the BananaPi R4 Lite,
which connects both flash chips to SPI2 and got broken MMC bus.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-11-05 14:19:39 +00:00

28 lines
901 B
Diff

From 6725bb3c2aa9330f37a591e1e539badf67021b47 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Sat, 4 Oct 2025 23:59:54 +0100
Subject: [PATCH] hack: mt7987: bl2: move FIP offset to 0x100000
There is no use in allocating more than 2MB to the factory partition.
After all, even for WiFi 7 tri-band devices the calibration data is
still in the kilobytes range.
Move FIP offset to 0x100000 to not waste so much space on small NOR
flash.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
plat/mediatek/mt7987/bl2/bl2_dev_spi_nor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/plat/mediatek/mt7987/bl2/bl2_dev_spi_nor.c
+++ b/plat/mediatek/mt7987/bl2/bl2_dev_spi_nor.c
@@ -7,7 +7,7 @@
#include <stdint.h>
#include <boot_spi.h>
-#define FIP_BASE 0x250000
+#define FIP_BASE 0x100000
#define FIP_SIZE 0x80000
#define MTK_QSPI_SRC_CLK CB_MPLL_D2