Shon Wang has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/59334 )
Change subject: mb/google/brya/var/vell: update memory settings ......................................................................
mb/google/brya/var/vell: update memory settings
BUG=b:205908918 TEST=emerge-brya coreboot
Change-Id: Ic0bbac5eaebc77639be6c1bc399658ac90e72fbb --- M src/mainboard/google/brya/variants/vell/Makefile.inc A src/mainboard/google/brya/variants/vell/memory.c 2 files changed, 32 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/59334/1
diff --git a/src/mainboard/google/brya/variants/vell/Makefile.inc b/src/mainboard/google/brya/variants/vell/Makefile.inc index 009117a..35286d1 100644 --- a/src/mainboard/google/brya/variants/vell/Makefile.inc +++ b/src/mainboard/google/brya/variants/vell/Makefile.inc @@ -1,4 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-only bootblock-y += gpio.c romstage-y += gpio.c -ramstage-y += gpio.c \ No newline at end of file +ramstage-y += gpio.c +romstage-y += memory.c diff --git a/src/mainboard/google/brya/variants/vell/memory.c b/src/mainboard/google/brya/variants/vell/memory.c new file mode 100644 index 0000000..6e36240 --- /dev/null +++ b/src/mainboard/google/brya/variants/vell/memory.c @@ -0,0 +1,30 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include <baseboard/gpio.h> +#include <baseboard/variants.h> +#include <gpio.h> + +int __weak variant_memory_sku(void) +{ + /* + * Memory configuration board straps + * GPIO_MEM_CONFIG_0 GPP_E11 + * GPIO_MEM_CONFIG_1 GPP_E2 + * GPIO_MEM_CONFIG_2 GPP_E1 + * GPIO_MEM_CONFIG_3 GPP_E12 + */ + gpio_t spd_gpios[] = { + GPP_E11, + GPP_E2, + GPP_E1, + GPP_E12, + }; + + return gpio_base2_value(spd_gpios, ARRAY_SIZE(spd_gpios)); +} + +bool __weak variant_is_half_populated(void) +{ + /* GPIO_MEM_CH_SEL GPP_E13 */ + return gpio_get(GPP_E13); +}