coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
gen1.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 /* PCIe reset pin */
4 #define GEN1_PCI_RESET_RESUMEWELL_GPIO 3
5 
6 /* Jumper J2 determines the slave address of Cypress I/O GPIO expander */
7 #define GALILEO_DETERMINE_IOEXP_SLA_RESUMEWELL_GPIO 5
8 
9 static const struct reg_script gen1_gpio_init[] = {
10  /* Initialize the legacy GPIO controller */
20 
30 
31  /* Initialize the GPIO controller */
41 
42  /* Toggle the Cypress reset line */
45 
47 };
48 
49 static const struct reg_script gen1_hsuart0_0x20[] = {
50  /* Route UART0_TXD to LVL_TXD -> IO1 -> DIGITAL 1
51  * Set IO1_MUX (EXP.PORT3_5) output, low
52  * Set LVL_OE (GPIO_SUS2) output, high
53  */
54 
58 
59  /* Route DIGITAL 0 -> IO0 -> LVL_RXD -> UART0_RXD
60  * Set IO0_MUX (EXP.PORT3_4) output, low
61  * Set LVL_OE (GPIO_SUS2) output, high
62  */
66 
70 
72 };
73 
74 static const struct reg_script gen1_hsuart0_0x21[] = {
75  /* Route UART0_TXD to LVL_TXD -> IO1 -> DIGITAL 1
76  * Set IO1_MUX (EXP.PORT3_5) output, low
77  * Set LVL_OE (GPIO_SUS2) output, high
78  */
79 
83 
84  /* Route DIGITAL 0 -> IO0 -> LVL_RXD -> UART0_RXD
85  * Set IO0_MUX (EXP.PORT3_4) output, low
86  * Set LVL_OE (GPIO_SUS2) output, high
87  */
91 
95 
97 };
98 
99 static const struct reg_script gen1_i2c_0x20_init[] = {
100  /* Route I2C pins to Arduino header:
101  * Clear I2C_MUX (GPORT1_BIT5) to route I2C to Arduino Shield connector
102  *
103  * I2C_SDA -> ANALOG_A4
104  * I2C_SCL -> ANALOG_A5
105  */
109 
110  /* Set all GPIO expander pins connected to the Reset Button as inputs
111  * Configure RESET_N_SHLD (GPORT5_BIT0) and SW_RESET_N_SHLD
112  * (GPORT5_BIT1) as inputs
113  */
116 
118 };
119 
120 static const struct reg_script gen1_i2c_0x21_init[] = {
121  /* Route I2C pins to Arduino header:
122  * Clear I2C_MUX (GPORT1_BIT5) to route I2C to Arduino Shield connector
123  *
124  * I2C_SDA -> ANALOG_A4
125  * I2C_SCL -> ANALOG_A5
126  */
130 
131  /* Set all GPIO expander pins connected to the Reset Button as inputs
132  * Configure RESET_N_SHLD (GPORT5_BIT0) and SW_RESET_N_SHLD
133  * (GPORT5_BIT1) as inputs
134  */
137 
139 };
140 
141 static const struct reg_script gen1_tpm_reset_0x20[] = {
142  /* Reset the TPM using SW_RESET_N_SHLD (GPORT5_BIT1):
143  * low, output, delay, input
144  */
148  TIME_DELAY_USEC(5),
150 
152 };
153 
154 static const struct reg_script gen1_tpm_reset_0x21[] = {
155  /* Reset the TPM using SW_RESET_N_SHLD (GPORT5_BIT1):
156  * low, output, delay, input
157  */
161  TIME_DELAY_USEC(5),
163 
165 };
#define GPIO_INTSTATUS
Definition: Ioh.h:227
#define GPIO_SWPORTA_DDR
Definition: Ioh.h:222
#define GPIO_INTEN
Definition: Ioh.h:223
#define GPIO_DEBOUNCE
Definition: Ioh.h:229
#define GPIO_INT_POLARITY
Definition: Ioh.h:226
#define GPIO_LS_SYNC
Definition: Ioh.h:233
#define BIT1
Definition: Ioh.h:8
#define GPIO_SWPORTA_DR
Definition: Ioh.h:221
#define BIT2
Definition: Ioh.h:9
#define BIT4
Definition: Ioh.h:11
#define GPIO_INTTYPE_LEVEL
Definition: Ioh.h:225
#define BIT0
Definition: Ioh.h:7
#define BIT5
Definition: Ioh.h:12
#define GPIO_INTMASK
Definition: Ioh.h:224
#define R_QNC_GPIO_CGLVL_CORE_WELL
Definition: QuarkNcSocId.h:469
#define R_QNC_GPIO_CGTPE_CORE_WELL
Definition: QuarkNcSocId.h:470
#define R_QNC_GPIO_RNMIEN_RESUME_WELL
Definition: QuarkNcSocId.h:484
#define R_QNC_GPIO_CNMIEN_CORE_WELL
Definition: QuarkNcSocId.h:483
#define R_QNC_GPIO_CGTNE_CORE_WELL
Definition: QuarkNcSocId.h:471
#define R_QNC_GPIO_CGEN_CORE_WELL
Definition: QuarkNcSocId.h:467
#define R_QNC_GPIO_RGTPE_RESUME_WELL
Definition: QuarkNcSocId.h:478
#define R_QNC_GPIO_CGGPE_CORE_WELL
Definition: QuarkNcSocId.h:472
#define R_QNC_GPIO_RGTS_RESUME_WELL
Definition: QuarkNcSocId.h:482
#define R_QNC_GPIO_RGEN_RESUME_WELL
Definition: QuarkNcSocId.h:475
#define R_QNC_GPIO_RGTNE_RESUME_WELL
Definition: QuarkNcSocId.h:479
#define R_QNC_GPIO_CGSMI_CORE_WELL
Definition: QuarkNcSocId.h:473
#define R_QNC_GPIO_RGLVL_RESUME_WELL
Definition: QuarkNcSocId.h:477
#define R_QNC_GPIO_RGSMI_RESUME_WELL
Definition: QuarkNcSocId.h:481
#define R_QNC_GPIO_RGIO_RESUME_WELL
Definition: QuarkNcSocId.h:476
#define R_QNC_GPIO_CGIO_CORE_WELL
Definition: QuarkNcSocId.h:468
#define R_QNC_GPIO_CGTS_CORE_WELL
Definition: QuarkNcSocId.h:474
#define R_QNC_GPIO_RGGPE_RESUME_WELL
Definition: QuarkNcSocId.h:480
static const struct reg_script gen1_hsuart0_0x21[]
Definition: gen1.h:74
static const struct reg_script gen1_gpio_init[]
Definition: gen1.h:9
static const struct reg_script gen1_i2c_0x20_init[]
Definition: gen1.h:99
static const struct reg_script gen1_tpm_reset_0x21[]
Definition: gen1.h:154
static const struct reg_script gen1_tpm_reset_0x20[]
Definition: gen1.h:141
static const struct reg_script gen1_hsuart0_0x20[]
Definition: gen1.h:49
static const struct reg_script gen1_i2c_0x21_init[]
Definition: gen1.h:120
#define GEN1_GPIO_EXP_OUTPUT1
Definition: reg_access.h:35
@ GEN1_I2C_GPIO_EXP_0x20
Definition: reg_access.h:18
@ GEN1_I2C_GPIO_EXP_0x21
Definition: reg_access.h:19
#define GEN1_GPIO_EXP_OUTPUT5
Definition: reg_access.h:39
#define GEN1_GPIO_EXP_OUTPUT3
Definition: reg_access.h:37
#define REG_I2C_WRITE(slave_addr_, reg_, value_)
Definition: reg_access.h:69
#define GEN1_GPIO_EXP_PORT_SELECT
Definition: reg_access.h:40
#define REG_I2C_AND(slave_addr_, reg_, value_)
Definition: reg_access.h:71
#define REG_I2C_OR(slave_addr_, reg_, value_)
Definition: reg_access.h:77
#define GEN1_GPIO_EXP_PORT_DIR
Definition: reg_access.h:41
#define REG_SCRIPT_END
Definition: reg_script.h:427
#define REG_GPIO_OR(reg_, value_)
Definition: reg_access.h:92
#define REG_GPIO_WRITE(reg_, value_)
Definition: reg_access.h:84
#define REG_GPIO_AND(reg_, value_)
Definition: reg_access.h:86
#define REG_LEG_GPIO_WRITE(reg_, value_)
Definition: reg_access.h:126
#define REG_LEG_GPIO_AND(reg_, value_)
Definition: reg_access.h:128
#define TIME_DELAY_USEC(value_)
Definition: reg_access.h:209
#define REG_LEG_GPIO_OR(reg_, value_)
Definition: reg_access.h:134