summaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/mediatek/mt8188/Kconfig6
-rw-r--r--src/soc/mediatek/mt8188/Makefile.inc14
-rw-r--r--src/soc/mediatek/mt8188/include/soc/addressmap.h2
-rw-r--r--src/soc/mediatek/mt8188/soc.c2
4 files changed, 24 insertions, 0 deletions
diff --git a/src/soc/mediatek/mt8188/Kconfig b/src/soc/mediatek/mt8188/Kconfig
index 9b6d3614c4..9ab3e5ccd6 100644
--- a/src/soc/mediatek/mt8188/Kconfig
+++ b/src/soc/mediatek/mt8188/Kconfig
@@ -17,4 +17,10 @@ config VBOOT
select VBOOT_SEPARATE_VERSTAGE
select VBOOT_RETURN_FROM_VERSTAGE
+config MCUPM_FIRMWARE
+ string
+ default "mcupm.bin"
+ help
+ The file name of the MediaTek MCUPM firmware.
+
endif
diff --git a/src/soc/mediatek/mt8188/Makefile.inc b/src/soc/mediatek/mt8188/Makefile.inc
index 1cae90a7ca..977fcc69a8 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 $< $@
diff --git a/src/soc/mediatek/mt8188/include/soc/addressmap.h b/src/soc/mediatek/mt8188/include/soc/addressmap.h
index dce2bb5fee..46157fb388 100644
--- a/src/soc/mediatek/mt8188/include/soc/addressmap.h
+++ b/src/soc/mediatek/mt8188/include/soc/addressmap.h
@@ -9,6 +9,8 @@
enum {
MCUSYS_BASE = 0x0C530000,
+ MCUPM_SRAM_BASE = 0x0C540000,
+ MCUPM_CFG_BASE = 0x0C560000,
IO_PHYS = 0x10000000,
MCUCFG_BASE = MCUSYS_BASE + 0x00008000,
};
diff --git a/src/soc/mediatek/mt8188/soc.c b/src/soc/mediatek/mt8188/soc.c
index 09a85c1e4f..4fa97f43cb 100644
--- a/src/soc/mediatek/mt8188/soc.c
+++ b/src/soc/mediatek/mt8188/soc.c
@@ -2,6 +2,7 @@
#include <device/device.h>
#include <soc/emi.h>
+#include <soc/mcupm.h>
#include <soc/mmu_operations.h>
#include <symbols.h>
@@ -13,6 +14,7 @@ static void soc_read_resources(struct device *dev)
static void soc_init(struct device *dev)
{
mtk_mmu_disable_l2c_sram();
+ mcupm_init();
}
static struct device_operations soc_ops = {