1 /* SPDX-License-Identifier: GPL-2.0-only */
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
),
13 const struct pad_config
*variant_early_gpio_table(size_t *num
)
15 *num
= ARRAY_SIZE(early_gpio_table
);
16 return early_gpio_table
;
19 /* Pad configuration in ramstage. */
20 const struct pad_config gpio_table
[] = {
21 /* GPD0: Battery Low */
22 PAD_CFG_NF(GPD0
, NONE
, DEEP
, NF1
),
23 /* GPD1: Charger Connected */
24 PAD_CFG_NF(GPD1
, NONE
, DEEP
, NF1
),
27 /* GPD3: Power Button */
28 PAD_CFG_NF(GPD3
, UP_20K
, DEEP
, NF1
),
30 PAD_CFG_NF(GPD4
, NONE
, DEEP
, NF1
),
32 PAD_CFG_NF(GPD5
, NONE
, DEEP
, NF1
),
34 PAD_CFG_NF(GPD6
, NONE
, DEEP
, NF1
),
35 /* GPD7: Power Adapter Disable */
36 PAD_CFG_GPO(GPD7
, 0, PWROK
),
37 /* GPD8: Suspend Clock */
38 PAD_CFG_NF(GPD8
, NONE
, DEEP
, NF1
),
39 /* GPD9: Wireless LAN Sleep */
40 PAD_CFG_NF(GPD9
, NONE
, DEEP
, NF1
),
42 PAD_CFG_NF(GPD10
, NONE
, DEEP
, NF1
),
43 /* GPD11: LAN PHY Enable */
51 /* A5: Not Connected */
53 /* A6: Not Connected */
55 /* A7: Embedded Controller SCI */
57 /* A8: Not Connected */
61 /* A11: Not Connected */
62 PAD_NC(GPP_A11
, NONE
),
63 /* A12: PCH M.2 SSD PEDET */
64 PAD_NC(GPP_A12
, NONE
),
65 /* A13: BlueTooth RF Kill */
66 PAD_NC(GPP_A13
, NONE
),
67 /* A14: Test Point 45 */
68 PAD_NC(GPP_A14
, NONE
),
69 /* A15: Test Point 52 */
70 PAD_NC(GPP_A15
, NONE
),
71 /* A16: USB OverCurrent 3 */
72 PAD_CFG_NF(GPP_A16
, NONE
, DEEP
, NF1
),
73 /* A17: Not Connected */
74 PAD_NC(GPP_A17
, NONE
),
75 /* A18: DDI B DP HPD */
76 PAD_CFG_NF(GPP_A18
, NONE
, DEEP
, NF1
),
77 /* A19: Not Connected */
78 PAD_NC(GPP_A19
, NONE
),
79 /* A20: Test Point 44 */
80 PAD_NC(GPP_A20
, NONE
),
81 /* A21: Fingerprint Reader Interrupt */
82 PAD_NC(GPP_A21
, NONE
),
83 /* A22: Fingerprint Reader Reset */
84 PAD_NC(GPP_A22
, NONE
),
85 /* A23: Not Connected */
86 PAD_NC(GPP_A23
, NONE
),
89 /* B0: Core Vendor ID 0 */
90 PAD_CFG_NF(GPP_B0
, NONE
, DEEP
, NF1
),
91 /* B1: Core Vendor ID 1 */
92 PAD_CFG_NF(GPP_B1
, NONE
, DEEP
, NF1
),
94 PAD_CFG_GPI_SCI(GPP_B2
, NONE
, PLTRST
, EDGE_SINGLE
, INVERT
),
95 /* B3: Not Connected */
97 /* B4: Not Connected */
99 /* B5: I2C 2 SDA Touch Panel SDA */
100 PAD_NC(GPP_B5
, NONE
),
101 /* B6: I2C 2 SCL Touch Panel Clock */
102 PAD_NC(GPP_B6
, NONE
),
103 /* B7: I2C 3 SDA Test Point 15 */
104 PAD_NC(GPP_B7
, NONE
),
105 /* B8: I2C 3 SCL Test Point 16 */
106 PAD_NC(GPP_B8
, NONE
),
107 /* B9: Not Connected */
108 PAD_NC(GPP_B9
, NONE
),
109 /* B10: Not Connected */
110 PAD_NC(GPP_B10
, NONE
),
111 /* B11: I2C PMC PD Interrupt */
112 PAD_CFG_NF(GPP_B11
, NONE
, DEEP
, NF1
),
114 PAD_CFG_NF(GPP_B12
, NONE
, DEEP
, NF1
),
116 PAD_CFG_NF(GPP_B13
, NONE
, DEEP
, NF1
),
117 /* B14: Top Swap Override Weak Internal PD 20K
120 PAD_CFG_GPO(GPP_B14
, 0, PLTRST
),
121 /* B15: Not Connected */
122 PAD_NC(GPP_B15
, NONE
),
123 /* B16: Not Connected */
124 PAD_NC(GPP_B16
, NONE
),
125 /* B17: Not Connected */
126 PAD_NC(GPP_B17
, NONE
),
127 /* B18: Reboot Support Weak Internal PD 20K
130 PAD_NC(GPP_B18
, NONE
),
131 /* B19: Not Connected */
132 PAD_NC(GPP_B19
, NONE
),
133 /* B20: Not Connected */
134 PAD_NC(GPP_B20
, NONE
),
135 /* B21: Not Connected */
136 PAD_NC(GPP_B21
, NONE
),
137 /* B22: Not Connected */
138 PAD_NC(GPP_B22
, NONE
),
139 /* B23: Not used MiPi Camera */
140 PAD_NC(GPP_B23
, NONE
),
141 /* B24: Not Connected */
142 PAD_NC(GPP_B24
, NONE
),
143 /* B25: Not Connected */
144 PAD_NC(GPP_B25
, NONE
),
147 PAD_CFG_NF(GPP_C0
, NONE
, DEEP
, NF1
),
149 PAD_CFG_NF(GPP_C1
, NONE
, DEEP
, NF1
),
150 /* C2: TLS Confidentiality Weak Internal PD 20K
153 PAD_CFG_GPO(GPP_C2
, 1, PLTRST
),
154 /* C3: SML 0 Clock */
155 PAD_CFG_NF(GPP_C3
, NONE
, DEEP
, NF1
),
157 PAD_CFG_NF(GPP_C4
, NONE
, DEEP
, NF1
),
158 /* C5: Boot Strap Weak Internal PD 20K
161 PAD_CFG_GPO(GPP_C5
, 0, DEEP
),
162 /* C6: SML 1 Clock */
163 PAD_CFG_NF(GPP_C6
, NONE
, DEEP
, NF1
),
165 PAD_CFG_NF(GPP_C7
, NONE
, DEEP
, NF1
),
166 /* C8: Not Connected */
167 PAD_NC(GPP_C8
, NONE
),
168 /* C9: Not Connected */
169 PAD_NC(GPP_C9
, NONE
),
170 /* C10: Not Connected */
171 PAD_NC(GPP_C10
, NONE
),
172 /* C11: Not Connected */
173 PAD_NC(GPP_C11
, NONE
),
174 /* C12: Not Connected */
175 PAD_NC(GPP_C12
, NONE
),
176 /* C13: Not Connected */
177 PAD_NC(GPP_C13
, NONE
),
178 /* C14: Not Connected */
179 PAD_NC(GPP_C14
, NONE
),
180 /* C15: Not Connected */
181 PAD_NC(GPP_C15
, NONE
),
182 /* C16: Not Connected */
183 PAD_NC(GPP_C16
, NONE
),
184 /* C17: Not Connected */
185 PAD_NC(GPP_C17
, NONE
),
186 /* C18: Not Connected */
187 PAD_NC(GPP_C18
, NONE
),
188 /* C19: Not Connected */
189 PAD_NC(GPP_C19
, NONE
),
190 /* C20: Not Connected */
191 PAD_NC(GPP_C20
, NONE
),
192 /* C21: Not Connected */
193 PAD_NC(GPP_C21
, NONE
),
194 /* C22: Not Connected */
195 PAD_NC(GPP_C22
, NONE
),
196 /* C23: Not Connected */
197 PAD_NC(GPP_C23
, NONE
),
199 /* D0: Not used Audio ID 0 */
200 PAD_NC(GPP_D0
, NONE
),
201 /* D1: Not used Audio ID 1 */
202 PAD_NC(GPP_D1
, NONE
),
203 /* D2: Not used Audio ID 2 */
204 PAD_NC(GPP_D2
, NONE
),
205 /* D3: Not Connected */
206 PAD_NC(GPP_D3
, NONE
),
207 /* D4: Not Connected */
208 PAD_NC(GPP_D4
, NONE
),
209 /* D5: Clock Request 0 */
210 PAD_NC(GPP_D5
, NONE
),
211 /* D6: Clock Request 1 PCH M.2 SSD */
212 PAD_NC(GPP_D6
, NONE
),
213 /* D7: Clock Request 2 Wireless LAN */
214 PAD_CFG_NF(GPP_D7
, NONE
, DEEP
, NF1
),
215 /* D8: Clock Request 3 LAN */
216 PAD_NC(GPP_D8
, NONE
),
218 PAD_NC(GPP_D9
, NONE
),
219 /* D10: GSPI 2 Clock */
220 PAD_NC(GPP_D10
, NONE
),
221 /* D11: GSPI 2 MISO FPS */
222 PAD_NC(GPP_D11
, NONE
),
223 /* D12: GSPI 2 MOSI FPS */
224 PAD_NC(GPP_D12
, NONE
),
225 /* D13: Wireless LAN Wake */
226 PAD_CFG_GPO(GPP_D13
, 1, PLTRST
),
227 /* D14: CPU M.2 SSD Power Enable */
228 PAD_CFG_GPO(GPP_D14
, 1, PLTRST
),
229 /* D15: Not Connected */
230 PAD_NC(GPP_D15
, NONE
),
231 /* D16: PCH M.2 SSD Power Enable */
232 PAD_NC(GPP_D16
, NONE
),
233 /* D17: Not used Fingerprint ID */
234 PAD_NC(GPP_D17
, NONE
),
235 /* D18: Not Connected */
236 PAD_NC(GPP_D18
, NONE
),
237 /* D19: Test Point 21 */
238 PAD_NC(GPP_D19
, NONE
),
240 /* E0: SATA x PCIe */
241 PAD_NC(GPP_E0
, NONE
),
242 /* E1: Not used Accelerometer Interrupt */
243 PAD_NC(GPP_E1
, NONE
),
244 /* E2: Not Connected */
245 PAD_CFG_GPO(GPP_E2
, 1, PLTRST
),
246 /* E3: WiFi RF Kill */
247 PAD_NC(GPP_E3
, NONE
),
248 /* E4: Retimer Force Power */
249 PAD_CFG_GPO(GPP_E4
, 0, PLTRST
),
250 /* E5: Not Connected */
251 PAD_NC(GPP_E5
, NONE
),
252 /* E6: JTAG ODT No internal PD
255 PAD_CFG_GPO(GPP_E6
, 0, DEEP
),
256 /* E7: Embedded Controller SMI */
257 PAD_NC(GPP_E7
, NONE
),
259 PAD_CFG_NF(GPP_E8
, NONE
, DEEP
, NF1
),
260 /* E9: USB OverCurrent 0 */
261 PAD_CFG_NF(GPP_E9
, NONE
, DEEP
, NF1
),
262 /* E10: PWD Amplifier Input */
263 PAD_CFG_GPO(GPP_E10
, 0, PLTRST
),
265 PAD_CFG_NF(GPP_E11
, NONE
, DEEP
, NF1
),
266 /* E12: Touchpad Interrupt */
267 PAD_CFG_GPI_APIC_LOW(GPP_E12
, NONE
, PLTRST
),
268 /* E13: Not connected */
269 PAD_NC(GPP_E13
, NONE
),
271 PAD_CFG_NF(GPP_E14
, NONE
, DEEP
, NF1
),
272 /* E15: Not Connected */
273 PAD_NC(GPP_E15
, NONE
),
274 /* E16: Not Connected */
275 PAD_NC(GPP_E16
, NONE
),
276 /* E17: Not Connected */
277 PAD_NC(GPP_E17
, NONE
),
278 /* E18: Thunderbolt LSX TXD */
279 PAD_NC(GPP_E18
, NONE
),
280 /* E19: Thunderbolt LSX RXD */
281 PAD_NC(GPP_E19
, NONE
),
282 /* E20: Not Connected */
283 PAD_NC(GPP_E20
, NONE
),
284 /* E21: Not Connected */
285 PAD_NC(GPP_E21
, NONE
),
286 /* E22: Not Connected */
287 PAD_NC(GPP_E22
, NONE
),
288 /* E23: Not Connected */
289 PAD_NC(GPP_E23
, NONE
),
291 /* F0: CNV BRI Data */
292 PAD_NC(GPP_F0
, NONE
),
293 /* F1: CNV BRI Response */
294 PAD_NC(GPP_F1
, NONE
),
295 /* F2: CNV RGI Data */
296 PAD_NC(GPP_F2
, NONE
),
297 /* F3: CNV RGI Response */
298 PAD_NC(GPP_F3
, NONE
),
299 /* F4: CNV RF Reset */
300 PAD_NC(GPP_F4
, NONE
),
301 /* F5: Not used MODEM_CLKREQ */
302 PAD_NC(GPP_F5
, NONE
),
303 /* F6: CNV PA Blanking */
304 PAD_NC(GPP_F6
, NONE
),
305 /* F7: TBT LSX VCCIO Weak Internal PD 20K
308 PAD_NC(GPP_F7
, NONE
),
309 /* F8: Not Connected */
310 PAD_NC(GPP_F8
, NONE
),
311 /* F9: EC Sleep S0 */
312 PAD_NC(GPP_F9
, NONE
),
313 /* F10: Weak Internal PD 20K */
314 PAD_CFG_GPO(GPP_F10
, 1, PLTRST
),
316 PAD_NC(GPP_F11
, NONE
),
317 /* F12: Not Connected */
318 PAD_NC(GPP_F12
, NONE
),
319 /* F13: Not Connected */
320 PAD_NC(GPP_F13
, NONE
),
321 /* F14: Not Connected */
322 PAD_NC(GPP_F14
, NONE
),
323 /* F15: Not used Accelerometer Interrupt 2*/
324 PAD_NC(GPP_F15
, NONE
),
325 /* F16: Not Connected */
326 PAD_NC(GPP_F16
, NONE
),
327 /* F17: Not used Touch Panel Reset */
328 PAD_NC(GPP_F17
, NONE
),
329 /* F18: Not used Touch Panel Interrupt */
330 PAD_NC(GPP_F18
, NONE
),
331 /* F19: Not Connected */
332 PAD_NC(GPP_F19
, NONE
),
333 /* F20: CPU M.2 SSD Reset */
334 PAD_CFG_GPO(GPP_F20
, 1, PLTRST
),
336 PAD_CFG_NF(GPP_F21
, NONE
, DEEP
, NF1
),
337 /* F22: Not Connected */
338 PAD_NC(GPP_F22
, NONE
),
339 /* F23: Not Connected */
340 PAD_NC(GPP_F23
, NONE
),
342 /* H0: PCH M.2 SSD Reset */
343 PAD_NC(GPP_H0
, NONE
),
344 /* H1: BFX Strap 2 Bit 3 Weak Internal PD 20K */
345 PAD_CFG_GPO(GPP_H1
, 1, PLTRST
),
346 /* H2: Wireless LAN Reset */
347 PAD_CFG_GPO(GPP_H2
, 1, PLTRST
),
348 /* H3: Not Connected */
349 PAD_NC(GPP_H3
, NONE
),
350 /* H4: I2C 0 SDA Touchpad */
351 PAD_CFG_NF(GPP_H4
, NONE
, DEEP
, NF1
),
352 /* H5: I2C 0 SDL Touchpad */
353 PAD_CFG_NF(GPP_H5
, NONE
, DEEP
, NF1
),
354 /* H6: Not Connected */
355 PAD_NC(GPP_H6
, NONE
),
356 /* H7: Not Connected */
357 PAD_NC(GPP_H7
, NONE
),
358 /* H8: I2C 4 SDA GSensor */
359 PAD_NC(GPP_H8
, NONE
),
360 /* H9: I2C 4 SDL GSensor */
361 PAD_NC(GPP_H9
, NONE
),
362 /* H12: Not Connected */
363 PAD_NC(GPP_H12
, NONE
),
364 /* H13: PCH M.2 SSD Device Sleep */
365 PAD_NC(GPP_H13
, NONE
),
366 /* H14: Not Connected */
367 PAD_NC(GPP_H14
, NONE
),
368 /* H15: DDPB Control Clock */
369 PAD_CFG_NF(GPP_H15
, NONE
, DEEP
, NF1
),
370 /* H16: Not Connected */
371 PAD_NC(GPP_H16
, NONE
),
372 /* H17: DDPB Control Data */
373 PAD_CFG_NF(GPP_H17
, NONE
, DEEP
, NF1
),
374 /* H18: CPI C10 Gate */
375 PAD_CFG_NF(GPP_H18
, NONE
, DEEP
, NF1
),
376 /* H19: Clock Request 4 CPU M.2 SSD */
377 PAD_CFG_NF(GPP_H19
, NONE
, DEEP
, NF1
),
378 /* H20: Not Connected */
379 PAD_NC(GPP_H20
, NONE
),
380 /* H21: Not Connected */
381 PAD_NC(GPP_H21
, NONE
),
382 /* H22: Not Connected */
383 PAD_NC(GPP_H22
, NONE
),
384 /* H23: Clock Request 5 */
385 PAD_NC(GPP_H23
, NONE
),
387 /* S0: Not Connected */
388 PAD_NC(GPP_S0
, NONE
),
389 /* S1: Not Connected */
390 PAD_NC(GPP_S1
, NONE
),
392 PAD_CFG_NF(GPP_S2
, NONE
, DEEP
, NF2
),
394 PAD_CFG_NF(GPP_S3
, NONE
, DEEP
, NF2
),
395 /* S4: Not Connected */
396 PAD_NC(GPP_S4
, NONE
),
397 /* S5: Not Connected */
398 PAD_NC(GPP_S5
, NONE
),
399 /* S6: Not Connected */
400 PAD_NC(GPP_S6
, NONE
),
401 /* S7: Not Connected */
402 PAD_NC(GPP_S7
, NONE
),
404 /* T0: Not Connected */
405 PAD_NC(GPP_T0
, NONE
),
406 /* T1: Not Connected */
407 PAD_NC(GPP_T1
, NONE
),
408 /* T2: Not Connected */
409 PAD_NC(GPP_T2
, NONE
),
410 /* T3: Not Connected */
411 PAD_NC(GPP_T3
, NONE
),
412 /* T4: Not Connected */
413 PAD_NC(GPP_T4
, NONE
),
414 /* T5: Not Connected */
415 PAD_NC(GPP_T5
, NONE
),
416 /* T6: Not Connected */
417 PAD_NC(GPP_T6
, NONE
),
418 /* T7: Not Connected */
419 PAD_NC(GPP_T7
, NONE
),
420 /* T8: Not Connected */
421 PAD_NC(GPP_T8
, NONE
),
422 /* T9: Not Connected */
423 PAD_NC(GPP_T9
, NONE
),
424 /* T10: Not Connected */
425 PAD_NC(GPP_T10
, NONE
),
426 /* T11: Not Connected */
427 PAD_NC(GPP_T11
, NONE
),
428 /* T12: Not Connected */
429 PAD_NC(GPP_T12
, NONE
),
430 /* T13: Not Connected */
431 PAD_NC(GPP_T13
, NONE
),
432 /* T14: Not Connected */
433 PAD_NC(GPP_T14
, NONE
),
434 /* T15: Not Connected */
435 PAD_NC(GPP_T15
, NONE
),
438 PAD_CFG_NF(GPP_R0
, NATIVE
, DEEP
, NF1
),
440 PAD_CFG_NF(GPP_R1
, NATIVE
, DEEP
, NF1
),
442 PAD_CFG_NF(GPP_R2
, NATIVE
, DEEP
, NF1
),
444 PAD_CFG_NF(GPP_R3
, NATIVE
, DEEP
, NF1
),
446 PAD_CFG_NF(GPP_R4
, NATIVE
, DEEP
, NF1
),
447 /* R5: MiPi Cam Reset */
448 PAD_NC(GPP_R5
, NONE
),
449 /* R6: Not Connected */
450 PAD_NC(GPP_R6
, NONE
),
451 /* R7: Not Connected */
452 PAD_NC(GPP_R7
, NONE
),
455 const struct pad_config
*variant_gpio_table(size_t *num
)
457 *num
= ARRAY_SIZE(gpio_table
);