mb/starlabs/starlite_adl: Configure CNVi Bluetooth I2S GPIOs
[coreboot.git] / src / mainboard / starlabs / starfighter / variants / rpl / gpio.c
blobc28592ed6bb2e024179a8e23ec692b174b466c42
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <variants.h>
5 /* Early pad configuration in bootblock */
6 const struct pad_config early_gpio_table[] = {
7 /* H10: UART0 RXD Debug Connector */
8 PAD_CFG_NF(GPP_H10, NONE, DEEP, NF2),
9 /* H11: UART0 TXD Debug Connector */
10 PAD_CFG_NF(GPP_H11, NONE, DEEP, NF2),
11 /* F12: Board ID 0 */
12 PAD_CFG_GPI_LOCK(GPP_F12, NONE, LOCK_CONFIG),
13 /* F13: Board ID 1 */
14 PAD_CFG_GPI_LOCK(GPP_F13, NONE, LOCK_CONFIG),
15 /* F14: Board ID 2 */
16 PAD_CFG_GPI_LOCK(GPP_F14, NONE, LOCK_CONFIG),
17 /* F15: Board ID 3 */
18 PAD_CFG_GPI_LOCK(GPP_F15, NONE, LOCK_CONFIG),
22 const struct pad_config *variant_early_gpio_table(size_t *num)
24 *num = ARRAY_SIZE(early_gpio_table);
25 return early_gpio_table;
28 /* Pad configuration in ramstage. */
29 const struct pad_config gpio_table[] = {
30 /* GPD0: Battery Low */
31 PAD_CFG_NF(GPD0, NONE, DEEP, NF1),
32 /* GPD1: Charger Connected */
33 PAD_CFG_NF(GPD1, NONE, DEEP, NF1),
34 /* GPD2: LAN Wake */
35 PAD_NC(GPD2, NONE),
36 /* GPD3: Power Button */
37 PAD_CFG_NF(GPD3, UP_20K, DEEP, NF1),
38 /* GPD4: Sleep S3 */
39 PAD_CFG_NF(GPD4, NONE, DEEP, NF1),
40 /* GPD5: Sleep S4 */
41 PAD_CFG_NF(GPD5, NONE, DEEP, NF1),
42 /* GPD6: Sleep A */
43 PAD_CFG_NF(GPD6, NONE, DEEP, NF1),
44 /* GPD7: Power Adapter Disable */
45 PAD_CFG_GPO(GPD7, 0, PWROK),
46 /* GPD8: Suspend Clock */
47 PAD_CFG_NF(GPD8, NONE, DEEP, NF1),
48 /* GPD9: Wireless LAN Sleep */
49 PAD_CFG_NF(GPD9, NONE, DEEP, NF1),
50 /* GPD10: Sleep S5 */
51 PAD_CFG_NF(GPD10, NONE, DEEP, NF1),
52 /* GPD11: LAN PHY Enable */
53 PAD_NC(GPD11, NONE),
55 /* A0: ESPI IO 0 */
56 /* A1: ESPI IO 1 */
57 /* A2: ESPI IO 2 */
58 /* A3: ESPI IO 3 */
59 /* A4: ESPI CS 0 */
60 /* A5: Not Connected */
61 PAD_NC(GPP_A5, NONE),
62 /* A6: Not Connected */
63 PAD_NC(GPP_A6, NONE),
64 /* A7: Embedded Controller SCI */
65 PAD_NC(GPP_A7, NONE),
66 /* A8: Not Connected */
67 PAD_NC(GPP_A8, NONE),
68 /* A9: ESPI Clock */
69 /* A10: ESPI Reset */
70 /* A11: Not Connected */
71 PAD_NC(GPP_A11, NONE),
72 /* A12: PCH M.2 SSD PEDET */
73 PAD_CFG_NF(GPP_A12, NONE, DEEP, NF1),
74 /* A13: BlueTooth RF Kill */
75 PAD_CFG_GPO_GPIO_DRIVER(GPP_A13, 1, DEEP, NONE),
76 /* A14: Test Point 45 */
77 PAD_NC(GPP_A14, NONE),
78 /* A15: Test Point 52 */
79 PAD_NC(GPP_A15, NONE),
80 /* A16: USB OverCurrent 3 */
81 PAD_CFG_NF(GPP_A16, NONE, DEEP, NF1),
82 /* A17: Not Connected */
83 PAD_NC(GPP_A17, NONE),
84 /* A18: DDI B DP HPD */
85 PAD_CFG_NF(GPP_A18, NONE, DEEP, NF1),
86 /* A19: Not Connected */
87 PAD_NC(GPP_A19, NONE),
88 /* A20: Test Point 44 */
89 PAD_NC(GPP_A20, NONE),
90 /* A21: Not Connected */
91 PAD_NC(GPP_A21, NONE),
92 /* A22: Not Connected */
93 PAD_NC(GPP_A22, NONE),
94 /* A23: Not Connected */
95 PAD_NC(GPP_A23, NONE),
98 /* B0: Core Vendor ID 0 */
99 PAD_CFG_NF(GPP_B0, NONE, DEEP, NF1),
100 /* B1: Core Vendor ID 1 */
101 PAD_CFG_NF(GPP_B1, NONE, DEEP, NF1),
102 /* B2: BC PROCHOT */
103 PAD_CFG_GPI_SCI(GPP_B2, NONE, PLTRST, EDGE_SINGLE, INVERT),
104 /* B3: Not Connected */
105 PAD_NC(GPP_B3, NONE),
106 /* B4: Not Connected */
107 PAD_NC(GPP_B4, NONE),
108 /* B5: I2C 2 SDA Touch Panel SDA */
109 PAD_NC(GPP_B5, NONE),
110 /* B6: I2C 2 SCL Touch Panel Clock */
111 PAD_NC(GPP_B6, NONE),
112 /* B7: I2C 3 SDA Test Point 15 */
113 PAD_NC(GPP_B7, NONE),
114 /* B8: I2C 3 SCL Test Point 16 */
115 PAD_NC(GPP_B8, NONE),
116 /* B9: Not Connected */
117 PAD_NC(GPP_B9, NONE),
118 /* B10: Not Connected */
119 PAD_NC(GPP_B10, NONE),
120 /* B11: I2C PMC PD Interrupt */
121 PAD_CFG_NF(GPP_B11, NONE, DEEP, NF1),
122 /* B12: PM SLP S0 */
123 PAD_CFG_NF(GPP_B12, NONE, DEEP, NF1),
124 /* B13: PLT RST */
125 PAD_CFG_NF(GPP_B13, NONE, DEEP, NF1),
126 /* B14: Not Connected */
127 PAD_NC(GPP_B14, NONE),
128 /* B15: Not Connected */
129 PAD_NC(GPP_B15, NONE),
130 /* B16: Not Connected */
131 PAD_NC(GPP_B16, NONE),
132 /* B17: Not Connected */
133 PAD_NC(GPP_B17, NONE),
134 /* B18: Not Connected */
135 PAD_NC(GPP_B18, NONE),
136 /* B19: Not Connected */
137 PAD_NC(GPP_B19, NONE),
138 /* B20: Not Connected */
139 PAD_NC(GPP_B20, NONE),
140 /* B21: Not Connected */
141 PAD_NC(GPP_B21, NONE),
142 /* B22: Not Connected */
143 PAD_NC(GPP_B22, NONE),
144 /* B23: Not Connected */
145 PAD_NC(GPP_B23, NONE),
146 /* B24: Not Connected */
147 PAD_NC(GPP_B24, NONE),
148 /* B25: Not Connected */
149 PAD_NC(GPP_B25, NONE),
151 /* C0: SMB Clock */
152 PAD_CFG_NF(GPP_C0, NONE, DEEP, NF1),
153 /* C1: SMB Data */
154 PAD_CFG_NF(GPP_C1, NONE, DEEP, NF1),
155 /* C2: TLS Confidentiality Weak Internal PD 20K
156 Low: Disabled
157 High: Enabled */
158 PAD_CFG_GPO(GPP_C2, 1, PLTRST),
159 /* C3: SML 0 Clock */
160 PAD_CFG_NF(GPP_C3, NONE, DEEP, NF1),
161 /* C4: SML 0 Data */
162 PAD_CFG_NF(GPP_C4, NONE, DEEP, NF1),
163 /* C5: Boot Strap Weak Internal PD 20K
164 Low: ESPI
165 High: Disabled */
166 PAD_CFG_GPO(GPP_C5, 0, DEEP),
167 /* C6: SML 1 Clock */
168 PAD_CFG_NF(GPP_C6, NONE, DEEP, NF1),
169 /* C7: SML 1 Data */
170 PAD_CFG_NF(GPP_C7, NONE, DEEP, NF1),
171 /* C8: Not Connected */
172 PAD_NC(GPP_C8, NONE),
173 /* C9: Not Connected */
174 PAD_NC(GPP_C9, NONE),
175 /* C10: Not Connected */
176 PAD_NC(GPP_C10, NONE),
177 /* C11: Not Connected */
178 PAD_NC(GPP_C11, NONE),
179 /* C12: Not Connected */
180 PAD_NC(GPP_C12, NONE),
181 /* C13: Not Connected */
182 PAD_NC(GPP_C13, NONE),
183 /* C14: Not Connected */
184 PAD_NC(GPP_C14, NONE),
185 /* C15: Not Connected */
186 PAD_NC(GPP_C15, NONE),
187 /* C16: Not Connected */
188 PAD_NC(GPP_C16, NONE),
189 /* C17: Not Connected */
190 PAD_NC(GPP_C17, NONE),
191 /* C18: Not Connected */
192 PAD_NC(GPP_C18, NONE),
193 /* C19: Not Connected */
194 PAD_NC(GPP_C19, NONE),
195 /* C20: Not Connected */
196 PAD_NC(GPP_C20, NONE),
197 /* C21: Not Connected */
198 PAD_NC(GPP_C21, NONE),
199 /* C22: Not Connected */
200 PAD_NC(GPP_C22, NONE),
201 /* C23: Not Connected */
202 PAD_NC(GPP_C23, NONE),
204 /* D0: Not used Audio ID 0 */
205 PAD_NC(GPP_D0, NONE),
206 /* D1: Not used Audio ID 1 */
207 PAD_NC(GPP_D1, NONE),
208 /* D2: Not used Audio ID 2 */
209 PAD_NC(GPP_D2, NONE),
210 /* D3: Not Connected */
211 PAD_NC(GPP_D3, NONE),
212 /* D4: Not Connected */
213 PAD_NC(GPP_D4, NONE),
214 /* D5: Clock Request 0 */
215 PAD_NC(GPP_D5, NONE),
216 /* D6: Clock Request 1 PCH M.2 SSD */
217 PAD_CFG_NF(GPP_D6, NONE, DEEP, NF1),
218 /* D7: Clock Request 2 Wireless LAN */
219 PAD_CFG_NF(GPP_D7, NONE, DEEP, NF1),
220 /* D8: Clock Request 3 LAN */
221 PAD_NC(GPP_D8, NONE),
222 /* D9: PWD_AMP_IN */
223 PAD_NC(GPP_D9, NONE),
224 /* D10: TPM_IRQ */
225 PAD_NC(GPP_D10, NONE),
226 /* D11: TCHPAD_INT_N */
227 PAD_CFG_GPI_APIC_LOW(GPP_D11, NONE, PLTRST),
228 /* D12: ES8336_INT_N */
229 PAD_NC(GPP_D12, NONE),
230 /* D13: Wireless LAN Wake */
231 PAD_CFG_GPO(GPP_D13, 1, PLTRST),
232 /* D14: CPU M.2 SSD Power Enable */
233 PAD_CFG_GPO(GPP_D14, 1, PLTRST),
234 /* D15: Not Connected */
235 PAD_NC(GPP_D15, NONE),
236 /* D16: PCH M.2 SSD Power Enable */
237 PAD_CFG_GPO(GPP_D16, 1, PLTRST),
238 /* D17: Not used Fingerprint ID */
239 PAD_NC(GPP_D17, NONE),
240 /* D18: Trackpad reset */
241 PAD_NC(GPP_D18, NONE),
242 /* D19: I2S_MCLK1_OUT */
243 PAD_NC(GPP_D19, NONE),
245 /* E0: SATA x PCIe */
246 PAD_NC(GPP_E0, NONE),
247 /* E1: Not Connected */
248 PAD_NC(GPP_E1, NONE),
249 /* E2: Not Connected */
250 PAD_CFG_GPO(GPP_E2, 1, PLTRST),
251 /* E3: WiFi RF Kill */
252 PAD_CFG_GPO_GPIO_DRIVER(GPP_E3, 1, DEEP, NONE),
253 /* E4: Retimer Force Power */
254 PAD_CFG_GPO(GPP_E4, 0, PLTRST),
255 /* E5: Not Connected */
256 PAD_NC(GPP_E5, NONE),
257 /* E6: JTAG ODT No internal PD
258 Low: Disabled
259 High: Enabled */
260 PAD_CFG_GPO(GPP_E6, 0, DEEP),
261 /* E7: Embedded Controller SMI */
262 PAD_NC(GPP_E7, NONE),
263 /* E8: DRAM Sleep */
264 PAD_CFG_NF(GPP_E8, NONE, DEEP, NF1),
265 /* E9: USB OverCurrent 0 */
266 PAD_CFG_NF(GPP_E9, NONE, DEEP, NF1),
267 /* E10: Not Connected */
268 PAD_NC(GPP_E10, NONE),
269 /* E11: Not Connected */
270 PAD_NC(GPP_E11, NONE),
271 /* E12: Not Connected */
272 PAD_NC(GPP_E12, NONE),
273 /* E13: Not connected */
274 PAD_NC(GPP_E13, NONE),
275 /* E14: EDP HPD */
276 PAD_CFG_NF(GPP_E14, NONE, DEEP, NF1),
277 /* E15: Not Connected */
278 PAD_NC(GPP_E15, NONE),
279 /* E16: Not Connected */
280 PAD_NC(GPP_E16, NONE),
281 /* E17: Not Connected */
282 PAD_NC(GPP_E17, NONE),
283 /* E18: TBT_LSX0_TXD */
284 PAD_CFG_NF(GPP_E18, NONE, DEEP, NF2),
285 /* E19: TBT_LSX0_RXD */
286 PAD_CFG_NF(GPP_E19, NONE, DEEP, NF2),
287 /* E20: TBT_LSX1_TXD */
288 PAD_CFG_NF(GPP_E20, NONE, DEEP, NF4),
289 /* E21: TBT_LSX1_RXD */
290 PAD_CFG_NF(GPP_E21, NONE, DEEP, NF4),
291 /* E22: Not Connected */
292 PAD_NC(GPP_E22, NONE),
293 /* E23: Not Connected */
294 PAD_NC(GPP_E23, NONE),
296 /* F0: CNV BRI Data */
297 PAD_NC(GPP_F0, NONE),
298 /* F1: CNV BRI Response */
299 PAD_NC(GPP_F1, NONE),
300 /* F2: CNV RGI Data */
301 PAD_NC(GPP_F2, NONE),
302 /* F3: CNV RGI Response */
303 PAD_NC(GPP_F3, NONE),
304 /* F4: CNV RF Reset */
305 PAD_NC(GPP_F4, NONE),
306 /* F5: Not used */
307 PAD_NC(GPP_F5, NONE),
308 /* F6: Not used */
309 PAD_NC(GPP_F6, NONE),
310 /* F7: GPPC_F7 */
311 PAD_NC(GPP_F7, NONE),
312 /* F8: Not Connected */
313 PAD_NC(GPP_F8, NONE),
314 /* F9: EC Sleep S0 */
315 PAD_CFG_GPO(GPP_F9, 1, PLTRST),
316 /* F10: Weak Internal PD 20K */
317 PAD_CFG_GPO(GPP_F10, 1, PLTRST),
318 /* F11: TPM ID */
319 PAD_CFG_GPI_TRIG_OWN(GPP_F11, NONE, DEEP, OFF, ACPI),
320 /* F16: Not Connected */
321 PAD_CFG_GPO(GPP_F16, 1, RSMRST),
322 /* F17: Not used Touch Panel Reset */
323 PAD_NC(GPP_F17, NONE),
324 /* F18: Not used Touch Panel Interrupt */
325 PAD_NC(GPP_F18, NONE),
326 /* F19: Not Connected */
327 PAD_NC(GPP_F19, NONE),
328 /* F20: CPU M.2 SSD Reset */
329 PAD_CFG_GPO(GPP_F20, 1, PLTRST),
330 /* F21: GPPC_F21 */
331 PAD_CFG_NF(GPP_F21, NONE, DEEP, NF1),
332 /* F22: Not Connected */
333 PAD_NC(GPP_F22, NONE),
334 /* F23: Not Connected */
335 PAD_NC(GPP_F23, NONE),
337 /* H0: PCH M.2 SSD Reset */
338 PAD_CFG_GPO(GPP_H0, 1, PLTRST),
339 /* H1: BFX Strap 2 Bit 3 Weak Internal PD 20K */
340 PAD_CFG_GPO(GPP_H1, 1, PLTRST),
341 /* H2: Wireless LAN Reset */
342 PAD_CFG_GPO(GPP_H2, 1, PLTRST),
343 /* H3: Not Connected */
344 PAD_NC(GPP_H3, NONE),
345 /* H4: I2C 0 SDA Touchpad */
346 PAD_CFG_NF(GPP_H4, NONE, DEEP, NF1),
347 /* H5: I2C 0 SDL Touchpad */
348 PAD_CFG_NF(GPP_H5, NONE, DEEP, NF1),
349 /* H6: Not Connected */
350 PAD_NC(GPP_H6, NONE),
351 /* H7: Not Connected */
352 PAD_NC(GPP_H7, NONE),
353 /* H8: Not Connected */
354 PAD_NC(GPP_H8, NONE),
355 /* H9: Not Connected */
356 PAD_NC(GPP_H9, NONE),
357 /* H12: Not Connected */
358 PAD_NC(GPP_H12, NONE),
359 /* H13: PCH M.2 SSD Device Sleep */
360 PAD_CFG_GPO(GPP_H13, 0, PLTRST),
361 /* H14: Not Connected */
362 PAD_NC(GPP_H14, NONE),
363 /* H15: DDPB Control Clock */
364 PAD_CFG_NF(GPP_H15, NONE, DEEP, NF1),
365 /* H16: Not Connected */
366 PAD_NC(GPP_H16, NONE),
367 /* H17: DDPB Control Data */
368 PAD_CFG_NF(GPP_H17, NONE, DEEP, NF1),
369 /* H18: CPI C10 Gate */
370 PAD_CFG_NF(GPP_H18, NONE, DEEP, NF1),
371 /* H19: Clock Request 4 CPU M.2 SSD */
372 PAD_CFG_NF(GPP_H19, NONE, DEEP, NF1),
373 /* H20: Not Connected */
374 PAD_NC(GPP_H20, NONE),
375 /* H21: Not Connected */
376 PAD_NC(GPP_H21, NONE),
377 /* H22: Not Connected */
378 PAD_NC(GPP_H22, NONE),
379 /* H23: Clock Request 5 */
380 PAD_NC(GPP_H23, NONE),
382 /* S0: Not Connected */
383 PAD_NC(GPP_S0, NONE),
384 /* S1: Not Connected */
385 PAD_NC(GPP_S1, NONE),
386 /* S2: DMIC Clock */
387 PAD_CFG_NF(GPP_S2, NONE, DEEP, NF2),
388 /* S3: DMIC Data */
389 PAD_CFG_NF(GPP_S3, NONE, DEEP, NF2),
390 /* S4: Not Connected */
391 PAD_NC(GPP_S4, NONE),
392 /* S5: Not Connected */
393 PAD_NC(GPP_S5, NONE),
394 /* S6: Not Connected */
395 PAD_NC(GPP_S6, NONE),
396 /* S7: Not Connected */
397 PAD_NC(GPP_S7, NONE),
399 /* T0: Not Connected */
400 PAD_NC(GPP_T0, NONE),
401 /* T1: Not Connected */
402 PAD_NC(GPP_T1, NONE),
403 /* T2: Not Connected */
404 PAD_NC(GPP_T2, NONE),
405 /* T3: Not Connected */
406 PAD_NC(GPP_T3, NONE),
407 /* T4: Not Connected */
408 PAD_NC(GPP_T4, NONE),
409 /* T5: Not Connected */
410 PAD_NC(GPP_T5, NONE),
411 /* T6: Not Connected */
412 PAD_NC(GPP_T6, NONE),
413 /* T7: Not Connected */
414 PAD_NC(GPP_T7, NONE),
415 /* T8: Not Connected */
416 PAD_NC(GPP_T8, NONE),
417 /* T9: Not Connected */
418 PAD_NC(GPP_T9, NONE),
419 /* T10: Not Connected */
420 PAD_NC(GPP_T10, NONE),
421 /* T11: Not Connected */
422 PAD_NC(GPP_T11, NONE),
423 /* T12: Not Connected */
424 PAD_NC(GPP_T12, NONE),
425 /* T13: Not Connected */
426 PAD_NC(GPP_T13, NONE),
427 /* T14: Not Connected */
428 PAD_NC(GPP_T14, NONE),
429 /* T15: Not Connected */
430 PAD_NC(GPP_T15, NONE),
432 /* R0: HDA BCLK */
433 PAD_CFG_NF(GPP_R0, NATIVE, DEEP, NF1),
434 /* R1: HDA SYNC */
435 PAD_CFG_NF(GPP_R1, NATIVE, DEEP, NF1),
436 /* R2: HDA SDO */
437 PAD_CFG_NF(GPP_R2, NATIVE, DEEP, NF1),
438 /* R3: HDA SDI */
439 PAD_CFG_NF(GPP_R3, NATIVE, DEEP, NF1),
440 /* R4: HDA Reset */
441 PAD_CFG_NF(GPP_R4, NATIVE, DEEP, NF1),
442 /* R5: MiPi Cam Reset */
443 PAD_NC(GPP_R5, NONE),
444 /* R6: Not Connected */
445 PAD_NC(GPP_R6, NONE),
446 /* R7: Not Connected */
447 PAD_NC(GPP_R7, NONE),
450 const struct pad_config *variant_gpio_table(size_t *num)
452 *num = ARRAY_SIZE(gpio_table);
453 return gpio_table;