From da38715ec3cef00ffa893a2adbee30674bf5f9a4 Mon Sep 17 00:00:00 2001 From: Karthikeyan Ramasubramanian Date: Fri, 17 Apr 2020 10:16:52 -0600 Subject: mb/google/dedede: Read DRAM population strap Configure DRAM population strap GPIO according to the schematics. Configure an internal pull-up to support the boards in which the strap is not populated. Read the strap and pass that information to FSP for memory initialization. BUG=b:152275658, b:154301008 TEST=Build and boot the mainboard. Ensure that the strap information is read as expected and passed to FSP. Change-Id: I69583f35ffc219bae9ce06bd4ba9898ed0d4d21d Signed-off-by: Karthikeyan Ramasubramanian Reviewed-on: https://review.coreboot.org/c/coreboot/+/39812 Reviewed-by: Furquan Shaikh Tested-by: build bot (Jenkins) --- src/mainboard/google/dedede/romstage.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/mainboard/google/dedede/romstage.c') diff --git a/src/mainboard/google/dedede/romstage.c b/src/mainboard/google/dedede/romstage.c index f95e7aacc3..2efaaf17e7 100644 --- a/src/mainboard/google/dedede/romstage.c +++ b/src/mainboard/google/dedede/romstage.c @@ -6,8 +6,10 @@ */ #include +#include #include #include +#include void mainboard_memory_init_params(FSPM_UPD *memupd) { @@ -16,7 +18,7 @@ void mainboard_memory_init_params(FSPM_UPD *memupd) .read_type = READ_SPD_CBFS, .spd_spec.spd_index = variant_memory_sku(), }; - /* TODO: Read the resistor strap to get number of memory segments. */ - bool half_populated = 0; + bool half_populated = !gpio_get(GPIO_MEM_CH_SEL); + memcfg_init(&memupd->FspmConfig, board_cfg, &spd_info, half_populated); } -- cgit v1.2.3