coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
gpio_defs.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-only */
2
3
#ifndef _SOC_ICELAKE_GPIO_DEFS_H_
4
#define _SOC_ICELAKE_GPIO_DEFS_H_
5
6
#ifndef __ACPI__
7
#include <
stddef.h
>
8
#endif
9
#include <soc/gpio_soc_defs.h>
10
11
#define GPIO_NUM_PAD_CFG_REGS 4
/* DW0, DW1, DW2, DW3 */
12
13
#define NUM_GPIO_COMx_GPI_REGS(n) \
14
(ALIGN_UP((n), GPIO_MAX_NUM_PER_GROUP) / GPIO_MAX_NUM_PER_GROUP)
15
16
#define NUM_GPIO_COM0_GPI_REGS NUM_GPIO_COMx_GPI_REGS(NUM_GPIO_COM0_PADS)
17
#define NUM_GPIO_COM1_GPI_REGS NUM_GPIO_COMx_GPI_REGS(NUM_GPIO_COM1_PADS)
18
#define NUM_GPIO_COM2_GPI_REGS NUM_GPIO_COMx_GPI_REGS(NUM_GPIO_COM2_PADS)
19
#define NUM_GPIO_COM4_GPI_REGS NUM_GPIO_COMx_GPI_REGS(NUM_GPIO_COM4_PADS)
20
#define NUM_GPIO_COM5_GPI_REGS NUM_GPIO_COMx_GPI_REGS(NUM_GPIO_COM5_PADS)
21
22
#define NUM_GPI_STATUS_REGS \
23
((NUM_GPIO_COM0_GPI_REGS) +\
24
(NUM_GPIO_COM1_GPI_REGS) +\
25
(NUM_GPIO_COM2_GPI_REGS) +\
26
(NUM_GPIO_COM4_GPI_REGS) +\
27
(NUM_GPIO_COM5_GPI_REGS))
28
/*
29
* IOxAPIC IRQs for the GPIOs
30
*/
31
32
/* Group G */
33
#define GPP_G0_IRQ 0x18
34
#define GPP_G1_IRQ 0x19
35
#define GPP_G2_IRQ 0x1a
36
#define GPP_G3_IRQ 0x1b
37
#define GPP_G4_IRQ 0x1c
38
#define GPP_G5_IRQ 0x1d
39
#define GPP_G6_IRQ 0x1e
40
#define GPP_G7_IRQ 0x1f
41
42
/* Group B */
43
#define GPP_B0_IRQ 0x20
44
#define GPP_B1_IRQ 0x21
45
#define GPP_B2_IRQ 0x22
46
#define GPP_B3_IRQ 0x23
47
#define GPP_B4_IRQ 0x24
48
#define GPP_B5_IRQ 0x25
49
#define GPP_B6_IRQ 0x26
50
#define GPP_B7_IRQ 0x27
51
#define GPP_B8_IRQ 0x28
52
#define GPP_B9_IRQ 0x29
53
#define GPP_B10_IRQ 0x2a
54
#define GPP_B11_IRQ 0x2b
55
#define GPP_B12_IRQ 0x2c
56
#define GPP_B13_IRQ 0x2d
57
#define GPP_B14_IRQ 0x2e
58
#define GPP_B15_IRQ 0x2f
59
#define GPP_B16_IRQ 0x30
60
#define GPP_B17_IRQ 0x31
61
#define GPP_B18_IRQ 0x32
62
#define GPP_B19_IRQ 0x33
63
#define GPP_B20_IRQ 0x34
64
#define GPP_B21_IRQ 0x35
65
#define GPP_B22_IRQ 0x36
66
#define GPP_B23_IRQ 0x37
67
68
/* Group A */
69
#define GPP_A0_IRQ 0x38
70
#define GPP_A1_IRQ 0x39
71
#define GPP_A2_IRQ 0x3a
72
#define GPP_A3_IRQ 0x3b
73
#define GPP_A4_IRQ 0x3c
74
#define GPP_A5_IRQ 0x3d
75
#define GPP_A6_IRQ 0x3e
76
#define GPP_A7_IRQ 0x3f
77
#define GPP_A8_IRQ 0x40
78
#define GPP_A9_IRQ 0x41
79
#define GPP_A10_IRQ 0x42
80
#define GPP_A11_IRQ 0x43
81
#define GPP_A12_IRQ 0x44
82
#define GPP_A13_IRQ 0x45
83
#define GPP_A14_IRQ 0x46
84
#define GPP_A15_IRQ 0x47
85
#define GPP_A16_IRQ 0x48
86
#define GPP_A17_IRQ 0x49
87
#define GPP_A18_IRQ 0x4a
88
#define GPP_A19_IRQ 0x4b
89
#define GPP_A20_IRQ 0x4c
90
#define GPP_A21_IRQ 0x4d
91
#define GPP_A22_IRQ 0x4e
92
#define GPP_A23_IRQ 0x4f
93
94
/* Group H */
95
#define GPP_H0_IRQ 0x70
96
#define GPP_H1_IRQ 0x71
97
#define GPP_H2_IRQ 0x72
98
#define GPP_H3_IRQ 0x73
99
#define GPP_H4_IRQ 0x74
100
#define GPP_H5_IRQ 0x75
101
#define GPP_H6_IRQ 0x76
102
#define GPP_H7_IRQ 0x77
103
#define GPP_H8_IRQ 0x18
104
#define GPP_H9_IRQ 0x19
105
#define GPP_H10_IRQ 0x1a
106
#define GPP_H11_IRQ 0x1b
107
#define GPP_H12_IRQ 0x1c
108
#define GPP_H13_IRQ 0x1d
109
#define GPP_H14_IRQ 0x1e
110
#define GPP_H15_IRQ 0x1f
111
#define GPP_H16_IRQ 0x20
112
#define GPP_H17_IRQ 0x21
113
#define GPP_H18_IRQ 0x22
114
#define GPP_H19_IRQ 0x23
115
#define GPP_H20_IRQ 0x24
116
#define GPP_H21_IRQ 0x25
117
#define GPP_H22_IRQ 0x26
118
#define GPP_H23_IRQ 0x27
119
120
/* Group D */
121
#define GPP_D0_IRQ 0x28
122
#define GPP_D1_IRQ 0x29
123
#define GPP_D2_IRQ 0x2a
124
#define GPP_D3_IRQ 0x2b
125
#define GPP_D4_IRQ 0x2c
126
#define GPP_D5_IRQ 0x2d
127
#define GPP_D6_IRQ 0x2e
128
#define GPP_D7_IRQ 0x2f
129
#define GPP_D8_IRQ 0x30
130
#define GPP_D9_IRQ 0x31
131
#define GPP_D10_IRQ 0x32
132
#define GPP_D11_IRQ 0x33
133
#define GPP_D12_IRQ 0x34
134
#define GPP_D13_IRQ 0x35
135
#define GPP_D14_IRQ 0x36
136
#define GPP_D15_IRQ 0x37
137
#define GPP_D16_IRQ 0x38
138
#define GPP_D17_IRQ 0x39
139
#define GPP_D18_IRQ 0x3a
140
#define GPP_D19_IRQ 0x3b
141
142
/* Group F */
143
#define GPP_F0_IRQ 0x40
144
#define GPP_F1_IRQ 0x41
145
#define GPP_F2_IRQ 0x42
146
#define GPP_F3_IRQ 0x43
147
#define GPP_F4_IRQ 0x44
148
#define GPP_F5_IRQ 0x45
149
#define GPP_F6_IRQ 0x46
150
#define GPP_F7_IRQ 0x47
151
#define GPP_F8_IRQ 0x48
152
#define GPP_F9_IRQ 0x49
153
#define GPP_F10_IRQ 0x4a
154
#define GPP_F11_IRQ 0x4b
155
#define GPP_F12_IRQ 0x4c
156
#define GPP_F13_IRQ 0x4d
157
#define GPP_F14_IRQ 0x4e
158
#define GPP_F15_IRQ 0x4f
159
#define GPP_F16_IRQ 0x50
160
#define GPP_F17_IRQ 0x51
161
#define GPP_F18_IRQ 0x52
162
#define GPP_F19_IRQ 0x53
163
164
/* Group GPD */
165
#define GPD0_IRQ 0x64
166
#define GPD1_IRQ 0x65
167
#define GPD2_IRQ 0x66
168
#define GPD3_IRQ 0x67
169
#define GPD4_IRQ 0x68
170
#define GPD5_IRQ 0x69
171
#define GPD6_IRQ 0x6a
172
#define GPD7_IRQ 0x6b
173
#define GPD8_IRQ 0x6c
174
#define GPD9_IRQ 0x6d
175
#define GPD10_IRQ 0x6e
176
#define GPD11_IRQ 0x6f
177
178
/* Group C */
179
#define GPP_C0_IRQ 0x5a
180
#define GPP_C1_IRQ 0x5b
181
#define GPP_C2_IRQ 0x5c
182
#define GPP_C3_IRQ 0x5d
183
#define GPP_C4_IRQ 0x5e
184
#define GPP_C5_IRQ 0x5f
185
#define GPP_C6_IRQ 0x60
186
#define GPP_C7_IRQ 0x61
187
#define GPP_C8_IRQ 0x62
188
#define GPP_C9_IRQ 0x63
189
#define GPP_C10_IRQ 0x64
190
#define GPP_C11_IRQ 0x65
191
#define GPP_C12_IRQ 0x66
192
#define GPP_C13_IRQ 0x67
193
#define GPP_C14_IRQ 0x68
194
#define GPP_C15_IRQ 0x69
195
#define GPP_C16_IRQ 0x6a
196
#define GPP_C17_IRQ 0x6b
197
#define GPP_C18_IRQ 0x6c
198
#define GPP_C19_IRQ 0x6d
199
#define GPP_C20_IRQ 0x6e
200
#define GPP_C21_IRQ 0x6f
201
#define GPP_C22_IRQ 0x70
202
#define GPP_C23_IRQ 0x71
203
/* Group E */
204
#define GPP_E0_IRQ 0x72
205
#define GPP_E1_IRQ 0x73
206
#define GPP_E2_IRQ 0x74
207
#define GPP_E3_IRQ 0x75
208
#define GPP_E4_IRQ 0x76
209
#define GPP_E5_IRQ 0x77
210
#define GPP_E6_IRQ 0x18
211
#define GPP_E7_IRQ 0x19
212
#define GPP_E8_IRQ 0x1a
213
#define GPP_E9_IRQ 0x1b
214
#define GPP_E10_IRQ 0x1c
215
#define GPP_E11_IRQ 0x1d
216
#define GPP_E12_IRQ 0x1e
217
#define GPP_E13_IRQ 0x1f
218
#define GPP_E14_IRQ 0x20
219
#define GPP_E15_IRQ 0x21
220
#define GPP_E16_IRQ 0x22
221
#define GPP_E17_IRQ 0x23
222
#define GPP_E18_IRQ 0x24
223
#define GPP_E19_IRQ 0x25
224
#define GPP_E20_IRQ 0x26
225
#define GPP_E21_IRQ 0x27
226
#define GPP_E22_IRQ 0x28
227
#define GPP_E23_IRQ 0x29
228
229
/* Group R*/
230
#define GPP_R0_IRQ 0x50
231
#define GPP_R1_IRQ 0x51
232
#define GPP_R2_IRQ 0x52
233
#define GPP_R3_IRQ 0x53
234
#define GPP_R4_IRQ 0x54
235
#define GPP_R5_IRQ 0x55
236
#define GPP_R6_IRQ 0x56
237
#define GPP_R7_IRQ 0x57
238
239
/* Group S */
240
#define GPP_S0_IRQ 0x5c
241
#define GPP_S1_IRQ 0x5d
242
#define GPP_S2_IRQ 0x5e
243
#define GPP_S3_IRQ 0x5f
244
#define GPP_S4_IRQ 0x60
245
#define GPP_S5_IRQ 0x61
246
#define GPP_S6_IRQ 0x62
247
#define GPP_S7_IRQ 0x63
248
249
/* Register defines. */
250
#define GPIO_MISCCFG 0x10
251
#define GPE_DW_SHIFT 8
252
#define GPE_DW_MASK 0xfff00
253
#define HOSTSW_OWN_REG_0 0xb0
254
#define GPI_INT_STS_0 0x100
255
#define GPI_INT_EN_0 0x110
256
#define GPI_SMI_STS_0 0x170
257
#define GPI_SMI_EN_0 0x190
258
#define GPI_NMI_STS_0 0x1b0
259
#define GPI_NMI_EN_0 0x1d0
260
#define PAD_CFG_BASE 0x600
261
262
#endif
stddef.h
src
soc
intel
icelake
include
soc
gpio_defs.h
Generated by
1.9.1