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

Go to the source code of this file.

Data Structures

struct  soc_gpio_map
 
struct  soc_gpio_config
 
struct  gpio_bank
 

Macros

#define CROS_GPIO_DEVICE_NAME   "Braswell"
 
#define COMMUNITY_SIZE   0x20000
 
#define COMMUNITY_GPSOUTHWEST_BASE   (IO_BASE_ADDRESS + COMMUNITY_OFFSET_GPSOUTHWEST)
 
#define COMMUNITY_GPNORTH_BASE   (IO_BASE_ADDRESS + COMMUNITY_OFFSET_GPNORTH)
 
#define COMMUNITY_GPEAST_BASE   (IO_BASE_ADDRESS + COMMUNITY_OFFSET_GPEAST)
 
#define COMMUNITY_GPSOUTHEAST_BASE   (IO_BASE_ADDRESS + COMMUNITY_OFFSET_GPSOUTHEAST)
 
#define GPIO_COMMUNITY_COUNT   4
 
#define GPIO_FAMILIES_MAX_PER_COMM   7
 
#define GP_SOUTHWEST   0
 
#define GP_NORTH   1
 
#define GP_EAST   2
 
#define GP_SOUTHEAST   3
 
#define COMMUNITY_BASE(community)   (IO_BASE_ADDRESS + community * 0x8000)
 
#define GP_READ_ACCESS_POLICY_BASE(community)   (COMMUNITY_BASE(community) + 0x000)
 
#define GP_WRITE_ACCESS_POLICY_BASE(community)   (COMMUNITY_BASE(community) + 0x100)
 
#define GP_WAKE_STATUS_REG_BASE(community)   (COMMUNITY_BASE(community) + 0x200)
 
#define GP_WAKE_MASK_REG_BASE(community)   (COMMUNITY_BASE(community) + 0x280)
 
#define GP_INT_STATUS_REG_BASE(community)   (COMMUNITY_BASE(community) + 0x300)
 
#define GP_INT_MASK_REG_BASE(community)   (COMMUNITY_BASE(community) + 0x380)
 
#define GP_FAMILY_RCOMP_CTRL(community, family)   (COMMUNITY_BASE(community) + 0x1080 + 0x80 * family)
 
#define GP_FAMILY_RCOMP_OFFSET(community, family)   (COMMUNITY_BASE(community) + 0x1084 + 0x80 * family)
 
#define GP_FAMILY_RCOMP_OVERRIDE(community, family)   (COMMUNITY_BASE(community) + 0x1088 + 0x80 * family)
 
#define GP_FAMILY_RCOMP_VALUE(community, family)   (COMMUNITY_BASE(community) + 0x108C + 0x80 * family)
 
#define GP_FAMILY_CONF_COMP(community, family)   (COMMUNITY_BASE(community) + 0x1090 + 0x80 * family)
 
#define GP_FAMILY_CONF_REG(community, family)   (COMMUNITY_BASE(community) + 0x1094 + 0x80 * family)
 
#define PAD_CONTROL_REG0_TRISTATE   (PAD_CONFIG0_DEFAULT|PAD_GPIOFG_HI_Z)
 
#define FAMILY_NUMBER(gpio_pad)   (gpio_pad / MAX_FAMILY_PAD_GPIO_NO)
 
#define INTERNAL_PAD_NUM(gpio_pad)   (gpio_pad % MAX_FAMILY_PAD_GPIO_NO)
 
#define GPIO_OFFSET(gpio_pad)
 
#define SDMMC1_CMD_MMIO_OFFSET   GPIO_OFFSET(23)
 
#define SDMMC1_D0_MMIO_OFFSET   GPIO_OFFSET(17)
 
#define SDMMC1_D1_MMIO_OFFSET   GPIO_OFFSET(24)
 
#define SDMMC1_D2_MMIO_OFFSET   GPIO_OFFSET(20)
 
#define SDMMC1_D3_MMIO_OFFSET   GPIO_OFFSET(26)
 
#define MMC1_D4_SD_WE_MMIO_OFFSET   GPIO_OFFSET(67)
 
#define MMC1_D5_MMIO_OFFSET   GPIO_OFFSET(65)
 
#define MMC1_D6_MMIO_OFFSET   GPIO_OFFSET(63)
 
#define MMC1_D7_MMIO_OFFSET   GPIO_OFFSET(68)
 
#define MMC1_RCLK_OFFSET   GPIO_OFFSET(69)
 
#define HV_DDI2_DDC_SDA_MMIO_OFFSET   GPIO_OFFSET(62)
 
#define HV_DDI2_DDC_SCL_MMIO_OFFSET   GPIO_OFFSET(67)
 
#define CFIO_139_MMIO_OFFSET   GPIO_OFFSET(64)
 
#define CFIO_140_MMIO_OFFSET   GPIO_OFFSET(67)
 
#define GPIO_READ_ACCESS_POLICY_REG   0x0000
 
#define GPIO_WRITE_ACCESS_POLICY_REG   0x0100
 
#define GPIO_WAKE_STATUS_REG   0x0200
 
#define GPIO_WAKE_MASK_REG0   0x0280
 
#define GPIO_WAKE_MASK_REG1   0x0284
 
#define GPIO_INTERRUPT_STATUS   0x0300
 
#define GPIO_INTERRUPT_MASK   0x0380
 
#define GPE0A_STS_REG   0x20
 
#define GPE0A_EN_REG   0x28
 
#define ALT_GPIO_SMI_REG   0x38
 
#define GPIO_ROUT_REG   0x58
 
#define PAD_CONF0_REG   0x0
 
#define PAD_CONF1_REG   0x4
 
#define GP_SOUTHWEST_COUNT   56
 
#define GP_NORTH_COUNT   59
 
#define GP_EAST_COUNT   24
 
#define GP_SOUTHEAST_COUNT   55
 
#define MAX_GPIO_CNT   (GP_SOUTHWEST_COUNT + GP_NORTH_COUNT + GP_EAST_COUNT + GP_SOUTHEAST_COUNT)
 
#define GPIO_REGS_SIZE   8
 
#define NA   0
 
#define MASK_WAKE   0
 
#define UNMASK_WAKE   1
 
#define GPE_CAPABLE   1
 
#define GPE_CAPABLE_NONE   0
 
#define MAX_FAMILY_PAD_GPIO_NO   15
 
#define FAMILY_PAD_REGS_OFF   0x4400
 
#define FAMILY_PAD_REGS_SIZE   0x400
 
#define PAD_INT_SEL(int_s)   (int_s << 28)
 
#define PAD_GFCFG(glitch_cfg)   (glitch_cfg << 26)
 
#define PAD_GFCFG_DISABLE   (0 << 26)
 
#define PAD_ENABLE_EDGE_DETECTION   (1 << 26) /* EDGE DETECTION ONLY */
 
#define PAD_ENABLE_RX_DETECTION   (2 << 26) /* RX DETECTION ONLY */
 
#define PAD_ENABLE_EDGE_RX_DETECTION   (3 << 26) /* RX & EDGE DETECTION */
 
#define PAD_FUNC_CTRL(tx_rx_enable)   (tx_rx_enable << 24)
 
#define PAD_FUNC_CTRL_RX_TX_ENABLE   (0 << 24)
 
#define PAD_FUNC_CTRL_TX_ENABLE_RX_DISABLE   (1 << 24)
 
#define PAD_FUNC_CTRL_TX_ENABLE_RX_ENABLE   (2 << 24)
 
#define PAD_TX_RX_ENABLE   (3 << 24)
 
#define PAD_PULL(TERM)   (TERM << 20)
 
#define PAD_PULL_DISABLE   (0 << 20)
 
#define PAD_PULL_DOWN_20K   (1 << 20)
 
#define PAD_PULL_DOWN_5K   (2 << 20)
 
#define PAD_PULL_DOWN_1K   (4 << 20)
 
#define PAD_PULL_UP_20K   (9 << 20)
 
#define PAD_PULL_UP_5K   (10 << 20)
 
#define PAD_PULL_UP_1K   (12 << 20)
 
#define PAD_MODE_SELECTION(MODE_SEL)   (MODE_SEL<<16)
 
#define SET_PAD_MODE_SELECTION(pad_config, mode)    ((pad_config & 0xfff0ffff) | PAD_MODE_SELECTION(mode))
 
#define PAD_GPIO_DISABLE   (0 << 15)
 
#define PAD_GPIO_ENABLE   (1 << 15)
 
#define PAD_GPIO_CFG(gpio_cfg)   (gpio_cfg << 8)
 
#define PAD_GPIOFG_GPIO   (0 << 8)
 
#define PAD_GPIOFG_GPO   (1 << 8)
 
#define PAD_GPIOFG_GPI   (2 << 8)
 
#define PAD_GPIOFG_HI_Z   (3 << 8)
 
#define PAD_DEFAULT_TX(STATE)   (STATE<<1)
 
#define PAD_RX_BIT   1
 
#define PAD_DISABLE_INT   (0 << 0)
 
#define PAD_TRIG_EDGE_LOW   (1 << 0)
 
#define PAD_TRIG_EDGE_HIGH   (2 << 0)
 
#define PAD_TRIG_EDGE_BOTH   (3 << 0)
 
#define PAD_TRIG_EDGE_LEVEL   (4 << 0)
 
#define PAD_CONFIG0_DEFAULT   0x00010300
 
#define PAD_CONFIG0_DEFAULT0   0x00910300
 
#define PAD_CONFIG0_DEFAULT1   0x00110300
 
#define PAD_CONFIG0_GPI_DEFAULT   0x00010200
 
#define PAD_CONFIG1_DEFAULT0   0x05C00000
 
#define PAD_CONFIG1_CSEN   0x0DC00000
 
#define PAD_CONFIG1_DEFAULT1   0x05C00020
 
#define GPIO_INPUT_PULL(pull)
 
#define GPIO_INPUT_NO_PULL   GPIO_INPUT_PULL(PAD_PULL_DISABLE)
 
#define GPIO_INPUT_PU_20K   GPIO_INPUT_PULL(PAD_PULL_UP_20K)
 
#define GPIO_INPUT_PU_5K   GPIO_INPUT_PULL(PAD_PULL_UP_5K)
 
#define GPIO_INPUT_PU_1K   GPIO_INPUT_PULL(PAD_PULL_UP_1K)
 
#define GPIO_INPUT_PD_20K   GPIO_INPUT_PULL(PAD_PULL_DOWN_20K)
 
#define GPIO_INPUT_PD_5K   GPIO_INPUT_PULL(PAD_PULL_DOWN_5K)
 
#define GPIO_INPUT_PD_1K   GPIO_INPUT_PULL(PAD_PULL_DOWN_1K)
 
#define GPI(int_type, int_sel, term, int_msk, glitch_cfg, wake_msk, gpe_val)
 
#define GPO_FUNC(term, tx_state)
 
#define NATIVE_FUNC(mode, term, inv_rx_tx)
 
#define NATIVE_FUNC_TX_RX(tx_rx_enable, mode, term, inv_rx_tx)
 
#define NATIVE_FUNC_CSEN(mode, term, inv_rx_tx)
 
#define NATIVE_INT(mode, int_sel)
 
#define NATIVE_INT_PU20K(mode, int_sel)
 
#define SPEAKER
 
#define SPARE_PIN
 
#define GPIO_SCI(int_sel)
 
#define GPIO_WAKE(int_sel)
 
#define GPIO_SMI(int_sel)
 
#define GPIO_SKIP   { .skip_config = 1 }
 
#define NATIVE_DEFAULT(mode)   NATIVE_FUNC(mode, 0, 0) /* no pull */
 
#define NATIVE_PU20K(mode)   NATIVE_FUNC(mode, 9, 0) /* PH 20k */
 
#define NATIVE_PU5K(mode)   NATIVE_FUNC(mode, 10, 0) /* PH 5k */
 
#define NATIVE_PU5K_INVTX(mode)   NATIVE_FUNC(mode, 10, inv_tx_enable) /* PH 5k */
 
#define NATIVE_PU1K(mode)   NATIVE_FUNC(mode, 12, 0) /* PH 1k */
 
#define NATIVE_PU1K_CSEN_INVTX(mode)    NATIVE_FUNC_CSEN(mode, 12, inv_tx_enable) /* PH 1k */
 
#define NATIVE_PU1K_INVTX(mode)   NATIVE_FUNC(mode, 12, inv_tx_enable) /* PH 1k */
 
#define NATIVE_PD20K(mode)   NATIVE_FUNC(mode, 1, 0) /* PD 20k */
 
#define NATIVE_PD5K(mode)   NATIVE_FUNC(mode, 2, 0) /* PD 5k */
 
#define NATIVE_PD1K(mode)   NATIVE_FUNC(mode, 4, 0) /* PD 1k */
 
#define NATIVE_PD1K_CSEN_INVTX(mode)   NATIVE_FUNC_CSEN(mode, 4, inv_tx_enable)
 
#define NATIVE_TX_RX_EN   NATIVE_FUNC_TX_RX(3, 1, 0, inv_tx_enable)
 
#define NATIVE_TX_RX_M1   NATIVE_FUNC_TX_RX(0, 1, 0, 0) /* no pull */
 
#define NATIVE_TX_RX_M3   NATIVE_FUNC_TX_RX(0, 3, 0, 0) /* no pull */
 
#define NATIVE_PU1K_M1   NATIVE_PU1K(1) /* PU1k M1 */
 
#define Native_M0   NATIVE_DEFAULT(0)
 
#define Native_M1   NATIVE_DEFAULT(1)
 
#define Native_M2   NATIVE_DEFAULT(2)
 
#define Native_M3   NATIVE_DEFAULT(3)
 
#define Native_M4   NATIVE_DEFAULT(4)
 
#define Native_M5   NATIVE_DEFAULT(5)
 
#define Native_M6   NATIVE_DEFAULT(6)
 
#define Native_M7   NATIVE_DEFAULT(7)
 
#define Native_M8   NATIVE_DEFAULT(8)
 
#define GPIO_OUT_LOW   GPO_FUNC(0, 0) /* gpo low */
 
#define GPIO_OUT_HIGH   GPO_FUNC(0, 1) /* gpo high */
 
#define GPIO_NC   GPIO_INPUT_PU_20K /* not connect */
 
#define GPIO_LIST_END   0xffffffff
 
#define GPIO_END    { .pad_conf0 = GPIO_LIST_END }
 
#define UART_RXD_PAD   82
 
#define UART_TXD_PAD   83
 
#define PCU_SMB_CLK_PAD   88
 
#define PCU_SMB_DATA_PAD   90
 
#define SOC_DDI1_VDDEN_PAD   16
 
#define UART1_RXD_PAD   9
 
#define UART1_TXD_PAD   13
 
#define DDI2_DDC_SCL   48
 
#define DDI2_DDC_SDA   53
 
#define PAD_VAL_HIGH   (1 << 0)
 

Typedefs

typedef int gpio_t
 

Enumerations

enum  pull_type_t {
  P_NONE = 0 , P_20K_L = 1 , P_5K_L = 2 , P_1K_L = 4 ,
  P_20K_H = 9 , P_5K_H = 10 , P_1K_H = 12
}
 
enum  mode_list_t {
  M0 = 0 , M1 , M2 , M3 ,
  M4 , M5 , M6 , M7 ,
  M8 , M9 , M10 , M11 ,
  M12 , M13
}
 
enum  int_select_t {
  L0 = 0 , L1 = 1 , L2 = 2 , L3 = 3 ,
  L4 = 4 , L5 = 5 , L6 = 6 , L7 = 7 ,
  L8 = 8 , L9 = 9 , L10 = 10 , L11 = 11 ,
  L12 = 12 , L13 = 13 , L14 = 14 , L15 = 15
}
 
enum  int_type_t {
  INT_DIS = 0 , trig_edge_low = PAD_TRIG_EDGE_LOW , trig_edge_high = PAD_TRIG_EDGE_HIGH , trig_edge_both = PAD_TRIG_EDGE_BOTH ,
  trig_level_high = PAD_TRIG_EDGE_LEVEL | (0 << 4) , trig_level_low = PAD_TRIG_EDGE_LEVEL | (4 << 4)
}
 
enum  glitch_cfg { glitch_disable = 0 , en_edge_detect , en_rx_data , en_edge_rx_data }
 
enum  mask_t { maskable = 0 , non_maskable }
 
enum  gpe_config_t { GPE = 0 , SMI , SCI }
 
enum  invert_rx_tx_t {
  no_inversion = 0 , inv_rx_enable = 0x1 , inv_tx_enable = 0x2 , inv_rx_tx_enable = 0x3 ,
  inv_rx_data = 0x4 , inv_tx_data = 0x8
}
 

Functions

void setup_soc_gpios (struct soc_gpio_config *config, u8 enable_xdp_tap)
 
struct soc_gpio_configmainboard_get_gpios (void)
 
int get_gpio (int community_base, int pad0_offset)
 
uint16_t gpio_family_number (uint8_t community, uint8_t pad)
 
uint32_tgpio_pad_config_reg (uint8_t community, uint8_t pad)
 
void lpc_init (void)
 
void lpc_set_low_power (void)
 

Variables

struct soc_gpio_map __packed
 

Macro Definition Documentation

◆ ALT_GPIO_SMI_REG

#define ALT_GPIO_SMI_REG   0x38

Definition at line 110 of file gpio.h.

◆ CFIO_139_MMIO_OFFSET

#define CFIO_139_MMIO_OFFSET   GPIO_OFFSET(64)

Definition at line 97 of file gpio.h.

◆ CFIO_140_MMIO_OFFSET

#define CFIO_140_MMIO_OFFSET   GPIO_OFFSET(67)

Definition at line 98 of file gpio.h.

◆ COMMUNITY_BASE

#define COMMUNITY_BASE (   community)    (IO_BASE_ADDRESS + community * 0x8000)

Definition at line 33 of file gpio.h.

◆ COMMUNITY_GPEAST_BASE

#define COMMUNITY_GPEAST_BASE   (IO_BASE_ADDRESS + COMMUNITY_OFFSET_GPEAST)

Definition at line 20 of file gpio.h.

◆ COMMUNITY_GPNORTH_BASE

#define COMMUNITY_GPNORTH_BASE   (IO_BASE_ADDRESS + COMMUNITY_OFFSET_GPNORTH)

Definition at line 17 of file gpio.h.

◆ COMMUNITY_GPSOUTHEAST_BASE

#define COMMUNITY_GPSOUTHEAST_BASE   (IO_BASE_ADDRESS + COMMUNITY_OFFSET_GPSOUTHEAST)

Definition at line 23 of file gpio.h.

◆ COMMUNITY_GPSOUTHWEST_BASE

#define COMMUNITY_GPSOUTHWEST_BASE   (IO_BASE_ADDRESS + COMMUNITY_OFFSET_GPSOUTHWEST)

Definition at line 14 of file gpio.h.

◆ COMMUNITY_SIZE

#define COMMUNITY_SIZE   0x20000

Definition at line 12 of file gpio.h.

◆ CROS_GPIO_DEVICE_NAME

#define CROS_GPIO_DEVICE_NAME   "Braswell"

Definition at line 10 of file gpio.h.

◆ DDI2_DDC_SCL

#define DDI2_DDC_SCL   48

Definition at line 342 of file gpio.h.

◆ DDI2_DDC_SDA

#define DDI2_DDC_SDA   53

Definition at line 343 of file gpio.h.

◆ FAMILY_NUMBER

#define FAMILY_NUMBER (   gpio_pad)    (gpio_pad / MAX_FAMILY_PAD_GPIO_NO)

Definition at line 78 of file gpio.h.

◆ FAMILY_PAD_REGS_OFF

#define FAMILY_PAD_REGS_OFF   0x4400

Definition at line 134 of file gpio.h.

◆ FAMILY_PAD_REGS_SIZE

#define FAMILY_PAD_REGS_SIZE   0x400

Definition at line 135 of file gpio.h.

◆ GP_EAST

#define GP_EAST   2

Definition at line 30 of file gpio.h.

◆ GP_EAST_COUNT

#define GP_EAST_COUNT   24

Definition at line 120 of file gpio.h.

◆ GP_FAMILY_CONF_COMP

#define GP_FAMILY_CONF_COMP (   community,
  family 
)    (COMMUNITY_BASE(community) + 0x1090 + 0x80 * family)

Definition at line 66 of file gpio.h.

◆ GP_FAMILY_CONF_REG

#define GP_FAMILY_CONF_REG (   community,
  family 
)    (COMMUNITY_BASE(community) + 0x1094 + 0x80 * family)

Definition at line 69 of file gpio.h.

◆ GP_FAMILY_RCOMP_CTRL

#define GP_FAMILY_RCOMP_CTRL (   community,
  family 
)    (COMMUNITY_BASE(community) + 0x1080 + 0x80 * family)

Definition at line 54 of file gpio.h.

◆ GP_FAMILY_RCOMP_OFFSET

#define GP_FAMILY_RCOMP_OFFSET (   community,
  family 
)    (COMMUNITY_BASE(community) + 0x1084 + 0x80 * family)

Definition at line 57 of file gpio.h.

◆ GP_FAMILY_RCOMP_OVERRIDE

#define GP_FAMILY_RCOMP_OVERRIDE (   community,
  family 
)    (COMMUNITY_BASE(community) + 0x1088 + 0x80 * family)

Definition at line 60 of file gpio.h.

◆ GP_FAMILY_RCOMP_VALUE

#define GP_FAMILY_RCOMP_VALUE (   community,
  family 
)    (COMMUNITY_BASE(community) + 0x108C + 0x80 * family)

Definition at line 63 of file gpio.h.

◆ GP_INT_MASK_REG_BASE

#define GP_INT_MASK_REG_BASE (   community)    (COMMUNITY_BASE(community) + 0x380)

Definition at line 51 of file gpio.h.

◆ GP_INT_STATUS_REG_BASE

#define GP_INT_STATUS_REG_BASE (   community)    (COMMUNITY_BASE(community) + 0x300)

Definition at line 48 of file gpio.h.

◆ GP_NORTH

#define GP_NORTH   1

Definition at line 29 of file gpio.h.

◆ GP_NORTH_COUNT

#define GP_NORTH_COUNT   59

Definition at line 119 of file gpio.h.

◆ GP_READ_ACCESS_POLICY_BASE

#define GP_READ_ACCESS_POLICY_BASE (   community)    (COMMUNITY_BASE(community) + 0x000)

Definition at line 36 of file gpio.h.

◆ GP_SOUTHEAST

#define GP_SOUTHEAST   3

Definition at line 31 of file gpio.h.

◆ GP_SOUTHEAST_COUNT

#define GP_SOUTHEAST_COUNT   55

Definition at line 121 of file gpio.h.

◆ GP_SOUTHWEST

#define GP_SOUTHWEST   0

Definition at line 28 of file gpio.h.

◆ GP_SOUTHWEST_COUNT

#define GP_SOUTHWEST_COUNT   56

Definition at line 118 of file gpio.h.

◆ GP_WAKE_MASK_REG_BASE

#define GP_WAKE_MASK_REG_BASE (   community)    (COMMUNITY_BASE(community) + 0x280)

Definition at line 45 of file gpio.h.

◆ GP_WAKE_STATUS_REG_BASE

#define GP_WAKE_STATUS_REG_BASE (   community)    (COMMUNITY_BASE(community) + 0x200)

Definition at line 42 of file gpio.h.

◆ GP_WRITE_ACCESS_POLICY_BASE

#define GP_WRITE_ACCESS_POLICY_BASE (   community)    (COMMUNITY_BASE(community) + 0x100)

Definition at line 39 of file gpio.h.

◆ GPE0A_EN_REG

#define GPE0A_EN_REG   0x28

Definition at line 109 of file gpio.h.

◆ GPE0A_STS_REG

#define GPE0A_STS_REG   0x20

Definition at line 108 of file gpio.h.

◆ GPE_CAPABLE

#define GPE_CAPABLE   1

Definition at line 130 of file gpio.h.

◆ GPE_CAPABLE_NONE

#define GPE_CAPABLE_NONE   0

Definition at line 131 of file gpio.h.

◆ GPI

#define GPI (   int_type,
  int_sel,
  term,
  int_msk,
  glitch_cfg,
  wake_msk,
  gpe_val 
)
Value:
{ \
.pad_conf0 = PAD_INT_SEL(int_sel) | PAD_GFCFG(glitch_cfg) \
.pad_conf1 = int_type << 0 | PAD_CONFIG1_DEFAULT0, \
.wake_mask = wake_msk, \
.int_mask = int_msk, \
.gpe = gpe_val }
#define PAD_CONFIG1_DEFAULT0
Definition: gpio.h:204
#define PAD_GPIOFG_GPI
Definition: gpio.h:180
glitch_cfg
Definition: gpio.h:426
#define PAD_INT_SEL(int_s)
Definition: gpio.h:138
#define PAD_PULL(TERM)
Definition: gpio.h:155
#define PAD_GPIO_ENABLE
Definition: gpio.h:172
#define PAD_GFCFG(glitch_cfg)
Definition: gpio.h:141

Definition at line 220 of file gpio.h.

◆ GPIO_COMMUNITY_COUNT

#define GPIO_COMMUNITY_COUNT   4

Definition at line 26 of file gpio.h.

◆ GPIO_END

#define GPIO_END    { .pad_conf0 = GPIO_LIST_END }

Definition at line 331 of file gpio.h.

◆ GPIO_FAMILIES_MAX_PER_COMM

#define GPIO_FAMILIES_MAX_PER_COMM   7

Definition at line 27 of file gpio.h.

◆ GPIO_INPUT_NO_PULL

#define GPIO_INPUT_NO_PULL   GPIO_INPUT_PULL(PAD_PULL_DISABLE)

Definition at line 212 of file gpio.h.

◆ GPIO_INPUT_PD_1K

#define GPIO_INPUT_PD_1K   GPIO_INPUT_PULL(PAD_PULL_DOWN_1K)

Definition at line 218 of file gpio.h.

◆ GPIO_INPUT_PD_20K

#define GPIO_INPUT_PD_20K   GPIO_INPUT_PULL(PAD_PULL_DOWN_20K)

Definition at line 216 of file gpio.h.

◆ GPIO_INPUT_PD_5K

#define GPIO_INPUT_PD_5K   GPIO_INPUT_PULL(PAD_PULL_DOWN_5K)

Definition at line 217 of file gpio.h.

◆ GPIO_INPUT_PU_1K

#define GPIO_INPUT_PU_1K   GPIO_INPUT_PULL(PAD_PULL_UP_1K)

Definition at line 215 of file gpio.h.

◆ GPIO_INPUT_PU_20K

#define GPIO_INPUT_PU_20K   GPIO_INPUT_PULL(PAD_PULL_UP_20K)

Definition at line 213 of file gpio.h.

◆ GPIO_INPUT_PU_5K

#define GPIO_INPUT_PU_5K   GPIO_INPUT_PULL(PAD_PULL_UP_5K)

Definition at line 214 of file gpio.h.

◆ GPIO_INPUT_PULL

#define GPIO_INPUT_PULL (   pull)
Value:
.pad_conf1 = PAD_CONFIG1_DEFAULT0 }
#define pull
Definition: asmlib.h:26
#define PAD_CONFIG0_GPI_DEFAULT
Definition: gpio.h:201

Definition at line 208 of file gpio.h.

◆ GPIO_INTERRUPT_MASK

#define GPIO_INTERRUPT_MASK   0x0380

Definition at line 107 of file gpio.h.

◆ GPIO_INTERRUPT_STATUS

#define GPIO_INTERRUPT_STATUS   0x0300

Definition at line 106 of file gpio.h.

◆ GPIO_LIST_END

#define GPIO_LIST_END   0xffffffff

Definition at line 329 of file gpio.h.

◆ GPIO_NC

#define GPIO_NC   GPIO_INPUT_PU_20K /* not connect */

Definition at line 326 of file gpio.h.

◆ GPIO_OFFSET

#define GPIO_OFFSET (   gpio_pad)
Value:
+ (GPIO_REGS_SIZE * INTERNAL_PAD_NUM(gpio_pad))))
#define FAMILY_PAD_REGS_OFF
Definition: gpio.h:134
#define GPIO_REGS_SIZE
Definition: gpio.h:126
#define FAMILY_NUMBER(gpio_pad)
Definition: gpio.h:78
#define INTERNAL_PAD_NUM(gpio_pad)
Definition: gpio.h:79
#define FAMILY_PAD_REGS_SIZE
Definition: gpio.h:135

Definition at line 80 of file gpio.h.

◆ GPIO_OUT_HIGH

#define GPIO_OUT_HIGH   GPO_FUNC(0, 1) /* gpo high */

Definition at line 325 of file gpio.h.

◆ GPIO_OUT_LOW

#define GPIO_OUT_LOW   GPO_FUNC(0, 0) /* gpo low */

Definition at line 324 of file gpio.h.

◆ GPIO_READ_ACCESS_POLICY_REG

#define GPIO_READ_ACCESS_POLICY_REG   0x0000

Definition at line 101 of file gpio.h.

◆ GPIO_REGS_SIZE

#define GPIO_REGS_SIZE   8

Definition at line 126 of file gpio.h.

◆ GPIO_ROUT_REG

#define GPIO_ROUT_REG   0x58

Definition at line 111 of file gpio.h.

◆ GPIO_SCI

#define GPIO_SCI (   int_sel)
Value:
| PAD_INT_SEL(int_sel), \
.gpe = SCI, \
.int_mask = 1 }
#define PAD_ENABLE_EDGE_RX_DETECTION
Definition: gpio.h:145
#define PAD_PULL_DISABLE
Definition: gpio.h:156
@ SCI
Definition: gpio.h:441
#define PAD_TRIG_EDGE_LOW
Definition: gpio.h:192

Definition at line 268 of file gpio.h.

◆ GPIO_SKIP

#define GPIO_SKIP   { .skip_config = 1 }

Definition at line 292 of file gpio.h.

◆ GPIO_SMI

#define GPIO_SMI (   int_sel)
Value:
| PAD_INT_SEL(int_sel), \
.int_mask = 1,\
.gpe = SMI }
@ SMI
Definition: gpio.h:440

Definition at line 284 of file gpio.h.

◆ GPIO_WAKE

#define GPIO_WAKE (   int_sel)
Value:
| PAD_INT_SEL(int_sel), \
.int_mask = 1,\
.wake_mask = 1 }

Definition at line 276 of file gpio.h.

◆ GPIO_WAKE_MASK_REG0

#define GPIO_WAKE_MASK_REG0   0x0280

Definition at line 104 of file gpio.h.

◆ GPIO_WAKE_MASK_REG1

#define GPIO_WAKE_MASK_REG1   0x0284

Definition at line 105 of file gpio.h.

◆ GPIO_WAKE_STATUS_REG

#define GPIO_WAKE_STATUS_REG   0x0200

Definition at line 103 of file gpio.h.

◆ GPIO_WRITE_ACCESS_POLICY_REG

#define GPIO_WRITE_ACCESS_POLICY_REG   0x0100

Definition at line 102 of file gpio.h.

◆ GPO_FUNC

#define GPO_FUNC (   term,
  tx_state 
)
Value:
{\
.pad_conf0 = PAD_GPIO_ENABLE | PAD_GPIOFG_GPO | PAD_PULL(term) \
| tx_state << 1, \
.pad_conf1 = PAD_CONFIG1_DEFAULT0 }
#define PAD_GPIOFG_GPO
Definition: gpio.h:179

Definition at line 228 of file gpio.h.

◆ HV_DDI2_DDC_SCL_MMIO_OFFSET

#define HV_DDI2_DDC_SCL_MMIO_OFFSET   GPIO_OFFSET(67)

Definition at line 96 of file gpio.h.

◆ HV_DDI2_DDC_SDA_MMIO_OFFSET

#define HV_DDI2_DDC_SDA_MMIO_OFFSET   GPIO_OFFSET(62)

Definition at line 95 of file gpio.h.

◆ INTERNAL_PAD_NUM

#define INTERNAL_PAD_NUM (   gpio_pad)    (gpio_pad % MAX_FAMILY_PAD_GPIO_NO)

Definition at line 79 of file gpio.h.

◆ MASK_WAKE

#define MASK_WAKE   0

Definition at line 128 of file gpio.h.

◆ MAX_FAMILY_PAD_GPIO_NO

#define MAX_FAMILY_PAD_GPIO_NO   15

Definition at line 133 of file gpio.h.

◆ MAX_GPIO_CNT

Definition at line 123 of file gpio.h.

◆ MMC1_D4_SD_WE_MMIO_OFFSET

#define MMC1_D4_SD_WE_MMIO_OFFSET   GPIO_OFFSET(67)

Definition at line 90 of file gpio.h.

◆ MMC1_D5_MMIO_OFFSET

#define MMC1_D5_MMIO_OFFSET   GPIO_OFFSET(65)

Definition at line 91 of file gpio.h.

◆ MMC1_D6_MMIO_OFFSET

#define MMC1_D6_MMIO_OFFSET   GPIO_OFFSET(63)

Definition at line 92 of file gpio.h.

◆ MMC1_D7_MMIO_OFFSET

#define MMC1_D7_MMIO_OFFSET   GPIO_OFFSET(68)

Definition at line 93 of file gpio.h.

◆ MMC1_RCLK_OFFSET

#define MMC1_RCLK_OFFSET   GPIO_OFFSET(69)

Definition at line 94 of file gpio.h.

◆ NA

#define NA   0

Definition at line 127 of file gpio.h.

◆ NATIVE_DEFAULT

#define NATIVE_DEFAULT (   mode)    NATIVE_FUNC(mode, 0, 0) /* no pull */

Definition at line 295 of file gpio.h.

◆ NATIVE_FUNC

#define NATIVE_FUNC (   mode,
  term,
  inv_rx_tx 
)
Value:
{\
| PAD_MODE_SELECTION(mode) | PAD_PULL(term),\
.pad_conf1 = PAD_CONFIG1_DEFAULT0 | inv_rx_tx << 4 }
#define PAD_GPIO_DISABLE
Definition: gpio.h:171
#define PAD_MODE_SELECTION(MODE_SEL)
Definition: gpio.h:165
#define PAD_GPIOFG_HI_Z
Definition: gpio.h:181

Definition at line 233 of file gpio.h.

◆ NATIVE_FUNC_CSEN

#define NATIVE_FUNC_CSEN (   mode,
  term,
  inv_rx_tx 
)
Value:
{\
| PAD_MODE_SELECTION(mode) | PAD_PULL(term),\
.pad_conf1 = PAD_CONFIG1_CSEN | inv_rx_tx << 4 }
#define PAD_CONFIG1_CSEN
Definition: gpio.h:205

Definition at line 244 of file gpio.h.

◆ NATIVE_FUNC_TX_RX

#define NATIVE_FUNC_TX_RX (   tx_rx_enable,
  mode,
  term,
  inv_rx_tx 
)
Value:
{\
.pad_conf0 = PAD_FUNC_CTRL(tx_rx_enable) | PAD_GPIO_DISABLE \
| PAD_PULL(term),\
.pad_conf1 = PAD_CONFIG1_DEFAULT0 | inv_rx_tx << 4 }
#define PAD_FUNC_CTRL(tx_rx_enable)
Definition: gpio.h:148
#define PAD_GPIOFG_GPIO
Definition: gpio.h:178

Definition at line 238 of file gpio.h.

◆ NATIVE_INT

#define NATIVE_INT (   mode,
  int_sel 
)
Value:
{\
.pad_conf0 = PAD_INT_SEL(int_sel) | PAD_GPIO_DISABLE \
.pad_conf1 = PAD_CONFIG1_DEFAULT0 }

Definition at line 249 of file gpio.h.

◆ NATIVE_INT_PU20K

#define NATIVE_INT_PU20K (   mode,
  int_sel 
)
Value:
{\
.pad_conf0 = PAD_PULL_UP_20K | PAD_INT_SEL(int_sel) | PAD_GPIO_DISABLE \
.pad_conf1 = PAD_CONFIG1_DEFAULT0 }
#define PAD_PULL_UP_20K
Definition: gpio.h:160

Definition at line 254 of file gpio.h.

◆ Native_M0

#define Native_M0   NATIVE_DEFAULT(0)

Definition at line 314 of file gpio.h.

◆ Native_M1

#define Native_M1   NATIVE_DEFAULT(1)

Definition at line 315 of file gpio.h.

◆ Native_M2

#define Native_M2   NATIVE_DEFAULT(2)

Definition at line 316 of file gpio.h.

◆ Native_M3

#define Native_M3   NATIVE_DEFAULT(3)

Definition at line 317 of file gpio.h.

◆ Native_M4

#define Native_M4   NATIVE_DEFAULT(4)

Definition at line 318 of file gpio.h.

◆ Native_M5

#define Native_M5   NATIVE_DEFAULT(5)

Definition at line 319 of file gpio.h.

◆ Native_M6

#define Native_M6   NATIVE_DEFAULT(6)

Definition at line 320 of file gpio.h.

◆ Native_M7

#define Native_M7   NATIVE_DEFAULT(7)

Definition at line 321 of file gpio.h.

◆ Native_M8

#define Native_M8   NATIVE_DEFAULT(8)

Definition at line 322 of file gpio.h.

◆ NATIVE_PD1K

#define NATIVE_PD1K (   mode)    NATIVE_FUNC(mode, 4, 0) /* PD 1k */

Definition at line 305 of file gpio.h.

◆ NATIVE_PD1K_CSEN_INVTX

#define NATIVE_PD1K_CSEN_INVTX (   mode)    NATIVE_FUNC_CSEN(mode, 4, inv_tx_enable)

Definition at line 306 of file gpio.h.

◆ NATIVE_PD20K

#define NATIVE_PD20K (   mode)    NATIVE_FUNC(mode, 1, 0) /* PD 20k */

Definition at line 303 of file gpio.h.

◆ NATIVE_PD5K

#define NATIVE_PD5K (   mode)    NATIVE_FUNC(mode, 2, 0) /* PD 5k */

Definition at line 304 of file gpio.h.

◆ NATIVE_PU1K

#define NATIVE_PU1K (   mode)    NATIVE_FUNC(mode, 12, 0) /* PH 1k */

Definition at line 299 of file gpio.h.

◆ NATIVE_PU1K_CSEN_INVTX

#define NATIVE_PU1K_CSEN_INVTX (   mode)     NATIVE_FUNC_CSEN(mode, 12, inv_tx_enable) /* PH 1k */

Definition at line 300 of file gpio.h.

◆ NATIVE_PU1K_INVTX

#define NATIVE_PU1K_INVTX (   mode)    NATIVE_FUNC(mode, 12, inv_tx_enable) /* PH 1k */

Definition at line 302 of file gpio.h.

◆ NATIVE_PU1K_M1

#define NATIVE_PU1K_M1   NATIVE_PU1K(1) /* PU1k M1 */

Definition at line 311 of file gpio.h.

◆ NATIVE_PU20K

#define NATIVE_PU20K (   mode)    NATIVE_FUNC(mode, 9, 0) /* PH 20k */

Definition at line 296 of file gpio.h.

◆ NATIVE_PU5K

#define NATIVE_PU5K (   mode)    NATIVE_FUNC(mode, 10, 0) /* PH 5k */

Definition at line 297 of file gpio.h.

◆ NATIVE_PU5K_INVTX

#define NATIVE_PU5K_INVTX (   mode)    NATIVE_FUNC(mode, 10, inv_tx_enable) /* PH 5k */

Definition at line 298 of file gpio.h.

◆ NATIVE_TX_RX_EN

#define NATIVE_TX_RX_EN   NATIVE_FUNC_TX_RX(3, 1, 0, inv_tx_enable)

Definition at line 308 of file gpio.h.

◆ NATIVE_TX_RX_M1

#define NATIVE_TX_RX_M1   NATIVE_FUNC_TX_RX(0, 1, 0, 0) /* no pull */

Definition at line 309 of file gpio.h.

◆ NATIVE_TX_RX_M3

#define NATIVE_TX_RX_M3   NATIVE_FUNC_TX_RX(0, 3, 0, 0) /* no pull */

Definition at line 310 of file gpio.h.

◆ PAD_CONF0_REG

#define PAD_CONF0_REG   0x0

Definition at line 114 of file gpio.h.

◆ PAD_CONF1_REG

#define PAD_CONF1_REG   0x4

Definition at line 115 of file gpio.h.

◆ PAD_CONFIG0_DEFAULT

#define PAD_CONFIG0_DEFAULT   0x00010300

Definition at line 198 of file gpio.h.

◆ PAD_CONFIG0_DEFAULT0

#define PAD_CONFIG0_DEFAULT0   0x00910300

Definition at line 199 of file gpio.h.

◆ PAD_CONFIG0_DEFAULT1

#define PAD_CONFIG0_DEFAULT1   0x00110300

Definition at line 200 of file gpio.h.

◆ PAD_CONFIG0_GPI_DEFAULT

#define PAD_CONFIG0_GPI_DEFAULT   0x00010200

Definition at line 201 of file gpio.h.

◆ PAD_CONFIG1_CSEN

#define PAD_CONFIG1_CSEN   0x0DC00000

Definition at line 205 of file gpio.h.

◆ PAD_CONFIG1_DEFAULT0

#define PAD_CONFIG1_DEFAULT0   0x05C00000

Definition at line 204 of file gpio.h.

◆ PAD_CONFIG1_DEFAULT1

#define PAD_CONFIG1_DEFAULT1   0x05C00020

Definition at line 206 of file gpio.h.

◆ PAD_CONTROL_REG0_TRISTATE

#define PAD_CONTROL_REG0_TRISTATE   (PAD_CONFIG0_DEFAULT|PAD_GPIOFG_HI_Z)

Definition at line 73 of file gpio.h.

◆ PAD_DEFAULT_TX

#define PAD_DEFAULT_TX (   STATE)    (STATE<<1)

Definition at line 186 of file gpio.h.

◆ PAD_DISABLE_INT

#define PAD_DISABLE_INT   (0 << 0)

Definition at line 191 of file gpio.h.

◆ PAD_ENABLE_EDGE_DETECTION

#define PAD_ENABLE_EDGE_DETECTION   (1 << 26) /* EDGE DETECTION ONLY */

Definition at line 143 of file gpio.h.

◆ PAD_ENABLE_EDGE_RX_DETECTION

#define PAD_ENABLE_EDGE_RX_DETECTION   (3 << 26) /* RX & EDGE DETECTION */

Definition at line 145 of file gpio.h.

◆ PAD_ENABLE_RX_DETECTION

#define PAD_ENABLE_RX_DETECTION   (2 << 26) /* RX DETECTION ONLY */

Definition at line 144 of file gpio.h.

◆ PAD_FUNC_CTRL

#define PAD_FUNC_CTRL (   tx_rx_enable)    (tx_rx_enable << 24)

Definition at line 148 of file gpio.h.

◆ PAD_FUNC_CTRL_RX_TX_ENABLE

#define PAD_FUNC_CTRL_RX_TX_ENABLE   (0 << 24)

Definition at line 149 of file gpio.h.

◆ PAD_FUNC_CTRL_TX_ENABLE_RX_DISABLE

#define PAD_FUNC_CTRL_TX_ENABLE_RX_DISABLE   (1 << 24)

Definition at line 150 of file gpio.h.

◆ PAD_FUNC_CTRL_TX_ENABLE_RX_ENABLE

#define PAD_FUNC_CTRL_TX_ENABLE_RX_ENABLE   (2 << 24)

Definition at line 151 of file gpio.h.

◆ PAD_GFCFG

#define PAD_GFCFG (   glitch_cfg)    (glitch_cfg << 26)

Definition at line 141 of file gpio.h.

◆ PAD_GFCFG_DISABLE

#define PAD_GFCFG_DISABLE   (0 << 26)

Definition at line 142 of file gpio.h.

◆ PAD_GPIO_CFG

#define PAD_GPIO_CFG (   gpio_cfg)    (gpio_cfg << 8)

Definition at line 177 of file gpio.h.

◆ PAD_GPIO_DISABLE

#define PAD_GPIO_DISABLE   (0 << 15)

Definition at line 171 of file gpio.h.

◆ PAD_GPIO_ENABLE

#define PAD_GPIO_ENABLE   (1 << 15)

Definition at line 172 of file gpio.h.

◆ PAD_GPIOFG_GPI

#define PAD_GPIOFG_GPI   (2 << 8)

Definition at line 180 of file gpio.h.

◆ PAD_GPIOFG_GPIO

#define PAD_GPIOFG_GPIO   (0 << 8)

Definition at line 178 of file gpio.h.

◆ PAD_GPIOFG_GPO

#define PAD_GPIOFG_GPO   (1 << 8)

Definition at line 179 of file gpio.h.

◆ PAD_GPIOFG_HI_Z

#define PAD_GPIOFG_HI_Z   (3 << 8)

Definition at line 181 of file gpio.h.

◆ PAD_INT_SEL

#define PAD_INT_SEL (   int_s)    (int_s << 28)

Definition at line 138 of file gpio.h.

◆ PAD_MODE_SELECTION

#define PAD_MODE_SELECTION (   MODE_SEL)    (MODE_SEL<<16)

Definition at line 165 of file gpio.h.

◆ PAD_PULL

#define PAD_PULL (   TERM)    (TERM << 20)

Definition at line 155 of file gpio.h.

◆ PAD_PULL_DISABLE

#define PAD_PULL_DISABLE   (0 << 20)

Definition at line 156 of file gpio.h.

◆ PAD_PULL_DOWN_1K

#define PAD_PULL_DOWN_1K   (4 << 20)

Definition at line 159 of file gpio.h.

◆ PAD_PULL_DOWN_20K

#define PAD_PULL_DOWN_20K   (1 << 20)

Definition at line 157 of file gpio.h.

◆ PAD_PULL_DOWN_5K

#define PAD_PULL_DOWN_5K   (2 << 20)

Definition at line 158 of file gpio.h.

◆ PAD_PULL_UP_1K

#define PAD_PULL_UP_1K   (12 << 20)

Definition at line 162 of file gpio.h.

◆ PAD_PULL_UP_20K

#define PAD_PULL_UP_20K   (9 << 20)

Definition at line 160 of file gpio.h.

◆ PAD_PULL_UP_5K

#define PAD_PULL_UP_5K   (10 << 20)

Definition at line 161 of file gpio.h.

◆ PAD_RX_BIT

#define PAD_RX_BIT   1

Definition at line 188 of file gpio.h.

◆ PAD_TRIG_EDGE_BOTH

#define PAD_TRIG_EDGE_BOTH   (3 << 0)

Definition at line 194 of file gpio.h.

◆ PAD_TRIG_EDGE_HIGH

#define PAD_TRIG_EDGE_HIGH   (2 << 0)

Definition at line 193 of file gpio.h.

◆ PAD_TRIG_EDGE_LEVEL

#define PAD_TRIG_EDGE_LEVEL   (4 << 0)

Definition at line 195 of file gpio.h.

◆ PAD_TRIG_EDGE_LOW

#define PAD_TRIG_EDGE_LOW   (1 << 0)

Definition at line 192 of file gpio.h.

◆ PAD_TX_RX_ENABLE

#define PAD_TX_RX_ENABLE   (3 << 24)

Definition at line 152 of file gpio.h.

◆ PAD_VAL_HIGH

#define PAD_VAL_HIGH   (1 << 0)

Definition at line 462 of file gpio.h.

◆ PCU_SMB_CLK_PAD

#define PCU_SMB_CLK_PAD   88

Definition at line 337 of file gpio.h.

◆ PCU_SMB_DATA_PAD

#define PCU_SMB_DATA_PAD   90

Definition at line 338 of file gpio.h.

◆ SDMMC1_CMD_MMIO_OFFSET

#define SDMMC1_CMD_MMIO_OFFSET   GPIO_OFFSET(23)

Definition at line 85 of file gpio.h.

◆ SDMMC1_D0_MMIO_OFFSET

#define SDMMC1_D0_MMIO_OFFSET   GPIO_OFFSET(17)

Definition at line 86 of file gpio.h.

◆ SDMMC1_D1_MMIO_OFFSET

#define SDMMC1_D1_MMIO_OFFSET   GPIO_OFFSET(24)

Definition at line 87 of file gpio.h.

◆ SDMMC1_D2_MMIO_OFFSET

#define SDMMC1_D2_MMIO_OFFSET   GPIO_OFFSET(20)

Definition at line 88 of file gpio.h.

◆ SDMMC1_D3_MMIO_OFFSET

#define SDMMC1_D3_MMIO_OFFSET   GPIO_OFFSET(26)

Definition at line 89 of file gpio.h.

◆ SET_PAD_MODE_SELECTION

#define SET_PAD_MODE_SELECTION (   pad_config,
  mode 
)     ((pad_config & 0xfff0ffff) | PAD_MODE_SELECTION(mode))

Definition at line 167 of file gpio.h.

◆ SOC_DDI1_VDDEN_PAD

#define SOC_DDI1_VDDEN_PAD   16

Definition at line 339 of file gpio.h.

◆ SPARE_PIN

#define SPARE_PIN
Value:
{ .pad_conf0 = 0x00110300,\
.pad_conf1 = PAD_CONFIG1_DEFAULT0 }

Definition at line 263 of file gpio.h.

◆ SPEAKER

#define SPEAKER
Value:
{ .pad_conf0 = PAD_CONFIG0_DEFAULT0, \
.pad_conf1 = PAD_CONFIG1_DEFAULT0 }
#define PAD_CONFIG0_DEFAULT0
Definition: gpio.h:199

Definition at line 259 of file gpio.h.

◆ UART1_RXD_PAD

#define UART1_RXD_PAD   9

Definition at line 340 of file gpio.h.

◆ UART1_TXD_PAD

#define UART1_TXD_PAD   13

Definition at line 341 of file gpio.h.

◆ UART_RXD_PAD

#define UART_RXD_PAD   82

Definition at line 335 of file gpio.h.

◆ UART_TXD_PAD

#define UART_TXD_PAD   83

Definition at line 336 of file gpio.h.

◆ UNMASK_WAKE

#define UNMASK_WAKE   1

Definition at line 129 of file gpio.h.

Typedef Documentation

◆ gpio_t

typedef int gpio_t

Definition at line 467 of file gpio.h.

Enumeration Type Documentation

◆ glitch_cfg

enum glitch_cfg
Enumerator
glitch_disable 
en_edge_detect 
en_rx_data 
en_edge_rx_data 

Definition at line 426 of file gpio.h.

◆ gpe_config_t

Enumerator
GPE 
SMI 
SCI 

Definition at line 438 of file gpio.h.

◆ int_select_t

Enumerator
L0 
L1 
L2 
L3 
L4 
L5 
L6 
L7 
L8 
L9 
L10 
L11 
L12 
L13 
L14 
L15 

Definition at line 398 of file gpio.h.

◆ int_type_t

enum int_type_t
Enumerator
INT_DIS 
trig_edge_low 
trig_edge_high 
trig_edge_both 
trig_level_high 
trig_level_low 

Definition at line 417 of file gpio.h.

◆ invert_rx_tx_t

Enumerator
no_inversion 
inv_rx_enable 
inv_tx_enable 
inv_rx_tx_enable 
inv_rx_data 
inv_tx_data 

Definition at line 453 of file gpio.h.

◆ mask_t

enum mask_t
Enumerator
maskable 
non_maskable 

Definition at line 433 of file gpio.h.

◆ mode_list_t

Enumerator
M0 
M1 
M2 
M3 
M4 
M5 
M6 
M7 
M8 
M9 
M10 
M11 
M12 
M13 

Definition at line 381 of file gpio.h.

◆ pull_type_t

Enumerator
P_NONE 
P_20K_L 
P_5K_L 
P_1K_L 
P_20K_H 
P_5K_H 
P_1K_H 

Definition at line 371 of file gpio.h.

Function Documentation

◆ get_gpio()

int get_gpio ( int  community_base,
int  pad0_offset 
)

Definition at line 148 of file gpio_support.c.

References PAD_RX_BIT, and read32().

Referenced by early_hybrid_graphics(), get_chassis_type(), get_ec_is_trusted(), get_lid_switch(), get_recovery_mode_switch(), get_write_protect_state(), h8_has_bdc(), h8_has_wwan(), mainboard_enable(), and mb_pre_raminit_setup().

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

◆ gpio_family_number()

uint16_t gpio_family_number ( uint8_t  community,
uint8_t  pad 
)

Definition at line 12 of file gpio_support.c.

References base, die(), GPIO_COMMUNITY_COUNT, and GPIO_FAMILIES_MAX_PER_COMM.

Referenced by gpio_pad_config_reg().

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

◆ gpio_pad_config_reg()

uint32_t* gpio_pad_config_reg ( uint8_t  community,
uint8_t  pad 
)

Definition at line 49 of file gpio_support.c.

References COMMUNITY_BASE, FAMILY_PAD_REGS_OFF, FAMILY_PAD_REGS_SIZE, gpio_family_number(), and GPIO_REGS_SIZE.

Referenced by bootblock_mainboard_early_init(), gpio_config_pad(), and gpio_get().

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

◆ lpc_init()

void lpc_init ( void  )

Definition at line 90 of file lpc_init.c.

References ACPI_BASE_ADDRESS, ACPI_S3, ACPI_S5, inl(), inw(), lpc_gpio_config(), PM1_CNT, PM1_STS, RESUME_CYCLE, and WAK_STS.

Here is the call graph for this function:

◆ lpc_set_low_power()

void lpc_set_low_power ( void  )

Definition at line 82 of file lpc_init.c.

References lpc_gpio_config(), and SUSPEND_CYCLE.

Referenced by mainboard_smi_sleep().

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

◆ mainboard_get_gpios()

struct soc_gpio_config* mainboard_get_gpios ( void  )

Definition at line 207 of file gpio.c.

References BIOS_DEBUG, gpio_config, NULL, and printk.

Referenced by baytrail_init_pre_device(), and soc_init_pre_device().

Here is the caller graph for this function:

◆ setup_soc_gpios()

void setup_soc_gpios ( struct soc_gpio_config config,
u8  enable_xdp_tap 
)

Variable Documentation

◆ __packed