1 /** @file
2   Register names for VER2 GPIO
3 
4 Conventions:
5 
6   - Register definition format:
7     Prefix_[GenerationName]_[ComponentName]_SubsystemName_RegisterSpace_RegisterName
8   - Prefix:
9     Definitions beginning with "R_" are registers
10     Definitions beginning with "B_" are bits within registers
11     Definitions beginning with "V_" are meaningful values within the bits
12     Definitions beginning with "S_" are register size
13     Definitions beginning with "N_" are the bit position
14   - [GenerationName]:
15     Three letter acronym of the generation is used (e.g. SKL,KBL,CNL etc.).
16     Register name without GenerationName applies to all generations.
17   - [ComponentName]:
18     This field indicates the component name that the register belongs to (e.g. PCH, SA etc.)
19     Register name without ComponentName applies to all components.
20     Register that is specific to -LP denoted by "_PCH_LP_" in component name.
21   - SubsystemName:
22     This field indicates the subsystem name of the component that the register belongs to
23     (e.g. PCIE, USB, SATA, GPIO, PMC etc.).
24   - RegisterSpace:
25     MEM - MMIO space register of subsystem.
26     IO  - IO space register of subsystem.
27     PCR - Private configuration register of subsystem.
28     CFG - PCI configuration space register of subsystem.
29   - RegisterName:
30     Full register name.
31 
32   Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
33   SPDX-License-Identifier: BSD-2-Clause-Patent
34 **/
35 #ifndef _GPIO_REGS_VER2_H_
36 #define _GPIO_REGS_VER2_H_
37 
38 //
39 // PCH-LP GPIO
40 //
41 #define GPIO_VER2_PCH_LP_GPIO_GPP_B_PAD_MAX    26
42 #define GPIO_VER2_PCH_LP_GPIO_GPP_A_PAD_MAX    25
43 #define GPIO_VER2_PCH_LP_GPIO_GPP_R_PAD_MAX    8
44 #define GPIO_VER2_PCH_LP_GPIO_GPD_PAD_MAX      17
45 #define GPIO_VER2_PCH_LP_GPIO_GPP_S_PAD_MAX    8
46 #define GPIO_VER2_PCH_LP_GPIO_GPP_H_PAD_MAX    24
47 #define GPIO_VER2_PCH_LP_GPIO_GPP_D_PAD_MAX    21
48 #define GPIO_VER2_PCH_LP_GPIO_GPP_F_PAD_MAX    25
49 #define GPIO_VER2_PCH_LP_GPIO_GPP_C_PAD_MAX    24
50 #define GPIO_VER2_PCH_LP_GPIO_GPP_E_PAD_MAX    25
51 #define GPIO_VER2_PCH_LP_GPIO_CPU_PAD_MAX      15
52 
53 //
54 // PCH-LP GPIO registers
55 //
56 
57 //
58 // GPIO Community 0 Private Configuration Registers
59 //
60 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_B_PAD_OWN        0x20
61 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_A_PAD_OWN        0x38
62 
63 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_B_PADCFGLOCK     0x80
64 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_B_PADCFGLOCKTX   0x84
65 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_A_PADCFGLOCK     0x90
66 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_A_PADCFGLOCKTX   0x94
67 
68 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_B_HOSTSW_OWN     0xB0
69 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_A_HOSTSW_OWN     0xB8
70 
71 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_B_GPI_IS         0x0100
72 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_A_GPI_IS         0x0108
73 
74 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_B_GPI_IE         0x0120
75 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_A_GPI_IE         0x0128
76 
77 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_B_GPI_GPE_STS    0x0140
78 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_A_GPI_GPE_STS    0x0148
79 
80 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_B_GPI_GPE_EN     0x0160
81 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_A_GPI_GPE_EN     0x0168
82 
83 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_B_SMI_STS        0x0180
84 
85 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_B_SMI_EN         0x01A0
86 
87 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_B_NMI_STS        0x01C0
88 
89 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_B_NMI_EN         0x01E0
90 
91 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_B_PADCFG_OFFSET  0x700
92 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_A_PADCFG_OFFSET  0x9A0
93 
94 //
95 // GPIO Community 1 Private Configuration Registers
96 //
97 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_S_PAD_OWN        0x20
98 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_H_PAD_OWN        0x24
99 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_D_PAD_OWN        0x30
100 
101 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_S_PADCFGLOCK     0x80
102 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_S_PADCFGLOCKTX   0x84
103 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_H_PADCFGLOCK     0x88
104 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_H_PADCFGLOCKTX   0x8C
105 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_D_PADCFGLOCK     0x90
106 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_D_PADCFGLOCKTX   0x94
107 
108 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_S_HOSTSW_OWN     0xB0
109 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_H_HOSTSW_OWN     0xB4
110 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_D_HOSTSW_OWN     0xB8
111 
112 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_S_GPI_IS         0x0100
113 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_H_GPI_IS         0x0104
114 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_D_GPI_IS         0x0108
115 
116 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_S_GPI_IE         0x0120
117 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_H_GPI_IE         0x0124
118 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_D_GPI_IE         0x0128
119 
120 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_S_GPI_GPE_STS    0x0140
121 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_H_GPI_GPE_STS    0x0144
122 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_D_GPI_GPE_STS    0x0148
123 
124 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_S_GPI_GPE_EN     0x0160
125 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_H_GPI_GPE_EN     0x0164
126 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_D_GPI_GPE_EN     0x0168
127 
128 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_D_SMI_STS        0x0188
129 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_D_SMI_EN         0x01A8
130 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_D_NMI_STS        0x01C8
131 
132 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_D_NMI_EN         0x01E8
133 
134 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_S_PADCFG_OFFSET  0x700
135 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_H_PADCFG_OFFSET  0x780
136 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_D_PADCFG_OFFSET  0x900
137 
138 //
139 // GPIO Community 2 Private Configuration Registers
140 //
141 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPD_PAD_OWN          0x20
142 
143 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPD_PADCFGLOCK       0x80
144 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPD_PADCFGLOCKTX     0x84
145 
146 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPD_HOSTSW_OWN       0xB0
147 
148 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPD_GPI_IS           0x0100
149 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPD_GPI_IE           0x0120
150 
151 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPD_GPI_GPE_STS      0x0140
152 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPD_GPI_GPE_EN       0x0160
153 
154 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPD_PADCFG_OFFSET    0x700
155 
156 //
157 // GPIO Community 4 Private Configuration Registers
158 //
159 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_C_PAD_OWN        0x20
160 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_F_PAD_OWN        0x2C
161 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_E_PAD_OWN        0x40
162 
163 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_C_PADCFGLOCK     0x80
164 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_C_PADCFGLOCKTX   0x84
165 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_F_PADCFGLOCK     0x88
166 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_F_PADCFGLOCKTX   0x8C
167 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_E_PADCFGLOCK     0x98
168 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_E_PADCFGLOCKTX   0x9C
169 
170 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_C_HOSTSW_OWN     0xB0
171 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_F_HOSTSW_OWN     0xB4
172 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_E_HOSTSW_OWN     0xBC
173 
174 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_C_GPI_IS         0x0100
175 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_F_GPI_IS         0x0104
176 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_E_GPI_IS         0x010C
177 
178 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_C_GPI_IE         0x0120
179 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_F_GPI_IE         0x0124
180 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_E_GPI_IE         0x012C
181 
182 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_C_GPI_GPE_STS    0x0140
183 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_F_GPI_GPE_STS    0x0144
184 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_E_GPI_GPE_STS    0x014C
185 
186 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_C_GPI_GPE_EN     0x0160
187 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_F_GPI_GPE_EN     0x0164
188 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_E_GPI_GPE_EN     0x016C
189 
190 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_C_SMI_STS        0x0180
191 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_E_SMI_STS        0x018C
192 
193 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_C_SMI_EN         0x01A0
194 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_E_SMI_EN         0x01AC
195 
196 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_C_NMI_STS        0x01C0
197 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_E_NMI_STS        0x01CC
198 
199 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_C_NMI_EN         0x01E0
200 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_E_NMI_EN         0x01EC
201 
202 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_C_PADCFG_OFFSET  0x700
203 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_F_PADCFG_OFFSET  0x880
204 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_E_PADCFG_OFFSET  0xA70
205 
206 //
207 // GPIO Community 5 Private Configuration Registers
208 //
209 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_R_PAD_OWN        0x20
210 
211 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_R_PADCFGLOCK     0x80
212 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_R_PADCFGLOCKTX   0x84
213 
214 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_R_HOSTSW_OWN     0xB0
215 
216 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_R_GPI_IS         0x0100
217 
218 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_R_GPI_IE         0x0120
219 
220 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_R_GPI_GPE_STS    0x0140
221 
222 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_R_GPI_GPE_EN     0x0160
223 
224 #define R_GPIO_VER2_PCH_LP_GPIO_PCR_GPP_R_PADCFG_OFFSET  0x700
225 
226 #endif // _GPIO_REGS_VER2_H_
227