39
39
#include "regaccess.h"
40
40
41
41
/* =========================================================================*/
42
- /* ================ ACPI_EC ================ */
42
+ /* ================ ACPI_EC === ================ */
43
43
/* =========================================================================*/
44
44
45
45
#define MCHP_ACPI_EC_BASE_ADDR 0x400F0800ul
129
129
/**
130
130
* @brief ACPI EC Registers (ACPI_EC)
131
131
*/
132
- typedef struct acpi_ec_regs
133
- {
132
+ typedef struct acpi_ec_regs {
134
133
__IOM uint32_t OS_DATA ; /*!< (@ 0x0000) OS Data */
135
134
__IOM uint8_t OS_CMD_STS ; /*!< (@ 0x0004) OS Command(WO), Status(RO) */
136
135
__IOM uint8_t OS_BYTE_CTRL ; /*!< (@ 0x0005) OS Byte Control */
@@ -142,6 +141,121 @@ typedef struct acpi_ec_regs
142
141
__IOM uint32_t OS2EC_DATA ; /*!< (@ 0x0108) OS to EC Data */
143
142
} ACPI_EC_Type ;
144
143
144
+ /* =========================================================================*/
145
+ /* ================ ACPI_PM1 =================== */
146
+ /* =========================================================================*/
147
+
148
+ #define MCHP_ACPI_PM1_BASE_ADDR 0x400F1C00ul
149
+
150
+ /*
151
+ * ACPI_PM1 interrupts
152
+ */
153
+ #define MCHP_ACPI_PM1_CTL_GIRQ 15u
154
+ #define MCHP_ACPI_PM1_EN_GIRQ 15u
155
+ #define MCHP_ACPI_PM1_STS_GIRQ 15u
156
+
157
+ /* Bit position in GIRQ Source, Enable-Set/Clr, and Result registers */
158
+ #define MCHP_ACPI_PM1_CTL_GIRQ_POS 15u
159
+ #define MCHP_ACPI_PM1_EN_GIRQ_POS 16u
160
+ #define MCHP_ACPI_PM1_STS_GIRQ_POS 17u
161
+
162
+ #define MCHP_ACPI_PM1_CTL_GIRQ_VAL (1ul << MCHP_ACPI_PM1_CTL_GIRQ_POS)
163
+ #define MCHP_ACPI_PM1_EN_GIRQ_VAL (1ul << MCHP_ACPI_PM1_EN_GIRQ_POS)
164
+ #define MCHP_ACPI_PM1_STS_GIRQ_VAL (1ul << MCHP_ACPI_PM1_STS_GIRQ_POS)
165
+
166
+ /* VCI GIRQ aggregated NVIC input */
167
+ #define MCHP_ACPI_PM1_CTL_NVIC_AGGR 7u
168
+ #define MCHP_ACPI_PM1_EN_NVIC_AGGR 7u
169
+ #define MCHP_ACPI_PM1_STS_NVIC_AGGR 7u
170
+
171
+ /* VCI direct NVIC inputs */
172
+ #define MCHP_ACPI_PM1_CTL_NVIC_DIRECT 55u
173
+ #define MCHP_ACPI_PM1_EN_NVIC_DIRECT 56u
174
+ #define MCHP_ACPI_PM1_STS_NVIC_DIRECT 57u
175
+
176
+ /* ACPI_PM1 RT/EC Status 1 */
177
+ #define MCHP_ACPI_PM1_RT_STS1_REG_OFS 0x0000ul
178
+ #define MCHP_ACPI_PM1_EC_STS1_REG_OFS 0x0100ul
179
+ #define MCHP_ACPI_PM1_STS1_REG_MASK 0x0000ul
180
+
181
+ /* ACPI_PM1 RT/EC Status 2 */
182
+ #define MCHP_ACPI_PM1_RT_STS2_REG_OFS 0x0001ul
183
+ #define MCHP_ACPI_PM1_EC_STS2_REG_OFS 0x0101ul
184
+ #define MCHP_ACPI_PM1_STS2_REG_MASK 0x008Ful
185
+ #define MCHP_ACPI_PM1_STS2_PWRBTN (1ul << 0)
186
+ #define MCHP_ACPI_PM1_STS2_SLPBTN (1ul << 1)
187
+ #define MCHP_ACPI_PM1_STS2_RTC (1ul << 2)
188
+ #define MCHP_ACPI_PM1_STS2_PWRBTNOR (1ul << 3)
189
+ #define MCHP_ACPI_PM1_STS2_WAK (1ul << 7)
190
+
191
+ /* ACPI_PM1 RT/EC Enable 1 */
192
+ #define MCHP_ACPI_PM1_RT_EN1_REG_OFS 0x0002ul
193
+ #define MCHP_ACPI_PM1_EC_EN1_REG_OFS 0x0102ul
194
+ #define MCHP_ACPI_PM1_EN1_REG_MASK 0x0000ul
195
+
196
+ /* ACPI_PM1 RT/EC Enable 2 */
197
+ #define MCHP_ACPI_PM1_RT_EN2_REG_OFS 0x0003ul
198
+ #define MCHP_ACPI_PM1_EC_EN2_REG_OFS 0x0103ul
199
+ #define MCHP_ACPI_PM1_EN2_REG_MASK 0x0007ul
200
+ #define MCHP_ACPI_PM1_EN2_PWRBTN (1ul << 0)
201
+ #define MCHP_ACPI_PM1_EN2_SLPBTN (1ul << 1)
202
+ #define MCHP_ACPI_PM1_EN2_RTC (1ul << 2)
203
+
204
+ /* ACPI_PM1 RT/EC Control 1 */
205
+ #define MCHP_ACPI_PM1_RT_CTRL1_REG_OFS 0x0004ul
206
+ #define MCHP_ACPI_PM1_EC_CTRL1_REG_OFS 0x0104ul
207
+ #define MCHP_ACPI_PM1_CTRL1_REG_MASK 0x0000ul
208
+
209
+ /* ACPI_PM1 RT/EC Control 2 */
210
+ #define MCHP_ACPI_PM1_RT_CTRL2_REG_OFS 0x0005ul
211
+ #define MCHP_ACPI_PM1_EC_CTRL2_REG_OFS 0x0105ul
212
+ #define MCHP_ACPI_PM1_CTRL2_REG_MASK 0x003Eul
213
+ #define MCHP_ACPI_PM1_CTRL2_PWRBTNOR_EN (1ul << 1)
214
+ #define MCHP_ACPI_PM1_CTRL2_SLP_TYPE_POS 2
215
+ #define MCHP_ACPI_PM1_CTRL2_SLP_TYPE_MASK (0x03ul << 2)
216
+ #define MCHP_ACPI_PM1_CTRL2_SLP_EN (1ul << 5)
217
+
218
+ /* ACPI_PM1 RT/EC Control 21 */
219
+ #define MCHP_ACPI_PM1_RT_CTRL21_REG_OFS 0x0006ul
220
+ #define MCHP_ACPI_PM1_EC_CTRL21_REG_OFS 0x0106ul
221
+ #define MCHP_ACPI_PM1_CTRL21_REG_MASK 0x0000ul
222
+
223
+ /* ACPI_PM1 RT/EC Control 22 */
224
+ #define MCHP_ACPI_PM1_RT_CTRL22_REG_OFS 0x0007ul
225
+ #define MCHP_ACPI_PM1_EC_CTRL22_REG_OFS 0x0107ul
226
+ #define MCHP_ACPI_PM1_CTRL22_REG_MASK 0x0000ul
227
+
228
+ /* ACPI_PM1 EC PM Status register */
229
+ #define MCHP_ACPI_PM1_EC_PM_STS_REG_OFS 0x0110ul
230
+ #define MCHP_ACPI_PM1_EC_PM_STS_REG_MASK 0x0001ul
231
+ #define MCHP_ACPI_PM1_EC_PM_STS_SCI 0x0001ul
232
+
233
+ /**
234
+ * @brief ACPI PM1 Registers (ACPI_PM1)
235
+ */
236
+ typedef struct acpi_pm1_regs {
237
+ __IOM uint8_t RT_STS1 ; /*!< (@ 0x0000) */
238
+ __IOM uint8_t RT_STS2 ; /*!< (@ 0x0001) */
239
+ __IOM uint8_t RT_EN1 ; /*!< (@ 0x0002) */
240
+ __IOM uint8_t RT_EN2 ; /*!< (@ 0x0003) */
241
+ __IOM uint8_t RT_CTRL1 ; /*!< (@ 0x0004) */
242
+ __IOM uint8_t RT_CTRL2 ; /*!< (@ 0x0005) */
243
+ __IOM uint8_t RT_CTRL21 ; /*!< (@ 0x0006) */
244
+ __IOM uint8_t RT_CTRL22 ; /*!< (@ 0x0007) */
245
+ uint8_t RSVD1 [(0x100u - 0x008u )];
246
+ __IOM uint8_t EC_STS1 ; /*!< (@ 0x0100) */
247
+ __IOM uint8_t EC_STS2 ; /*!< (@ 0x0101) */
248
+ __IOM uint8_t EC_EN1 ; /*!< (@ 0x0102) */
249
+ __IOM uint8_t EC_EN2 ; /*!< (@ 0x0103) */
250
+ __IOM uint8_t EC_CTRL1 ; /*!< (@ 0x0104) */
251
+ __IOM uint8_t EC_CTRL2 ; /*!< (@ 0x0105) */
252
+ __IOM uint8_t EC_CTRL21 ; /*!< (@ 0x0106) */
253
+ __IOM uint8_t EC_CTRL22 ; /*!< (@ 0x0107) */
254
+ uint8_t RSVD2 [(0x0110u - 0x0108u )];
255
+ __IOM uint8_t EC_PM_STS ; /*!< (@ 0x0110) */
256
+ uint8_t RSVD3 [3 ];
257
+ } ACPI_PM1_Type ;
258
+
145
259
#endif /* #ifndef _ACPI_EC_H */
146
260
/* end acpi_ec.h */
147
261
/** @}
0 commit comments