summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Chuang <ryan.chuang@mediatek.corp-partner.google.com>2021-12-27 12:43:39 +0800
committerHung-Te Lin <hungte@chromium.org>2021-12-29 07:46:00 +0000
commit31531eab35982c212d29724cdacdec59bc8a9c81 (patch)
tree16f5e42f9ac58e8a9f526d53e88ced95b1ea9b66
parent773c007af46b02b32d2f0885ba3bfda62db1861e (diff)
soc/mediatek/mt8186: Add DRAM full calibration support
Use common SoC drivers for DRAM calibration support. TEST=build pass. BUG=b:202871018 Signed-off-by: Ryan Chuang <ryan.chuang@mediatek.corp-partner.google.com> Change-Id: Ie1a1e04da0cce9aaf86588a94c64d2242e7cb4b7 Reviewed-on: https://review.coreboot.org/c/coreboot/+/60318 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com> Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
-rw-r--r--src/soc/mediatek/mt8186/Kconfig1
-rw-r--r--src/soc/mediatek/mt8186/Makefile.inc12
2 files changed, 13 insertions, 0 deletions
diff --git a/src/soc/mediatek/mt8186/Kconfig b/src/soc/mediatek/mt8186/Kconfig
index 5393baadf0..11a18f2e10 100644
--- a/src/soc/mediatek/mt8186/Kconfig
+++ b/src/soc/mediatek/mt8186/Kconfig
@@ -6,6 +6,7 @@ config SOC_MEDIATEK_MT8186
select ARCH_ROMSTAGE_ARMV8_64
select ARCH_RAMSTAGE_ARMV8_64
select ARM64_USE_ARM_TRUSTED_FIRMWARE
+ select CACHE_MRC_SETTINGS
select HAVE_UART_SPECIAL
select SOC_MEDIATEK_COMMON
diff --git a/src/soc/mediatek/mt8186/Makefile.inc b/src/soc/mediatek/mt8186/Makefile.inc
index 5d3f668d5e..c940d3727b 100644
--- a/src/soc/mediatek/mt8186/Makefile.inc
+++ b/src/soc/mediatek/mt8186/Makefile.inc
@@ -26,10 +26,14 @@ verstage-y += ../common/wdt.c wdt.c
romstage-y += ../common/auxadc.c
romstage-y += ../common/cbmem.c
+romstage-y += ../common/dram_init.c
+romstage-y += ../common/dramc_param.c
romstage-y += emi.c
romstage-y += ../common/flash_controller.c
romstage-y += ../common/gpio.c gpio.c
romstage-y += ../common/i2c.c i2c.c
+romstage-y += ../common/memory.c
+romstage-y += ../common/memory_test.c
romstage-y += ../common/mmu_operations.c ../common/mmu_cmops.c
romstage-y += ../common/pll.c pll.c
romstage-$(CONFIG_SPI_FLASH) += ../common/spi.c spi.c
@@ -78,6 +82,14 @@ $(foreach fw, $(call strip_quotes,$(mcu-firmware-files)), \
$(if $(wildcard $($(fw)-file)), $(eval cbfs-files-y += $(fw)), ) \
)
+DRAM_CBFS := $(CONFIG_CBFS_PREFIX)/dram
+$(DRAM_CBFS)-file := $(MT8186_BLOB_DIR)/dram.elf
+$(DRAM_CBFS)-type := stage
+$(DRAM_CBFS)-compression := $(CBFS_PRERAM_COMPRESS_FLAG)
+ifneq ($(wildcard $($(DRAM_CBFS)-file)),)
+ cbfs-files-y += $(DRAM_CBFS)
+endif
+
$(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin
./util/mtkheader/gen-bl-img.py mt8183 sf $< $@