Karthik Ramasubramanian has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/39812 )
Change subject: mb/google/dedede: Read DRAM population strap ......................................................................
mb/google/dedede: Read DRAM population strap
Read DRAM population strap and pass that information to FSP for memory initialization.
BUG=b:152275658 TEST=Build the mainboard.
Change-Id: I69583f35ffc219bae9ce06bd4ba9898ed0d4d21d Signed-off-by: Karthikeyan Ramasubramanian kramasub@google.com --- M src/mainboard/google/dedede/romstage.c M src/mainboard/google/dedede/variants/baseboard/include/baseboard/gpio.h 2 files changed, 7 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/12/39812/1
diff --git a/src/mainboard/google/dedede/romstage.c b/src/mainboard/google/dedede/romstage.c index 9c220d4..ca81785 100644 --- a/src/mainboard/google/dedede/romstage.c +++ b/src/mainboard/google/dedede/romstage.c @@ -6,8 +6,10 @@ */
#include <baseboard/variants.h> +#include <gpio.h> #include <soc/meminit_jsl.h> #include <soc/romstage.h> +#include <variant/gpio.h>
void mainboard_memory_init_params(FSPM_UPD *memupd) { @@ -16,7 +18,7 @@ .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); } diff --git a/src/mainboard/google/dedede/variants/baseboard/include/baseboard/gpio.h b/src/mainboard/google/dedede/variants/baseboard/include/baseboard/gpio.h index dfb2cd1..fff0489 100644 --- a/src/mainboard/google/dedede/variants/baseboard/include/baseboard/gpio.h +++ b/src/mainboard/google/dedede/variants/baseboard/include/baseboard/gpio.h @@ -26,4 +26,7 @@ #define GPIO_MEM_CONFIG_2 GPP_C4 #define GPIO_MEM_CONFIG_3 GPP_C5
+/* Memory channel select strap - 0:fully-populated, 1:half-populated */ +#define GPIO_MEM_CH_SEL GPP_S0 + #endif /* __BASEBOARD_GPIO_H__ */