Attention is currently required from: Ryan Chuang. Hello Ryan Chuang,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/60386
to review the following change.
Change subject: mb/google/corsola: Add DRAM full calibration support ......................................................................
mb/google/corsola: Add DRAM full calibration support
Initialize and calibrate DRAM in romstage.
TEST=DRAM full calibration pass. BUG=b:202871018
Signed-off-by: Ryan Chuang ryan.chuang@mediatek.corp-partner.google.com Change-Id: I80a18a8be5b1d47a5f0f7afed9601c0884e69035 --- M src/mainboard/google/corsola/Makefile.inc M src/mainboard/google/corsola/romstage.c A src/mainboard/google/corsola/sdram_configs.c 3 files changed, 18 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/86/60386/1
diff --git a/src/mainboard/google/corsola/Makefile.inc b/src/mainboard/google/corsola/Makefile.inc index 1a9a1c28..e1e363c 100644 --- a/src/mainboard/google/corsola/Makefile.inc +++ b/src/mainboard/google/corsola/Makefile.inc @@ -11,6 +11,7 @@ romstage-y += chromeos.c romstage-y += regulator.c romstage-y += romstage.c +romstage-y += sdram_configs.c
ramstage-y += memlayout.ld ramstage-y += boardid.c diff --git a/src/mainboard/google/corsola/romstage.c b/src/mainboard/google/corsola/romstage.c index aff496b..8d03b5b 100644 --- a/src/mainboard/google/corsola/romstage.c +++ b/src/mainboard/google/corsola/romstage.c @@ -3,6 +3,7 @@ #include <arch/stages.h> #include <console/console.h> #include <delay.h> +#include <soc/emi.h> #include <soc/mt6366.h> #include <soc/pll_common.h> #include <soc/regulator.h> @@ -26,4 +27,5 @@ mt6366_init(); raise_little_cpu_freq(); rtc_boot(); + mtk_dram_init(); } diff --git a/src/mainboard/google/corsola/sdram_configs.c b/src/mainboard/google/corsola/sdram_configs.c new file mode 100644 index 0000000..f565f53 --- /dev/null +++ b/src/mainboard/google/corsola/sdram_configs.c @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <soc/dramc_param.h> + +const struct sdram_info *get_sdram_config(void) +{ + /* + * The MT8186 platform supports "dram adaptive" feature to + * automatically detect dram information, including channel, rank, die size..., + * and can automatically configure EMI settings. + * So we will be passing a placeholder param blob. + */ + static struct sdram_info params; + return ¶ms; +}