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-or-later */
2
3
#include <baseboard/gpio.h>
4
#include <baseboard/variants.h>
5
#include <
commonlib/helpers.h
>
6
#include <soc/gpio.h>
7
8
/* Early pad configuration in bootblock */
9
static
const
struct
pad_config
early_gpio_table
[] = {
10
/* F12 : GSXDOUT ==> WWAN_RST_L */
11
PAD_CFG_GPO
(
GPP_F12
, 0, DEEP),
12
/* H12 : UART0_RTS# ==> SD_PERST_L */
13
PAD_CFG_GPO
(
GPP_H12
, 0, DEEP),
14
/* A13 : GPP_A13 ==> GSC_SOC_INT_ODL */
15
PAD_CFG_GPI_APIC
(
GPP_A13
,
NONE
, PLTRST, LEVEL, INVERT),
16
/* D6 : SRCCLKREQ1# ==> WWAN_EN */
17
PAD_CFG_GPO
(
GPP_D6
, 1, DEEP),
18
/* E12 : THC0_SPI1_IO1 ==> SOC_WP_OD */
19
PAD_CFG_GPI_GPIO_DRIVER
(
GPP_E12
,
NONE
, DEEP),
20
/* F18 : THC1_SPI2_INT# ==> EC_IN_RW_OD */
21
PAD_CFG_GPI
(
GPP_F18
,
NONE
, DEEP),
22
/* H4 : I2C0_SDA ==> SOC_I2C_GSC_SDA */
23
PAD_CFG_NF
(
GPP_H4
,
NONE
, DEEP, NF1),
24
/* H5 : I2C0_SCL ==> SOC_I2C_GSC_SCL */
25
PAD_CFG_NF
(
GPP_H5
,
NONE
, DEEP, NF1),
26
/* H10 : UART0_RXD ==> UART_SOC_RX_DBG_TX */
27
PAD_CFG_NF
(
GPP_H10
,
NONE
, DEEP, NF2),
28
/* H11 : UART0_TXD ==> UART_SOC_TX_DBG_RX */
29
PAD_CFG_NF
(
GPP_H11
,
NONE
, DEEP, NF2),
30
/* H13 : UART0_CTS# ==> EN_PP3300_SD_X */
31
PAD_CFG_GPO
(
GPP_H13
, 1, DEEP),
32
};
33
34
static
const
struct
pad_config
romstage_gpio_table
[] = {
35
/* H12 : UART0_RTS# ==> SD_PERST_L */
36
PAD_CFG_GPO
(
GPP_H12
, 1, DEEP),
37
};
38
39
const
struct
pad_config
*
variant_early_gpio_table
(
size_t
*num)
40
{
41
*num =
ARRAY_SIZE
(
early_gpio_table
);
42
return
early_gpio_table
;
43
}
44
45
const
struct
pad_config
*
variant_romstage_gpio_table
(
size_t
*num)
46
{
47
*num =
ARRAY_SIZE
(
romstage_gpio_table
);
48
return
romstage_gpio_table
;
49
}
GPP_F12
#define GPP_F12
Definition:
gpio_soc_defs.h:585
GPP_H11
#define GPP_H11
Definition:
gpio_soc_defs.h:227
GPP_D6
#define GPP_D6
Definition:
gpio_soc_defs.h:258
GPP_H12
#define GPP_H12
Definition:
gpio_soc_defs.h:228
GPP_H13
#define GPP_H13
Definition:
gpio_soc_defs.h:229
GPP_H5
#define GPP_H5
Definition:
gpio_soc_defs.h:221
GPP_A13
#define GPP_A13
Definition:
gpio_soc_defs.h:132
GPP_F18
#define GPP_F18
Definition:
gpio_soc_defs.h:591
GPP_H10
#define GPP_H10
Definition:
gpio_soc_defs.h:226
GPP_E12
#define GPP_E12
Definition:
gpio_soc_defs.h:640
GPP_H4
#define GPP_H4
Definition:
gpio_soc_defs.h:220
ARRAY_SIZE
#define ARRAY_SIZE(a)
Definition:
helpers.h:12
helpers.h
variant_romstage_gpio_table
const struct pad_config * variant_romstage_gpio_table(size_t *num)
Definition:
gpio.c:210
variant_early_gpio_table
const struct pad_config * variant_early_gpio_table(size_t *num)
Definition:
gpio.c:204
romstage_gpio_table
static const struct pad_config romstage_gpio_table[]
Definition:
gpio.c:34
early_gpio_table
static const struct pad_config early_gpio_table[]
Definition:
gpio.c:9
NONE
@ NONE
Definition:
qup_se_handlers_common.h:196
PAD_CFG_GPI
#define PAD_CFG_GPI(pad, pull, rst)
Definition:
gpio_defs.h:284
PAD_CFG_NF
#define PAD_CFG_NF(pad, pull, rst, func)
Definition:
gpio_defs.h:197
PAD_CFG_GPI_APIC
#define PAD_CFG_GPI_APIC(pad, pull, rst, trig, inv)
Definition:
gpio_defs.h:376
PAD_CFG_GPO
#define PAD_CFG_GPO(pad, val, rst)
Definition:
gpio_defs.h:247
PAD_CFG_GPI_GPIO_DRIVER
#define PAD_CFG_GPI_GPIO_DRIVER(pad, pull, rst)
Definition:
gpio_defs.h:323
pad_config
Definition:
gpio.h:75
src
mainboard
google
brya
variants
craask
gpio.c
Generated by
1.9.1