From efe858b1706568fcfefe4d582cebbb32de9cd596 Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Mon, 22 Mar 2021 20:08:22 +0530 Subject: soc/intel/alderlake: Add provision to override Rcomp settings Add function to allow overriding the RcompResistor and RcompTarget UPDs from mainboard if required. Mainboard users can pass required rcomp from memory.c file. Refactor ddr_config structure to take out rcomp related variable outside for all memory type to override if required. BUG=b:182772421 TEST=Able to override the default RcompResistor and RcompTarget values. Change-Id: Ie8528bbf0517728534d47f9adaabfc9a2c469609 Signed-off-by: Subrata Banik Reviewed-on: https://review.coreboot.org/c/coreboot/+/51683 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh Reviewed-by: Angel Pons --- src/mainboard/intel/adlrvp/memory.c | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'src/mainboard/intel') diff --git a/src/mainboard/intel/adlrvp/memory.c b/src/mainboard/intel/adlrvp/memory.c index 68f7fca483..85d174363e 100644 --- a/src/mainboard/intel/adlrvp/memory.c +++ b/src/mainboard/intel/adlrvp/memory.c @@ -8,18 +8,19 @@ static const struct mb_cfg ddr4_mem_config = { .type = MEM_TYPE_DDR4, + .rcomp = { + /* Baseboard uses only 100ohm Rcomp resistor */ + .resistor = 100, + + /* Baseboard Rcomp target values */ + .targets = {40, 30, 33, 33, 30}, + }, + .ect = true, /* Early Command Training */ .UserBd = BOARD_TYPE_MOBILE, .ddr_config = { - - /* Baseboard uses only 100ohm Rcomp resistor */ - .rcomp_resistor = 100, - - /* Baseboard Rcomp target values */ - .rcomp_targets = {40, 30, 33, 33, 30}, - .dq_pins_interleaved = false, }, }; @@ -143,17 +144,19 @@ static const struct mb_cfg lp5_mem_config = { static const struct mb_cfg ddr5_mem_config = { .type = MEM_TYPE_DDR5, + .rcomp = { + /* Baseboard uses only 100ohm Rcomp resistor */ + .resistor = 100, + + /* Baseboard Rcomp target values */ + .targets = {50, 30, 30, 30, 27}, + }, + .ect = true, /* Early Command Training */ .UserBd = BOARD_TYPE_MOBILE, .ddr_config = { - /* Baseboard uses only 100ohm Rcomp resistor */ - .rcomp_resistor = 100, - - /* Baseboard Rcomp target values */ - .rcomp_targets = {50, 30, 30, 30, 27}, - .dq_pins_interleaved = false, } }; -- cgit v1.2.3