coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
gen2.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 /* PCIe reset pin */
4 #define GEN2_PCI_RESET_RESUMEWELL_GPIO 0
5 
6 static const struct reg_script gen2_gpio_init[] = {
7  /* Initialize the legacy GPIO controller */
17 
27 
28  /* Initialize the GPIO controller */
38 
40 };
41 
42 static const struct reg_script gen2_hsuart0[] = {
43  /* Route UART0_TXD to MUX7_Y -> BUF_IO1 -> IO1 -> DIGITAL 1
44  * Set MUX7_SEL (EXP1.P1_5) high
45  * Configure MUX7_SEL (EXP1.P1_5) as an output
46  * Set LVL_B_OE6_N (EXP0.P1_4) low
47  * Configure LVL_B_OE6_N (EXP0.P1_4) as an output
48  */
53 
54  /* Route DIGITAL 0 -> IO0 -> UART0_RXD
55  * Set LVL_C_OE0_N (EXP1.P0_0) high
56  * Configure LVL_C_OE0_N (EXP1.P0_0) as an output
57  */
60 
62 };
63 
64 static const struct reg_script gen2_i2c_init[] = {
65  /* Route I2C to Arduino Shield connector:
66  * Set AMUX1_IN (EXP2.P1_4) low
67  * Configure AMUX1_IN (EXP2.P1_4) as an output
68  *
69  * I2C_SDA -> ANALOG_A4
70  * I2C_SCL -> ANALOG_A5
71  */
74 
75  /* Set all GPIO expander pins connected to the Reset Button as inputs
76  * Configure Reset Button(EXP1.P1_7) as an input
77  * Disable pullup on Reset Button(EXP1.P1_7)
78  * Configure Reset Button(EXP2.P1_7) as an input
79  * Disable pullup on Reset Button(EXP2.P1_7)
80  */
85 
87 };
88 
89 static const struct reg_script gen2_tpm_reset[] = {
90  /* Reset the TPM using SW_RESET_N_SHLD (EXP1 P1.7):
91  * low, output, delay, input
92  */
95  TIME_DELAY_USEC(5),
97 
99 };
#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 GPIO_SWPORTA_DR
Definition: Ioh.h:221
#define BIT7
Definition: Ioh.h:14
#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 gen2_gpio_init[]
Definition: gen2.h:6
static const struct reg_script gen2_hsuart0[]
Definition: gen2.h:42
static const struct reg_script gen2_tpm_reset[]
Definition: gen2.h:89
static const struct reg_script gen2_i2c_init[]
Definition: gen2.h:64
#define GEN2_GPIO_EXP_OUTPUT1
Definition: reg_access.h:47
@ GEN2_I2C_GPIO_EXP1
Definition: reg_access.h:22
@ GEN2_I2C_GPIO_EXP2
Definition: reg_access.h:23
@ GEN2_I2C_GPIO_EXP0
Definition: reg_access.h:21
#define GEN2_GPIO_EXP_CONFIG1
Definition: reg_access.h:51
#define GEN2_GPIO_EXP_OUTPUT0
Definition: reg_access.h:46
#define REG_I2C_AND(slave_addr_, reg_, value_)
Definition: reg_access.h:71
#define GEN2_GPIO_EXP_CONFIG0
Definition: reg_access.h:50
#define GEN2_GPIO_EXP_PULL_UP_DOWN_EN1
Definition: reg_access.h:55
#define REG_I2C_OR(slave_addr_, reg_, value_)
Definition: reg_access.h:77
#define REG_SCRIPT_END
Definition: reg_script.h:427
#define REG_GPIO_WRITE(reg_, value_)
Definition: reg_access.h:84
#define REG_LEG_GPIO_WRITE(reg_, value_)
Definition: reg_access.h:126
#define TIME_DELAY_USEC(value_)
Definition: reg_access.h:209