mb/google/cherry: Add DRAM calibration support
Initialize and calibrate DRAM in romstage. Signed-off-by: Ryan Chuang <ryan.chuang@mediatek.com> Change-Id: Ib7677baef126ee60bf35da3a4eaf720eaa118a27 Reviewed-on: https://review.coreboot.org/c/coreboot/+/54269 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org>
This commit is contained in:
parent
5f126a08c8
commit
c51a54ecdd
|
@ -7,10 +7,13 @@ verstage-y += chromeos.c
|
||||||
verstage-y += reset.c
|
verstage-y += reset.c
|
||||||
|
|
||||||
romstage-y += memlayout.ld
|
romstage-y += memlayout.ld
|
||||||
|
romstage-y += boardid.c
|
||||||
romstage-y += chromeos.c
|
romstage-y += chromeos.c
|
||||||
romstage-y += romstage.c
|
romstage-y += romstage.c
|
||||||
|
romstage-y += sdram_configs.c
|
||||||
|
|
||||||
ramstage-y += memlayout.ld
|
ramstage-y += memlayout.ld
|
||||||
|
ramstage-y += boardid.c
|
||||||
ramstage-y += chromeos.c
|
ramstage-y += chromeos.c
|
||||||
ramstage-y += mainboard.c
|
ramstage-y += mainboard.c
|
||||||
ramstage-y += reset.c
|
ramstage-y += reset.c
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
|
#include <boardid.h>
|
||||||
|
|
||||||
|
uint32_t ram_code(void)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
#include <arch/stages.h>
|
#include <arch/stages.h>
|
||||||
#include <soc/clkbuf.h>
|
#include <soc/clkbuf.h>
|
||||||
|
#include <soc/emi.h>
|
||||||
#include <soc/mt6315.h>
|
#include <soc/mt6315.h>
|
||||||
#include <soc/mt6359p.h>
|
#include <soc/mt6359p.h>
|
||||||
#include <soc/pmif.h>
|
#include <soc/pmif.h>
|
||||||
|
@ -15,5 +16,6 @@ void platform_romstage_main(void)
|
||||||
mt6315_init();
|
mt6315_init();
|
||||||
clk_buf_init();
|
clk_buf_init();
|
||||||
rtc_boot();
|
rtc_boot();
|
||||||
|
mtk_dram_init();
|
||||||
scp_rsi_enable();
|
scp_rsi_enable();
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 MT8195 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;
|
||||||
|
}
|
Loading…
Reference in New Issue