coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
gpio.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <baseboard/gpio.h>
4 #include <baseboard/variants.h>
5 #include <gpio.h>
6 #include <soc/gpio.h>
7 
8 static const struct pad_config default_override_table[] = {
9 
10  PAD_NC(GPIO_52, UP_20K),
11  PAD_NC(GPIO_53, UP_20K),
12  /* UART2-CTS_B -- EN_PP3300_DX_LTE_SOC */
13  PAD_CFG_GPO(GPIO_67, 1, PWROK),
14  /* PCIE_WAKE1_B -- FULL_CARD_POWER_OFF */
15  PAD_CFG_GPO(GPIO_117, 1, PWROK),
16 
17  /* GPIO_137 -- HP_INT_ODL and would be amend by SSFC. */
18  PAD_CFG_GPI_APIC_IOS(GPIO_137, NONE, DEEP, LEVEL, INVERT, HIZCRx1, DISPUPD),
19 
20  PAD_NC(GPIO_143, UP_20K),
21  /* GPIO_144 -- Codec reset pin. */
22  PAD_CFG_GPO(GPIO_144, 1, PWROK),
23  PAD_NC(GPIO_145, UP_20K),
24 
25  /* EN_PP3300_TOUCHSCREEN */
26  PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_146, 0, DEEP, NONE, Tx0RxDCRx0, DISPUPD),
27 
28  /* AVS_I2S1_MCLK -- PLT_RST_LTE_L */
29  PAD_CFG_GPO(GPIO_161, 1, DEEP),
30 
31  PAD_NC(GPIO_213, DN_20K),
32  PAD_NC(GPIO_214, DN_20K),
33 };
34 
35 const struct pad_config *variant_override_gpio_table(size_t *num)
36 {
38 
40 }
41 
42 static const struct pad_config lte_early_override_table[] = {
43  /* UART2-CTS_B -- EN_PP3300_DX_LTE_SOC */
44  PAD_CFG_GPO(GPIO_67, 1, PWROK),
45 
46  /* PCIE_WAKE1_B -- FULL_CARD_POWER_OFF */
47  PAD_CFG_GPO(GPIO_117, 1, PWROK),
48 
49  /* AVS_I2S1_MCLK -- PLT_RST_LTE_L */
50  PAD_CFG_GPO(GPIO_161, 0, DEEP),
51 };
52 
54 {
56 
58 }
#define ARRAY_SIZE(a)
Definition: helpers.h:12
#define GPIO_214
Definition: gpio_apl.h:172
#define GPIO_161
Definition: gpio_apl.h:282
#define GPIO_213
Definition: gpio_apl.h:171
#define GPIO_53
Definition: gpio_glk.h:67
#define GPIO_52
Definition: gpio_glk.h:66
const struct pad_config *__weak variant_override_gpio_table(size_t *num)
Definition: gpio.c:450
const struct soc_amd_gpio *__weak variant_early_override_gpio_table(size_t *size)
Definition: gpio.c:317
static const struct pad_config default_override_table[]
Definition: gpio.c:8
static const struct pad_config lte_early_override_table[]
Definition: gpio.c:42
#define GPIO_143
Definition: gpio.h:90
#define GPIO_67
Definition: gpio.h:53
#define GPIO_145
Definition: gpio.h:92
#define GPIO_144
Definition: gpio.h:91
#define GPIO_146
Definition: gpio.h:93
#define PAD_NC(pin)
Definition: gpio_defs.h:263
#define GPIO_137
Definition: gpio.h:92
#define GPIO_117
Definition: gpio.h:84
#define PAD_CFG_GPI_APIC_IOS(pad, pull, rst, trig, inv, iosstate, iosterm)
Definition: gpio_defs.h:391
#define PAD_CFG_GPO_IOSSTATE_IOSTERM(pad, val, rst, pull, iosstate, ioterm)
Definition: gpio_defs.h:277
#define PAD_CFG_GPO(pad, val, rst)
Definition: gpio_defs.h:247