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-only */
2 
3 #include <variant/gpio.h>
4 #include <variant/variant.h>
5 #include <vendorcode/google/chromeos/chromeos.h>
6 #include <gpio.h>
7 #include <soc/romstage.h>
8 #include <baseboard/variants.h>
9 
10 /* Pad configuration in ramstage */
11 static const struct pad_config gpio_table[] = {
12 /* RCIN# */ PAD_NC(GPP_A0, NONE),
13 /* ESPI_IO0 */
14 /* ESPI_IO1 */
15 /* ESPI_IO2 */
16 /* ESPI_IO3 */
17 /* ESPI_CS# */
18 /* SERIRQ */ PAD_NC(GPP_A6, NONE),
19 /* TPM_PIRQ#_A7 */ PAD_NC(GPP_A7, NONE),
20 /* CLKRUN# */ PAD_NC(GPP_A8, NONE),
21 /* ESPI_CLK */
22 /* CLKOUT_LPC1 */ PAD_NC(GPP_A10, NONE),
23 /* PME# */ PAD_NC(GPP_A11, NONE),
24  /* ISH_LID_CL#_TAB */
25 /* ISH_GP6 */ PAD_CFG_NF(GPP_A12, NONE, DEEP, NF2),
26 /* SUSWARN# */ PAD_NC(GPP_A13, NONE),
27 /* ESPI_RESET# */
28 /* SUSACK# */ PAD_NC(GPP_A15, NONE),
29 /* SD_1P8_SEL */ PAD_CFG_GPI(GPP_A16, NONE, PLTRST), /* 2.7MM_CAM_DET# */
30 /* SD_PWR_EN# */ PAD_NC(GPP_A17, NONE),
31  /* ISH_ACC1_INT# */
32 /* ISH_GP0 */ PAD_CFG_NF(GPP_A18, NONE, DEEP, NF1),
33  /* ISH_ACC2_INT# */
34 /* ISH_GP1 */ PAD_CFG_NF(GPP_A19, NONE, DEEP, NF1),
35 /* ISH_GP2 */ PAD_CFG_NF(GPP_A20, NONE, DEEP, NF1),
36 /* ISH_GP3 */ PAD_NC(GPP_A21, NONE),
37  /* ISH_NB_MODE */
38 /* ISH_GP4 */ PAD_CFG_NF(GPP_A22, NONE, DEEP, NF1),
39  /* ISH_LID_CL#_NB */
40 /* ISH_GP5 */ PAD_CFG_NF(GPP_A23, NONE, DEEP, NF1),
41 
42 /* CORE_VID0 */ PAD_CFG_NF(GPP_B0, NONE, DEEP, NF1),
43 /* CORE_VID1 */ PAD_CFG_NF(GPP_B1, NONE, DEEP, NF1),
44 /* VRALERT# */ PAD_CFG_NF(GPP_B2, NONE, DEEP, NF1),
45 /* CPU_GP2 */ PAD_CFG_GPI_APIC(GPP_B3, NONE, PLTRST,
46  EDGE_SINGLE, INVERT), /* TOUCHPAD_INTR# */
47 /* CPU_GP3 */ PAD_CFG_GPI(GPP_B4, NONE, DEEP), /* TOUCH_SCREEN_DET# */
48  /* LAN_CLKREQ_CPU_N */
49 /* SRCCLKREQ0# */ PAD_CFG_NF(GPP_B5, NONE, DEEP, NF1),
50  /* CARD_CLKREQ_CPU_N */
51 /* SRCCLKREQ1# */ PAD_CFG_NF(GPP_B6, NONE, DEEP, NF1),
52  /* WLAN_CLKREQ_CPU_N */
53 /* SRCCLKREQ2# */ PAD_CFG_NF(GPP_B7, NONE, DEEP, NF1),
54 /* SRCCLKREQ3# */ PAD_NC(GPP_B8, NONE),
55  /* SSD_CKLREQ_CPU_N */
56 /* SRCCLKREQ4# */ PAD_CFG_NF(GPP_B9, NONE, DEEP, NF1),
57 /* SRCCLKREQ5# */ PAD_NC(GPP_B10, NONE),
58 /* EXT_PWR_GATE# */ PAD_CFG_GPO(GPP_B11, 0, PLTRST), /* 3.3V_CAM_EN# */
59 /* SLP_S0# */ PAD_CFG_NF(GPP_B12, NONE, DEEP, NF1),
60 /* PLTRST# */ PAD_CFG_NF(GPP_B13, NONE, DEEP, NF1),
61 /* SPKR */ PAD_CFG_NF(GPP_B14, NONE, DEEP, NF1),
62 /* GSPI0_CS# */ PAD_CFG_GPO(GPP_B15, 0, PLTRST), /* PRIM_CORE_OPT_DIS */
63 /* GSPI0_CLK */ PAD_CFG_GPI(GPP_B16, NONE, PLTRST), /* ONE_DIMM# */
64 /* GSPI0_MISO */ PAD_NC(GPP_B17, NONE), /* RTC_DET# */
65 /* GSPI0_MOSI */ PAD_NC(GPP_B18, NONE),
66 /* GSPI1_CS# */ PAD_NC(GPP_B19, NONE), /* HDD_FALL_INT (nostuff) */
67 /* GSPI1_CLK */ PAD_NC(GPP_B20, NONE),
68 /* GSPI1_MISO */ PAD_CFG_GPO(GPP_B21, 0, DEEP), /* PCH_3.3V_TS_EN */
69 /* GSPI1_MOSI */ PAD_NC(GPP_B22, NONE),
70 /* SML1ALERT# */ PAD_NC(GPP_B23, DN_20K),
71 
72 /* SMBCLK */ PAD_CFG_NF(GPP_C0, NONE, DEEP, NF1), /* MEM_SMBCLK */
73 /* SMBDATA */ PAD_CFG_NF(GPP_C1, NONE, DEEP, NF1), /* MEM_SMBDATA */
74 /* SMBALERT# */ PAD_NC(GPP_C2, DN_20K),
75 /* SML0CLK */ PAD_NC(GPP_C3, NONE),
76 /* SML0DATA */ PAD_NC(GPP_C4, NONE),
77 /* SML0ALERT# */ PAD_CFG_GPI(GPP_C5, NONE, DEEP),
78 /* UART0_RTS# */ PAD_CFG_GPO(GPP_C10, 1, DEEP), /* WWAN_FULL_PWR_EN */
79 /* UART0_CTS# */ PAD_NC(GPP_C11, NONE),
80 /* UART1_RXD */ PAD_NC(GPP_C12, NONE),
81 /* UART1_TXD */ PAD_NC(GPP_C13, NONE),
82 /* UART1_RTS# */ PAD_CFG_GPI(GPP_C14, NONE, PLTRST), /* LCD_CBL_DET# */
83 /* UART1_CTS# */ PAD_NC(GPP_C15, NONE),
84 /* I2C0_SDA */ PAD_CFG_NF(GPP_C16, NONE, DEEP, NF1), /* TS_I2C_SDA */
85 /* I2C0_SCL */ PAD_CFG_NF(GPP_C17, NONE, DEEP, NF1), /* TS_I2C_SCL */
86 /* I2C1_SDA */ PAD_CFG_NF(GPP_C18, NONE, DEEP, NF1), /* I2C1_SDA_TP */
87 /* I2C1_SCL */ PAD_CFG_NF(GPP_C19, NONE, DEEP, NF1), /* I2C1_SCK_TP */
88 /* UART2_RXD */ PAD_NC(GPP_C20, NONE),
89 /* UART2_TXD */ PAD_NC(GPP_C21, NONE),
90 /* UART2_RTS# */ PAD_CFG_GPI(GPP_C22, NONE, PLTRST), /* SPK_DETECT */
91 /* UART2_CTS# */ PAD_CFG_GPI_APIC(GPP_C23, NONE, PLTRST,
92  LEVEL, NONE), /* TS_INT# */
93 
94 /* SPI1_CS# */ PAD_CFG_GPI_APIC(GPP_D0, NONE, PLTRST,
95  EDGE_SINGLE, INVERT), /* MEDIACARD_IRQ# */
96 /* SPI1_CLK */ PAD_CFG_GPI(GPP_D1, NONE, DEEP), /* VPRO_DET# */
97 /* SPI1_MISO */ PAD_NC(GPP_D2, NONE),
98 /* SPI1_MOSI */ PAD_CFG_GPI(GPP_D3, NONE, PLTRST), /* RTC_DET# */
99 /* FASHTRIG */ PAD_NC(GPP_D4, NONE),
100  /* ISH_I2C0_ACC_SDA */
101 /* ISH_I2C0_SDA */ PAD_CFG_NF(GPP_D5, NONE, DEEP, NF1),
102  /* ISH_I2C0_ACC_SCL */
103 /* ISH_I2C0_SCL */ PAD_CFG_NF(GPP_D6, NONE, DEEP, NF1),
104 /* ISH_I2C1_SDA */ PAD_CFG_NF(GPP_D7, NONE, DEEP, NF1),
105 /* ISH_I2C1_SCL */ PAD_CFG_NF(GPP_D8, NONE, DEEP, NF1),
106 /* ISH_SPI_CS# */ PAD_CFG_GPI(GPP_D9, NONE, PLTRST), /* IR_CAM_DET# */
107 /* ISH_SPI_CLK */ PAD_NC(GPP_D10, NONE),
108 /* ISH_SPI_MISO */ PAD_NC(GPP_D11, NONE),
109 /* ISH_SPI_MOSI */ PAD_NC(GPP_D12, NONE),
110  /* ISH_CPU_UART0_RX */
111 /* ISH_UART0_RXD */ PAD_CFG_NF(GPP_D13, UP_20K, DEEP, NF1),
112  /* ISH_CPU_UART0_TX */
113 /* ISH_UART0_TXD */ PAD_CFG_NF(GPP_D14, NONE, DEEP, NF1),
114 /* ISH_UART0_RTS# */ PAD_CFG_GPO(GPP_D15, 0, DEEP), /* TS_RST */
115 /* ISH_UART0_CTS# */ PAD_CFG_GPI(GPP_D16, NONE, PLTRST),
116 /* DMIC_CLK1 */ PAD_CFG_GPI(GPP_D17, NONE, PLTRST), /* KB_DET# */
117 /* DMIC_DATA1 */ PAD_CFG_GPI_APIC(GPP_D18, NONE, PLTRST,
118  EDGE_SINGLE, INVERT), /* H1_PCH_INT_ODL */
119 /* DMIC_CLK0 */ PAD_NC(GPP_D19, NONE),
120 /* DMIC_DATA0 */ PAD_NC(GPP_D20, NONE),
121 /* SPI1_IO2 */ PAD_CFG_GPO(GPP_D21, 1, DEEP), /* WWAN_BB_RST# */
122 /* SPI1_IO3 */ PAD_CFG_GPO(GPP_D22, 0, DEEP), /* WWAN_GPIO_PERST# */
123 /* I2S_MCLK */ PAD_CFG_GPI_SCI_LOW(GPP_D23, NONE, DEEP,
124  EDGE_SINGLE), /* WWAN_GPIO_WAKE# */
125 
126 /* SATAXPCIE0 */ PAD_CFG_NF(GPP_E0, NONE, DEEP, NF2), /* HDD_DET# */
127  /* M3042_PCIE#_SATA */
128 /* SATAXPCIE1 */ PAD_CFG_NF(GPP_E1, NONE, DEEP, NF2),
129  /* M2880_PCIE_SATA# */
130 /* SATAXPCIE2 */ PAD_CFG_NF(GPP_E2, NONE, DEEP, NF2),
131 /* CPU_GP0 */ PAD_CFG_GPI(GPP_E3, NONE, PLTRST), /* MEM_INTERLEAVED */
132 /* SATA_DEVSLP0 */ PAD_NC(GPP_E4, NONE),
133 /* SATA_DEVSLP1 */ PAD_CFG_NF(GPP_E5, NONE, DEEP, NF1), /* M3042_DEVSLP */
134 /* SATA_DEVSLP2 */ PAD_CFG_NF(GPP_E6, NONE, DEEP, NF1), /* M2280_DEVSLP */
135 /* CPU_GP1 */ PAD_CFG_GPO(GPP_E7, 0, PLTRST), /* TOUCH_SCREEN_PD# */
136 /* SATALED# */ PAD_CFG_GPI(GPP_E8, NONE, DEEP),
137 /* USB2_OCO# */ PAD_CFG_NF(GPP_E9, NONE, DEEP, NF1), /* USB_OC0# */
138 /* USB2_OC1# */ PAD_CFG_NF(GPP_E10, NONE, DEEP, NF1), /* USB_OC1# */
139 /* USB2_OC2# */ PAD_CFG_NF(GPP_E11, NONE, DEEP, NF1),
140 /* USB2_OC3# */ PAD_CFG_NF(GPP_E12, NONE, DEEP, NF1),
141 /* DDPB_HPD0 */ PAD_CFG_NF(GPP_E13, NONE, DEEP, NF1), /* DP_HPD_CPU */
142 /* DDPC_HPD1 */ PAD_CFG_NF(GPP_E14, NONE, DEEP, NF1), /* DP2_HPD_CPU */
143 /* DDPD_HPD2 */ PAD_CFG_GPI(GPP_E15, NONE, DEEP), /* H1_FLASH_WP */
144 /* DDPE_HPD3 */ PAD_CFG_GPO(GPP_E16, 1, DEEP), /* HDMI_PD# */
145 /* EDP_HPD */ PAD_CFG_NF(GPP_E17, NONE, DEEP, NF1),
146 /* DDPB_CTRLCLK */ PAD_CFG_NF(GPP_E18, NONE, DEEP, NF1),
147 /* DDPB_CTRLDATA */ PAD_CFG_NF(GPP_E19, NONE, DEEP, NF1),
148 /* DDPC_CTRLCLK */ PAD_CFG_NF(GPP_E20, NONE, DEEP, NF1),
149 /* DDPC_CTRLDATA */ PAD_CFG_NF(GPP_E21, NONE, DEEP, NF1),
150 /* DDPD_CTRLCLK */ PAD_NC(GPP_E22, NONE),
151 /* DDPD_CTRLDATA */ PAD_NC(GPP_E23, NONE),
152 
153 /* CNV_PA_BLANKING */ PAD_CFG_NF(GPP_F0, NONE, DEEP, NF1), /* CNV_COEX3 */
154 /* GPP_F3 */ PAD_NC(GPP_F3, NONE),
155 /* CNV_BRI_DT */ PAD_CFG_NF(GPP_F4, NONE, DEEP, NF1),
156 /* CNV_BRI_RSP */ PAD_CFG_NF(GPP_F5, NONE, DEEP, NF1),
157 /* CNV_RGI_DT */ PAD_CFG_NF(GPP_F6, NONE, DEEP, NF1),
158 /* CNV_RGI_RSP */ PAD_CFG_NF(GPP_F7, NONE, DEEP, NF1),
159 /* CNV_MFUART2_RXD */ PAD_CFG_NF(GPP_F8, NONE, DEEP, NF1), /* CNV_COEX2 */
160 /* CNV_MFUART2_TXD */ PAD_CFG_NF(GPP_F9, NONE, DEEP, NF1), /* CNV_COEX1 */
161 /* GPP_F10 */ PAD_NC(GPP_F10, NONE),
162 /* EMMC_CMD */ PAD_NC(GPP_F11, NONE),
163 /* EMMC_DATA5 */ PAD_NC(GPP_F17, NONE),
164 /* EMMC_DATA6 */ PAD_NC(GPP_F18, NONE),
165 /* EMMC_DATA7 */ PAD_NC(GPP_F19, NONE),
166 /* EMMC_RCLK */ PAD_NC(GPP_F20, NONE),
167 /* EMMC_CLK */ PAD_NC(GPP_F21, NONE),
168 /* EMMC_RESET# */ PAD_NC(GPP_F22, NONE),
169 /* A4WP_PRESENT */ PAD_CFG_NF(GPP_F23, NONE, PLTRST, NF1),
170 /* SD_CMD */ PAD_CFG_GPI(GPP_G0, NONE, PLTRST), /* CAM_MIC */
171 /* SD_DATA0 */ PAD_NC(GPP_G1, NONE), /* ANT_CONFIG (nostuff) */
172 /* SD_DATA1 */ PAD_NC(GPP_G2, NONE),
173 /* SD_DATA2 */ PAD_NC(GPP_G3, NONE),
174 /* SD_DATA3 */ PAD_NC(GPP_G4, NONE), /* CTLESS_DET# */
175 /* SD_CD# */ PAD_CFG_GPO(GPP_G5, 1, PLTRST), /* HOST_SD_WP# */
176 /* SD_CLK */ PAD_NC(GPP_G6, NONE), /* AUD_PWR_EN */
177 /* SD_WP */ PAD_CFG_GPI(GPP_G7, NONE, PLTRST), /* SPK_DET# */
178 
179 /* I2S2_SCLK */ PAD_NC(GPP_H0, NONE),
180 /* I2S2_SFRM */ PAD_CFG_NF(GPP_H1, NONE, DEEP, NF3), /* CNV_RF_RESET# */
181 /* I2S2_TXD */ PAD_CFG_NF(GPP_H2, NONE, DEEP, NF3), /* CLKREQ_CNV# */
182 /* I2S2_RXD */ PAD_CFG_GPI(GPP_H3, NONE, DEEP), /* CNVI_EN# */
183 /* I2C2_SDA */ PAD_NC(GPP_H4, NONE),
184 /* I2C3_SDA */ PAD_NC(GPP_H6, NONE),
185 /* I2C3_SCL */ PAD_NC(GPP_H7, NONE),
186 /* I2C4_SDA */ PAD_CFG_NF(GPP_H8, NONE, DEEP, NF1),
187 /* I2C4_SCL */ PAD_CFG_NF(GPP_H9, NONE, DEEP, NF1),
188 /* I2C5_SDA */ PAD_NC(GPP_H10, NONE), /* ISH_I2C2_SDA */
189 /* I2C5_SCL */ PAD_NC(GPP_H11, NONE), /* ISH_I2C2_SCL */
190 /* M2_SKT2_CFG0 */ PAD_NC(GPP_H12, NONE),
191 /* M2_SKT2_CFG1 */ PAD_NC(GPP_H13, NONE),
192 /* M2_SKT2_CFG2 */ PAD_NC(GPP_H14, NONE),
193 /* M2_SKT2_CFG3 */ PAD_CFG_GPO(GPP_H15, 1, DEEP), /* BT_RADIO_DIS# */
194 /* DDPF_CTRLCLK */ PAD_NC(GPP_H16, NONE),
195 /* DPPF_CTRLDATA */ PAD_NC(GPP_H17, NONE),
196 /* CPU_C10_GATE# */ PAD_CFG_NF(GPP_H18, NONE, DEEP, NF1), /* C10_GATE# */
197 /* TIMESYNC0 */ PAD_NC(GPP_H19, NONE),
198 /* IMGCLKOUT1 */ PAD_NC(GPP_H20, NONE),
199 /* GPP_H21 */ PAD_NC(GPP_H21, NONE),
200 /* GPP_H22 */ PAD_NC(GPP_H22, NONE),
201 /* GPP_H23 */ PAD_NC(GPP_H23, NONE),
202 
203 /* BATLOW# */ PAD_CFG_NF(GPD0, NONE, DEEP, NF1), /* BATLOW# */
204 /* ACPRESENT */ PAD_CFG_NF(GPD1, NONE, DEEP, NF1), /* AC_PRESENT */
205 /* LAN_WAKE# */ PAD_CFG_NF(GPD2, NONE, DEEP, NF1), /* LAN_WAKE# */
206 /* SLP_S3# */ PAD_CFG_NF(GPD4, NONE, DEEP, NF1), /* SIO_SLP_S3# */
207 /* SLP_S4# */ PAD_CFG_NF(GPD5, NONE, DEEP, NF1), /* SIO_SLP_S4# */
208 /* SLP_A# */ PAD_CFG_NF(GPD6, NONE, DEEP, NF1), /* SIO_SLP_A# */
209 /* GPD7 */ PAD_NC(GPD7, NONE),
210 /* SUSCLK */ PAD_CFG_NF(GPD8, NONE, DEEP, NF1), /* SUSCLK */
211 /* SLP_WLAN# */ PAD_CFG_NF(GPD9, NONE, DEEP, NF1), /* SIO_SLP_WLAN# */
212 /* SLP_S5# */ PAD_CFG_NF(GPD10, NONE, DEEP, NF1), /* SIO_SLP_S5# */
213 /* LANPHYC */ PAD_NC(GPD11, NONE), /* PM_LANPHY_EN */
214 };
215 
216 /* Early pad configuration in bootblock */
217 static const struct pad_config early_gpio_table[] = {
218 /* UART2_RXD */ PAD_CFG_NF(GPP_C8, NONE, DEEP, NF1), /* SERVOTX_UART */
219 /* UART2_TXD */ PAD_CFG_NF(GPP_C9, NONE, DEEP, NF1), /* SERVORX_UART */
220 /* I2C4_SDA */ PAD_CFG_NF(GPP_H8, NONE, DEEP, NF1), /* SDA_PCH_H1 */
221 /* I2C4_SCL */ PAD_CFG_NF(GPP_H9, NONE, DEEP, NF1), /* SCL_PCH_H1 */
222 /* DMIC_DATA1 */ PAD_CFG_GPI_APIC(GPP_D18, NONE, PLTRST,
223  EDGE_SINGLE, INVERT), /* H1_PCH_INT_ODL */
224 /* RESET# need to stay low before FULL_CARD_POWER_OFF assert */
225 /* SPI1_IO2 */ PAD_CFG_GPO(GPP_D21, 0, DEEP), /* WWAN_BB_RST# */
226 /* CPU_GP0 */ PAD_CFG_GPI(GPP_E3, NONE, DEEP), /* MEM_INTERLEAVED */
227 /* SATALED# */ PAD_CFG_GPI(GPP_E8, NONE, DEEP), /* RECOVERY# */
228 /* DDPD_HPD2 */ PAD_CFG_GPI(GPP_E15, NONE, DEEP), /* PCH_WP */
229 /* GPP_F1 */ PAD_CFG_GPI(GPP_F1, NONE, DEEP), /* DDR_CHA_EN_1P8 */
230 /* GPP_F2 */ PAD_CFG_GPI(GPP_F2, NONE, DEEP), /* DDR_CHB_EN_1P8 */
231 /* EMMC_DATA0 */ PAD_CFG_GPI(GPP_F12, NONE, DEEP), /* MEM_CONFIGO_1P8 */
232 /* EMMC_DATA1 */ PAD_CFG_GPI(GPP_F13, NONE, DEEP), /* MEM_CONFIGO_1P8 */
233 /* EMMC_DATA2 */ PAD_CFG_GPI(GPP_F14, NONE, DEEP), /* MEM_CONFIGO_1P8 */
234 /* EMMC_DATA3 */ PAD_CFG_GPI(GPP_F15, NONE, DEEP), /* MEM_CONFIGO_1P8 */
235 /* EMMC_DATA4 */ PAD_CFG_GPI(GPP_F16, NONE, DEEP), /* MEM_CONFIGO_1P8 */
236 /* I2C2_SCL */ PAD_CFG_GPI(GPP_H5, NONE, PLTRST), /* 360_SENSOR_DET# */
237 /* PWRBTN# */ PAD_CFG_NF(GPD3, UP_20K, DEEP, NF1), /* SIO_PWRBTN# */
238 };
239 
240 const struct pad_config *variant_gpio_table(size_t *num)
241 {
242  *num = ARRAY_SIZE(gpio_table);
243  return gpio_table;
244 }
245 
246 const struct pad_config *variant_early_gpio_table(size_t *num)
247 {
249  return early_gpio_table;
250 }
251 
252 static const struct cros_gpio cros_gpios[] = {
253  CROS_GPIO_REC_AL(GPP_E8, CROS_GPIO_DEVICE_NAME),
254  CROS_GPIO_WP_AH(GPP_E15, CROS_GPIO_DEVICE_NAME),
255 };
256 
258 
260 {
261  FSP_M_CONFIG *fsp_m_cfg = &mupd->FspmConfig;
262  if (fsp_m_cfg->PchIshEnable)
263  fsp_m_cfg->PchIshEnable = has_360_sensor_board();
264 
265  /*
266  * Disable memory channel by HW strap pin, HW default is enable
267  * 0: Enable both DIMMs, 3: Disable both DIMMs
268  */
269  mupd->FspmConfig.DisableDimmChannel0 = gpio_get(DDR_CH0_EN) ? 0 : 3;
270  mupd->FspmConfig.DisableDimmChannel1 = gpio_get(DDR_CH1_EN) ? 0 : 3;
271 }
#define GPD11
#define GPP_H22
#define GPP_C15
#define GPD3
#define GPP_H20
#define GPP_B6
Definition: gpio_soc_defs.h:59
#define GPP_H19
#define GPP_D1
#define GPD9
#define GPP_C2
#define GPP_D10
#define GPP_D8
#define GPP_D17
#define GPP_E3
#define GPP_A18
#define GPP_F21
#define GPP_C12
#define GPP_F12
#define GPP_F16
#define GPP_H15
#define GPP_H16
#define GPP_E0
#define GPP_F6
#define GPP_H18
#define GPP_D14
#define GPP_B1
Definition: gpio_soc_defs.h:54
#define GPP_F20
#define GPP_F23
#define GPP_C5
#define GPP_H11
#define GPP_B12
Definition: gpio_soc_defs.h:65
#define GPP_H17
#define GPP_D12
#define GPP_B16
Definition: gpio_soc_defs.h:69
#define GPP_B2
Definition: gpio_soc_defs.h:55
#define GPP_D7
#define GPP_B13
Definition: gpio_soc_defs.h:66
#define GPP_E6
#define GPP_F0
#define GPP_D6
#define GPP_A19
#define GPP_D2
#define GPP_H12
#define GPP_H6
#define GPP_C9
#define GPP_H2
#define GPP_C22
#define GPP_H9
#define GPD0
#define GPP_D9
#define GPP_F5
#define GPP_B15
Definition: gpio_soc_defs.h:68
#define GPP_E13
#define GPP_H21
#define GPP_C23
#define GPP_H13
#define GPP_C8
#define GPP_D11
#define GPP_H7
#define GPP_A6
#define GPP_H1
#define GPP_C11
#define GPP_H14
#define GPP_D5
#define GPP_B22
Definition: gpio_soc_defs.h:75
#define GPP_A23
#define GPP_C18
#define GPP_F9
#define GPP_C13
#define GPP_E14
#define GPP_E23
#define GPP_E9
#define GPP_C17
#define GPP_E8
#define GPP_A7
#define GPP_E5
#define GPP_A0
#define GPD7
#define GPP_B8
Definition: gpio_soc_defs.h:61
#define GPP_C20
#define GPP_B20
Definition: gpio_soc_defs.h:73
#define GPP_A20
#define GPP_A16
#define GPP_F1
#define GPP_F17
#define GPP_A12
#define GPP_F15
#define GPP_D4
#define GPP_C10
#define GPD2
#define GPP_F10
#define GPP_E7
#define GPP_C16
#define GPP_F7
#define GPD1
#define GPP_F13
#define GPP_C4
#define GPP_D18
#define GPP_B19
Definition: gpio_soc_defs.h:72
#define GPP_E17
#define GPP_E2
#define GPP_E19
#define GPP_H0
#define GPP_H5
#define GPP_C21
#define GPP_B9
Definition: gpio_soc_defs.h:62
#define GPD10
#define GPP_E18
#define GPP_F14
#define GPP_H3
#define GPP_F4
#define GPP_A10
#define GPP_A8
#define GPP_D0
#define GPP_B14
Definition: gpio_soc_defs.h:67
#define GPP_B11
Definition: gpio_soc_defs.h:64
#define GPP_D13
#define GPP_B18
Definition: gpio_soc_defs.h:71
#define GPP_B5
Definition: gpio_soc_defs.h:58
#define GPP_B0
Definition: gpio_soc_defs.h:53
#define GPP_A11
#define GPP_C14
#define GPP_E20
#define GPP_A15
#define GPP_E10
#define GPP_F8
#define GPP_C19
#define GPD8
#define GPP_A13
#define GPP_A21
#define GPP_B23
Definition: gpio_soc_defs.h:76
#define GPP_E15
#define GPP_B10
Definition: gpio_soc_defs.h:63
#define GPP_E16
#define GPP_D19
#define GPP_C1
#define GPP_F2
#define GPP_E11
#define GPD6
#define GPP_F18
#define GPP_B3
Definition: gpio_soc_defs.h:56
#define GPP_A22
#define GPP_F22
#define GPP_D15
#define GPP_F11
#define GPP_B21
Definition: gpio_soc_defs.h:74
#define GPD4
#define GPP_B4
Definition: gpio_soc_defs.h:57
#define GPP_D16
#define GPP_F3
#define GPP_E22
#define GPP_H10
#define GPP_E21
#define GPP_C3
#define GPP_E12
#define GPP_A17
#define GPP_B17
Definition: gpio_soc_defs.h:70
#define GPP_E4
#define GPP_C0
#define GPD5
#define GPP_E1
#define GPP_H8
#define GPP_F19
#define GPP_H4
#define GPP_H23
#define GPP_B7
Definition: gpio_soc_defs.h:60
#define GPP_D3
#define ARRAY_SIZE(a)
Definition: helpers.h:12
#define GPP_D23
#define GPP_G1
Definition: gpio_soc_defs.h:89
#define GPP_G7
Definition: gpio_soc_defs.h:95
#define GPP_D22
#define GPP_G4
Definition: gpio_soc_defs.h:92
#define GPP_G2
Definition: gpio_soc_defs.h:90
#define GPP_D21
#define GPP_G6
Definition: gpio_soc_defs.h:94
#define GPP_G0
Definition: gpio_soc_defs.h:88
#define GPP_D20
#define GPP_G3
Definition: gpio_soc_defs.h:91
#define GPP_G5
Definition: gpio_soc_defs.h:93
#define FSP_M_CONFIG
Definition: fsp_upd.h:8
const struct pad_config * variant_early_gpio_table(size_t *num)
Definition: gpio.c:204
const struct pad_config *__weak variant_gpio_table(size_t *num)
Definition: gpio.c:406
DECLARE_CROS_GPIOS(cros_gpios)
int __weak has_360_sensor_board(void)
Definition: gpio.c:426
void variant_mainboard_post_init_params(FSPM_UPD *mupd)
Definition: gpio.c:259
static const struct pad_config gpio_table[]
Definition: gpio.c:11
static const struct pad_config early_gpio_table[]
Definition: gpio.c:217
static const struct cros_gpio cros_gpios[]
Definition: gpio.c:252
#define DDR_CH1_EN
Definition: gpio.h:20
#define DDR_CH0_EN
Definition: gpio.h:19
int gpio_get(gpio_t gpio_num)
Definition: gpio.c:166
#define PAD_NC(pin)
Definition: gpio_defs.h:263
#define CROS_GPIO_DEVICE_NAME
Definition: gpio.h:14
#define PAD_CFG_GPI(pad, pull, rst)
Definition: gpio_defs.h:284
#define PAD_CFG_GPI_SCI_LOW(pad, pull, rst, trig)
Definition: gpio_defs.h:452
#define PAD_CFG_NF(pad, pull, rst, func)
Definition: gpio_defs.h:197
#define PAD_CFG_GPI_APIC(pad, pull, rst, trig, inv)
Definition: gpio_defs.h:376
#define PAD_CFG_GPO(pad, val, rst)
Definition: gpio_defs.h:247