coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
gpio_baseboard_trembyle.c File Reference
#include <acpi/acpi.h>
#include <baseboard/variants.h>
#include <delay.h>
#include <ec/google/chromeec/ec.h>
#include <gpio.h>
#include <soc/gpio.h>
#include <soc/smi.h>
#include <variant/gpio.h>
Include dependency graph for gpio_baseboard_trembyle.c:

Go to the source code of this file.

Functions

const __weak struct soc_amd_gpiovariant_base_gpio_table (size_t *size)
 
static void wifi_power_reset_configure_active_low_power (void)
 
static void wifi_power_reset_configure_active_high_power (void)
 
static void wifi_power_reset_configure_v3 (void)
 
static void wifi_power_reset_configure_pre_v3 (void)
 
__weak void variant_pcie_gpio_configure (void)
 
__weak void finalize_gpios (int slp_typ)
 
const __weak struct soc_amd_gpiovariant_bootblock_gpio_table (size_t *size, int slp_typ)
 
const __weak struct soc_amd_gpiovariant_sleep_gpio_table (size_t *size, int slp_typ)
 
const struct soc_amd_gpiovariant_espi_gpio_table (size_t *size)
 
const struct soc_amd_gpiovariant_tpm_gpio_table (size_t *size)
 
const struct soc_amd_gpiovariant_early_gpio_table (size_t *size)
 

Variables

static const struct soc_amd_gpio gpio_set_stage_ram []
 
static const struct soc_amd_gpio gpio_fingerprint_bootblock_table []
 
static const struct soc_amd_gpio gpio_no_fingerprint_bootblock_table []
 
static const struct soc_amd_gpio gpio_sleep_table []
 
static const struct soc_amd_gpio gpio_fp_shutdown_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 early_gpio_table []
 

Function Documentation

◆ finalize_gpios()

__weak void finalize_gpios ( int  slp_typ)

Definition at line 285 of file gpio_baseboard_trembyle.c.

References ACPI_S3, fpmcu_needs_delay(), GPIO_11, GPIO_32, gpio_set(), mdelay(), and variant_has_fingerprint().

Here is the call graph for this function:

◆ variant_base_gpio_table()

const __weak struct soc_amd_gpio* variant_base_gpio_table ( size_t size)

Definition at line 176 of file gpio_baseboard_trembyle.c.

References ARRAY_SIZE, and gpio_set_stage_ram.

◆ variant_bootblock_gpio_table()

const __weak struct soc_amd_gpio* variant_bootblock_gpio_table ( size_t size,
int  slp_typ 
)

Definition at line 316 of file gpio_baseboard_trembyle.c.

◆ variant_early_gpio_table()

const struct soc_amd_gpio* variant_early_gpio_table ( size_t size)

Definition at line 401 of file gpio_baseboard_trembyle.c.

References ARRAY_SIZE, and early_gpio_table.

◆ variant_espi_gpio_table()

const struct soc_amd_gpio* variant_espi_gpio_table ( size_t size)

Definition at line 371 of file gpio_baseboard_trembyle.c.

◆ variant_pcie_gpio_configure()

◆ variant_sleep_gpio_table()

const __weak struct soc_amd_gpio* variant_sleep_gpio_table ( size_t size,
int  slp_typ 
)

Definition at line 351 of file gpio_baseboard_trembyle.c.

◆ variant_tpm_gpio_table()

const struct soc_amd_gpio* variant_tpm_gpio_table ( size_t size)

Definition at line 388 of file gpio_baseboard_trembyle.c.

◆ wifi_power_reset_configure_active_high_power()

static void wifi_power_reset_configure_active_high_power ( void  )
static

Definition at line 201 of file gpio_baseboard_trembyle.c.

References ARRAY_SIZE, GPIO_42, GPIO_86, gpio_configure_pads(), gpio_set(), mdelay(), and PAD_GPO.

Referenced by wifi_power_reset_configure_v3().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wifi_power_reset_configure_active_low_power()

static void wifi_power_reset_configure_active_low_power ( void  )
static

Definition at line 182 of file gpio_baseboard_trembyle.c.

References ARRAY_SIZE, GPIO_42, GPIO_86, gpio_configure_pads(), and PAD_GPO.

Referenced by wifi_power_reset_configure_v3().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wifi_power_reset_configure_pre_v3()

static void wifi_power_reset_configure_pre_v3 ( void  )
static

Definition at line 236 of file gpio_baseboard_trembyle.c.

References ARRAY_SIZE, GPIO_29, GPIO_42, gpio_configure_pads(), gpio_set(), mdelay(), and PAD_GPO.

Referenced by variant_pcie_gpio_configure().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wifi_power_reset_configure_v3()

static void wifi_power_reset_configure_v3 ( void  )
static

Definition at line 228 of file gpio_baseboard_trembyle.c.

References variant_has_active_low_wifi_power(), wifi_power_reset_configure_active_high_power(), and wifi_power_reset_configure_active_low_power().

Referenced by variant_pcie_gpio_configure().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ early_gpio_table

const struct soc_amd_gpio early_gpio_table[]
static
Initial value:
= {
PAD_NF(GPIO_136, UART0_RXD, PULL_NONE),
PAD_NF(GPIO_138, UART0_TXD, PULL_NONE),
}
#define PULL_NONE
Definition: buildOpts.c:72
#define PAD_NF(pin, func, pull)
Definition: gpio_defs.h:208
#define GPIO_136
Definition: gpio.h:91
#define GPIO_138
Definition: gpio.h:93

Definition at line 388 of file gpio_baseboard_trembyle.c.

Referenced by variant_early_gpio_table().

◆ espi_gpio_table

const struct soc_amd_gpio espi_gpio_table[]
static
Initial value:
= {
PAD_NF(GPIO_26, PCIE_RST_L, PULL_NONE),
PAD_NF(GPIO_30, ESPI_CS_L, PULL_NONE),
PAD_NF(GPIO_108, ESPI_ALERT_L, PULL_NONE),
}
#define GPIO_30
Definition: gpio.h:46
#define GPIO_108
Definition: gpio.h:73
#define GPIO_26
Definition: gpio.h:43

Definition at line 351 of file gpio_baseboard_trembyle.c.

◆ gpio_fingerprint_bootblock_table

const struct soc_amd_gpio gpio_fingerprint_bootblock_table[]
static
Initial value:
= {
}
#define GPIO_11
Definition: gpio_ftns.h:13
#define GPIO_32
Definition: gpio_ftns.h:15
#define PAD_GPO(pin, direction)
Definition: gpio_defs.h:220

Definition at line 285 of file gpio_baseboard_trembyle.c.

◆ gpio_fp_shutdown_table

const struct soc_amd_gpio gpio_fp_shutdown_table[]
static
Initial value:
= {
}
#define GPIO_76
Definition: gpio.h:59
#define GPIO_40
Definition: gpio.h:49

Definition at line 316 of file gpio_baseboard_trembyle.c.

◆ gpio_no_fingerprint_bootblock_table

const struct soc_amd_gpio gpio_no_fingerprint_bootblock_table[]
static
Initial value:
= {
}
#define PAD_NC(pin)
Definition: gpio_defs.h:263

Definition at line 285 of file gpio_baseboard_trembyle.c.

◆ gpio_set_stage_ram

const struct soc_amd_gpio gpio_set_stage_ram[]
static

Definition at line 1 of file gpio_baseboard_trembyle.c.

Referenced by variant_base_gpio_table().

◆ gpio_sleep_table

const struct soc_amd_gpio gpio_sleep_table[]
static
Initial value:
= {
}
#define GPIO_10
Definition: gpio_ftns.h:12

Definition at line 316 of file gpio_baseboard_trembyle.c.

◆ tpm_gpio_table

const struct soc_amd_gpio tpm_gpio_table[]
static
Initial value:
= {
PAD_INT(GPIO_3, PULL_NONE, EDGE_LOW, STATUS),
PAD_NF(GPIO_19, I2C3_SCL, PULL_NONE),
PAD_NF(GPIO_20, I2C3_SDA, PULL_NONE),
}
#define GPIO_130
Definition: gpio.h:84
#define GPIO_20
Definition: gpio.h:38
#define GPIO_19
Definition: gpio.h:37
#define GPIO_3
Definition: gpio.h:24
#define PAD_INT(pin, pull, trigger, action)
Definition: gpio_defs.h:224
#define PAD_GPI(pin, pull)
Definition: gpio_defs.h:216

Definition at line 371 of file gpio_baseboard_trembyle.c.