summaryrefslogtreecommitdiffstats
path: root/src/soc/mediatek/mt8188/Makefile.inc
diff options
context:
space:
mode:
authorRex-BC Chen <rex-bc.chen@mediatek.com>2022-07-22 11:09:55 +0800
committerFelix Held <felix-coreboot@felixheld.de>2022-07-26 12:40:59 +0000
commit0c7a0f963867cd2b6ed9d35fc9a662f178e0f680 (patch)
tree33d579e4bf97a660b82bf8172977606590c6efc8 /src/soc/mediatek/mt8188/Makefile.inc
parent108e53792804293a13b48a1f6e7dddcb4f0b1250 (diff)
downloadcoreboot-0c7a0f963867cd2b6ed9d35fc9a662f178e0f680.tar.gz
coreboot-0c7a0f963867cd2b6ed9d35fc9a662f178e0f680.tar.bz2
coreboot-0c7a0f963867cd2b6ed9d35fc9a662f178e0f680.zip
soc/mediatek/mt8188: Initialize MCUPM
Load MCUPM firmware and boot up MCUPM in ramstage. It takes 41 ms to load mcupm.bin. coreboot logs: CBFS: Found 'mcupm.bin' @0x12580 size 0xf0c6 in mcache @0xffffead0 mtk_init_mcu: Loaded (and reset) mcupm.bin in 41 msecs (122184 bytes) TEST=we can see the mcupm logs after reset releases. BUG=b:233720142 Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com> Change-Id: Id1e62d9d6ede1c453e03eeda0d9b16fafa9e2372 Reviewed-on: https://review.coreboot.org/c/coreboot/+/66066 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Diffstat (limited to 'src/soc/mediatek/mt8188/Makefile.inc')
-rw-r--r--src/soc/mediatek/mt8188/Makefile.inc14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/soc/mediatek/mt8188/Makefile.inc b/src/soc/mediatek/mt8188/Makefile.inc
index 1cae90a7ca8b..977fcc69a8ce 100644
--- a/src/soc/mediatek/mt8188/Makefile.inc
+++ b/src/soc/mediatek/mt8188/Makefile.inc
@@ -22,6 +22,8 @@ romstage-y += ../common/pmif_spi.c pmif_spi.c
romstage-y += ../common/pmif_spmi.c pmif_spmi.c
ramstage-y += emi.c
+ramstage-y += ../common/mcu.c
+ramstage-y += ../common/mcupm.c
ramstage-y += ../common/mmu_operations.c ../common/mmu_cmops.c
ramstage-$(CONFIG_COMMONLIB_STORAGE_MMC) += ../common/msdc.c msdc.c
ramstage-y += ../common/mt6359p.c mt6359p.c
@@ -33,6 +35,18 @@ ramstage-y += ../common/usb.c usb.c
CPPFLAGS_common += -Isrc/soc/mediatek/mt8188/include
CPPFLAGS_common += -Isrc/soc/mediatek/common/include
+MT8188_BLOB_DIR := 3rdparty/blobs/soc/mediatek/mt8188
+
+mcu-firmware-files := \
+ $(CONFIG_MCUPM_FIRMWARE)
+
+$(foreach fw, $(call strip_quotes,$(mcu-firmware-files)), \
+ $(eval $(fw)-file := $(MT8188_BLOB_DIR)/$(fw)) \
+ $(eval $(fw)-type := raw) \
+ $(eval $(fw)-compression := LZ4) \
+ $(if $(wildcard $($(fw)-file)), $(eval cbfs-files-y += $(fw)), ) \
+)
+
$(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin
./util/mtkheader/gen-bl-img.py mt8183 sf $< $@