openwrt-6.x/package/boot/arm-trusted-firmware-mediatek/patches/0006-hack-mt7987-mmc-use-4-bit-bus-width-for-eMMC.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

25 lines
925 B
Diff

From 0a09912eb336bee788443b919ea5b99b195f5a91 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Sat, 4 Oct 2025 22:13:49 +0100
Subject: [PATCH] hack: mt7987: mmc: use 4-bit bus-width for eMMC
The BananaPi R4 Lite has broken DAT5 signal of the MMC bus, which
results in 8-bit buswidth not working well for the eMMC.
Reduce to 4-bit buswidth fixes it (and makes all other boards with
eMMC a tiny bit slower to boot, but it's in the milliseconds).
---
plat/mediatek/mt7987/bl2/bl2_dev_mmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/plat/mediatek/mt7987/bl2/bl2_dev_mmc.c
+++ b/plat/mediatek/mt7987/bl2/bl2_dev_mmc.c
@@ -74,7 +74,7 @@ static const struct mt7987_msdc_conf {
{
.base = MSDC0_BASE,
.top_base = MSDC0_TOP_BASE,
- .bus_width = MMC_BUS_WIDTH_8,
+ .bus_width = MMC_BUS_WIDTH_4,
.type = MMC_IS_EMMC,
.src_clk = 200000000,
.dev_comp = &mt7987_msdc_compat,