huayang duan has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37924 )
Change subject: mainboard/google/kukui: Restore vcore to default voltage after DRAM calibration ......................................................................
mainboard/google/kukui: Restore vcore to default voltage after DRAM calibration
DRAM calibration will set vcore to different voltage for different frequency, after DRAM calibration should restore vcore to default volatge
BRANCH=none BUG=none TEST=bootup pass
Change-Id: Ia87b4ac78a32dbd4c4ab52e84d307cb46525afa1 Signed-off-by: Huayang Duan huayang.duan@mediatek.com --- M src/mainboard/google/kukui/romstage.c 1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/24/37924/1
diff --git a/src/mainboard/google/kukui/romstage.c b/src/mainboard/google/kukui/romstage.c index 2b7dd6a..a34b35e 100644 --- a/src/mainboard/google/kukui/romstage.c +++ b/src/mainboard/google/kukui/romstage.c @@ -74,5 +74,8 @@ pmic_init_scp_voltage(); rtc_boot(); mt_mem_init(&dparam_ops); + + /* after DRAM calibration, restore vcore voltage to default setting */ + pmic_set_vcore_vol(800000); mtk_mmu_after_dram(); }
Yu-Ping Wu has uploaded a new patch set (#2) to the change originally created by huayang duan. ( https://review.coreboot.org/c/coreboot/+/37924 )
Change subject: mb/google/kukui: Restore vcore after DRAM calibration ......................................................................
mb/google/kukui: Restore vcore after DRAM calibration
DRAM calibration sets vcore to different voltages at different frequencies. After DRAM calibration, vcore should be restored to the default voltage, which is 800mV for both eMCP and discrete DDR devices.
BRANCH=kukui BUG=b:146618163 TEST=bootup pass
Change-Id: Ia87b4ac78a32dbd4c4ab52e84d307cb46525afa1 Signed-off-by: Huayang Duan huayang.duan@mediatek.com --- M src/mainboard/google/kukui/romstage.c 1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/24/37924/2
Yu-Ping Wu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37924 )
Change subject: mb/google/kukui: Restore vcore after DRAM calibration ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/37924/1/src/mainboard/google/kukui/... File src/mainboard/google/kukui/romstage.c:
https://review.coreboot.org/c/coreboot/+/37924/1/src/mainboard/google/kukui/... PS1, Line 79: pmic_set_vcore_vol(800000); Would it be better to restore vcore in soc/mediatek/mt8183?
Hello Yu-Ping Wu, You-Cheng Syu, Hung-Te Lin, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/37924
to look at the new patch set (#3).
Change subject: mb/google/kukui: Restore vcore after DRAM calibration ......................................................................
mb/google/kukui: Restore vcore after DRAM calibration
DRAM calibration sets vcore to different voltages at different frequencies. After DRAM calibration, vcore should be restored to the default voltage, which is 800mV for both eMCP and discrete DDR devices.
BRANCH=kukui BUG=b:146618163 TEST=bootup pass
Change-Id: Ia87b4ac78a32dbd4c4ab52e84d307cb46525afa1 Signed-off-by: Huayang Duan huayang.duan@mediatek.com --- M src/soc/mediatek/mt8183/emi.c M src/soc/mediatek/mt8183/memory.c 2 files changed, 13 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/24/37924/3
Yu-Ping Wu has uploaded a new patch set (#4) to the change originally created by huayang duan. ( https://review.coreboot.org/c/coreboot/+/37924 )
Change subject: soc/mediatek/mt8183: Restore vcore after DRAM calibration ......................................................................
soc/mediatek/mt8183: Restore vcore after DRAM calibration
DRAM calibration sets vcore to different voltages at different frequencies. After DRAM calibration, vcore should be restored to the default voltage, which is 800mV for both eMCP and discrete DDR devices.
BRANCH=kukui BUG=b:146618163 TEST=bootup pass
Change-Id: Ia87b4ac78a32dbd4c4ab52e84d307cb46525afa1 Signed-off-by: Huayang Duan huayang.duan@mediatek.com --- M src/soc/mediatek/mt8183/emi.c M src/soc/mediatek/mt8183/memory.c 2 files changed, 13 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/24/37924/4
Yu-Ping Wu has uploaded a new patch set (#5) to the change originally created by huayang duan. ( https://review.coreboot.org/c/coreboot/+/37924 )
Change subject: soc/mediatek/mt8183: Restore vcore after DRAM calibration ......................................................................
soc/mediatek/mt8183: Restore vcore after DRAM calibration
DRAM calibration sets vcore to different voltages at different frequencies. After DRAM calibration, vcore should be restored to the default voltage, which is 800mV for both eMCP and discrete DDR devices.
BRANCH=kukui BUG=b:146618163 TEST=bootup pass
Change-Id: Ia87b4ac78a32dbd4c4ab52e84d307cb46525afa1 Signed-off-by: Huayang Duan huayang.duan@mediatek.com --- M src/soc/mediatek/mt8183/memory.c 1 file changed, 11 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/24/37924/5
Yu-Ping Wu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37924 )
Change subject: soc/mediatek/mt8183: Restore vcore after DRAM calibration ......................................................................
Patch Set 5: Code-Review+1
(1 comment)
https://review.coreboot.org/c/coreboot/+/37924/1/src/mainboard/google/kukui/... File src/mainboard/google/kukui/romstage.c:
https://review.coreboot.org/c/coreboot/+/37924/1/src/mainboard/google/kukui/... PS1, Line 79: pmic_set_vcore_vol(800000);
Would it be better to restore vcore in soc/mediatek/mt8183?
I moved this to memory.c in patchset 5.
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37924 )
Change subject: soc/mediatek/mt8183: Restore vcore after DRAM calibration ......................................................................
Patch Set 6: Code-Review+2
Nico Huber has submitted this change. ( https://review.coreboot.org/c/coreboot/+/37924 )
Change subject: soc/mediatek/mt8183: Restore vcore after DRAM calibration ......................................................................
soc/mediatek/mt8183: Restore vcore after DRAM calibration
DRAM calibration sets vcore to different voltages at different frequencies. After DRAM calibration, vcore should be restored to the default voltage, which is 800mV for both eMCP and discrete DDR devices.
BRANCH=kukui BUG=b:146618163 TEST=bootup pass
Change-Id: Ia87b4ac78a32dbd4c4ab52e84d307cb46525afa1 Signed-off-by: Huayang Duan huayang.duan@mediatek.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/37924 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Hung-Te Lin hungte@chromium.org Reviewed-by: Yu-Ping Wu yupingso@google.com --- M src/soc/mediatek/mt8183/memory.c 1 file changed, 11 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Hung-Te Lin: Looks good to me, approved Yu-Ping Wu: Looks good to me, but someone else must approve
diff --git a/src/soc/mediatek/mt8183/memory.c b/src/soc/mediatek/mt8183/memory.c index 13c3d9a..78890ea 100644 --- a/src/soc/mediatek/mt8183/memory.c +++ b/src/soc/mediatek/mt8183/memory.c @@ -21,6 +21,7 @@ #include <soc/dramc_param.h> #include <soc/dramc_pi_api.h> #include <soc/emi.h> +#include <soc/mt6358.h> #include <symbols.h>
static int mt_mem_test(void) @@ -156,7 +157,7 @@ memcpy(&dst[shuffle], src, sizeof(*dst)); }
-void mt_mem_init(struct dramc_param_ops *dparam_ops) +static void mt_mem_init_run(struct dramc_param_ops *dparam_ops) { struct dramc_param *dparam = dparam_ops->param;
@@ -202,6 +203,7 @@ if (err == 0) { printk(BIOS_INFO, "Successfully loaded DRAM blobs and " "ran DRAM calibration\n"); + /* * In recovery mode the system boots in RO but the flash params * should be calibrated for RW so we can't mix them up. @@ -228,3 +230,11 @@ if (mt_mem_test() != 0) die("Memory test failed with params from sdram config\n"); } + +void mt_mem_init(struct dramc_param_ops *dparam_ops) +{ + mt_mem_init_run(dparam_ops); + + /* After DRAM calibration, restore vcore voltage to default setting */ + pmic_set_vcore_vol(800000); +}