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 #include <soc/gpio.h>
3 #include "gpio.h"
4 
5 /* GPIO pins used by coreboot should be initialized in bootblock */
6 
7 static const struct soc_amd_gpio gpio_set_stage_reset[] = {
8  /* assert PCIe reset */
9  PAD_GPO(GPIO_6, HIGH),
10  /* not LLB */
12  /* not USB_OC1_L */
14  /* not USB_OC2_L */
16  /* SDIO eMMC power control */
17  PAD_NF(GPIO_22, EMMC_PWR_CTRL, PULL_NONE),
18  /* PCIe Reset to DP0, DP1, J2105, TP, FP */
19  PAD_GPO(GPIO_27, HIGH),
20  /* eSPI CS# */
21  PAD_NF(GPIO_30, ESPI_CS_L, PULL_NONE),
22  /* GPP_10G_SELECT => High=10G, Low=x2 NVME (work with AGPIO89) */
23  PAD_GPO(GPIO_42, LOW),
24  /* FANOUT0 */
25  PAD_NF(GPIO_85, FANOUT0, PULL_NONE),
26  /* APU_COMBO_GPP_SW => High=SATA, Low=x2 NVME (work with EGPIO42) */
27  PAD_GPO(GPIO_89, LOW),
28  /* PC beep to codec */
29  PAD_NF(GPIO_91, SPKR, PULL_NONE),
30 };
31 
33 {
35 }
static const struct soc_amd_gpio gpio_set_stage_reset[]
Definition: early_gpio.c:7
void mainboard_program_early_gpios(void)
Definition: early_gpio.c:32
#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_89
Definition: gpio.h:65
#define GPIO_12
Definition: gpio.h:33
#define GPIO_85
Definition: gpio.h:61
#define GPIO_42
Definition: gpio.h:50
#define GPIO_6
Definition: gpio.h:27
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