diff options
-rw-r--r-- | src/mainboard/google/rex/variants/baseboard/rex/include/baseboard/gpio.h | 6 | ||||
-rw-r--r-- | src/mainboard/google/rex/variants/baseboard/rex/memory.c | 11 |
2 files changed, 15 insertions, 2 deletions
diff --git a/src/mainboard/google/rex/variants/baseboard/rex/include/baseboard/gpio.h b/src/mainboard/google/rex/variants/baseboard/rex/include/baseboard/gpio.h index ce389fe7d7..52a33667cb 100644 --- a/src/mainboard/google/rex/variants/baseboard/rex/include/baseboard/gpio.h +++ b/src/mainboard/google/rex/variants/baseboard/rex/include/baseboard/gpio.h @@ -17,5 +17,11 @@ #define EC_SCI_GPI GPE0_ESPI /* EC wake is LAN_WAKE# which is a special DeepSX wake pin */ #define GPE_EC_WAKE GPE0_LAN_WAK +/* Memory configuration board straps */ +#define GPIO_MEM_CONFIG_0 GPP_E11 +#define GPIO_MEM_CONFIG_1 GPP_E02 +#define GPIO_MEM_CONFIG_2 GPP_E01 +#define GPIO_MEM_CONFIG_3 GPP_E12 +#define GPIO_MEM_CH_SEL GPP_E13 #endif /* __BASEBOARD_GPIO_H__ */ diff --git a/src/mainboard/google/rex/variants/baseboard/rex/memory.c b/src/mainboard/google/rex/variants/baseboard/rex/memory.c index 0fb80e94af..a8f65155e5 100644 --- a/src/mainboard/google/rex/variants/baseboard/rex/memory.c +++ b/src/mainboard/google/rex/variants/baseboard/rex/memory.c @@ -17,12 +17,19 @@ const struct mb_cfg *__weak variant_memory_params(void) int __weak variant_memory_sku(void) { - return 0; + gpio_t spd_gpios[] = { + GPIO_MEM_CONFIG_0, + GPIO_MEM_CONFIG_1, + GPIO_MEM_CONFIG_2, + GPIO_MEM_CONFIG_3, + }; + + return gpio_base2_value(spd_gpios, ARRAY_SIZE(spd_gpios)); } bool __weak variant_is_half_populated(void) { - return 0; + return gpio_get(GPIO_MEM_CH_SEL); } void __weak variant_get_spd_info(struct mem_spd *spd_info) |