From 31531eab35982c212d29724cdacdec59bc8a9c81 Mon Sep 17 00:00:00 2001 From: Ryan Chuang Date: Mon, 27 Dec 2021 12:43:39 +0800 Subject: 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 Change-Id: Ie1a1e04da0cce9aaf86588a94c64d2242e7cb4b7 Reviewed-on: https://review.coreboot.org/c/coreboot/+/60318 Tested-by: build bot (Jenkins) Reviewed-by: Yu-Ping Wu Reviewed-by: Paul Menzel --- src/soc/mediatek/mt8186/Kconfig | 1 + src/soc/mediatek/mt8186/Makefile.inc | 12 ++++++++++++ 2 files changed, 13 insertions(+) (limited to 'src') 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 $< $@ -- cgit v1.2.3