huayang duan has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33838
Change subject: mediatek/mt8183: support SANDISK LPDDR4X DDR bootup ......................................................................
mediatek/mt8183: support SANDISK LPDDR4X DDR bootup
Support SANDISK SDADA4CR-128G EMCP LPDDR4X DDR
BUG=b:80501386 BRANCH=none TEST=Boots correctly on EMCP DRAM
Change-Id: I7de4c9a27282d3d00f51adf46dcb3d2f3984bfff --- M src/mainboard/google/kukui/sdram_configs.c M src/mainboard/google/kukui/sdram_params/Makefile.inc A src/mainboard/google/kukui/sdram_params/sdram-lpddr4x-SDADA4CR-128G-4GB.c 3 files changed, 43 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/38/33838/1
diff --git a/src/mainboard/google/kukui/sdram_configs.c b/src/mainboard/google/kukui/sdram_configs.c index 5931c79..202a75f6 100644 --- a/src/mainboard/google/kukui/sdram_configs.c +++ b/src/mainboard/google/kukui/sdram_configs.c @@ -23,6 +23,7 @@ [2] = "sdram-lpddr4x-MT53E1G32D4NQ-4GB", [3] = "sdram-lpddr4x-KMDP6001DA-B425-4GB", [5] = "sdram-lpddr4x-MT29VZZZAD8DQKSL-4GB", + [7] = "sdram-lpddr4x-SDADA4CR-128G-4GB", };
static struct sdram_params params; diff --git a/src/mainboard/google/kukui/sdram_params/Makefile.inc b/src/mainboard/google/kukui/sdram_params/Makefile.inc index 77158a5..40e3641 100644 --- a/src/mainboard/google/kukui/sdram_params/Makefile.inc +++ b/src/mainboard/google/kukui/sdram_params/Makefile.inc @@ -3,6 +3,7 @@ sdram-params += sdram-lpddr4x-MT53E1G32D4NQ-4GB sdram-params += sdram-lpddr4x-KMDP6001DA-B425-4GB sdram-params += sdram-lpddr4x-MT29VZZZAD8DQKSL-4GB +sdram-params += sdram-lpddr4x-SDADA4CR-128G-4GB
$(foreach params,$(sdram-params), \ $(eval cbfs-files-y += $(params)) \ diff --git a/src/mainboard/google/kukui/sdram_params/sdram-lpddr4x-SDADA4CR-128G-4GB.c b/src/mainboard/google/kukui/sdram_params/sdram-lpddr4x-SDADA4CR-128G-4GB.c new file mode 100755 index 0000000..61060d6 --- /dev/null +++ b/src/mainboard/google/kukui/sdram_params/sdram-lpddr4x-SDADA4CR-128G-4GB.c @@ -0,0 +1,41 @@ +/* + * This file is part of the coreboot project. + * + * Copyright 2018 MediaTek Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include <soc/emi.h> + +struct sdram_params params = { + .impedance = { + [ODT_OFF] = {0x8, 0x7, 0x0, 0xF}, + [ODT_ON] = {0x9, 0x9, 0x0, 0xE} + }, + .wr_level = { + [CHANNEL_A] = { {0x1F, 0x1C}, {0x1C, 0x1B} }, + [CHANNEL_B] = { {0x27, 0x28}, {0x23, 0x28} } + }, + .cbt_cs = { + [CHANNEL_A] = {0x3, 0x3}, + [CHANNEL_B] = {0x4, 0x6} + }, + .cbt_mr12 = { + [CHANNEL_A] = {0x5C, 0x5A}, + [CHANNEL_B] = {0x5C, 0x5A} + }, + .emi_cona_val = 0xF053F154, + .emi_conh_val = 0x44440003, + .emi_conf_val = 0x00421000, + .chn_emi_cona_val = {0x0444F051, 0x0444F051}, + .cbt_mode_extern = CBT_NORMAL_MODE, + .delay_cell_unit = 868, +};