mb/google/fatcat/var/fatcat: Refactor GPIO programming for UFS support
[coreboot.git] / src / mainboard / google / brya / variants / nivviks / memory.c
blob0453cf1748a147d48d8fa288d9e89b5a69358155
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 #include <baseboard/variants.h>
4 #include <boardid.h>
5 #include <gpio.h>
7 int variant_memory_sku(void)
9 /*
10 * The memory straps in the P0 build don't match those generated by
11 * spd_tools, so override the memory ID to 0.
13 if (board_id() == 0)
14 return 0;
17 * Memory configuration board straps
18 * GPIO_MEM_CONFIG_0 GPP_E1
19 * GPIO_MEM_CONFIG_1 GPP_E2
20 * GPIO_MEM_CONFIG_2 GPP_E3
22 gpio_t spd_gpios[] = {
23 GPP_E1,
24 GPP_E2,
25 GPP_E3,
28 return gpio_base2_value(spd_gpios, ARRAY_SIZE(spd_gpios));