From 5d3b1bbce4b3aefaee66e1d96be058397a9d7840 Mon Sep 17 00:00:00 2001 From: Dtrain Hsu Date: Mon, 21 Mar 2022 14:51:18 +0800 Subject: mb/google/brya/var/kinox: Modify DDR4 to non-interleaved Kinox is designed to 8-layer PCB. In order to reduce the length of memory singals, the DDR4 is designed from interleaved to non-interleaved. BUG=b:210094309 TEST=emerge-brask coreboot Signed-off-by: Dtrain Hsu Change-Id: I03c6fcccf8b1646cec1a35cc1f9cbb1cfb942c4e Reviewed-on: https://review.coreboot.org/c/coreboot/+/62953 Tested-by: build bot (Jenkins) Reviewed-by: Zhuohao Lee --- .../google/brya/variants/kinox/Makefile.inc | 1 + src/mainboard/google/brya/variants/kinox/memory.c | 31 ++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 src/mainboard/google/brya/variants/kinox/memory.c (limited to 'src/mainboard/google') diff --git a/src/mainboard/google/brya/variants/kinox/Makefile.inc b/src/mainboard/google/brya/variants/kinox/Makefile.inc index 681c76498a..27174f45bf 100644 --- a/src/mainboard/google/brya/variants/kinox/Makefile.inc +++ b/src/mainboard/google/brya/variants/kinox/Makefile.inc @@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-only bootblock-y += gpio.c romstage-y += gpio.c +romstage-y += memory.c ramstage-y += gpio.c ramstage-y += ramstage.c diff --git a/src/mainboard/google/brya/variants/kinox/memory.c b/src/mainboard/google/brya/variants/kinox/memory.c new file mode 100644 index 0000000000..ad33e9c9c7 --- /dev/null +++ b/src/mainboard/google/brya/variants/kinox/memory.c @@ -0,0 +1,31 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include +#include +#include +#include + +static const struct mb_cfg ddr4_mem_config = { + .type = MEM_TYPE_DDR4, + + .rcomp = { + /* Baseboard uses only 100ohm Rcomp resistors */ + .resistor = 100, + + /* Baseboard Rcomp target values */ + .targets = {50, 20, 25, 25, 25}, + }, + + .ect = 1, /* Early Command Training */ + + .UserBd = BOARD_TYPE_MOBILE, + + .ddr_config = { + .dq_pins_interleaved = false, + }, +}; + +const struct mb_cfg *variant_memory_params(void) +{ + return &ddr4_mem_config; +} -- cgit v1.2.3