coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
variants.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #ifndef __BASEBOARD_VARIANTS_H__
4 #define __BASEBOARD_VARIANTS_H__
5 
6 #include <amdblocks/gpio.h>
7 #include <soc/pci_devs.h>
8 #include <platform_descriptors.h>
9 
10 #define WLAN_DEVFN PCIE_GPP_2_0_DEVFN
11 #define SD_DEVFN PCIE_GPP_2_1_DEVFN
12 #define NVME_DEVFN PCIE_GPP_2_2_DEVFN
13 
14 /*
15  * This function provides base GPIO configuration table. It is typically provided by
16  * baseboard using a weak implementation. If GPIO configuration for a variant differs
17  * significantly from the baseboard, then the variant can also provide a strong implementation
18  * of this function.
19  */
20 void variant_base_gpio_table(const struct soc_amd_gpio **gpio, size_t *size);
21 
22 /*
23  * This function allows variant to override any GPIOs that are different than the base GPIO
24  * configuration provided by variant_base_gpio_table().
25  */
26 void variant_override_gpio_table(const struct soc_amd_gpio **gpio, size_t *size);
27 
28 /* This function provides GPIO init in bootblock. */
29 void variant_bootblock_gpio_table(const struct soc_amd_gpio **gpio, size_t *size);
30 
31 /* This function provides early GPIO init in early bootblock or psp. */
32 void variant_early_gpio_table(const struct soc_amd_gpio **gpio, size_t *size);
33 
34 /* This function allows variant to override any early GPIO init in early bootblock or psp. */
35 void variant_early_override_gpio_table(const struct soc_amd_gpio **gpio, size_t *size);
36 
37 /* This function provides GPIO settings before entering sleep. */
38 void variant_sleep_gpio_table(const struct soc_amd_gpio **gpio, size_t *size);
39 
40 /* This function provides GPIO settings for eSPI bus. */
41 void variant_espi_gpio_table(const struct soc_amd_gpio **gpio, size_t *size);
42 
43 /* This function provides GPIO settings for TPM i2c bus. */
44 void variant_tpm_gpio_table(const struct soc_amd_gpio **gpio, size_t *size);
45 
46 /* This function provides GPIO settings before PCIe enumeration. */
47 void variant_pcie_gpio_table(const struct soc_amd_gpio **gpio, size_t *size);
48 
49 #endif /* __BASEBOARD_VARIANTS_H__ */
const struct pad_config * variant_early_gpio_table(size_t *num)
Definition: gpio.c:204
const struct pad_config * variant_override_gpio_table(size_t *num)
Definition: gpio.c:450
const struct pad_config * variant_sleep_gpio_table(size_t *num)
Definition: gpio.c:466
const struct pad_config * variant_base_gpio_table(size_t *num)
Definition: gpio.c:444
const struct soc_amd_gpio * variant_tpm_gpio_table(size_t *size)
Definition: gpio.c:354
const struct soc_amd_gpio * variant_early_override_gpio_table(size_t *size)
Definition: gpio.c:317
const struct soc_amd_gpio * variant_espi_gpio_table(size_t *size)
Definition: gpio.c:348
const struct soc_amd_gpio * variant_pcie_gpio_table(size_t *size)
Definition: gpio.c:294
const struct soc_amd_gpio * variant_bootblock_gpio_table(size_t *size)
Definition: gpio.c:300
Definition: pinmux.c:36