OpenBIC
OpenSource Bridge-IC
plat_gpio.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef PLAT_GPIO_H
18#define PLAT_GPIO_H
19
20#include "hal_gpio.h"
21#include "plat_class.h"
22
23// gpio_cfg(chip, number, is_init, direction, status, int_type, int_callback)
24// dedicate gpio A0~A7, B0~B7, C0~C7, D0~D7, E0~E7, total 40 gpios
25// Default name: RESERVE_GPIOH0
26
27// clang-format off
28
29#define OPA_name_gpioA \
30 gpio_name_to_num(OPA_CLKBUF_E1S_2_OE_N) \
31 gpio_name_to_num(OPA_CLKBUF_E1S_1_OE_N) \
32 gpio_name_to_num(OPA_CLKBUF_E1S_0_OE_N) \
33 gpio_name_to_num(OPA_CLKBUF_RTM_OE_N) \
34 gpio_name_to_num(OPA_CLKBUF_RISER_OE_N) \
35 gpio_name_to_num(OPA_PWRGD_P12V_E1S_2_R) \
36 gpio_name_to_num(OPA_PWRGD_P12V_E1S_1_R) \
37 gpio_name_to_num(OPA_PWRGD_P12V_E1S_0_R)
38
39#define OPA_name_gpioB \
40 gpio_name_to_num(OPA_PWRGD_EXP_PWR) \
41 gpio_name_to_num(OPA_RESERVE_GPIOB1) \
42 gpio_name_to_num(OPA_E1S_2_PRSNT_N) \
43 gpio_name_to_num(OPA_E1S_1_PRSNT_N) \
44 gpio_name_to_num(OPA_E1S_0_PRSNT_N) \
45 gpio_name_to_num(OPA_PWRGD_P3V3_STBY) \
46 gpio_name_to_num(OPA_PWRGD_P1V2_STBY ) \
47 gpio_name_to_num(OPA_SMB_TMP_SENSOR_ALT_N)
48
49#define OPA_name_gpioC \
50 gpio_name_to_num(OPA_PWRGD_P3V3_E1S_2_R) \
51 gpio_name_to_num(OPA_PWRGD_P3V3_E1S_1_R) \
52 gpio_name_to_num(OPA_PWRGD_P3V3_E1S_0_R) \
53 gpio_name_to_num(OPA_PWRGD_P1V8_VR) \
54 gpio_name_to_num(OPA_PWRGD_P0V9_VR) \
55 gpio_name_to_num(OPA_BOARD_REV_0) \
56 gpio_name_to_num(OPA_BOARD_REV_1) \
57 gpio_name_to_num(OPA_BOARD_REV_2)
58
59#define OPA_name_gpioD \
60 gpio_name_to_num(OPA_PWRGD_P12V_MAIN) \
61 gpio_name_to_num(OPA_RST_SMBRST_BIC_E1S_2_N) \
62 gpio_name_to_num(OPA_RST_SMBRST_BIC_E1S_1_N) \
63 gpio_name_to_num(OPA_RST_SMBRST_BIC_E1S_0_N) \
64 gpio_name_to_num(OPA_RESET_BIC_RTM_N) \
65 gpio_name_to_num(OPA_RST_USB_HUB_N) \
66 gpio_name_to_num(OPA_PERST_BIC_RTM_N) \
67 gpio_name_to_num(OPA_RESERVE_GPIOD7)
68
69#define OPA_name_gpioE \
70 gpio_name_to_num(OPA_PERST_E1S_2_N) \
71 gpio_name_to_num(OPA_PERST_E1S_1_N) \
72 gpio_name_to_num(OPA_PERST_E1S_0_N) \
73 gpio_name_to_num(OPA_E1S_2_P12V_POWER_EN) \
74 gpio_name_to_num(OPA_E1S_1_P12V_POWER_EN) \
75 gpio_name_to_num(OPA_E1S_0_P12V_POWER_EN) \
76 gpio_name_to_num(OPA_EN_P0V9_VR) \
77 gpio_name_to_num(OPA_RESERVE_GPIOE7)
78
79#define OPA_name_gpioF \
80 gpio_name_to_num(OPA_SMB_PCIE_EXPB_ALERT_N) \
81 gpio_name_to_num(OPA_RST_PCIE_EXP_PERST0_N) \
82 gpio_name_to_num(OPA_CLKBUF_PWRDOWN_R_N) \
83 gpio_name_to_num(OPA_FM_PWRDIS_E1S_2) \
84 gpio_name_to_num(OPA_FM_PWRDIS_E1S_1) \
85 gpio_name_to_num(OPA_FM_PWRDIS_E1S_0) \
86 gpio_name_to_num(OPA_SMB_PCIE_EXP1_ALERT_N) \
87 gpio_name_to_num(OPA_RESERVE_GPIOF7)
88
89#define OPA_name_gpioG \
90 gpio_name_to_num(OPA_SMB_E1S_2_INA233_ALT_N) \
91 gpio_name_to_num(OPA_SMB_E1S_1_INA233_ALT_N) \
92 gpio_name_to_num(OPA_SMB_E1S_0_INA233_ALT_N) \
93 gpio_name_to_num(OPA_SMB_P12V_EDGE_INA233_ALT_N) \
94 gpio_name_to_num(OPA_RTM_IOEXP_INT_N) \
95 gpio_name_to_num(OPA_LED_E1S_2_ATTN_R) \
96 gpio_name_to_num(OPA_LED_E1S_1_ATTN_R) \
97 gpio_name_to_num(OPA_LED_E1S_0_ATTN_R)
98
99#define OPA_name_gpioH \
100 gpio_name_to_num(OPA_RESERVE_GPIOH0) \
101 gpio_name_to_num(OPA_RESERVE_GPIOH1) \
102 gpio_name_to_num(OPA_HUB1_MASTER_SELECT_R) \
103 gpio_name_to_num(OPA_SMB_IOEXP_ALT_N)\
104 gpio_name_to_num(OPA_RESERVE_GPIOH4) \
105 gpio_name_to_num(OPA_RESERVE_GPIOH5) \
106 gpio_name_to_num(OPA_RESERVE_GPIOH6) \
107 gpio_name_to_num(OPA_RESERVE_GPIOH7)
108
109#define OPA_name_gpioI \
110 gpio_name_to_num(OPA_RESERVE_GPIOI0) \
111 gpio_name_to_num(OPA_RESERVE_GPIOI1) \
112 gpio_name_to_num(OPA_RESERVE_GPIOI2) \
113 gpio_name_to_num(OPA_RESERVE_GPIOI3) \
114 gpio_name_to_num(OPA_RESERVE_GPIOI4) \
115 gpio_name_to_num(OPA_RESERVE_GPIOI5) \
116 gpio_name_to_num(OPA_RESERVE_GPIOI6) \
117 gpio_name_to_num(OPA_RESERVE_GPIOI7)
118
119#define OPA_name_gpioJ \
120 gpio_name_to_num(OPA_RESERVE_GPIOJ0) \
121 gpio_name_to_num(OPA_RESERVE_GPIOJ1) \
122 gpio_name_to_num(OPA_RESERVE_GPIOJ2) \
123 gpio_name_to_num(OPA_RESERVE_GPIOJ3) \
124 gpio_name_to_num(OPA_RESERVE_GPIOJ4) \
125 gpio_name_to_num(OPA_RESERVE_GPIOJ5) \
126 gpio_name_to_num(OPA_RESERVE_GPIOJ6) \
127 gpio_name_to_num(OPA_RESERVE_GPIOJ7)
128
129#define OPA_name_gpioK \
130 gpio_name_to_num(OPA_RESERVE_GPIOK0) \
131 gpio_name_to_num(OPA_RESERVE_GPIOK1) \
132 gpio_name_to_num(OPA_RESERVE_GPIOK2) \
133 gpio_name_to_num(OPA_RESERVE_GPIOK3) \
134 gpio_name_to_num(OPA_RESERVE_GPIOK4) \
135 gpio_name_to_num(OPA_RESERVE_GPIOK5) \
136 gpio_name_to_num(OPA_RESERVE_GPIOK6) \
137 gpio_name_to_num(OPA_RESERVE_GPIOK7)
138
139#define OPA_name_gpioL \
140 gpio_name_to_num(OPA_RESERVE_GPIOL0) \
141 gpio_name_to_num(OPA_RESERVE_GPIOL1) \
142 gpio_name_to_num(OPA_E1S_2_P3V3_POWER_EN) \
143 gpio_name_to_num(OPA_E1S_1_P3V3_POWER_EN) \
144 gpio_name_to_num(OPA_E1S_0_P3V3_POWER_EN) \
145 gpio_name_to_num(OPA_RESERVE_GPIOL5) \
146 gpio_name_to_num(OPA_RESERVE_GPIOL6) \
147 gpio_name_to_num(OPA_RESERVE_GPIOL7)
148
149#define OPA_name_gpioM \
150 gpio_name_to_num(OPA_RESERVE_GPIOM0) \
151 gpio_name_to_num(OPA_RESERVE_GPIOM1) \
152 gpio_name_to_num(OPA_RESERVE_GPIOM2) \
153 gpio_name_to_num(OPA_RESERVE_GPIOM3) \
154 gpio_name_to_num(SMB_LS_MUX_EN) \
155 gpio_name_to_num(SELECT_SMB_MUX_N) \
156 gpio_name_to_num(OPA_RESERVE_GPIOM6) \
157 gpio_name_to_num(OPA_RESERVE_GPIOM7)
158
159#define OPA_name_gpioN \
160 gpio_name_to_num(OPA_RESERVE_GPION0) \
161 gpio_name_to_num(OPA_RESERVE_GPION1) \
162 gpio_name_to_num(OPA_RESERVE_GPION2) \
163 gpio_name_to_num(OPA_RESERVE_GPION3) \
164 gpio_name_to_num(OPA_RESERVE_GPION4) \
165 gpio_name_to_num(OPA_RESERVE_GPION5) \
166 gpio_name_to_num(OPA_RESERVE_GPION6) \
167 gpio_name_to_num(OPA_RESERVE_GPION7)
168
169#define OPA_name_gpioO \
170 gpio_name_to_num(OPA_RESERVE_GPIOO0) \
171 gpio_name_to_num(OPA_RESERVE_GPIOO1) \
172 gpio_name_to_num(OPA_RESERVE_GPIOO2) \
173 gpio_name_to_num(OPA_RESERVE_GPIOO3) \
174 gpio_name_to_num(OPA_RESERVE_GPIOO4) \
175 gpio_name_to_num(OPA_RESERVE_GPIOO5) \
176 gpio_name_to_num(OPA_RESERVE_GPIOO6) \
177 gpio_name_to_num(OPA_RESERVE_GPIOO7)
178
179#define OPA_name_gpioP \
180 gpio_name_to_num(OPA_RESERVE_GPIOP0) \
181 gpio_name_to_num(OPA_RESERVE_GPIOP1) \
182 gpio_name_to_num(OPA_RESERVE_GPIOP2) \
183 gpio_name_to_num(OPA_RESERVE_GPIOP3) \
184 gpio_name_to_num(OPA_RESERVE_GPIOP4) \
185 gpio_name_to_num(OPA_RESERVE_GPIOP5) \
186 gpio_name_to_num(OPA_BIC_EXP_ID) \
187 gpio_name_to_num(OPA_BIC_BOARD_ID)
188
189#define OPA_name_gpioQ \
190 gpio_name_to_num(OPA_FM_EXP_MAIN_PWR_EN) \
191 gpio_name_to_num(OPA_PRSNT0_EXPB) \
192 gpio_name_to_num(OPA_RESERVE_GPIOQ2) \
193 gpio_name_to_num(OPA_RESERVE_GPIOQ3) \
194 gpio_name_to_num(OPA_RESERVE_GPIOQ4) \
195 gpio_name_to_num(OPA_RESERVE_GPIOQ5) \
196 gpio_name_to_num(OPA_RESERVE_GPIOQ6) \
197 gpio_name_to_num(OPA_RESERVE_GPIOQ7)
198
199#define OPA_name_gpioR \
200 gpio_name_to_num(OPA_RESERVE_GPIOR0) \
201 gpio_name_to_num(OPA_RESERVE_GPIOR1) \
202 gpio_name_to_num(OPA_RESERVE_GPIOR2) \
203 gpio_name_to_num(OPA_RESERVE_GPIOR3) \
204 gpio_name_to_num(OPA_RESERVE_GPIOR4) \
205 gpio_name_to_num(OPA_RESERVE_GPIOR5) \
206 gpio_name_to_num(OPA_RESERVE_GPIOR6) \
207 gpio_name_to_num(OPA_RESERVE_GPIOR7)
208
209#define OPA_name_gpioS \
210 gpio_name_to_num(OPA_RESERVE_GPIOS0) \
211 gpio_name_to_num(OPA_RESERVE_GPIOS1) \
212 gpio_name_to_num(OPA_RESERVE_GPIOS2) \
213 gpio_name_to_num(OPA_RESERVE_GPIOS3) \
214 gpio_name_to_num(OPA_RESERVE_GPIOS4) \
215 gpio_name_to_num(OPA_RESERVE_GPIOS5) \
216 gpio_name_to_num(OPA_RESERVE_GPIOS6) \
217 gpio_name_to_num(OPA_RESERVE_GPIOS7)
218
219#define OPA_name_gpioT \
220 gpio_name_to_num(OPA_RESERVE_GPIOT0) \
221 gpio_name_to_num(OPA_RESERVE_GPIOT1) \
222 gpio_name_to_num(OPA_RESERVE_GPIOT2) \
223 gpio_name_to_num(OPA_RESERVE_GPIOT3) \
224 gpio_name_to_num(OPA_RESERVE_GPIOT4) \
225 gpio_name_to_num(OPA_RESERVE_GPIOT5) \
226 gpio_name_to_num(OPA_RESERVE_GPIOT6) \
227 gpio_name_to_num(OPA_RESERVE_GPIOT7)
228
229#define OPA_name_gpioU \
230 gpio_name_to_num(OPA_RESERVE_GPIOU0) \
231 gpio_name_to_num(OPA_RESERVE_GPIOU1) \
232 gpio_name_to_num(OPA_RESERVE_GPIOU2) \
233 gpio_name_to_num(OPA_RESERVE_GPIOU3) \
234 gpio_name_to_num(OPA_RESERVE_GPIOU4) \
235 gpio_name_to_num(OPA_RESERVE_GPIOU5) \
236 gpio_name_to_num(OPA_RESERVE_GPIOU6) \
237 gpio_name_to_num(OPA_RESERVE_GPIOU7)
238
239// For OPB BIC GPIO name
240#define OPB_name_gpioA \
241 gpio_name_to_num(OPB_CLKBUF_E1S_4_OE_N) \
242 gpio_name_to_num(OPB_CLKBUF_E1S_3_OE_N) \
243 gpio_name_to_num(OPB_CLKBUF_E1S_2_OE_N) \
244 gpio_name_to_num(OPB_CLKBUF_E1S_1_OE_N) \
245 gpio_name_to_num(OPB_CLKBUF_E1S_0_OE_N) \
246 gpio_name_to_num(OPB_PWRGD_P12V_E1S_4_R) \
247 gpio_name_to_num(OPB_PWRGD_P12V_E1S_3_R) \
248 gpio_name_to_num(OPB_PWRGD_P12V_E1S_2_R)
249
250#define OPB_name_gpioB \
251 gpio_name_to_num(OPB_PWRGD_P12V_E1S_1_R) \
252 gpio_name_to_num(OPB_PWRGD_P12V_E1S_0_R) \
253 gpio_name_to_num(OPB_E1S_4_PRSNT_N) \
254 gpio_name_to_num(OPB_E1S_3_PRSNT_N) \
255 gpio_name_to_num(OPB_E1S_2_PRSNT_N) \
256 gpio_name_to_num(OPB_E1S_1_PRSNT_N) \
257 gpio_name_to_num(OPB_E1S_0_PRSNT_N ) \
258 gpio_name_to_num(OPB_SMB_TEMP_SENSOR_ALT_N)
259
260#define OPB_name_gpioC \
261 gpio_name_to_num(OPB_PWRGD_P3V3_E1S_4_R) \
262 gpio_name_to_num(OPB_PWRGD_P3V3_E1S_3_R) \
263 gpio_name_to_num(OPB_PWRGD_P3V3_E1S_2_R) \
264 gpio_name_to_num(OPB_PWRGD_P3V3_E1S_1_R) \
265 gpio_name_to_num(OPB_PWRGD_P3V3_E1S_0_R) \
266 gpio_name_to_num(OPB_BOARD_REV_0) \
267 gpio_name_to_num(OPB_BOARD_REV_1) \
268 gpio_name_to_num(OPB_BOARD_REV_2)
269
270#define OPB_name_gpioD \
271 gpio_name_to_num(OPB_PWRGD_P12V_MAIN) \
272 gpio_name_to_num(OPB_RST_SMBRST_BIC_E1S_4) \
273 gpio_name_to_num(OPB_RST_SMBRST_BIC_E1S_3) \
274 gpio_name_to_num(OPB_RST_SMBRST_BIC_E1S_2) \
275 gpio_name_to_num(OPB_RST_SMBRST_BIC_E1S_1) \
276 gpio_name_to_num(OPB_RST_SMBRST_BIC_E1S_0) \
277 gpio_name_to_num(OPB_RST_E1S_1_PERST) \
278 gpio_name_to_num(OPB_RST_E1S_0_PERST)
279
280#define OPB_name_gpioE \
281 gpio_name_to_num(OPB_RST_E1S_4_PERST) \
282 gpio_name_to_num(OPB_RST_E1S_3_PERST) \
283 gpio_name_to_num(OPB_RST_E1S_2_PERST) \
284 gpio_name_to_num(OPB_P12V_E1S_4_EN_R) \
285 gpio_name_to_num(OPB_P12V_E1S_3_EN_R) \
286 gpio_name_to_num(OPB_P12V_E1S_2_EN_R) \
287 gpio_name_to_num(OPB_P12V_E1S_1_EN_R) \
288 gpio_name_to_num(OPB_P12V_E1S_0_EN_R)
289
290#define OPB_name_gpioF \
291 gpio_name_to_num(OPB_SMB_P12V_MAIN_INA233_ALT_N) \
292 gpio_name_to_num(OPB_PMB_P12V_MAIN_ALT_N) \
293 gpio_name_to_num(OPB_CLKBUF_PWRDOWN_R_N) \
294 gpio_name_to_num(OPB_FM_PWRDIS_E1S_4) \
295 gpio_name_to_num(OPB_FM_PWRDIS_E1S_3) \
296 gpio_name_to_num(OPB_FM_PWRDIS_E1S_2) \
297 gpio_name_to_num(OPB_FM_PWRDIS_E1S_1) \
298 gpio_name_to_num(OPB_FM_PWRDIS_E1S_0)
299
300#define OPB_name_gpioG \
301 gpio_name_to_num(OPB_SMB_E1S_4_INA233_ALT_N) \
302 gpio_name_to_num(OPB_SMB_E1S_3_INA233_ALT_N) \
303 gpio_name_to_num(OPB_SMB_E1S_2_INA233_ALT_N) \
304 gpio_name_to_num(OPB_SMB_E1S_1_INA233_ALT_N) \
305 gpio_name_to_num(OPB_SMB_E1S_0_INA233_ALT_N) \
306 gpio_name_to_num(OPB_LED_E1S_4_ATTN_R) \
307 gpio_name_to_num(OPB_LED_E1S_3_ATTN_R) \
308 gpio_name_to_num(OPB_LED_E1S_2_ATTN_R)
309
310#define OPB_name_gpioH \
311 gpio_name_to_num(OPB_LED_E1S_1_ATTN_R) \
312 gpio_name_to_num(OPB_LED_E1S_0_ATTN_R) \
313 gpio_name_to_num(OPB_HUB1_MASTER_SELECT_R) \
314 gpio_name_to_num(OPB_SMB_IOEXP_ALT_N) \
315 gpio_name_to_num(OPB_RESERVE_GPIOH4) \
316 gpio_name_to_num(OPB_RESERVE_GPIOH5) \
317 gpio_name_to_num(OPB_RESERVE_GPIOH6) \
318 gpio_name_to_num(OPB_RESERVE_GPIOH7)
319
320#define OPB_name_gpioI \
321 gpio_name_to_num(OPB_RESERVE_GPIOI0) \
322 gpio_name_to_num(OPB_RESERVE_GPIOI1) \
323 gpio_name_to_num(OPB_RESERVE_GPIOI2) \
324 gpio_name_to_num(OPB_RESERVE_GPIOI3) \
325 gpio_name_to_num(OPB_RESERVE_GPIOI4) \
326 gpio_name_to_num(OPB_RESERVE_GPIOI5) \
327 gpio_name_to_num(OPB_RESERVE_GPIOI6) \
328 gpio_name_to_num(OPB_RESERVE_GPIOI7)
329
330#define OPB_name_gpioJ \
331 gpio_name_to_num(OPB_RESERVE_GPIOJ0) \
332 gpio_name_to_num(OPB_RESERVE_GPIOJ1) \
333 gpio_name_to_num(OPB_RESERVE_GPIOJ2) \
334 gpio_name_to_num(OPB_RESERVE_GPIOJ3) \
335 gpio_name_to_num(OPB_RESERVE_GPIOJ4) \
336 gpio_name_to_num(OPB_RESERVE_GPIOJ5) \
337 gpio_name_to_num(OPB_RESERVE_GPIOJ6) \
338 gpio_name_to_num(OPB_RESERVE_GPIOJ7)
339
340#define OPB_name_gpioK \
341 gpio_name_to_num(OPB_RESERVE_GPIOK0) \
342 gpio_name_to_num(OPB_RESERVE_GPIOK1) \
343 gpio_name_to_num(OPB_RESERVE_GPIOK2) \
344 gpio_name_to_num(OPB_RESERVE_GPIOK3) \
345 gpio_name_to_num(OPB_RESERVE_GPIOK4) \
346 gpio_name_to_num(OPB_RESERVE_GPIOK5) \
347 gpio_name_to_num(OPB_RESERVE_GPIOK6) \
348 gpio_name_to_num(OPB_RESERVE_GPIOK7)
349
350#define OPB_name_gpioL \
351 gpio_name_to_num(OPB_RESERVE_GPIOL0) \
352 gpio_name_to_num(OPB_RESERVE_GPIOL1) \
353 gpio_name_to_num(OPB_P3V3_E1S_4_EN_R) \
354 gpio_name_to_num(OPB_P3V3_E1S_3_EN_R) \
355 gpio_name_to_num(OPB_P3V3_E1S_2_EN_R) \
356 gpio_name_to_num(OPB_P3V3_E1S_1_EN_R) \
357 gpio_name_to_num(OPB_P3V3_E1S_0_EN_R) \
358 gpio_name_to_num(OPB_RESERVE_GPIOL7)
359
360#define OPB_name_gpioM \
361 gpio_name_to_num(OPB_RESERVE_GPIOM0) \
362 gpio_name_to_num(OPB_RESERVE_GPIOM1) \
363 gpio_name_to_num(OPB_RESERVE_GPIOM2) \
364 gpio_name_to_num(OPB_RESERVE_GPIOM3) \
365 gpio_name_to_num(OPB_RESERVE_GPIOM4) \
366 gpio_name_to_num(OPB_RESERVE_GPIOM5) \
367 gpio_name_to_num(OPB_RESERVE_GPIOM6) \
368 gpio_name_to_num(OPB_RESERVE_GPIOM7)
369
370#define OPB_name_gpioN \
371 gpio_name_to_num(OPB_RESERVE_GPION0) \
372 gpio_name_to_num(OPB_RESERVE_GPION1) \
373 gpio_name_to_num(OPB_RESERVE_GPION2) \
374 gpio_name_to_num(OPB_RESERVE_GPION3) \
375 gpio_name_to_num(OPB_RESERVE_GPION4) \
376 gpio_name_to_num(OPB_RESERVE_GPION5) \
377 gpio_name_to_num(OPB_RESERVE_GPION6) \
378 gpio_name_to_num(OPB_RESERVE_GPION7)
379
380#define OPB_name_gpioO \
381 gpio_name_to_num(OPB_RESERVE_GPIOO0) \
382 gpio_name_to_num(OPB_RESERVE_GPIOO1) \
383 gpio_name_to_num(OPB_RESERVE_GPIOO2) \
384 gpio_name_to_num(OPB_RESERVE_GPIOO3) \
385 gpio_name_to_num(OPB_RESERVE_GPIOO4) \
386 gpio_name_to_num(OPB_RESERVE_GPIOO5) \
387 gpio_name_to_num(OPB_RESERVE_GPIOO6) \
388 gpio_name_to_num(OPB_RESERVE_GPIOO7)
389
390#define OPB_name_gpioP \
391 gpio_name_to_num(OPB_RESERVE_GPIOP0) \
392 gpio_name_to_num(OPB_RESERVE_GPIOP1) \
393 gpio_name_to_num(OPB_RESERVE_GPIOP2) \
394 gpio_name_to_num(OPB_RESERVE_GPIOP3) \
395 gpio_name_to_num(OPB_RESERVE_GPIOP4) \
396 gpio_name_to_num(OPB_RESERVE_GPIOP5) \
397 gpio_name_to_num(OPB_BIC_EXP_ID) \
398 gpio_name_to_num(OPB_BIC_BOARD_ID)
399
400#define OPB_name_gpioQ \
401 gpio_name_to_num(OPB_FM_EXP_MAIN_PWR_EN) \
402 gpio_name_to_num(OPB_RESERVE_GPIOQ1) \
403 gpio_name_to_num(OPB_BIC_MAIN_PWR_EN_R) \
404 gpio_name_to_num(OPB_SMB_BIC_ALERT_N_R) \
405 gpio_name_to_num(OPB_RST_CPLD_PERST1_N) \
406 gpio_name_to_num(OPB_RESERVE_GPIOQ5) \
407 gpio_name_to_num(OPB_RESERVE_GPIOQ6) \
408 gpio_name_to_num(OPB_RESERVE_GPIOQ7)
409
410#define OPB_name_gpioR \
411 gpio_name_to_num(OPB_RESERVE_GPIOR0) \
412 gpio_name_to_num(OPB_RESERVE_GPIOR1) \
413 gpio_name_to_num(OPB_RESERVE_GPIOR2) \
414 gpio_name_to_num(OPB_RESERVE_GPIOR3) \
415 gpio_name_to_num(OPB_RESERVE_GPIOR4) \
416 gpio_name_to_num(OPB_RESERVE_GPIOR5) \
417 gpio_name_to_num(OPB_RESERVE_GPIOR6) \
418 gpio_name_to_num(OPB_RESERVE_GPIOR7)
419
420#define OPB_name_gpioS \
421 gpio_name_to_num(OPB_RESERVE_GPIOS0) \
422 gpio_name_to_num(OPB_RESERVE_GPIOS1) \
423 gpio_name_to_num(OPB_RESERVE_GPIOS2) \
424 gpio_name_to_num(OPB_RESERVE_GPIOS3) \
425 gpio_name_to_num(OPB_RESERVE_GPIOS4) \
426 gpio_name_to_num(OPB_RESERVE_GPIOS5) \
427 gpio_name_to_num(OPB_RESERVE_GPIOS6) \
428 gpio_name_to_num(OPB_RESERVE_GPIOS7)
429
430#define OPB_name_gpioT \
431 gpio_name_to_num(OPB_RESERVE_GPIOT0) \
432 gpio_name_to_num(OPB_RESERVE_GPIOT1) \
433 gpio_name_to_num(OPB_RESERVE_GPIOT2) \
434 gpio_name_to_num(OPB_RESERVE_GPIOT3) \
435 gpio_name_to_num(OPB_RESERVE_GPIOT4) \
436 gpio_name_to_num(OPB_RESERVE_GPIOT5) \
437 gpio_name_to_num(OPB_RESERVE_GPIOT6) \
438 gpio_name_to_num(OPB_RESERVE_GPIOT7)
439
440#define OPB_name_gpioU \
441 gpio_name_to_num(OPB_RESERVE_GPIOU0) \
442 gpio_name_to_num(OPB_RESERVE_GPIOU1) \
443 gpio_name_to_num(OPB_RESERVE_GPIOU2) \
444 gpio_name_to_num(OPB_RESERVE_GPIOU3) \
445 gpio_name_to_num(OPB_RESERVE_GPIOU4) \
446 gpio_name_to_num(OPB_RESERVE_GPIOU5) \
447 gpio_name_to_num(OPB_RESERVE_GPIOU6) \
448 gpio_name_to_num(OPB_RESERVE_GPIOU7)
449
450// clang-format on
451
452#define gpio_name_to_num(x) x,
453
461
469
470// define opa opb same pin
471#define BIC_EXP_ID OPA_BIC_EXP_ID
472#define BIC_BOARD_ID OPA_BIC_BOARD_ID
473#define FM_EXP_MAIN_PWR_EN OPA_FM_EXP_MAIN_PWR_EN
474#define PWRGD_P12V_MAIN OPA_PWRGD_P12V_MAIN
475
478#undef gpio_name_to_num
479
481
482#endif
#define OPB_name_gpioC
Definition: plat_gpio.h:260
#define OPB_name_gpioO
Definition: plat_gpio.h:380
#define OPA_name_gpioB
Definition: plat_gpio.h:39
#define OPB_name_gpioN
Definition: plat_gpio.h:370
#define OPA_name_gpioR
Definition: plat_gpio.h:199
#define OPB_name_gpioQ
Definition: plat_gpio.h:400
#define OPB_name_gpioL
Definition: plat_gpio.h:350
#define OPB_name_gpioB
Definition: plat_gpio.h:250
#define OPA_name_gpioS
Definition: plat_gpio.h:209
#define OPA_name_gpioT
Definition: plat_gpio.h:219
#define OPA_name_gpioI
Definition: plat_gpio.h:109
#define OPA_name_gpioA
Definition: plat_gpio.h:29
#define OPA_name_gpioJ
Definition: plat_gpio.h:119
#define OPB_name_gpioG
Definition: plat_gpio.h:300
#define OPB_name_gpioJ
Definition: plat_gpio.h:330
#define OPB_name_gpioI
Definition: plat_gpio.h:320
#define OPB_name_gpioF
Definition: plat_gpio.h:290
#define OPA_name_gpioL
Definition: plat_gpio.h:139
#define OPA_name_gpioC
Definition: plat_gpio.h:49
#define OPA_name_gpioP
Definition: plat_gpio.h:179
#define OPA_name_gpioM
Definition: plat_gpio.h:149
#define OPA_name_gpioK
Definition: plat_gpio.h:129
#define OPB_name_gpioP
Definition: plat_gpio.h:390
#define OPA_name_gpioN
Definition: plat_gpio.h:159
#define OPB_name_gpioA
Definition: plat_gpio.h:240
enum _OPB_GPIO_NUMS_ OPB_GPIO_NUMS
#define OPA_name_gpioU
Definition: plat_gpio.h:229
enum _OPA_GPIO_NUMS_ OPA_GPIO_NUMS
#define OPB_name_gpioD
Definition: plat_gpio.h:270
#define OPA_name_gpioQ
Definition: plat_gpio.h:189
_OPA_GPIO_NUMS_
Definition: plat_gpio.h:454
#define OPB_name_gpioT
Definition: plat_gpio.h:430
#define OPA_name_gpioD
Definition: plat_gpio.h:59
#define OPB_name_gpioM
Definition: plat_gpio.h:360
void init_card_position_gpio()
Definition: plat_gpio.c:488
#define OPA_name_gpioO
Definition: plat_gpio.h:169
#define OPB_name_gpioR
Definition: plat_gpio.h:410
#define OPB_name_gpioE
Definition: plat_gpio.h:280
_OPB_GPIO_NUMS_
Definition: plat_gpio.h:462
#define OPA_name_gpioF
Definition: plat_gpio.h:79
#define OPB_name_gpioU
Definition: plat_gpio.h:440
#define OPB_name_gpioH
Definition: plat_gpio.h:310
#define OPA_name_gpioH
Definition: plat_gpio.h:99
#define OPB_name_gpioS
Definition: plat_gpio.h:420
#define OPB_name_gpioK
Definition: plat_gpio.h:340
#define OPA_name_gpioE
Definition: plat_gpio.h:69
#define OPA_name_gpioG
Definition: plat_gpio.h:89