coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
early_gpio.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #include <baseboard/gpio.h>
4 #include <baseboard/variants.h>
5 
6 /* Early pad configuration in bootblock */
7 static const struct pad_config early_gpio_table[] = {
8 
9  /* UART0 RX */
10  PAD_CFG_NF(GPP_H10, NONE, DEEP, NF2),
11  /* UART0 TX */
12  PAD_CFG_NF(GPP_H11, NONE, DEEP, NF2),
13  /* A7 : MEM_STRAP_0 */
14  PAD_CFG_GPI(GPP_A7, NONE, DEEP),
15  /* A8 : EC_IN_RW_OD */
16  PAD_CFG_GPI(GPP_A8, NONE, DEEP),
17  /* A17 : MEM_CH_SEL */
18  PAD_CFG_GPI(GPP_A17, NONE, DEEP),
19  /* A19 : MEM_STRAP_2 */
20  PAD_CFG_GPI(GPP_A19, NONE, DEEP),
21  /* A20 : MEM_STRAP_1 */
22  PAD_CFG_GPI(GPP_A20, NONE, DEEP),
23  /* B11 : PCH_WP_OD */
25  /* C0 : EN_PP3300_WLAN */
26  PAD_CFG_GPO(GPP_C0, 1, DEEP),
27  /* C3 : H1_PCH_INT_ODL */
28  PAD_CFG_GPI_APIC(GPP_C3, NONE, PLTRST, LEVEL, INVERT),
29  /* D10 : EN_PP3300_WWAN */
30  PAD_CFG_GPO(GPP_D10, 1, DEEP),
31  /* D15 : MEM_STRAP_3 */
33  /* D16 : EN_PP3300_SD */
34  PAD_NC(GPP_D16, UP_20K),
35  /* E10 : PCH_GSPI0_H1_TPM_CS_L */
36  PAD_CFG_NF(GPP_E10, NONE, DEEP, NF7),
37  /* E11 : PCH_GSPI0_H1_TPM_CLK */
38  PAD_CFG_NF(GPP_E11, NONE, DEEP, NF7),
39  /* E12 : PCH_GSPIO_H1_TPM_MISO */
40  PAD_CFG_NF(GPP_E12, NONE, DEEP, NF7),
41  /* E13 : PCH_GSPI0_H1_TPM_MOSI_STRAP */
42  PAD_CFG_NF(GPP_E13, NONE, DEEP, NF7),
43  /* F14 : WLAN_PERST_L */
44  PAD_CFG_GPO(GPP_F14, 1, DEEP),
45  /* F20 : WWAN_RST_ODL
46  To meet timing constraints - drive reset low.
47  Deasserted in ramstage. */
48  PAD_CFG_GPO(GPP_F20, 0, DEEP),
49 };
50 
52 {
54 }
#define GPP_D10
#define GPP_F20
#define GPP_H11
#define GPP_A19
#define GPP_E13
#define GPP_A7
#define GPP_A20
#define GPP_F14
#define GPP_A8
#define GPP_B11
Definition: gpio_soc_defs.h:64
#define GPP_E10
#define GPP_E11
#define GPP_D15
#define GPP_D16
#define GPP_H10
#define GPP_C3
#define GPP_E12
#define GPP_A17
#define GPP_C0
#define ARRAY_SIZE(a)
Definition: helpers.h:12
void variant_configure_early_gpio_pads(void)
Definition: early_gpio.c:117
static const struct pad_config early_gpio_table[]
Definition: early_gpio.c:7
void gpio_configure_pads(const struct soc_amd_gpio *gpio_list_ptr, size_t size)
program a particular set of GPIO
Definition: gpio.c:307
#define PAD_NC(pin)
Definition: gpio_defs.h:263
#define PAD_CFG_GPI(pad, pull, rst)
Definition: gpio_defs.h:284
#define PAD_CFG_NF(pad, pull, rst, func)
Definition: gpio_defs.h:197
#define PAD_CFG_GPI_APIC(pad, pull, rst, trig, inv)
Definition: gpio_defs.h:376
#define PAD_CFG_GPO(pad, val, rst)
Definition: gpio_defs.h:247
#define PAD_CFG_GPI_GPIO_DRIVER(pad, pull, rst)
Definition: gpio_defs.h:323