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/soc/intel/alderlake/include/soc/meminit.h | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'src/soc/intel/alderlake/include') diff --git a/src/soc/intel/alderlake/include/soc/meminit.h b/src/soc/intel/alderlake/include/soc/meminit.h index 9813d9345e..96e049cf99 100644 --- a/src/soc/intel/alderlake/include/soc/meminit.h +++ b/src/soc/intel/alderlake/include/soc/meminit.h @@ -19,13 +19,6 @@ enum mem_type { struct mem_ddr_config { /* Dqs Pins Interleaved Setting. Enable/Disable Control */ bool dq_pins_interleaved; - /* - * Rcomp resistor value. This values represents the resistance in - * ohms of the rcomp resistor attached to the DDR_COMP pin on the SoC. - */ - uint16_t rcomp_resistor; - /* Rcomp target values. */ - uint16_t rcomp_targets[5]; }; struct lpx_dq { @@ -64,9 +57,22 @@ struct mem_lp5x_config { uint8_t ccc_config; }; +struct rcomp { + /* + * Rcomp resistor value. This values represents the resistance in + * ohms of the rcomp resistor attached to the DDR_COMP pin on the SoC. + * + * Note: If mainboard users don't want to override rcomp related settings + * then associated rcomp UPDs will have its default value. + */ + uint16_t resistor; + /* Rcomp target values. */ + uint16_t targets[5]; +}; + struct mb_cfg { enum mem_type type; - + struct rcomp rcomp; union { /* * DQ CPU<>DRAM map: -- cgit v1.2.3