soc/mediatek/mt8196: Initialize SSPM
[coreboot.git] / src / mainboard / lenovo / thinkcentre_m710s / gpio.h
bloba1acba7c9ceebe3f1ea8a26a15de136e1fb10265
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #ifndef CFG_GPIO_H
4 #define CFG_GPIO_H
6 #include <gpio.h>
8 static const struct pad_config gpio_table[] = {
9 /* ------- GPIO Community 0 ------- */
11 /* ------- GPIO Group GPP_A ------- */
13 PAD_CFG_NF(GPP_A0, NONE, PLTRST, NF1), // KBRST#
14 PAD_CFG_NF(GPP_A1, UP_20K, PLTRST, NF1), // LPC_AD0
15 PAD_CFG_NF(GPP_A2, UP_20K, PLTRST, NF1), // LPC_AD1
16 PAD_CFG_NF(GPP_A3, UP_20K, PLTRST, NF1), // LPC_AD2
17 PAD_CFG_NF(GPP_A4, UP_20K, PLTRST, NF1), // LPC_AD3
18 PAD_CFG_NF(GPP_A5, NONE, PLTRST, NF1), // LPC_FRAME#
19 PAD_CFG_NF(GPP_A6, NONE, PLTRST, NF1), // LPC_SERIRQ
20 PAD_CFG_NF(GPP_A7, NONE, PLTRST, NF1), // LPC_DRQ#0
21 PAD_CFG_NF(GPP_A8, NONE, PLTRST, NF1), // TPM_CLKRUN
22 PAD_CFG_NF(GPP_A9, DN_20K, PLTRST, NF1), // CLK_LPC_24M
23 PAD_CFG_NF(GPP_A10, DN_20K, PLTRST, NF1), // CLK_PCI_24M
24 PAD_CFG_NF(GPP_A11, NONE, PLTRST, NF1), // SIO_PME#
25 PAD_CFG_GPO(GPP_A12, 1, PLTRST), // BMBUSY#
26 PAD_CFG_NF(GPP_A13, NONE, DEEP, NF1), // PCH_SUSWARN#
27 PAD_NC(GPP_A14, NONE),
28 PAD_CFG_NF(GPP_A15, UP_20K, DEEP, NF1), // PCH_SUSACK#
29 PAD_NC(GPP_A16, NONE),
30 PAD_NC(GPP_A17, NONE),
31 PAD_NC(GPP_A18, NONE),
32 PAD_NC(GPP_A19, NONE),
33 PAD_CFG_GPO(GPP_A20, 1, PLTRST), // TPM_GPIO
34 PAD_NC(GPP_A21, NONE),
35 PAD_NC(GPP_A22, NONE),
36 PAD_CFG_GPO(GPP_A23, 1, PLTRST), // TPM_EN
38 /* ------- GPIO Group GPP_B ------- */
40 PAD_CFG_GPI_TRIG_OWN(GPP_B0, NONE, PLTRST, OFF, ACPI), // FUSB_G1
41 PAD_CFG_GPI_TRIG_OWN(GPP_B1, NONE, PLTRST, OFF, ACPI), // FUSB_G2
42 PAD_CFG_GPI_TRIG_OWN(GPP_B2, NONE, PLTRST, OFF, ACPI), // VR_ALERT#
43 PAD_NC(GPP_B3, NONE),
44 PAD_CFG_GPI_TRIG_OWN(GPP_B4, NONE, PLTRST, OFF, ACPI), // LPT_DET#
45 PAD_CFG_GPI_TRIG_OWN(GPP_B5, NONE, PLTRST, OFF, ACPI), // COM_GPIO1
46 PAD_CFG_GPI_TRIG_OWN(GPP_B6, NONE, PLTRST, OFF, ACPI), // CLKREQ_WLAN#
47 PAD_CFG_NF(GPP_B7, NONE, DEEP, NF1), // PCIEX16_PRSNT
48 PAD_NC(GPP_B8, NONE), // PCI_PRSNT#
49 PAD_NC(GPP_B9, NONE),
50 PAD_CFG_GPI_TRIG_OWN(GPP_B10, NONE, PLTRST, OFF, ACPI), // CLKREQ_LAN#
51 PAD_NC(GPP_B11, NONE),
52 PAD_CFG_GPO(GPP_B12, 1, DEEP), // SLP_S0#
53 PAD_CFG_NF(GPP_B13, NONE, DEEP, NF1), // PLTRST#
54 PAD_CFG_NF(GPP_B14, DN_20K, PLTRST, NF1), // SPKR
55 PAD_NC(GPP_B15, NONE),
56 PAD_NC(GPP_B16, NONE),
57 PAD_NC(GPP_B17, NONE),
58 PAD_CFG_NF(GPP_B18, NONE, PLTRST, NF1), // LPSS_GSPI0_MOSI
59 PAD_NC(GPP_B19, NONE),
60 PAD_CFG_GPI_SMI(GPP_B20, NONE, DEEP, EDGE_SINGLE, INVERT), // SMI#
61 PAD_CFG_GPI_TRIG_OWN(GPP_B21, NONE, PLTRST, OFF, ACPI), // OE#
62 PAD_CFG_NF(GPP_B22, NONE, PLTRST, NF1), // LPSS_GSPI1_MOSI
63 PAD_CFG_NF(GPP_B23, DN_20K, DEEP, NF2), // EXI_STRAP
65 /* ------- GPIO Community 1 ------- */
67 /* ------- GPIO Group GPP_C ------- */
69 PAD_CFG_NF(GPP_C0, NONE, DEEP, NF1), // SMBCLK
70 PAD_CFG_NF(GPP_C1, NONE, DEEP, NF1), // SMBDATA
71 PAD_CFG_NF(GPP_C2, NONE, DEEP, NF1), // TLS_STRAP
72 PAD_CFG_NF(GPP_C3, NONE, DEEP, NF1), // SML0_CLK
73 PAD_CFG_NF(GPP_C4, NONE, DEEP, NF1), // SML0_DATA
74 PAD_CFG_GPI_TRIG_OWN(GPP_C5, DN_20K, DEEP, OFF, ACPI), // ESPI_LPC_STRAP
75 /* GPP_C6 - RESERVED */ // SML1_CLK
76 /* GPP_C7 - RESERVED */ // SML1_DATA
77 PAD_NC(GPP_C8, NONE),
78 PAD_NC(GPP_C9, NONE),
79 PAD_NC(GPP_C10, NONE),
80 PAD_NC(GPP_C11, NONE),
81 PAD_CFG_GPO(GPP_C12, 1, PLTRST), // TPM_DISABLE
82 PAD_CFG_GPO(GPP_C13, 0, PLTRST), // SSD_SATA_DEVSLP
83 PAD_CFG_GPI_TRIG_OWN(GPP_C14, NONE, PLTRST, OFF, ACPI), // TPM_PRESENT#
84 PAD_CFG_GPI_TRIG_OWN(GPP_C15, NONE, PLTRST, OFF, ACPI), // M2_SSD_DET#
85 PAD_NC(GPP_C16, NONE),
86 PAD_NC(GPP_C17, NONE),
87 PAD_NC(GPP_C18, NONE),
88 PAD_NC(GPP_C19, NONE),
89 PAD_NC(GPP_C20, NONE),
90 PAD_NC(GPP_C21, NONE), // UART2_TXD
91 PAD_NC(GPP_C22, NONE),
92 PAD_NC(GPP_C23, NONE),
94 /* ------- GPIO Group GPP_D ------- */
96 PAD_NC(GPP_D0, NONE),
97 PAD_NC(GPP_D1, NONE),
98 PAD_CFG_GPI_TRIG_OWN(GPP_D2, NONE, PLTRST, OFF, ACPI), // PD_PCH_GPP_D_2
99 PAD_CFG_GPI_TRIG_OWN(GPP_D3, NONE, PLTRST, OFF, ACPI), // PD_PCH_GPP_D_3
100 PAD_NC(GPP_D4, NONE),
101 PAD_NC(GPP_D5, NONE),
102 PAD_NC(GPP_D6, NONE),
103 PAD_NC(GPP_D7, NONE),
104 PAD_NC(GPP_D8, NONE),
105 PAD_NC(GPP_D9, NONE),
106 PAD_NC(GPP_D10, NONE),
107 PAD_NC(GPP_D11, NONE),
108 PAD_NC(GPP_D12, NONE),
109 PAD_NC(GPP_D13, NONE),
110 PAD_CFG_GPO(GPP_D14, 0, PLTRST), // GPP_D14
111 PAD_NC(GPP_D15, NONE),
112 PAD_CFG_GPI_TRIG_OWN(GPP_D16, NONE, PLTRST, OFF, ACPI), // GPP_D16
113 PAD_NC(GPP_D17, NONE),
114 PAD_NC(GPP_D18, NONE),
115 PAD_NC(GPP_D19, NONE),
116 PAD_NC(GPP_D20, NONE),
117 PAD_NC(GPP_D21, NONE),
118 PAD_NC(GPP_D22, NONE),
119 PAD_NC(GPP_D23, NONE),
121 /* ------- GPIO Group GPP_E ------- */
123 PAD_NC(GPP_E0, NONE),
124 PAD_NC(GPP_E1, NONE),
125 PAD_NC(GPP_E2, NONE),
126 PAD_NC(GPP_E3, NONE),
127 PAD_NC(GPP_E4, NONE),
128 PAD_NC(GPP_E5, NONE),
129 PAD_NC(GPP_E6, NONE),
130 PAD_NC(GPP_E7, NONE),
131 PAD_CFG_NF(GPP_E8, NONE, PLTRST, NF1), // SATA_LED#
132 PAD_CFG_NF(GPP_E9, NONE, DEEP, NF1), // USB_OC1#
133 PAD_CFG_NF(GPP_E10, NONE, DEEP, NF1), // USB_OC2#
134 PAD_CFG_NF(GPP_E11, NONE, DEEP, NF1), // USB_OC3#
135 PAD_CFG_GPO(GPP_E12, 1, DEEP), // VISACH2_D3
137 /* ------- GPIO Group GPP_F ------- */
139 PAD_NC(GPP_F0, NONE),
140 PAD_NC(GPP_F1, NONE),
141 PAD_NC(GPP_F2, NONE),
142 PAD_NC(GPP_F3, NONE),
143 PAD_NC(GPP_F4, NONE),
144 PAD_NC(GPP_F5, NONE),
145 PAD_NC(GPP_F6, NONE),
146 PAD_NC(GPP_F7, NONE),
147 PAD_NC(GPP_F8, NONE),
148 PAD_NC(GPP_F9, NONE),
149 PAD_CFG_GPI_APIC_HIGH(GPP_F10, NONE, PLTRST), // PCH_CONFIG_JUMPER
150 PAD_CFG_GPI_TRIG_OWN(GPP_F11, NONE, PLTRST, OFF, ACPI), // PCH_RSVD
151 PAD_CFG_GPI_APIC_LOW(GPP_F12, NONE, PLTRST), // SV_ADVANCE_GP48
152 PAD_CFG_GPI_APIC_HIGH(GPP_F13, NONE, PLTRST), // GP39_GFX_CRB_DETECT
153 PAD_CFG_GPI_APIC_LOW(GPP_F14, NONE, DEEP), // H_SKTOCC#
154 PAD_CFG_NF(GPP_F15, NONE, DEEP, NF1), // USB_OC4#
155 PAD_CFG_NF(GPP_F16, NONE, DEEP, NF1), // USB_OC5#
156 PAD_CFG_NF(GPP_F17, NONE, DEEP, NF1), // USB_OC6#
157 PAD_CFG_NF(GPP_F18, NONE, PLTRST, NF1), // USB2_OCB7
158 PAD_NC(GPP_F19, NONE),
159 PAD_NC(GPP_F20, NONE),
160 PAD_NC(GPP_F21, NONE),
161 PAD_CFG_GPO(GPP_F22, 1, PLTRST), // PCH_GPIO_F22
162 PAD_NC(GPP_F23, NONE),
164 /* ------- GPIO Group GPP_G ------- */
166 PAD_CFG_GPI_TRIG_OWN(GPP_G0, NONE, PLTRST, OFF, ACPI), // BRD_ID0
167 PAD_CFG_GPI_TRIG_OWN(GPP_G1, NONE, PLTRST, OFF, ACPI), // BRD_ID1
168 PAD_CFG_GPI_TRIG_OWN(GPP_G2, NONE, PLTRST, OFF, ACPI), // BRD_ID2
169 PAD_CFG_GPI_TRIG_OWN(GPP_G3, NONE, PLTRST, OFF, ACPI), // BRD_ID3
170 PAD_CFG_GPI_TRIG_OWN(GPP_G4, NONE, PLTRST, OFF, ACPI), // BRD_ID4
171 PAD_CFG_GPI_TRIG_OWN(GPP_G5, NONE, PLTRST, OFF, ACPI), // BRD_ID5
172 PAD_NC(GPP_G6, NONE),
173 PAD_NC(GPP_G7, NONE),
174 PAD_NC(GPP_G8, NONE),
175 PAD_NC(GPP_G9, NONE),
176 PAD_NC(GPP_G10, NONE),
177 PAD_NC(GPP_G11, NONE),
178 PAD_NC(GPP_G12, NONE),
179 PAD_NC(GPP_G13, NONE),
180 PAD_NC(GPP_G14, NONE),
181 PAD_NC(GPP_G15, NONE),
182 PAD_NC(GPP_G16, NONE),
183 PAD_NC(GPP_G17, NONE),
184 PAD_NC(GPP_G18, NONE),
185 PAD_NC(GPP_G19, NONE), // SMI#
186 PAD_CFG_GPO(GPP_G20, 1, PLTRST), // PCH_VGA_HOT_PLUG#
187 PAD_CFG_GPI_SCI(GPP_G21, NONE, DEEP, EDGE_SINGLE, INVERT), // SPI_TPM_PIRQ
188 PAD_CFG_GPI_TRIG_OWN(GPP_G22, NONE, PLTRST, OFF, ACPI), // GPP_G22
189 PAD_CFG_GPI_TRIG_OWN(GPP_G23, NONE, PLTRST, OFF, ACPI), // GPP_G23
191 /* ------- GPIO Group GPP_H ------- */
193 PAD_CFG_NF(GPP_H0, NONE, PLTRST, NF1), // CLKREQ_SSD#
194 PAD_CFG_GPI_TRIG_OWN(GPP_H1, NONE, PLTRST, OFF, ACPI), // PCIE1_PRSNT#
195 PAD_CFG_GPI_TRIG_OWN(GPP_H2, NONE, PLTRST, OFF, ACPI), // PCIE2_PRSNT#
196 PAD_NC(GPP_H3, NONE),
197 PAD_CFG_GPO(GPP_H4, 1, PLTRST), // CHARGE_EN
198 PAD_NC(GPP_H5, NONE),
199 PAD_NC(GPP_H6, NONE),
200 PAD_NC(GPP_H7, NONE),
201 PAD_NC(GPP_H8, NONE),
202 PAD_NC(GPP_H9, NONE),
203 PAD_CFG_GPO(GPP_H10, 1, PLTRST), // WIRELESS_EN1
204 PAD_CFG_GPO(GPP_H11, 1, PLTRST), // WIRELESS_EN2
205 PAD_CFG_GPO(GPP_H12, 1, PLTRST), // GPP_H12
206 PAD_CFG_GPI_TRIG_OWN(GPP_H13, NONE, PLTRST, OFF, ACPI), // SEL#
207 PAD_NC(GPP_H14, NONE),
208 PAD_NC(GPP_H15, NONE),
209 PAD_NC(GPP_H16, NONE),
210 PAD_NC(GPP_H17, NONE),
211 PAD_NC(GPP_H18, NONE),
212 PAD_NC(GPP_H19, NONE),
213 PAD_CFG_GPI_TRIG_OWN(GPP_H20, NONE, PLTRST, OFF, ACPI), // CHASSIS_ID1
214 PAD_CFG_GPI_TRIG_OWN(GPP_H21, NONE, PLTRST, OFF, ACPI), // CHASSIS_ID2
215 PAD_NC(GPP_H22, NONE),
216 PAD_CFG_GPI_TRIG_OWN(GPP_H23, NONE, DEEP, OFF, ACPI), // CLR_CMOS
218 /* ------- GPIO Community 2 ------- */
220 /* -------- GPIO Group GPD -------- */
222 PAD_CFG_NF(GPD0, NONE, PLTRST, NF1), // PCH_BATLOW#
223 PAD_CFG_NF(GPD1, NONE, PWROK, NF1), // ACPRESENT
224 PAD_CFG_NF(GPD2, NATIVE, PWROK, NF1), // LAN_WAKE#
225 PAD_CFG_NF(GPD3, UP_20K, PWROK, NF1), // PWRBTN#
226 PAD_CFG_NF(GPD4, NONE, PWROK, NF1), // SLP_S3#
227 PAD_CFG_NF(GPD5, NONE, PWROK, NF1), // SLP_S4#
228 PAD_CFG_NF(GPD6, NONE, PWROK, NF1), // SLP_A#
229 PAD_CFG_GPO(GPD7, 1, PWROK), // ME_DIS
230 PAD_CFG_NF(GPD8, NONE, PWROK, NF1), // SUS_CLK
231 PAD_CFG_NF(GPD9, NONE, PWROK, NF1), // SLP_WLAN#
232 PAD_CFG_NF(GPD10, NONE, PWROK, NF1), // SLP_S5#
233 PAD_CFG_GPO(GPD11, 1, PWROK), // LAN_DISABLE#
235 /* ------- GPIO Community 3 ------- */
237 /* ------- GPIO Group GPP_I ------- */
239 PAD_CFG_NF(GPP_I0, NONE, PLTRST, NF1), // VGA_HPD
240 PAD_CFG_NF(GPP_I1, NONE, PLTRST, NF1), // DP1_HPD
241 PAD_CFG_NF(GPP_I2, NONE, PLTRST, NF1), // DP2_HPD
242 PAD_CFG_NF(GPP_I3, NONE, PLTRST, NF1), // GPP_I3
243 PAD_CFG_NF(GPP_I4, NONE, PLTRST, NF1), // GPP_I4
244 PAD_CFG_GPO(GPP_I5, 1, PLTRST), // GPP_I5
245 PAD_CFG_NF(GPP_I6, DN_20K, PLTRST, NF1), // GPP_I6
246 PAD_CFG_NF(GPP_I7, NONE, PLTRST, NF1), // DP1_DDC_SCL
247 PAD_CFG_NF(GPP_I8, DN_20K, PLTRST, NF1), // DP1_DDC_SDA
248 PAD_CFG_NF(GPP_I9, NONE, PLTRST, NF1), // DP2_DDC_SCL
249 PAD_CFG_NF(GPP_I10, DN_20K, PLTRST, NF1), // DP2_DDC_SDA
252 #endif /* CFG_GPIO_H */