Hung-Te Lin has submitted this change. ( https://review.coreboot.org/c/coreboot/+/56106 )
Change subject: vc/mediatek/mt8195: Enable DRAM Vcore DVFS settings ......................................................................
vc/mediatek/mt8195: Enable DRAM Vcore DVFS settings
Add the implementation for vcore voltage control. Also remove the reporting of vio18 because it is fixed during DRAM init, and we won't provide drivers for reading or writing it.
Signed-off-by: Ryan Chuang ryan.chuang@mediatek.corp-partner.google.com Change-Id: I39342aea902a87cdc2c5b862e5d1a889fcc822c5 Reviewed-on: https://review.coreboot.org/c/coreboot/+/56106 Reviewed-by: Hung-Te Lin hungte@chromium.org Reviewed-by: Yu-Ping Wu yupingso@google.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/vendorcode/mediatek/mt8195/dramc/dramc_pi_main.c M src/vendorcode/mediatek/mt8195/dramc/dramc_top.c 2 files changed, 6 insertions(+), 2 deletions(-)
Approvals: build bot (Jenkins): Verified Hung-Te Lin: Looks good to me, but someone else must approve Yu-Ping Wu: Looks good to me, approved
diff --git a/src/vendorcode/mediatek/mt8195/dramc/dramc_pi_main.c b/src/vendorcode/mediatek/mt8195/dramc/dramc_pi_main.c index b761473..b5de592 100644 --- a/src/vendorcode/mediatek/mt8195/dramc/dramc_pi_main.c +++ b/src/vendorcode/mediatek/mt8195/dramc/dramc_pi_main.c @@ -272,7 +272,6 @@
#ifndef DDR_INIT_TIME_PROFILING print("Read voltage for %d, %d\n", p->frequency, vGet_Current_SRAMIdx(p)); - print("Vio18 = %d\n", dramc_get_vio18_voltage()); print("Vcore = %d\n", dramc_get_vcore_voltage()); print("Vdram = %d\n", dramc_get_vmdd_voltage(p->dram_type)); print("Vddq = %d\n", dramc_get_vmddq_voltage(p->dram_type)); diff --git a/src/vendorcode/mediatek/mt8195/dramc/dramc_top.c b/src/vendorcode/mediatek/mt8195/dramc/dramc_top.c index 570c976..5662412 100644 --- a/src/vendorcode/mediatek/mt8195/dramc/dramc_top.c +++ b/src/vendorcode/mediatek/mt8195/dramc/dramc_top.c @@ -352,8 +352,13 @@ { #ifdef MTK_PMIC_MT6359 return mtk_regulator_set_voltage(®_vcore, vcore, MAX_VCORE); -#endif +#elif defined(FOR_COREBOOT) + dramc_debug("%s set vcore to %u\n", __func__, vcore); + mainboard_set_regulator_vol(MTK_REGULATOR_VCORE, vcore); return 0; +#else + return 0; +#endif }
unsigned int dramc_get_vcore_voltage(void)