Daniel Peng has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/80763?usp=email )
Change subject: mb/google/nissa/var/glassway: Add memory config for glassway ......................................................................
mb/google/nissa/var/glassway: Add memory config for glassway
Follow glassway schematic to set memory configruation board straps.
BUG=b:319071869 BRANCH=None TEST=None
Change-Id: Id85d590ed55997690e4c279ae83544b78fe72eec Signed-off-by: Daniel Peng Daniel_Peng@pegatron.corp-partner.google.com --- A src/mainboard/google/brya/variants/glassway/Makefile.mk A src/mainboard/google/brya/variants/glassway/memory.c 2 files changed, 29 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/63/80763/1
diff --git a/src/mainboard/google/brya/variants/glassway/Makefile.mk b/src/mainboard/google/brya/variants/glassway/Makefile.mk new file mode 100644 index 0000000..c44e4f0 --- /dev/null +++ b/src/mainboard/google/brya/variants/glassway/Makefile.mk @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0-only +romstage-y += memory.c diff --git a/src/mainboard/google/brya/variants/glassway/memory.c b/src/mainboard/google/brya/variants/glassway/memory.c new file mode 100644 index 0000000..d655ca8 --- /dev/null +++ b/src/mainboard/google/brya/variants/glassway/memory.c @@ -0,0 +1,27 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include <baseboard/variants.h> +#include <boardid.h> +#include <gpio.h> + +int variant_memory_sku(void) +{ + /* + * The memory straps in the P0 build don't match those generated by + * spd_tools, so override the memory ID to 0. + */ + + /* + * Memory configuration board straps + * GPIO_MEM_CONFIG_0 GPP_E1 + * GPIO_MEM_CONFIG_1 GPP_E2 + * GPIO_MEM_CONFIG_2 GPP_E3 + */ + gpio_t spd_gpios[] = { + GPP_E1, + GPP_E2, + GPP_E3, + }; + + return gpio_base2_value(spd_gpios, ARRAY_SIZE(spd_gpios)); +}