coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
gpio.c File Reference
#include <baseboard/gpio.h>
#include <baseboard/variants.h>
#include <commonlib/helpers.h>
#include <gpio.h>
#include <soc/gpio.h>
Include dependency graph for gpio.c:

Go to the source code of this file.

Functions

const struct soc_amd_gpio *__weak variant_pcie_gpio_table (size_t *size)
 
const struct soc_amd_gpio *__weak variant_bootblock_gpio_table (size_t *size)
 
const struct soc_amd_gpio *__weak variant_base_gpio_table (size_t *size)
 
const struct soc_amd_gpio *__weak variant_override_gpio_table (size_t *size)
 
const struct soc_amd_gpio *__weak variant_early_override_gpio_table (size_t *size)
 
const struct soc_amd_gpio *__weak variant_bootblock_override_gpio_table (size_t *size)
 
const struct soc_amd_gpio *__weak variant_pcie_override_gpio_table (size_t *size)
 
const struct soc_amd_gpio *__weak variant_early_gpio_table (size_t *size)
 
const __weak struct soc_amd_gpiovariant_sleep_gpio_table (size_t *size)
 
const __weak struct soc_amd_gpiovariant_espi_gpio_table (size_t *size)
 
const __weak struct soc_amd_gpiovariant_tpm_gpio_table (size_t *size)
 

Variables

static const struct soc_amd_gpio base_gpio_table []
 
static const struct soc_amd_gpio early_gpio_table []
 
static const struct soc_amd_gpio espi_gpio_table []
 
static const struct soc_amd_gpio tpm_gpio_table []
 
static const struct soc_amd_gpio bootblock_gpio_table []
 
static const struct soc_amd_gpio sleep_gpio_table []
 
static const struct soc_amd_gpio pcie_gpio_table []
 

Function Documentation

◆ variant_base_gpio_table()

const struct soc_amd_gpio* __weak variant_base_gpio_table ( size_t size)

Definition at line 306 of file gpio.c.

References ARRAY_SIZE, and base_gpio_table.

◆ variant_bootblock_gpio_table()

const struct soc_amd_gpio* __weak variant_bootblock_gpio_table ( size_t size)

Definition at line 300 of file gpio.c.

References ARRAY_SIZE, and bootblock_gpio_table.

Referenced by bootblock_mainboard_early_init(), and bootblock_mainboard_init().

Here is the caller graph for this function:

◆ variant_bootblock_override_gpio_table()

const struct soc_amd_gpio* __weak variant_bootblock_override_gpio_table ( size_t size)

Definition at line 324 of file gpio.c.

References NULL.

Referenced by bootblock_mainboard_init().

Here is the caller graph for this function:

◆ variant_early_gpio_table()

const struct soc_amd_gpio* __weak variant_early_gpio_table ( size_t size)

Definition at line 336 of file gpio.c.

References ARRAY_SIZE, and early_gpio_table.

◆ variant_early_override_gpio_table()

const struct soc_amd_gpio* __weak variant_early_override_gpio_table ( size_t size)

Definition at line 317 of file gpio.c.

References NULL.

Referenced by bootblock_mainboard_early_init(), bootblock_mainboard_init(), and verstage_mainboard_early_init().

Here is the caller graph for this function:

◆ variant_espi_gpio_table()

const __weak struct soc_amd_gpio* variant_espi_gpio_table ( size_t size)

Definition at line 348 of file gpio.c.

References ARRAY_SIZE, and espi_gpio_table.

Referenced by bootblock_mainboard_early_init(), mb_set_up_early_espi(), and verstage_mainboard_espi_init().

Here is the caller graph for this function:

◆ variant_override_gpio_table()

const struct soc_amd_gpio* __weak variant_override_gpio_table ( size_t size)

Definition at line 311 of file gpio.c.

References NULL.

◆ variant_pcie_gpio_table()

const struct soc_amd_gpio* __weak variant_pcie_gpio_table ( size_t size)

Definition at line 294 of file gpio.c.

References ARRAY_SIZE, and pcie_gpio_table.

Referenced by mb_pre_fspm().

Here is the caller graph for this function:

◆ variant_pcie_override_gpio_table()

const struct soc_amd_gpio* __weak variant_pcie_override_gpio_table ( size_t size)

Definition at line 330 of file gpio.c.

References NULL.

Referenced by mb_pre_fspm().

Here is the caller graph for this function:

◆ variant_sleep_gpio_table()

const __weak struct soc_amd_gpio* variant_sleep_gpio_table ( size_t size)

Definition at line 342 of file gpio.c.

References ARRAY_SIZE, and sleep_gpio_table.

◆ variant_tpm_gpio_table()

const __weak struct soc_amd_gpio* variant_tpm_gpio_table ( size_t size)

Definition at line 354 of file gpio.c.

References ARRAY_SIZE, and tpm_gpio_table.

Referenced by bootblock_mainboard_early_init(), and verstage_mainboard_tpm_init().

Here is the caller graph for this function:

Variable Documentation

◆ base_gpio_table

const struct soc_amd_gpio base_gpio_table[]
static

Definition at line 1 of file gpio.c.

Referenced by mainboard_chip_init(), and variant_base_gpio_table().

◆ bootblock_gpio_table

const struct soc_amd_gpio bootblock_gpio_table[]
static
Initial value:
= {
PAD_GPO(GPIO_24, HIGH),
}
#define GPIO_130
Definition: gpio.h:84
#define GPIO_24
Definition: gpio.h:42
#define PAD_GPO(pin, direction)
Definition: gpio_defs.h:220

Definition at line 1 of file gpio.c.

Referenced by variant_bootblock_gpio_table().

◆ early_gpio_table

const struct soc_amd_gpio early_gpio_table[]
static

Definition at line 1 of file gpio.c.

Referenced by variant_early_gpio_table().

◆ espi_gpio_table

const struct soc_amd_gpio espi_gpio_table[]
static
Initial value:
= {
PAD_NF(GPIO_30, ESPI_CS_L, PULL_NONE),
PAD_NF(GPIO_104, SPI2_DO_ESPI2_D0, PULL_NONE),
PAD_NF(GPIO_105, SPI2_DI_ESPI2_D1, PULL_NONE),
PAD_NF(GPIO_106, SPI2_WP_L_ESPI2_D2, PULL_NONE),
PAD_NF(GPIO_107, SPI2_HOLD_L_ESPI2_D3, PULL_NONE),
PAD_NF(GPIO_108, ESPI_ALERT_D1, PULL_NONE),
}
#define PULL_NONE
Definition: buildOpts.c:72
@ SPI_CLK
Definition: pmif_spi.h:74
#define GPIO_30
Definition: gpio.h:46
#define GPIO_104
Definition: gpio.h:69
#define GPIO_105
Definition: gpio.h:70
#define GPIO_107
Definition: gpio.h:72
#define GPIO_108
Definition: gpio.h:73
#define GPIO_86
Definition: gpio.h:62
#define GPIO_106
Definition: gpio.h:71
#define PAD_NF(pin, func, pull)
Definition: gpio_defs.h:208

Definition at line 1 of file gpio.c.

Referenced by variant_espi_gpio_table().

◆ pcie_gpio_table

const struct soc_amd_gpio pcie_gpio_table[]
static
Initial value:
= {
PAD_GPO(GPIO_18, HIGH),
PAD_GPO(GPIO_40, HIGH),
PAD_GPO(GPIO_69, HIGH),
PAD_NFO(GPIO_26, PCIE_RST_L, HIGH),
}
#define GPIO_18
Definition: gpio_ftns.h:17
#define GPIO_69
Definition: gpio.h:55
#define GPIO_5
Definition: gpio.h:26
#define GPIO_70
Definition: gpio.h:56
#define GPIO_26
Definition: gpio.h:43
#define GPIO_29
Definition: gpio.h:45
#define GPIO_40
Definition: gpio.h:49
#define PAD_NFO(pin, func, direction)
Definition: gpio_defs.h:212
#define PAD_NC(pin)
Definition: gpio_defs.h:263

Definition at line 1 of file gpio.c.

Referenced by variant_pcie_gpio_configure(), and variant_pcie_gpio_table().

◆ sleep_gpio_table

const struct soc_amd_gpio sleep_gpio_table[]
static
Initial value:
= {
}

Definition at line 1 of file gpio.c.

Referenced by variant_sleep_gpio_table().

◆ tpm_gpio_table

const struct soc_amd_gpio tpm_gpio_table[]
static
Initial value:
= {
PAD_NF(GPIO_19, I2C3_SCL, PULL_NONE),
PAD_NF(GPIO_20, I2C3_SDA, PULL_NONE),
PAD_INT(GPIO_85, PULL_NONE, EDGE_LOW, STATUS_DELIVERY),
}
#define GPIO_20
Definition: gpio.h:38
#define GPIO_19
Definition: gpio.h:37
#define GPIO_85
Definition: gpio.h:61
#define PAD_INT(pin, pull, trigger, action)
Definition: gpio_defs.h:224

Definition at line 1 of file gpio.c.

Referenced by variant_tpm_gpio_table().