Tristan Hsieh has uploaded this change for review.

View Change

google/kukui: DRAM freq switch to 2400Mbps

Forcing DRAM frequency 2400Mbps.

BUG=b:80501386
BRANCH=none
TEST=Boots correctly on Kukui

Change-Id: Ie3ac04080b32a84b8451910d309b43f2f1921d9a
Signed-off-by: Huayang Duan <huayang.duan@mediatek.com>
---
M src/mainboard/google/kukui/sdram_params/sdram-lpddr4x-H9HCNNNCPMALHR-4GB.c
M src/soc/mediatek/mt8183/dramc_init_setting.c
M src/soc/mediatek/mt8183/emi.c
3 files changed, 53 insertions(+), 69 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/13/30613/1
diff --git a/src/mainboard/google/kukui/sdram_params/sdram-lpddr4x-H9HCNNNCPMALHR-4GB.c b/src/mainboard/google/kukui/sdram_params/sdram-lpddr4x-H9HCNNNCPMALHR-4GB.c
index da6c7d2..555bb02 100644
--- a/src/mainboard/google/kukui/sdram_params/sdram-lpddr4x-H9HCNNNCPMALHR-4GB.c
+++ b/src/mainboard/google/kukui/sdram_params/sdram-lpddr4x-H9HCNNNCPMALHR-4GB.c
@@ -17,8 +17,8 @@

struct sdram_params params = {
.impedance = {
- [ODT_OFF] = {0x7, 0x6, 0x0, 0xF},
- [ODT_ON] = {0x9, 0x9, 0x0, 0xF}
+ [ODT_OFF] = {0x5, 0x6, 0x0, 0xF},
+ [ODT_ON] = {0x6, 0x9, 0x0, 0xE}
},
.wr_level = {
[CHANNEL_A] = { {0x22, 0x1b}, {0x22, 0x19} },
diff --git a/src/soc/mediatek/mt8183/dramc_init_setting.c b/src/soc/mediatek/mt8183/dramc_init_setting.c
index 9197ceb..551205f 100644
--- a/src/soc/mediatek/mt8183/dramc_init_setting.c
+++ b/src/soc/mediatek/mt8183/dramc_init_setting.c
@@ -126,17 +126,17 @@
{&ch[0].phy.pll2, 0x00000000},
{&ch[0].phy.misc_cg_ctrl0, 0x0000000f},
{&mt8183_infracfg->dramc_wbr, 0x00000000},
- {&ch[0].phy.shu[0].ca_cmd[6], 0x000604c0},
- {&ch[1].phy.shu[0].ca_cmd[6], 0x00060440},
+ {&ch[0].phy.shu[0].ca_cmd[6], 0x000607c0},
+ {&ch[1].phy.shu[0].ca_cmd[6], 0x00060740},
{&ch[0].phy.shu[0].ca_dll[1], 0x0004e104},
- {&ch[0].phy.shu[0].b[0].dq[6], 0x00060440},
+ {&ch[0].phy.shu[0].b[0].dq[6], 0x00060740},
{&ch[0].phy.shu[0].b[0].dll[1], 0x00022401},
- {&ch[0].phy.shu[0].b[1].dq[6], 0x00060440},
+ {&ch[0].phy.shu[0].b[1].dq[6], 0x00060740},
{&ch[0].phy.shu[0].b[1].dll[1], 0x00022401},
{&ch[1].phy.shu[0].ca_dll[1], 0x0004e101},
- {&ch[1].phy.shu[0].b[0].dq[6], 0x00060440},
+ {&ch[1].phy.shu[0].b[0].dq[6], 0x00060740},
{&ch[1].phy.shu[0].b[0].dll[1], 0x00022401},
- {&ch[1].phy.shu[0].b[1].dq[6], 0x00060440},
+ {&ch[1].phy.shu[0].b[1].dq[6], 0x00060740},
{&ch[1].phy.shu[0].b[1].dll[1], 0x00022401},
{&ch[0].phy.shu[0].pll[4], 0xe5780000},
{&ch[0].phy.shu[0].pll[6], 0xe5780000},
@@ -146,15 +146,15 @@
{&ch[0].ao.dvfsdll, 0x00000000},
{&ch[0].phy.shu[0].ca_dll[0], 0x00698619},
{&ch[0].phy.shu[0].ca_dll[1], 0x0004e104},
- {&ch[0].phy.shu[0].ca_cmd[6], 0x000604c0},
+ {&ch[0].phy.shu[0].ca_cmd[6], 0x000607C0},
{&ch[0].phy.b[0].dq[7], 0x00000055},
{&ch[0].phy.b[1].dq[7], 0x00000055},
{&ch[0].phy.ca_cmd[7], 0x00000055},
{&ch[0].phy.ca_cmd[2], 0x00200000},
{&ch[0].phy.misc_cg_ctrl0, 0x0000000f},
- {&ch[0].phy.shu[0].b[0].dq[6], 0x00060440},
- {&ch[0].phy.shu[0].b[1].dq[6], 0x00060440},
- {&ch[0].phy.shu[0].ca_cmd[6], 0x000604c0},
+ {&ch[0].phy.shu[0].b[0].dq[6], 0x00060740},
+ {&ch[0].phy.shu[0].b[1].dq[6], 0x00060740},
+ {&ch[0].phy.shu[0].ca_cmd[6], 0x000607C0},
{&ch[0].phy.pll4, 0x000c0000},
{&ch[0].phy.pll1, 0x00000000},
{&ch[0].phy.pll2, 0x00000000},
@@ -169,26 +169,26 @@
{&ch[0].phy.b[1].dll_fine_tune[0], 0x00000000},
{&ch[0].phy.shu[0].pll[8], 0x00040000},
{&ch[0].phy.shu[0].pll[10], 0x00040000},
- {&ch[0].phy.shu[0].pll[5], 0x7b000002},
- {&ch[0].phy.shu[0].pll[7], 0x7b000002},
+ {&ch[0].phy.shu[0].pll[5], 0x5c000002},
+ {&ch[0].phy.shu[0].pll[7], 0x5c000002},
{&ch[0].phy.ca_dll_fine_tune[0], 0x00000002},
{&ch[0].phy.b[0].dll_fine_tune[0], 0x00000002},
{&ch[0].phy.b[1].dll_fine_tune[0], 0x00000002},
{&ch[0].phy.ca_dll_fine_tune[1], 0x00200000},
{&ch[0].phy.b[0].dll_fine_tune[1], 0x00000000},
{&ch[0].phy.b[1].dll_fine_tune[1], 0x00000000},
- {&ch[0].phy.shu[0].b[0].dq[6], 0x02860440},
- {&ch[0].phy.shu[0].b[1].dq[6], 0x02860440},
- {&ch[0].phy.shu[0].ca_cmd[6], 0x028604c0},
+ {&ch[0].phy.shu[0].b[0].dq[6], 0x02C60740},
+ {&ch[0].phy.shu[0].b[1].dq[6], 0x02C60740},
+ {&ch[0].phy.shu[0].ca_cmd[6], 0x02C607C0},
{&ch[0].phy.ca_dll_fine_tune[0], 0x0000000a},
{&ch[0].phy.b[0].dll_fine_tune[0], 0x0000000a},
{&ch[0].phy.b[1].dll_fine_tune[0], 0x0000000a},
{&ch[0].phy.pll1, 0x80000000},
{&ch[0].phy.pll2, 0x80000000},
{&ch[0].phy.pll4, 0x004d0000},
- {&ch[0].phy.shu[0].b[0].dq[6], 0x06860440},
- {&ch[0].phy.shu[0].b[1].dq[6], 0x06860440},
- {&ch[0].phy.shu[0].ca_cmd[6], 0x068604c0},
+ {&ch[0].phy.shu[0].b[0].dq[6], 0x06C60740},
+ {&ch[0].phy.shu[0].b[1].dq[6], 0x06C60740},
+ {&ch[0].phy.shu[0].ca_cmd[6], 0x06C607C0},
{&ch[0].phy.ca_dll_fine_tune[3], 0x000ba000},
{&ch[0].phy.b[0].dll_fine_tune[3], 0x0002e800},
{&ch[0].phy.b[1].dll_fine_tune[3], 0x0002e800},
@@ -208,14 +208,6 @@
{&ch[0].phy.ca_cmd[7], 0x00000040},
{&ch[0].ao.ckectrl, 0x00100400},
{&ch[1].ao.ckectrl, 0x00100400},
- {&ch[0].phy.shu[0].pll[5], 0x7b000003},
- {&ch[0].phy.shu[0].pll[7], 0x7b000003},
- {&ch[0].phy.shu[0].pll[14], 0x00000002},
- {&ch[0].phy.shu[0].pll20, 0x00000002},
- {&ch[0].phy.shu[0].pll[14], 0x02080002},
- {&ch[0].phy.shu[0].pll20, 0x02080002},
- {&ch[0].phy.shu[0].pll[15], 0x0c030000},
- {&ch[0].phy.shu[0].pll21, 0x0c030000},
{&ch[1].phy.shu[0].pll[4], 0x00000000},
{&ch[1].phy.shu[0].pll[6], 0x00000000},
{&ch[1].phy.misc_shu_opt, 0x00090909},
@@ -224,15 +216,15 @@
{&ch[1].ao.dvfsdll, 0x00000000},
{&ch[1].phy.shu[0].ca_dll[0], 0xc0778609},
{&ch[1].phy.shu[0].ca_dll[1], 0x0004e101},
- {&ch[1].phy.shu[0].ca_cmd[6], 0x00060440},
+ {&ch[1].phy.shu[0].ca_cmd[6], 0x00060740},
{&ch[1].phy.b[0].dq[7], 0x00000055},
{&ch[1].phy.b[1].dq[7], 0x00000055},
{&ch[1].phy.ca_cmd[7], 0x00000055},
{&ch[1].phy.ca_cmd[2], 0x00200000},
{&ch[1].phy.misc_cg_ctrl0, 0x0000000f},
- {&ch[1].phy.shu[0].b[0].dq[6], 0x00060440},
- {&ch[1].phy.shu[0].b[1].dq[6], 0x00060440},
- {&ch[1].phy.shu[0].ca_cmd[6], 0x00060440},
+ {&ch[1].phy.shu[0].b[0].dq[6], 0x00060740},
+ {&ch[1].phy.shu[0].b[1].dq[6], 0x00060740},
+ {&ch[1].phy.shu[0].ca_cmd[6], 0x00060740},
{&ch[1].phy.pll4, 0x00000000},
{&ch[1].phy.pll1, 0x00000000},
{&ch[1].phy.pll2, 0x00000000},
@@ -247,26 +239,26 @@
{&ch[1].phy.b[1].dll_fine_tune[0], 0x00000000},
{&ch[1].phy.shu[0].pll[8], 0x00040000},
{&ch[1].phy.shu[0].pll[10], 0x00040000},
- {&ch[1].phy.shu[0].pll[5], 0x7b000000},
- {&ch[1].phy.shu[0].pll[7], 0x7b000000},
+ {&ch[1].phy.shu[0].pll[5], 0x5c000000},
+ {&ch[1].phy.shu[0].pll[7], 0x5c000000},
{&ch[1].phy.ca_dll_fine_tune[0], 0x00000002},
{&ch[1].phy.b[0].dll_fine_tune[0], 0x00000002},
{&ch[1].phy.b[1].dll_fine_tune[0], 0x00000002},
{&ch[1].phy.ca_dll_fine_tune[1], 0x00200000},
{&ch[1].phy.b[0].dll_fine_tune[1], 0x00000000},
{&ch[1].phy.b[1].dll_fine_tune[1], 0x00000000},
- {&ch[1].phy.shu[0].b[0].dq[6], 0x02860440},
- {&ch[1].phy.shu[0].b[1].dq[6], 0x02860440},
- {&ch[1].phy.shu[0].ca_cmd[6], 0x02860440},
+ {&ch[1].phy.shu[0].b[0].dq[6], 0x02C60740},
+ {&ch[1].phy.shu[0].b[1].dq[6], 0x02C60740},
+ {&ch[1].phy.shu[0].ca_cmd[6], 0x02C60740},
{&ch[1].phy.ca_dll_fine_tune[0], 0x0000000a},
{&ch[1].phy.b[0].dll_fine_tune[0], 0x0000000a},
{&ch[1].phy.b[1].dll_fine_tune[0], 0x0000000a},
{&ch[1].phy.pll1, 0x80000000},
{&ch[1].phy.pll2, 0x80000000},
{&ch[1].phy.pll4, 0x00410000},
- {&ch[1].phy.shu[0].b[0].dq[6], 0x06860440},
- {&ch[1].phy.shu[0].b[1].dq[6], 0x06860440},
- {&ch[1].phy.shu[0].ca_cmd[6], 0x06860440},
+ {&ch[1].phy.shu[0].b[0].dq[6], 0x06C60740},
+ {&ch[1].phy.shu[0].b[1].dq[6], 0x06C60740},
+ {&ch[1].phy.shu[0].ca_cmd[6], 0x06C60740},
{&ch[1].phy.ca_dll_fine_tune[3], 0x0003a000},
{&ch[1].phy.b[0].dll_fine_tune[3], 0x0002e800},
{&ch[1].phy.b[1].dll_fine_tune[3], 0x0002e800},
@@ -286,14 +278,6 @@
{&ch[1].phy.ca_cmd[7], 0x00000040},
{&ch[0].ao.ckectrl, 0x00100400},
{&ch[1].ao.ckectrl, 0x00100400},
- {&ch[1].phy.shu[0].pll[5], 0x00000001},
- {&ch[1].phy.shu[0].pll[7], 0x00000001},
- {&ch[1].phy.shu[0].pll[14], 0x00000002},
- {&ch[1].phy.shu[0].pll20, 0x00000002},
- {&ch[1].phy.shu[0].pll[14], 0x02080000},
- {&ch[1].phy.shu[0].pll20, 0x02080000},
- {&ch[1].phy.shu[0].pll[15], 0x0c030000},
- {&ch[1].phy.shu[0].pll21, 0x0c030000},
{&mt8183_infracfg->dramc_wbr, 0x0000001f},
{&ch[0].ao.drsctrl, 0x20080000},
{&ch[0].ao.ckectrl, 0x08100400},
@@ -431,12 +415,12 @@
{&ch[0].ao.shu[0].rk[1].selph_dq[2], 0x33333333},
{&ch[0].ao.shu[0].rk[1].selph_dq[3], 0x33333333},
{&ch[0].ao.shu[0].dqsg_retry, 0x8120050c},
- {&ch[0].phy.shu[0].b[0].dq[7], 0x00008090},
- {&ch[0].phy.shu[0].b[1].dq[7], 0x00008080},
+ {&ch[0].phy.shu[0].b[0].dq[7], 0x0000B090},
+ {&ch[0].phy.shu[0].b[1].dq[7], 0x0000B080},
{&ch[0].ao.shu[0].dqs2dq_tx, 0x00000000},
{&ch[0].ao.shu[0].odtctrl, 0xc0010003},
- {&ch[0].phy.shu[0].b[0].dq[7], 0x00008090},
- {&ch[0].phy.shu[0].b[1].dq[7], 0x00008080},
+ {&ch[0].phy.shu[0].b[0].dq[7], 0x0000B090},
+ {&ch[0].phy.shu[0].b[1].dq[7], 0x0000B080},
{&ch[0].phy.r[0].b[0].rxdvs[2], 0x20000000},
{&ch[0].phy.r[1].b[0].rxdvs[2], 0x20000000},
{&ch[0].phy.r[0].b[1].rxdvs[2], 0x20000000},
@@ -468,10 +452,10 @@
{&ch[0].phy.b[0].dq[6], 0x010352e9},
{&ch[0].phy.b[1].dq[6], 0x010352e9},
{&ch[0].phy.ca_cmd[6], 0x00034269},
- {&ch[0].phy.shu[0].b[0].dq[5], 0x0030000e},
- {&ch[0].phy.b[0].dq[5], 0x82110e00},
- {&ch[0].phy.shu[0].b[1].dq[5], 0x0030000e},
- {&ch[0].phy.b[1].dq[5], 0x82110e00},
+ {&ch[0].phy.shu[0].b[0].dq[5], 0x0030000E},
+ {&ch[0].phy.b[0].dq[5], 0x82110E00},
+ {&ch[0].phy.shu[0].b[1].dq[5], 0x0030000E},
+ {&ch[0].phy.b[1].dq[5], 0x82110E00},
{&ch[0].phy.b[0].dq[8], 0x00000007},
{&ch[0].phy.b[1].dq[8], 0x00000007},
{&ch[0].phy.ca_cmd[9], 0x00010007},
@@ -502,16 +486,16 @@
{&ch[0].phy.ca_cmd[8], 0x00080a0a},
{&ch[0].ao.shu[0].misc, 0x0000f132},
{&ch[0].ao.shu[0].dqsg, 0x02a19800},
- {&ch[0].phy.shu[0].b[0].dq[5], 0x0030000e},
- {&ch[0].phy.shu[0].b[1].dq[5], 0x0030000e},
+ {&ch[0].phy.shu[0].b[0].dq[5], 0x0030000E},
+ {&ch[0].phy.shu[0].b[1].dq[5], 0x0030000E},
{&ch[0].phy.shu[0].ca_cmd[5], 0x00000000},
{&mt8183_infracfg->dramc_wbr, 0x00000000},
- {&ch[0].phy.shu[0].b[0].dq[6], 0x06860440},
- {&ch[0].phy.shu[0].b[1].dq[6], 0x06860440},
- {&ch[0].phy.shu[0].ca_cmd[6], 0x068604c0},
- {&ch[1].phy.shu[0].b[0].dq[6], 0x06860440},
- {&ch[1].phy.shu[0].b[1].dq[6], 0x06860440},
- {&ch[1].phy.shu[0].ca_cmd[6], 0x06860440},
+ {&ch[0].phy.shu[0].b[0].dq[6], 0x06C60740},
+ {&ch[0].phy.shu[0].b[1].dq[6], 0x06C60740},
+ {&ch[0].phy.shu[0].ca_cmd[6], 0x06C607C0},
+ {&ch[1].phy.shu[0].b[0].dq[6], 0x06C60740},
+ {&ch[1].phy.shu[0].b[1].dq[6], 0x06C60740},
+ {&ch[1].phy.shu[0].ca_cmd[6], 0x06C60740},
{&mt8183_infracfg->dramc_wbr, 0x0000001f},
{&ch[0].ao.shu[0].impcal1, 0x81080004},
{&ch[0].ao.srefctrl, 0x4840f000},
@@ -600,10 +584,10 @@

/* dramc duty calibration */
{&ch[0].phy.shu[0].rk[0].ca_cmd[1], 0x00000000},
- {&ch[0].phy.shu[0].rk[0].ca_cmd[0], 0x00000000},
+ {&ch[0].phy.shu[0].rk[0].ca_cmd[0], 0x11000000},
{&ch[0].phy.shu[0].rk[1].ca_cmd[1], 0x00000000},
- {&ch[0].phy.shu[0].rk[1].ca_cmd[0], 0x00000000},
- {&ch[0].phy.shu[0].ca_cmd[3], 0x00000400},
+ {&ch[0].phy.shu[0].rk[1].ca_cmd[0], 0x11000000},
+ {&ch[0].phy.shu[0].ca_cmd[3], 0x00000600},
{&ch[0].phy.shu[0].rk[0].b[0].dq[1], 0x00110000},
{&ch[0].phy.shu[0].rk[0].b[1].dq[1], 0x00110000},
{&ch[0].phy.shu[0].rk[1].b[0].dq[1], 0x00110000},
diff --git a/src/soc/mediatek/mt8183/emi.c b/src/soc/mediatek/mt8183/emi.c
index bb617f9..4d05dd0 100644
--- a/src/soc/mediatek/mt8183/emi.c
+++ b/src/soc/mediatek/mt8183/emi.c
@@ -272,10 +272,10 @@
{
for (size_t chn = 0; chn < CHANNEL_MAX; chn++) {
clrsetbits_le32(&ch[chn].ao.shu[0].actim[3],
- 0xff << 16, 0x64 << 16);
+ 0xff << 16, 0x48 << 16);
clrbits_le32(&ch[chn].ao.shu[0].ac_time_05t, 0x1 << 2);
clrsetbits_le32(&ch[chn].ao.shu[0].actim[4],
- 0x3ff << 0, 0x77 << 0);
+ 0x3ff << 0, 0x5B << 0);
}
}


To view, visit change 30613. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ie3ac04080b32a84b8451910d309b43f2f1921d9a
Gerrit-Change-Number: 30613
Gerrit-PatchSet: 1
Gerrit-Owner: Tristan Hsieh <tristan.shieh@mediatek.com>
Gerrit-MessageType: newchange