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-only */
2 
3 #include <soc/gpio.h>
4 #include "../../gpio.h"
5 
6 /* GPIO pins used by coreboot should be initialized in bootblock */
7 
8 static const struct soc_amd_gpio gpio_set_stage_reset[] = {
9  /* not LLB */
11  /* not USB_OC5_L */
13  /* not USB_OC4_L */
15  /* not USB_OC1_L */
17  /* not USB_OC2_L */
19  /* SDIO eMMC power control */
20  PAD_NF(GPIO_22, EMMC_PWR_CTRL, PULL_NONE),
21  /* PCIe SSD power enable */
22  PAD_GPO(GPIO_23, HIGH),
23  /* PCIe Reset to DP0, DP1, J2105, TP, FP */
24  PAD_NF(GPIO_27, PCIE_RST1_L, PULL_NONE),
25  /* eSPI CS# */
26  PAD_NF(GPIO_30, ESPI_CS_L, PULL_NONE),
27  /* FANOUT0 */
28  PAD_NF(GPIO_85, FANOUT0, PULL_NONE),
29  /* PC beep to codec */
30  PAD_NF(GPIO_91, SPKR, PULL_NONE),
31 };
32 
34 {
36 }
void mainboard_program_early_gpios(void)
Definition: early_gpio.c:32
static const struct soc_amd_gpio gpio_set_stage_reset[]
Definition: early_gpio.c:8
#define GPIO_18
Definition: gpio_ftns.h:17
#define GPIO_17
Definition: gpio_ftns.h:16
#define GPIO_22
Definition: gpio_ftns.h:14
#define ARRAY_SIZE(a)
Definition: helpers.h:12
#define PULL_UP
Definition: buildOpts.c:70
#define PULL_NONE
Definition: buildOpts.c:72
#define GPIO_91
Definition: gpio.h:67
#define GPIO_30
Definition: gpio.h:46
#define GPIO_27
Definition: gpio.h:44
#define GPIO_12
Definition: gpio.h:33
#define GPIO_85
Definition: gpio.h:61
#define GPIO_23
Definition: gpio.h:41
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_GPO(pin, direction)
Definition: gpio_defs.h:220
#define PAD_NF(pin, func, pull)
Definition: gpio_defs.h:208
#define PAD_GPI(pin, pull)
Definition: gpio_defs.h:216
#define GPIO_14
Definition: gpio.h:35
#define GPIO_13
Definition: gpio.h:34