Software APIs
top_earlgrey.h
Go to the documentation of this file.
1 // Copyright lowRISC contributors (OpenTitan project).
2 // Licensed under the Apache License, Version 2.0, see LICENSE for details.
3 // SPDX-License-Identifier: Apache-2.0
4 
5 #ifndef OPENTITAN_HW_TOP_EARLGREY_SW_AUTOGEN_TOP_EARLGREY_H_
6 #define OPENTITAN_HW_TOP_EARLGREY_SW_AUTOGEN_TOP_EARLGREY_H_
7 
8 /**
9  * @file
10  * @brief Top-specific Definitions
11  *
12  * This file contains preprocessor and type definitions for use within the
13  * device C/C++ codebase.
14  *
15  * These definitions are for information that depends on the top-specific chip
16  * configuration, which includes:
17  * - Device Memory Information (for Peripherals and Memory)
18  * - PLIC Interrupt ID Names and Source Mappings
19  * - Alert ID Names and Source Mappings
20  * - Pinmux Pin/Select Names
21  * - Power Manager Wakeups
22  */
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 /**
29  * Peripheral base address for uart0 in top earlgrey.
30  *
31  * This should be used with #mmio_region_from_addr to access the memory-mapped
32  * registers associated with the peripheral (usually via a DIF).
33  */
34 #define TOP_EARLGREY_UART0_BASE_ADDR 0x40000000u
35 
36 /**
37  * Peripheral size for uart0 in top earlgrey.
38  *
39  * This is the size (in bytes) of the peripheral's reserved memory area. All
40  * memory-mapped registers associated with this peripheral should have an
41  * address between #TOP_EARLGREY_UART0_BASE_ADDR and
42  * `TOP_EARLGREY_UART0_BASE_ADDR + TOP_EARLGREY_UART0_SIZE_BYTES`.
43  */
44 #define TOP_EARLGREY_UART0_SIZE_BYTES 0x40u
45 
46 /**
47  * Peripheral base address for uart1 in top earlgrey.
48  *
49  * This should be used with #mmio_region_from_addr to access the memory-mapped
50  * registers associated with the peripheral (usually via a DIF).
51  */
52 #define TOP_EARLGREY_UART1_BASE_ADDR 0x40010000u
53 
54 /**
55  * Peripheral size for uart1 in top earlgrey.
56  *
57  * This is the size (in bytes) of the peripheral's reserved memory area. All
58  * memory-mapped registers associated with this peripheral should have an
59  * address between #TOP_EARLGREY_UART1_BASE_ADDR and
60  * `TOP_EARLGREY_UART1_BASE_ADDR + TOP_EARLGREY_UART1_SIZE_BYTES`.
61  */
62 #define TOP_EARLGREY_UART1_SIZE_BYTES 0x40u
63 
64 /**
65  * Peripheral base address for uart2 in top earlgrey.
66  *
67  * This should be used with #mmio_region_from_addr to access the memory-mapped
68  * registers associated with the peripheral (usually via a DIF).
69  */
70 #define TOP_EARLGREY_UART2_BASE_ADDR 0x40020000u
71 
72 /**
73  * Peripheral size for uart2 in top earlgrey.
74  *
75  * This is the size (in bytes) of the peripheral's reserved memory area. All
76  * memory-mapped registers associated with this peripheral should have an
77  * address between #TOP_EARLGREY_UART2_BASE_ADDR and
78  * `TOP_EARLGREY_UART2_BASE_ADDR + TOP_EARLGREY_UART2_SIZE_BYTES`.
79  */
80 #define TOP_EARLGREY_UART2_SIZE_BYTES 0x40u
81 
82 /**
83  * Peripheral base address for uart3 in top earlgrey.
84  *
85  * This should be used with #mmio_region_from_addr to access the memory-mapped
86  * registers associated with the peripheral (usually via a DIF).
87  */
88 #define TOP_EARLGREY_UART3_BASE_ADDR 0x40030000u
89 
90 /**
91  * Peripheral size for uart3 in top earlgrey.
92  *
93  * This is the size (in bytes) of the peripheral's reserved memory area. All
94  * memory-mapped registers associated with this peripheral should have an
95  * address between #TOP_EARLGREY_UART3_BASE_ADDR and
96  * `TOP_EARLGREY_UART3_BASE_ADDR + TOP_EARLGREY_UART3_SIZE_BYTES`.
97  */
98 #define TOP_EARLGREY_UART3_SIZE_BYTES 0x40u
99 
100 /**
101  * Peripheral base address for gpio in top earlgrey.
102  *
103  * This should be used with #mmio_region_from_addr to access the memory-mapped
104  * registers associated with the peripheral (usually via a DIF).
105  */
106 #define TOP_EARLGREY_GPIO_BASE_ADDR 0x40040000u
107 
108 /**
109  * Peripheral size for gpio in top earlgrey.
110  *
111  * This is the size (in bytes) of the peripheral's reserved memory area. All
112  * memory-mapped registers associated with this peripheral should have an
113  * address between #TOP_EARLGREY_GPIO_BASE_ADDR and
114  * `TOP_EARLGREY_GPIO_BASE_ADDR + TOP_EARLGREY_GPIO_SIZE_BYTES`.
115  */
116 #define TOP_EARLGREY_GPIO_SIZE_BYTES 0x80u
117 
118 /**
119  * Peripheral base address for spi_device in top earlgrey.
120  *
121  * This should be used with #mmio_region_from_addr to access the memory-mapped
122  * registers associated with the peripheral (usually via a DIF).
123  */
124 #define TOP_EARLGREY_SPI_DEVICE_BASE_ADDR 0x40050000u
125 
126 /**
127  * Peripheral size for spi_device in top earlgrey.
128  *
129  * This is the size (in bytes) of the peripheral's reserved memory area. All
130  * memory-mapped registers associated with this peripheral should have an
131  * address between #TOP_EARLGREY_SPI_DEVICE_BASE_ADDR and
132  * `TOP_EARLGREY_SPI_DEVICE_BASE_ADDR + TOP_EARLGREY_SPI_DEVICE_SIZE_BYTES`.
133  */
134 #define TOP_EARLGREY_SPI_DEVICE_SIZE_BYTES 0x2000u
135 
136 /**
137  * Peripheral base address for i2c0 in top earlgrey.
138  *
139  * This should be used with #mmio_region_from_addr to access the memory-mapped
140  * registers associated with the peripheral (usually via a DIF).
141  */
142 #define TOP_EARLGREY_I2C0_BASE_ADDR 0x40080000u
143 
144 /**
145  * Peripheral size for i2c0 in top earlgrey.
146  *
147  * This is the size (in bytes) of the peripheral's reserved memory area. All
148  * memory-mapped registers associated with this peripheral should have an
149  * address between #TOP_EARLGREY_I2C0_BASE_ADDR and
150  * `TOP_EARLGREY_I2C0_BASE_ADDR + TOP_EARLGREY_I2C0_SIZE_BYTES`.
151  */
152 #define TOP_EARLGREY_I2C0_SIZE_BYTES 0x80u
153 
154 /**
155  * Peripheral base address for i2c1 in top earlgrey.
156  *
157  * This should be used with #mmio_region_from_addr to access the memory-mapped
158  * registers associated with the peripheral (usually via a DIF).
159  */
160 #define TOP_EARLGREY_I2C1_BASE_ADDR 0x40090000u
161 
162 /**
163  * Peripheral size for i2c1 in top earlgrey.
164  *
165  * This is the size (in bytes) of the peripheral's reserved memory area. All
166  * memory-mapped registers associated with this peripheral should have an
167  * address between #TOP_EARLGREY_I2C1_BASE_ADDR and
168  * `TOP_EARLGREY_I2C1_BASE_ADDR + TOP_EARLGREY_I2C1_SIZE_BYTES`.
169  */
170 #define TOP_EARLGREY_I2C1_SIZE_BYTES 0x80u
171 
172 /**
173  * Peripheral base address for i2c2 in top earlgrey.
174  *
175  * This should be used with #mmio_region_from_addr to access the memory-mapped
176  * registers associated with the peripheral (usually via a DIF).
177  */
178 #define TOP_EARLGREY_I2C2_BASE_ADDR 0x400A0000u
179 
180 /**
181  * Peripheral size for i2c2 in top earlgrey.
182  *
183  * This is the size (in bytes) of the peripheral's reserved memory area. All
184  * memory-mapped registers associated with this peripheral should have an
185  * address between #TOP_EARLGREY_I2C2_BASE_ADDR and
186  * `TOP_EARLGREY_I2C2_BASE_ADDR + TOP_EARLGREY_I2C2_SIZE_BYTES`.
187  */
188 #define TOP_EARLGREY_I2C2_SIZE_BYTES 0x80u
189 
190 /**
191  * Peripheral base address for pattgen in top earlgrey.
192  *
193  * This should be used with #mmio_region_from_addr to access the memory-mapped
194  * registers associated with the peripheral (usually via a DIF).
195  */
196 #define TOP_EARLGREY_PATTGEN_BASE_ADDR 0x400E0000u
197 
198 /**
199  * Peripheral size for pattgen in top earlgrey.
200  *
201  * This is the size (in bytes) of the peripheral's reserved memory area. All
202  * memory-mapped registers associated with this peripheral should have an
203  * address between #TOP_EARLGREY_PATTGEN_BASE_ADDR and
204  * `TOP_EARLGREY_PATTGEN_BASE_ADDR + TOP_EARLGREY_PATTGEN_SIZE_BYTES`.
205  */
206 #define TOP_EARLGREY_PATTGEN_SIZE_BYTES 0x40u
207 
208 /**
209  * Peripheral base address for rv_timer in top earlgrey.
210  *
211  * This should be used with #mmio_region_from_addr to access the memory-mapped
212  * registers associated with the peripheral (usually via a DIF).
213  */
214 #define TOP_EARLGREY_RV_TIMER_BASE_ADDR 0x40100000u
215 
216 /**
217  * Peripheral size for rv_timer in top earlgrey.
218  *
219  * This is the size (in bytes) of the peripheral's reserved memory area. All
220  * memory-mapped registers associated with this peripheral should have an
221  * address between #TOP_EARLGREY_RV_TIMER_BASE_ADDR and
222  * `TOP_EARLGREY_RV_TIMER_BASE_ADDR + TOP_EARLGREY_RV_TIMER_SIZE_BYTES`.
223  */
224 #define TOP_EARLGREY_RV_TIMER_SIZE_BYTES 0x200u
225 
226 /**
227  * Peripheral base address for core device on otp_ctrl in top earlgrey.
228  *
229  * This should be used with #mmio_region_from_addr to access the memory-mapped
230  * registers associated with the peripheral (usually via a DIF).
231  */
232 #define TOP_EARLGREY_OTP_CTRL_CORE_BASE_ADDR 0x40130000u
233 
234 /**
235  * Peripheral size for core device on otp_ctrl in top earlgrey.
236  *
237  * This is the size (in bytes) of the peripheral's reserved memory area. All
238  * memory-mapped registers associated with this peripheral should have an
239  * address between #TOP_EARLGREY_OTP_CTRL_CORE_BASE_ADDR and
240  * `TOP_EARLGREY_OTP_CTRL_CORE_BASE_ADDR + TOP_EARLGREY_OTP_CTRL_CORE_SIZE_BYTES`.
241  */
242 #define TOP_EARLGREY_OTP_CTRL_CORE_SIZE_BYTES 0x1000u
243 
244 /**
245  * Peripheral base address for prim device on otp_ctrl in top earlgrey.
246  *
247  * This should be used with #mmio_region_from_addr to access the memory-mapped
248  * registers associated with the peripheral (usually via a DIF).
249  */
250 #define TOP_EARLGREY_OTP_CTRL_PRIM_BASE_ADDR 0x40138000u
251 
252 /**
253  * Peripheral size for prim device on otp_ctrl in top earlgrey.
254  *
255  * This is the size (in bytes) of the peripheral's reserved memory area. All
256  * memory-mapped registers associated with this peripheral should have an
257  * address between #TOP_EARLGREY_OTP_CTRL_PRIM_BASE_ADDR and
258  * `TOP_EARLGREY_OTP_CTRL_PRIM_BASE_ADDR + TOP_EARLGREY_OTP_CTRL_PRIM_SIZE_BYTES`.
259  */
260 #define TOP_EARLGREY_OTP_CTRL_PRIM_SIZE_BYTES 0x20u
261 
262 /**
263  * Peripheral base address for regs device on lc_ctrl in top earlgrey.
264  *
265  * This should be used with #mmio_region_from_addr to access the memory-mapped
266  * registers associated with the peripheral (usually via a DIF).
267  */
268 #define TOP_EARLGREY_LC_CTRL_REGS_BASE_ADDR 0x40140000u
269 
270 /**
271  * Peripheral size for regs device on lc_ctrl in top earlgrey.
272  *
273  * This is the size (in bytes) of the peripheral's reserved memory area. All
274  * memory-mapped registers associated with this peripheral should have an
275  * address between #TOP_EARLGREY_LC_CTRL_REGS_BASE_ADDR and
276  * `TOP_EARLGREY_LC_CTRL_REGS_BASE_ADDR + TOP_EARLGREY_LC_CTRL_REGS_SIZE_BYTES`.
277  */
278 #define TOP_EARLGREY_LC_CTRL_REGS_SIZE_BYTES 0x100u
279 
280 /**
281  * Peripheral base address for dmi device on lc_ctrl in top earlgrey.
282  *
283  * This should be used with #mmio_region_from_addr to access the memory-mapped
284  * registers associated with the peripheral (usually via a DIF).
285  */
286 #define TOP_EARLGREY_LC_CTRL_DMI_BASE_ADDR 0x0u
287 
288 /**
289  * Peripheral size for dmi device on lc_ctrl in top earlgrey.
290  *
291  * This is the size (in bytes) of the peripheral's reserved memory area. All
292  * memory-mapped registers associated with this peripheral should have an
293  * address between #TOP_EARLGREY_LC_CTRL_DMI_BASE_ADDR and
294  * `TOP_EARLGREY_LC_CTRL_DMI_BASE_ADDR + TOP_EARLGREY_LC_CTRL_DMI_SIZE_BYTES`.
295  */
296 #define TOP_EARLGREY_LC_CTRL_DMI_SIZE_BYTES 0x1000u
297 
298 /**
299  * Peripheral base address for alert_handler in top earlgrey.
300  *
301  * This should be used with #mmio_region_from_addr to access the memory-mapped
302  * registers associated with the peripheral (usually via a DIF).
303  */
304 #define TOP_EARLGREY_ALERT_HANDLER_BASE_ADDR 0x40150000u
305 
306 /**
307  * Peripheral size for alert_handler in top earlgrey.
308  *
309  * This is the size (in bytes) of the peripheral's reserved memory area. All
310  * memory-mapped registers associated with this peripheral should have an
311  * address between #TOP_EARLGREY_ALERT_HANDLER_BASE_ADDR and
312  * `TOP_EARLGREY_ALERT_HANDLER_BASE_ADDR + TOP_EARLGREY_ALERT_HANDLER_SIZE_BYTES`.
313  */
314 #define TOP_EARLGREY_ALERT_HANDLER_SIZE_BYTES 0x800u
315 
316 /**
317  * Peripheral base address for spi_host0 in top earlgrey.
318  *
319  * This should be used with #mmio_region_from_addr to access the memory-mapped
320  * registers associated with the peripheral (usually via a DIF).
321  */
322 #define TOP_EARLGREY_SPI_HOST0_BASE_ADDR 0x40300000u
323 
324 /**
325  * Peripheral size for spi_host0 in top earlgrey.
326  *
327  * This is the size (in bytes) of the peripheral's reserved memory area. All
328  * memory-mapped registers associated with this peripheral should have an
329  * address between #TOP_EARLGREY_SPI_HOST0_BASE_ADDR and
330  * `TOP_EARLGREY_SPI_HOST0_BASE_ADDR + TOP_EARLGREY_SPI_HOST0_SIZE_BYTES`.
331  */
332 #define TOP_EARLGREY_SPI_HOST0_SIZE_BYTES 0x40u
333 
334 /**
335  * Peripheral base address for spi_host1 in top earlgrey.
336  *
337  * This should be used with #mmio_region_from_addr to access the memory-mapped
338  * registers associated with the peripheral (usually via a DIF).
339  */
340 #define TOP_EARLGREY_SPI_HOST1_BASE_ADDR 0x40310000u
341 
342 /**
343  * Peripheral size for spi_host1 in top earlgrey.
344  *
345  * This is the size (in bytes) of the peripheral's reserved memory area. All
346  * memory-mapped registers associated with this peripheral should have an
347  * address between #TOP_EARLGREY_SPI_HOST1_BASE_ADDR and
348  * `TOP_EARLGREY_SPI_HOST1_BASE_ADDR + TOP_EARLGREY_SPI_HOST1_SIZE_BYTES`.
349  */
350 #define TOP_EARLGREY_SPI_HOST1_SIZE_BYTES 0x40u
351 
352 /**
353  * Peripheral base address for usbdev in top earlgrey.
354  *
355  * This should be used with #mmio_region_from_addr to access the memory-mapped
356  * registers associated with the peripheral (usually via a DIF).
357  */
358 #define TOP_EARLGREY_USBDEV_BASE_ADDR 0x40320000u
359 
360 /**
361  * Peripheral size for usbdev in top earlgrey.
362  *
363  * This is the size (in bytes) of the peripheral's reserved memory area. All
364  * memory-mapped registers associated with this peripheral should have an
365  * address between #TOP_EARLGREY_USBDEV_BASE_ADDR and
366  * `TOP_EARLGREY_USBDEV_BASE_ADDR + TOP_EARLGREY_USBDEV_SIZE_BYTES`.
367  */
368 #define TOP_EARLGREY_USBDEV_SIZE_BYTES 0x1000u
369 
370 /**
371  * Peripheral base address for pwrmgr_aon in top earlgrey.
372  *
373  * This should be used with #mmio_region_from_addr to access the memory-mapped
374  * registers associated with the peripheral (usually via a DIF).
375  */
376 #define TOP_EARLGREY_PWRMGR_AON_BASE_ADDR 0x40400000u
377 
378 /**
379  * Peripheral size for pwrmgr_aon in top earlgrey.
380  *
381  * This is the size (in bytes) of the peripheral's reserved memory area. All
382  * memory-mapped registers associated with this peripheral should have an
383  * address between #TOP_EARLGREY_PWRMGR_AON_BASE_ADDR and
384  * `TOP_EARLGREY_PWRMGR_AON_BASE_ADDR + TOP_EARLGREY_PWRMGR_AON_SIZE_BYTES`.
385  */
386 #define TOP_EARLGREY_PWRMGR_AON_SIZE_BYTES 0x80u
387 
388 /**
389  * Peripheral base address for rstmgr_aon in top earlgrey.
390  *
391  * This should be used with #mmio_region_from_addr to access the memory-mapped
392  * registers associated with the peripheral (usually via a DIF).
393  */
394 #define TOP_EARLGREY_RSTMGR_AON_BASE_ADDR 0x40410000u
395 
396 /**
397  * Peripheral size for rstmgr_aon in top earlgrey.
398  *
399  * This is the size (in bytes) of the peripheral's reserved memory area. All
400  * memory-mapped registers associated with this peripheral should have an
401  * address between #TOP_EARLGREY_RSTMGR_AON_BASE_ADDR and
402  * `TOP_EARLGREY_RSTMGR_AON_BASE_ADDR + TOP_EARLGREY_RSTMGR_AON_SIZE_BYTES`.
403  */
404 #define TOP_EARLGREY_RSTMGR_AON_SIZE_BYTES 0x80u
405 
406 /**
407  * Peripheral base address for clkmgr_aon in top earlgrey.
408  *
409  * This should be used with #mmio_region_from_addr to access the memory-mapped
410  * registers associated with the peripheral (usually via a DIF).
411  */
412 #define TOP_EARLGREY_CLKMGR_AON_BASE_ADDR 0x40420000u
413 
414 /**
415  * Peripheral size for clkmgr_aon in top earlgrey.
416  *
417  * This is the size (in bytes) of the peripheral's reserved memory area. All
418  * memory-mapped registers associated with this peripheral should have an
419  * address between #TOP_EARLGREY_CLKMGR_AON_BASE_ADDR and
420  * `TOP_EARLGREY_CLKMGR_AON_BASE_ADDR + TOP_EARLGREY_CLKMGR_AON_SIZE_BYTES`.
421  */
422 #define TOP_EARLGREY_CLKMGR_AON_SIZE_BYTES 0x80u
423 
424 /**
425  * Peripheral base address for sysrst_ctrl_aon in top earlgrey.
426  *
427  * This should be used with #mmio_region_from_addr to access the memory-mapped
428  * registers associated with the peripheral (usually via a DIF).
429  */
430 #define TOP_EARLGREY_SYSRST_CTRL_AON_BASE_ADDR 0x40430000u
431 
432 /**
433  * Peripheral size for sysrst_ctrl_aon in top earlgrey.
434  *
435  * This is the size (in bytes) of the peripheral's reserved memory area. All
436  * memory-mapped registers associated with this peripheral should have an
437  * address between #TOP_EARLGREY_SYSRST_CTRL_AON_BASE_ADDR and
438  * `TOP_EARLGREY_SYSRST_CTRL_AON_BASE_ADDR + TOP_EARLGREY_SYSRST_CTRL_AON_SIZE_BYTES`.
439  */
440 #define TOP_EARLGREY_SYSRST_CTRL_AON_SIZE_BYTES 0x100u
441 
442 /**
443  * Peripheral base address for adc_ctrl_aon in top earlgrey.
444  *
445  * This should be used with #mmio_region_from_addr to access the memory-mapped
446  * registers associated with the peripheral (usually via a DIF).
447  */
448 #define TOP_EARLGREY_ADC_CTRL_AON_BASE_ADDR 0x40440000u
449 
450 /**
451  * Peripheral size for adc_ctrl_aon in top earlgrey.
452  *
453  * This is the size (in bytes) of the peripheral's reserved memory area. All
454  * memory-mapped registers associated with this peripheral should have an
455  * address between #TOP_EARLGREY_ADC_CTRL_AON_BASE_ADDR and
456  * `TOP_EARLGREY_ADC_CTRL_AON_BASE_ADDR + TOP_EARLGREY_ADC_CTRL_AON_SIZE_BYTES`.
457  */
458 #define TOP_EARLGREY_ADC_CTRL_AON_SIZE_BYTES 0x80u
459 
460 /**
461  * Peripheral base address for pwm_aon in top earlgrey.
462  *
463  * This should be used with #mmio_region_from_addr to access the memory-mapped
464  * registers associated with the peripheral (usually via a DIF).
465  */
466 #define TOP_EARLGREY_PWM_AON_BASE_ADDR 0x40450000u
467 
468 /**
469  * Peripheral size for pwm_aon in top earlgrey.
470  *
471  * This is the size (in bytes) of the peripheral's reserved memory area. All
472  * memory-mapped registers associated with this peripheral should have an
473  * address between #TOP_EARLGREY_PWM_AON_BASE_ADDR and
474  * `TOP_EARLGREY_PWM_AON_BASE_ADDR + TOP_EARLGREY_PWM_AON_SIZE_BYTES`.
475  */
476 #define TOP_EARLGREY_PWM_AON_SIZE_BYTES 0x80u
477 
478 /**
479  * Peripheral base address for pinmux_aon in top earlgrey.
480  *
481  * This should be used with #mmio_region_from_addr to access the memory-mapped
482  * registers associated with the peripheral (usually via a DIF).
483  */
484 #define TOP_EARLGREY_PINMUX_AON_BASE_ADDR 0x40460000u
485 
486 /**
487  * Peripheral size for pinmux_aon in top earlgrey.
488  *
489  * This is the size (in bytes) of the peripheral's reserved memory area. All
490  * memory-mapped registers associated with this peripheral should have an
491  * address between #TOP_EARLGREY_PINMUX_AON_BASE_ADDR and
492  * `TOP_EARLGREY_PINMUX_AON_BASE_ADDR + TOP_EARLGREY_PINMUX_AON_SIZE_BYTES`.
493  */
494 #define TOP_EARLGREY_PINMUX_AON_SIZE_BYTES 0x1000u
495 
496 /**
497  * Peripheral base address for aon_timer_aon in top earlgrey.
498  *
499  * This should be used with #mmio_region_from_addr to access the memory-mapped
500  * registers associated with the peripheral (usually via a DIF).
501  */
502 #define TOP_EARLGREY_AON_TIMER_AON_BASE_ADDR 0x40470000u
503 
504 /**
505  * Peripheral size for aon_timer_aon in top earlgrey.
506  *
507  * This is the size (in bytes) of the peripheral's reserved memory area. All
508  * memory-mapped registers associated with this peripheral should have an
509  * address between #TOP_EARLGREY_AON_TIMER_AON_BASE_ADDR and
510  * `TOP_EARLGREY_AON_TIMER_AON_BASE_ADDR + TOP_EARLGREY_AON_TIMER_AON_SIZE_BYTES`.
511  */
512 #define TOP_EARLGREY_AON_TIMER_AON_SIZE_BYTES 0x40u
513 
514 /**
515  * Peripheral base address for ast in top earlgrey.
516  *
517  * This should be used with #mmio_region_from_addr to access the memory-mapped
518  * registers associated with the peripheral (usually via a DIF).
519  */
520 #define TOP_EARLGREY_AST_BASE_ADDR 0x40480000u
521 
522 /**
523  * Peripheral size for ast in top earlgrey.
524  *
525  * This is the size (in bytes) of the peripheral's reserved memory area. All
526  * memory-mapped registers associated with this peripheral should have an
527  * address between #TOP_EARLGREY_AST_BASE_ADDR and
528  * `TOP_EARLGREY_AST_BASE_ADDR + TOP_EARLGREY_AST_SIZE_BYTES`.
529  */
530 #define TOP_EARLGREY_AST_SIZE_BYTES 0x400u
531 
532 /**
533  * Peripheral base address for sensor_ctrl_aon in top earlgrey.
534  *
535  * This should be used with #mmio_region_from_addr to access the memory-mapped
536  * registers associated with the peripheral (usually via a DIF).
537  */
538 #define TOP_EARLGREY_SENSOR_CTRL_AON_BASE_ADDR 0x40490000u
539 
540 /**
541  * Peripheral size for sensor_ctrl_aon in top earlgrey.
542  *
543  * This is the size (in bytes) of the peripheral's reserved memory area. All
544  * memory-mapped registers associated with this peripheral should have an
545  * address between #TOP_EARLGREY_SENSOR_CTRL_AON_BASE_ADDR and
546  * `TOP_EARLGREY_SENSOR_CTRL_AON_BASE_ADDR + TOP_EARLGREY_SENSOR_CTRL_AON_SIZE_BYTES`.
547  */
548 #define TOP_EARLGREY_SENSOR_CTRL_AON_SIZE_BYTES 0x80u
549 
550 /**
551  * Peripheral base address for regs device on sram_ctrl_ret_aon in top earlgrey.
552  *
553  * This should be used with #mmio_region_from_addr to access the memory-mapped
554  * registers associated with the peripheral (usually via a DIF).
555  */
556 #define TOP_EARLGREY_SRAM_CTRL_RET_AON_REGS_BASE_ADDR 0x40500000u
557 
558 /**
559  * Peripheral size for regs device on sram_ctrl_ret_aon in top earlgrey.
560  *
561  * This is the size (in bytes) of the peripheral's reserved memory area. All
562  * memory-mapped registers associated with this peripheral should have an
563  * address between #TOP_EARLGREY_SRAM_CTRL_RET_AON_REGS_BASE_ADDR and
564  * `TOP_EARLGREY_SRAM_CTRL_RET_AON_REGS_BASE_ADDR + TOP_EARLGREY_SRAM_CTRL_RET_AON_REGS_SIZE_BYTES`.
565  */
566 #define TOP_EARLGREY_SRAM_CTRL_RET_AON_REGS_SIZE_BYTES 0x40u
567 
568 /**
569  * Peripheral base address for ram device on sram_ctrl_ret_aon in top earlgrey.
570  *
571  * This should be used with #mmio_region_from_addr to access the memory-mapped
572  * registers associated with the peripheral (usually via a DIF).
573  */
574 #define TOP_EARLGREY_SRAM_CTRL_RET_AON_RAM_BASE_ADDR 0x40600000u
575 
576 /**
577  * Peripheral size for ram device on sram_ctrl_ret_aon in top earlgrey.
578  *
579  * This is the size (in bytes) of the peripheral's reserved memory area. All
580  * memory-mapped registers associated with this peripheral should have an
581  * address between #TOP_EARLGREY_SRAM_CTRL_RET_AON_RAM_BASE_ADDR and
582  * `TOP_EARLGREY_SRAM_CTRL_RET_AON_RAM_BASE_ADDR + TOP_EARLGREY_SRAM_CTRL_RET_AON_RAM_SIZE_BYTES`.
583  */
584 #define TOP_EARLGREY_SRAM_CTRL_RET_AON_RAM_SIZE_BYTES 0x1000u
585 
586 /**
587  * Peripheral base address for core device on flash_ctrl in top earlgrey.
588  *
589  * This should be used with #mmio_region_from_addr to access the memory-mapped
590  * registers associated with the peripheral (usually via a DIF).
591  */
592 #define TOP_EARLGREY_FLASH_CTRL_CORE_BASE_ADDR 0x41000000u
593 
594 /**
595  * Peripheral size for core device on flash_ctrl in top earlgrey.
596  *
597  * This is the size (in bytes) of the peripheral's reserved memory area. All
598  * memory-mapped registers associated with this peripheral should have an
599  * address between #TOP_EARLGREY_FLASH_CTRL_CORE_BASE_ADDR and
600  * `TOP_EARLGREY_FLASH_CTRL_CORE_BASE_ADDR + TOP_EARLGREY_FLASH_CTRL_CORE_SIZE_BYTES`.
601  */
602 #define TOP_EARLGREY_FLASH_CTRL_CORE_SIZE_BYTES 0x200u
603 
604 /**
605  * Peripheral base address for prim device on flash_ctrl in top earlgrey.
606  *
607  * This should be used with #mmio_region_from_addr to access the memory-mapped
608  * registers associated with the peripheral (usually via a DIF).
609  */
610 #define TOP_EARLGREY_FLASH_CTRL_PRIM_BASE_ADDR 0x41008000u
611 
612 /**
613  * Peripheral size for prim device on flash_ctrl in top earlgrey.
614  *
615  * This is the size (in bytes) of the peripheral's reserved memory area. All
616  * memory-mapped registers associated with this peripheral should have an
617  * address between #TOP_EARLGREY_FLASH_CTRL_PRIM_BASE_ADDR and
618  * `TOP_EARLGREY_FLASH_CTRL_PRIM_BASE_ADDR + TOP_EARLGREY_FLASH_CTRL_PRIM_SIZE_BYTES`.
619  */
620 #define TOP_EARLGREY_FLASH_CTRL_PRIM_SIZE_BYTES 0x80u
621 
622 /**
623  * Peripheral base address for mem device on flash_ctrl in top earlgrey.
624  *
625  * This should be used with #mmio_region_from_addr to access the memory-mapped
626  * registers associated with the peripheral (usually via a DIF).
627  */
628 #define TOP_EARLGREY_FLASH_CTRL_MEM_BASE_ADDR 0x20000000u
629 
630 /**
631  * Peripheral size for mem device on flash_ctrl in top earlgrey.
632  *
633  * This is the size (in bytes) of the peripheral's reserved memory area. All
634  * memory-mapped registers associated with this peripheral should have an
635  * address between #TOP_EARLGREY_FLASH_CTRL_MEM_BASE_ADDR and
636  * `TOP_EARLGREY_FLASH_CTRL_MEM_BASE_ADDR + TOP_EARLGREY_FLASH_CTRL_MEM_SIZE_BYTES`.
637  */
638 #define TOP_EARLGREY_FLASH_CTRL_MEM_SIZE_BYTES 0x100000u
639 
640 /**
641  * Peripheral base address for regs device on rv_dm in top earlgrey.
642  *
643  * This should be used with #mmio_region_from_addr to access the memory-mapped
644  * registers associated with the peripheral (usually via a DIF).
645  */
646 #define TOP_EARLGREY_RV_DM_REGS_BASE_ADDR 0x41200000u
647 
648 /**
649  * Peripheral size for regs device on rv_dm in top earlgrey.
650  *
651  * This is the size (in bytes) of the peripheral's reserved memory area. All
652  * memory-mapped registers associated with this peripheral should have an
653  * address between #TOP_EARLGREY_RV_DM_REGS_BASE_ADDR and
654  * `TOP_EARLGREY_RV_DM_REGS_BASE_ADDR + TOP_EARLGREY_RV_DM_REGS_SIZE_BYTES`.
655  */
656 #define TOP_EARLGREY_RV_DM_REGS_SIZE_BYTES 0x10u
657 
658 /**
659  * Peripheral base address for mem device on rv_dm in top earlgrey.
660  *
661  * This should be used with #mmio_region_from_addr to access the memory-mapped
662  * registers associated with the peripheral (usually via a DIF).
663  */
664 #define TOP_EARLGREY_RV_DM_MEM_BASE_ADDR 0x10000u
665 
666 /**
667  * Peripheral size for mem device on rv_dm in top earlgrey.
668  *
669  * This is the size (in bytes) of the peripheral's reserved memory area. All
670  * memory-mapped registers associated with this peripheral should have an
671  * address between #TOP_EARLGREY_RV_DM_MEM_BASE_ADDR and
672  * `TOP_EARLGREY_RV_DM_MEM_BASE_ADDR + TOP_EARLGREY_RV_DM_MEM_SIZE_BYTES`.
673  */
674 #define TOP_EARLGREY_RV_DM_MEM_SIZE_BYTES 0x1000u
675 
676 /**
677  * Peripheral base address for dbg device on rv_dm in top earlgrey.
678  *
679  * This should be used with #mmio_region_from_addr to access the memory-mapped
680  * registers associated with the peripheral (usually via a DIF).
681  */
682 #define TOP_EARLGREY_RV_DM_DBG_BASE_ADDR 0x1000u
683 
684 /**
685  * Peripheral size for dbg device on rv_dm in top earlgrey.
686  *
687  * This is the size (in bytes) of the peripheral's reserved memory area. All
688  * memory-mapped registers associated with this peripheral should have an
689  * address between #TOP_EARLGREY_RV_DM_DBG_BASE_ADDR and
690  * `TOP_EARLGREY_RV_DM_DBG_BASE_ADDR + TOP_EARLGREY_RV_DM_DBG_SIZE_BYTES`.
691  */
692 #define TOP_EARLGREY_RV_DM_DBG_SIZE_BYTES 0x200u
693 
694 /**
695  * Peripheral base address for rv_plic in top earlgrey.
696  *
697  * This should be used with #mmio_region_from_addr to access the memory-mapped
698  * registers associated with the peripheral (usually via a DIF).
699  */
700 #define TOP_EARLGREY_RV_PLIC_BASE_ADDR 0x48000000u
701 
702 /**
703  * Peripheral size for rv_plic in top earlgrey.
704  *
705  * This is the size (in bytes) of the peripheral's reserved memory area. All
706  * memory-mapped registers associated with this peripheral should have an
707  * address between #TOP_EARLGREY_RV_PLIC_BASE_ADDR and
708  * `TOP_EARLGREY_RV_PLIC_BASE_ADDR + TOP_EARLGREY_RV_PLIC_SIZE_BYTES`.
709  */
710 #define TOP_EARLGREY_RV_PLIC_SIZE_BYTES 0x8000000u
711 
712 /**
713  * Peripheral base address for aes in top earlgrey.
714  *
715  * This should be used with #mmio_region_from_addr to access the memory-mapped
716  * registers associated with the peripheral (usually via a DIF).
717  */
718 #define TOP_EARLGREY_AES_BASE_ADDR 0x41100000u
719 
720 /**
721  * Peripheral size for aes in top earlgrey.
722  *
723  * This is the size (in bytes) of the peripheral's reserved memory area. All
724  * memory-mapped registers associated with this peripheral should have an
725  * address between #TOP_EARLGREY_AES_BASE_ADDR and
726  * `TOP_EARLGREY_AES_BASE_ADDR + TOP_EARLGREY_AES_SIZE_BYTES`.
727  */
728 #define TOP_EARLGREY_AES_SIZE_BYTES 0x100u
729 
730 /**
731  * Peripheral base address for hmac in top earlgrey.
732  *
733  * This should be used with #mmio_region_from_addr to access the memory-mapped
734  * registers associated with the peripheral (usually via a DIF).
735  */
736 #define TOP_EARLGREY_HMAC_BASE_ADDR 0x41110000u
737 
738 /**
739  * Peripheral size for hmac in top earlgrey.
740  *
741  * This is the size (in bytes) of the peripheral's reserved memory area. All
742  * memory-mapped registers associated with this peripheral should have an
743  * address between #TOP_EARLGREY_HMAC_BASE_ADDR and
744  * `TOP_EARLGREY_HMAC_BASE_ADDR + TOP_EARLGREY_HMAC_SIZE_BYTES`.
745  */
746 #define TOP_EARLGREY_HMAC_SIZE_BYTES 0x2000u
747 
748 /**
749  * Peripheral base address for kmac in top earlgrey.
750  *
751  * This should be used with #mmio_region_from_addr to access the memory-mapped
752  * registers associated with the peripheral (usually via a DIF).
753  */
754 #define TOP_EARLGREY_KMAC_BASE_ADDR 0x41120000u
755 
756 /**
757  * Peripheral size for kmac in top earlgrey.
758  *
759  * This is the size (in bytes) of the peripheral's reserved memory area. All
760  * memory-mapped registers associated with this peripheral should have an
761  * address between #TOP_EARLGREY_KMAC_BASE_ADDR and
762  * `TOP_EARLGREY_KMAC_BASE_ADDR + TOP_EARLGREY_KMAC_SIZE_BYTES`.
763  */
764 #define TOP_EARLGREY_KMAC_SIZE_BYTES 0x1000u
765 
766 /**
767  * Peripheral base address for otbn in top earlgrey.
768  *
769  * This should be used with #mmio_region_from_addr to access the memory-mapped
770  * registers associated with the peripheral (usually via a DIF).
771  */
772 #define TOP_EARLGREY_OTBN_BASE_ADDR 0x41130000u
773 
774 /**
775  * Peripheral size for otbn in top earlgrey.
776  *
777  * This is the size (in bytes) of the peripheral's reserved memory area. All
778  * memory-mapped registers associated with this peripheral should have an
779  * address between #TOP_EARLGREY_OTBN_BASE_ADDR and
780  * `TOP_EARLGREY_OTBN_BASE_ADDR + TOP_EARLGREY_OTBN_SIZE_BYTES`.
781  */
782 #define TOP_EARLGREY_OTBN_SIZE_BYTES 0x10000u
783 
784 /**
785  * Peripheral base address for keymgr in top earlgrey.
786  *
787  * This should be used with #mmio_region_from_addr to access the memory-mapped
788  * registers associated with the peripheral (usually via a DIF).
789  */
790 #define TOP_EARLGREY_KEYMGR_BASE_ADDR 0x41140000u
791 
792 /**
793  * Peripheral size for keymgr in top earlgrey.
794  *
795  * This is the size (in bytes) of the peripheral's reserved memory area. All
796  * memory-mapped registers associated with this peripheral should have an
797  * address between #TOP_EARLGREY_KEYMGR_BASE_ADDR and
798  * `TOP_EARLGREY_KEYMGR_BASE_ADDR + TOP_EARLGREY_KEYMGR_SIZE_BYTES`.
799  */
800 #define TOP_EARLGREY_KEYMGR_SIZE_BYTES 0x100u
801 
802 /**
803  * Peripheral base address for csrng in top earlgrey.
804  *
805  * This should be used with #mmio_region_from_addr to access the memory-mapped
806  * registers associated with the peripheral (usually via a DIF).
807  */
808 #define TOP_EARLGREY_CSRNG_BASE_ADDR 0x41150000u
809 
810 /**
811  * Peripheral size for csrng in top earlgrey.
812  *
813  * This is the size (in bytes) of the peripheral's reserved memory area. All
814  * memory-mapped registers associated with this peripheral should have an
815  * address between #TOP_EARLGREY_CSRNG_BASE_ADDR and
816  * `TOP_EARLGREY_CSRNG_BASE_ADDR + TOP_EARLGREY_CSRNG_SIZE_BYTES`.
817  */
818 #define TOP_EARLGREY_CSRNG_SIZE_BYTES 0x80u
819 
820 /**
821  * Peripheral base address for entropy_src in top earlgrey.
822  *
823  * This should be used with #mmio_region_from_addr to access the memory-mapped
824  * registers associated with the peripheral (usually via a DIF).
825  */
826 #define TOP_EARLGREY_ENTROPY_SRC_BASE_ADDR 0x41160000u
827 
828 /**
829  * Peripheral size for entropy_src in top earlgrey.
830  *
831  * This is the size (in bytes) of the peripheral's reserved memory area. All
832  * memory-mapped registers associated with this peripheral should have an
833  * address between #TOP_EARLGREY_ENTROPY_SRC_BASE_ADDR and
834  * `TOP_EARLGREY_ENTROPY_SRC_BASE_ADDR + TOP_EARLGREY_ENTROPY_SRC_SIZE_BYTES`.
835  */
836 #define TOP_EARLGREY_ENTROPY_SRC_SIZE_BYTES 0x100u
837 
838 /**
839  * Peripheral base address for edn0 in top earlgrey.
840  *
841  * This should be used with #mmio_region_from_addr to access the memory-mapped
842  * registers associated with the peripheral (usually via a DIF).
843  */
844 #define TOP_EARLGREY_EDN0_BASE_ADDR 0x41170000u
845 
846 /**
847  * Peripheral size for edn0 in top earlgrey.
848  *
849  * This is the size (in bytes) of the peripheral's reserved memory area. All
850  * memory-mapped registers associated with this peripheral should have an
851  * address between #TOP_EARLGREY_EDN0_BASE_ADDR and
852  * `TOP_EARLGREY_EDN0_BASE_ADDR + TOP_EARLGREY_EDN0_SIZE_BYTES`.
853  */
854 #define TOP_EARLGREY_EDN0_SIZE_BYTES 0x80u
855 
856 /**
857  * Peripheral base address for edn1 in top earlgrey.
858  *
859  * This should be used with #mmio_region_from_addr to access the memory-mapped
860  * registers associated with the peripheral (usually via a DIF).
861  */
862 #define TOP_EARLGREY_EDN1_BASE_ADDR 0x41180000u
863 
864 /**
865  * Peripheral size for edn1 in top earlgrey.
866  *
867  * This is the size (in bytes) of the peripheral's reserved memory area. All
868  * memory-mapped registers associated with this peripheral should have an
869  * address between #TOP_EARLGREY_EDN1_BASE_ADDR and
870  * `TOP_EARLGREY_EDN1_BASE_ADDR + TOP_EARLGREY_EDN1_SIZE_BYTES`.
871  */
872 #define TOP_EARLGREY_EDN1_SIZE_BYTES 0x80u
873 
874 /**
875  * Peripheral base address for regs device on sram_ctrl_main in top earlgrey.
876  *
877  * This should be used with #mmio_region_from_addr to access the memory-mapped
878  * registers associated with the peripheral (usually via a DIF).
879  */
880 #define TOP_EARLGREY_SRAM_CTRL_MAIN_REGS_BASE_ADDR 0x411C0000u
881 
882 /**
883  * Peripheral size for regs device on sram_ctrl_main in top earlgrey.
884  *
885  * This is the size (in bytes) of the peripheral's reserved memory area. All
886  * memory-mapped registers associated with this peripheral should have an
887  * address between #TOP_EARLGREY_SRAM_CTRL_MAIN_REGS_BASE_ADDR and
888  * `TOP_EARLGREY_SRAM_CTRL_MAIN_REGS_BASE_ADDR + TOP_EARLGREY_SRAM_CTRL_MAIN_REGS_SIZE_BYTES`.
889  */
890 #define TOP_EARLGREY_SRAM_CTRL_MAIN_REGS_SIZE_BYTES 0x40u
891 
892 /**
893  * Peripheral base address for ram device on sram_ctrl_main in top earlgrey.
894  *
895  * This should be used with #mmio_region_from_addr to access the memory-mapped
896  * registers associated with the peripheral (usually via a DIF).
897  */
898 #define TOP_EARLGREY_SRAM_CTRL_MAIN_RAM_BASE_ADDR 0x10000000u
899 
900 /**
901  * Peripheral size for ram device on sram_ctrl_main in top earlgrey.
902  *
903  * This is the size (in bytes) of the peripheral's reserved memory area. All
904  * memory-mapped registers associated with this peripheral should have an
905  * address between #TOP_EARLGREY_SRAM_CTRL_MAIN_RAM_BASE_ADDR and
906  * `TOP_EARLGREY_SRAM_CTRL_MAIN_RAM_BASE_ADDR + TOP_EARLGREY_SRAM_CTRL_MAIN_RAM_SIZE_BYTES`.
907  */
908 #define TOP_EARLGREY_SRAM_CTRL_MAIN_RAM_SIZE_BYTES 0x20000u
909 
910 /**
911  * Peripheral base address for regs device on rom_ctrl in top earlgrey.
912  *
913  * This should be used with #mmio_region_from_addr to access the memory-mapped
914  * registers associated with the peripheral (usually via a DIF).
915  */
916 #define TOP_EARLGREY_ROM_CTRL_REGS_BASE_ADDR 0x411E0000u
917 
918 /**
919  * Peripheral size for regs device on rom_ctrl in top earlgrey.
920  *
921  * This is the size (in bytes) of the peripheral's reserved memory area. All
922  * memory-mapped registers associated with this peripheral should have an
923  * address between #TOP_EARLGREY_ROM_CTRL_REGS_BASE_ADDR and
924  * `TOP_EARLGREY_ROM_CTRL_REGS_BASE_ADDR + TOP_EARLGREY_ROM_CTRL_REGS_SIZE_BYTES`.
925  */
926 #define TOP_EARLGREY_ROM_CTRL_REGS_SIZE_BYTES 0x80u
927 
928 /**
929  * Peripheral base address for rom device on rom_ctrl in top earlgrey.
930  *
931  * This should be used with #mmio_region_from_addr to access the memory-mapped
932  * registers associated with the peripheral (usually via a DIF).
933  */
934 #define TOP_EARLGREY_ROM_CTRL_ROM_BASE_ADDR 0x8000u
935 
936 /**
937  * Peripheral size for rom device on rom_ctrl in top earlgrey.
938  *
939  * This is the size (in bytes) of the peripheral's reserved memory area. All
940  * memory-mapped registers associated with this peripheral should have an
941  * address between #TOP_EARLGREY_ROM_CTRL_ROM_BASE_ADDR and
942  * `TOP_EARLGREY_ROM_CTRL_ROM_BASE_ADDR + TOP_EARLGREY_ROM_CTRL_ROM_SIZE_BYTES`.
943  */
944 #define TOP_EARLGREY_ROM_CTRL_ROM_SIZE_BYTES 0x8000u
945 
946 /**
947  * Peripheral base address for cfg device on rv_core_ibex in top earlgrey.
948  *
949  * This should be used with #mmio_region_from_addr to access the memory-mapped
950  * registers associated with the peripheral (usually via a DIF).
951  */
952 #define TOP_EARLGREY_RV_CORE_IBEX_CFG_BASE_ADDR 0x411F0000u
953 
954 /**
955  * Peripheral size for cfg device on rv_core_ibex in top earlgrey.
956  *
957  * This is the size (in bytes) of the peripheral's reserved memory area. All
958  * memory-mapped registers associated with this peripheral should have an
959  * address between #TOP_EARLGREY_RV_CORE_IBEX_CFG_BASE_ADDR and
960  * `TOP_EARLGREY_RV_CORE_IBEX_CFG_BASE_ADDR + TOP_EARLGREY_RV_CORE_IBEX_CFG_SIZE_BYTES`.
961  */
962 #define TOP_EARLGREY_RV_CORE_IBEX_CFG_SIZE_BYTES 0x100u
963 
964 
965 /**
966  * Memory base address for ram_ret_aon in top earlgrey.
967  */
968 #define TOP_EARLGREY_RAM_RET_AON_BASE_ADDR 0x40600000u
969 
970 /**
971  * Memory size for ram_ret_aon in top earlgrey.
972  */
973 #define TOP_EARLGREY_RAM_RET_AON_SIZE_BYTES 0x1000u
974 
975 /**
976  * Memory base address for eflash in top earlgrey.
977  */
978 #define TOP_EARLGREY_EFLASH_BASE_ADDR 0x20000000u
979 
980 /**
981  * Memory size for eflash in top earlgrey.
982  */
983 #define TOP_EARLGREY_EFLASH_SIZE_BYTES 0x100000u
984 
985 /**
986  * Memory base address for ram_main in top earlgrey.
987  */
988 #define TOP_EARLGREY_RAM_MAIN_BASE_ADDR 0x10000000u
989 
990 /**
991  * Memory size for ram_main in top earlgrey.
992  */
993 #define TOP_EARLGREY_RAM_MAIN_SIZE_BYTES 0x20000u
994 
995 /**
996  * Memory base address for rom in top earlgrey.
997  */
998 #define TOP_EARLGREY_ROM_BASE_ADDR 0x8000u
999 
1000 /**
1001  * Memory size for rom in top earlgrey.
1002  */
1003 #define TOP_EARLGREY_ROM_SIZE_BYTES 0x8000u
1004 
1005 
1006 /**
1007  * PLIC Interrupt Source Peripheral.
1008  *
1009  * Enumeration used to determine which peripheral asserted the corresponding
1010  * interrupt.
1011  */
1013  kTopEarlgreyPlicPeripheralUnknown = 0, /**< Unknown Peripheral */
1019  kTopEarlgreyPlicPeripheralSpiDevice = 6, /**< spi_device */
1024  kTopEarlgreyPlicPeripheralRvTimer = 11, /**< rv_timer */
1025  kTopEarlgreyPlicPeripheralOtpCtrl = 12, /**< otp_ctrl */
1026  kTopEarlgreyPlicPeripheralAlertHandler = 13, /**< alert_handler */
1027  kTopEarlgreyPlicPeripheralSpiHost0 = 14, /**< spi_host0 */
1028  kTopEarlgreyPlicPeripheralSpiHost1 = 15, /**< spi_host1 */
1030  kTopEarlgreyPlicPeripheralPwrmgrAon = 17, /**< pwrmgr_aon */
1031  kTopEarlgreyPlicPeripheralSysrstCtrlAon = 18, /**< sysrst_ctrl_aon */
1032  kTopEarlgreyPlicPeripheralAdcCtrlAon = 19, /**< adc_ctrl_aon */
1033  kTopEarlgreyPlicPeripheralAonTimerAon = 20, /**< aon_timer_aon */
1034  kTopEarlgreyPlicPeripheralSensorCtrlAon = 21, /**< sensor_ctrl_aon */
1035  kTopEarlgreyPlicPeripheralFlashCtrl = 22, /**< flash_ctrl */
1041  kTopEarlgreyPlicPeripheralEntropySrc = 28, /**< entropy_src */
1044  kTopEarlgreyPlicPeripheralLast = 30, /**< \internal Final PLIC peripheral */
1046 
1047 /**
1048  * PLIC Interrupt Source.
1049  *
1050  * Enumeration of all PLIC interrupt sources. The interrupt sources belonging to
1051  * the same peripheral are guaranteed to be consecutive.
1052  */
1054  kTopEarlgreyPlicIrqIdNone = 0, /**< No Interrupt */
1055  kTopEarlgreyPlicIrqIdUart0TxWatermark = 1, /**< uart0_tx_watermark */
1056  kTopEarlgreyPlicIrqIdUart0RxWatermark = 2, /**< uart0_rx_watermark */
1057  kTopEarlgreyPlicIrqIdUart0TxDone = 3, /**< uart0_tx_done */
1058  kTopEarlgreyPlicIrqIdUart0RxOverflow = 4, /**< uart0_rx_overflow */
1059  kTopEarlgreyPlicIrqIdUart0RxFrameErr = 5, /**< uart0_rx_frame_err */
1060  kTopEarlgreyPlicIrqIdUart0RxBreakErr = 6, /**< uart0_rx_break_err */
1061  kTopEarlgreyPlicIrqIdUart0RxTimeout = 7, /**< uart0_rx_timeout */
1062  kTopEarlgreyPlicIrqIdUart0RxParityErr = 8, /**< uart0_rx_parity_err */
1063  kTopEarlgreyPlicIrqIdUart0TxEmpty = 9, /**< uart0_tx_empty */
1064  kTopEarlgreyPlicIrqIdUart1TxWatermark = 10, /**< uart1_tx_watermark */
1065  kTopEarlgreyPlicIrqIdUart1RxWatermark = 11, /**< uart1_rx_watermark */
1066  kTopEarlgreyPlicIrqIdUart1TxDone = 12, /**< uart1_tx_done */
1067  kTopEarlgreyPlicIrqIdUart1RxOverflow = 13, /**< uart1_rx_overflow */
1068  kTopEarlgreyPlicIrqIdUart1RxFrameErr = 14, /**< uart1_rx_frame_err */
1069  kTopEarlgreyPlicIrqIdUart1RxBreakErr = 15, /**< uart1_rx_break_err */
1070  kTopEarlgreyPlicIrqIdUart1RxTimeout = 16, /**< uart1_rx_timeout */
1071  kTopEarlgreyPlicIrqIdUart1RxParityErr = 17, /**< uart1_rx_parity_err */
1072  kTopEarlgreyPlicIrqIdUart1TxEmpty = 18, /**< uart1_tx_empty */
1073  kTopEarlgreyPlicIrqIdUart2TxWatermark = 19, /**< uart2_tx_watermark */
1074  kTopEarlgreyPlicIrqIdUart2RxWatermark = 20, /**< uart2_rx_watermark */
1075  kTopEarlgreyPlicIrqIdUart2TxDone = 21, /**< uart2_tx_done */
1076  kTopEarlgreyPlicIrqIdUart2RxOverflow = 22, /**< uart2_rx_overflow */
1077  kTopEarlgreyPlicIrqIdUart2RxFrameErr = 23, /**< uart2_rx_frame_err */
1078  kTopEarlgreyPlicIrqIdUart2RxBreakErr = 24, /**< uart2_rx_break_err */
1079  kTopEarlgreyPlicIrqIdUart2RxTimeout = 25, /**< uart2_rx_timeout */
1080  kTopEarlgreyPlicIrqIdUart2RxParityErr = 26, /**< uart2_rx_parity_err */
1081  kTopEarlgreyPlicIrqIdUart2TxEmpty = 27, /**< uart2_tx_empty */
1082  kTopEarlgreyPlicIrqIdUart3TxWatermark = 28, /**< uart3_tx_watermark */
1083  kTopEarlgreyPlicIrqIdUart3RxWatermark = 29, /**< uart3_rx_watermark */
1084  kTopEarlgreyPlicIrqIdUart3TxDone = 30, /**< uart3_tx_done */
1085  kTopEarlgreyPlicIrqIdUart3RxOverflow = 31, /**< uart3_rx_overflow */
1086  kTopEarlgreyPlicIrqIdUart3RxFrameErr = 32, /**< uart3_rx_frame_err */
1087  kTopEarlgreyPlicIrqIdUart3RxBreakErr = 33, /**< uart3_rx_break_err */
1088  kTopEarlgreyPlicIrqIdUart3RxTimeout = 34, /**< uart3_rx_timeout */
1089  kTopEarlgreyPlicIrqIdUart3RxParityErr = 35, /**< uart3_rx_parity_err */
1090  kTopEarlgreyPlicIrqIdUart3TxEmpty = 36, /**< uart3_tx_empty */
1091  kTopEarlgreyPlicIrqIdGpioGpio0 = 37, /**< gpio_gpio 0 */
1092  kTopEarlgreyPlicIrqIdGpioGpio1 = 38, /**< gpio_gpio 1 */
1093  kTopEarlgreyPlicIrqIdGpioGpio2 = 39, /**< gpio_gpio 2 */
1094  kTopEarlgreyPlicIrqIdGpioGpio3 = 40, /**< gpio_gpio 3 */
1095  kTopEarlgreyPlicIrqIdGpioGpio4 = 41, /**< gpio_gpio 4 */
1096  kTopEarlgreyPlicIrqIdGpioGpio5 = 42, /**< gpio_gpio 5 */
1097  kTopEarlgreyPlicIrqIdGpioGpio6 = 43, /**< gpio_gpio 6 */
1098  kTopEarlgreyPlicIrqIdGpioGpio7 = 44, /**< gpio_gpio 7 */
1099  kTopEarlgreyPlicIrqIdGpioGpio8 = 45, /**< gpio_gpio 8 */
1100  kTopEarlgreyPlicIrqIdGpioGpio9 = 46, /**< gpio_gpio 9 */
1101  kTopEarlgreyPlicIrqIdGpioGpio10 = 47, /**< gpio_gpio 10 */
1102  kTopEarlgreyPlicIrqIdGpioGpio11 = 48, /**< gpio_gpio 11 */
1103  kTopEarlgreyPlicIrqIdGpioGpio12 = 49, /**< gpio_gpio 12 */
1104  kTopEarlgreyPlicIrqIdGpioGpio13 = 50, /**< gpio_gpio 13 */
1105  kTopEarlgreyPlicIrqIdGpioGpio14 = 51, /**< gpio_gpio 14 */
1106  kTopEarlgreyPlicIrqIdGpioGpio15 = 52, /**< gpio_gpio 15 */
1107  kTopEarlgreyPlicIrqIdGpioGpio16 = 53, /**< gpio_gpio 16 */
1108  kTopEarlgreyPlicIrqIdGpioGpio17 = 54, /**< gpio_gpio 17 */
1109  kTopEarlgreyPlicIrqIdGpioGpio18 = 55, /**< gpio_gpio 18 */
1110  kTopEarlgreyPlicIrqIdGpioGpio19 = 56, /**< gpio_gpio 19 */
1111  kTopEarlgreyPlicIrqIdGpioGpio20 = 57, /**< gpio_gpio 20 */
1112  kTopEarlgreyPlicIrqIdGpioGpio21 = 58, /**< gpio_gpio 21 */
1113  kTopEarlgreyPlicIrqIdGpioGpio22 = 59, /**< gpio_gpio 22 */
1114  kTopEarlgreyPlicIrqIdGpioGpio23 = 60, /**< gpio_gpio 23 */
1115  kTopEarlgreyPlicIrqIdGpioGpio24 = 61, /**< gpio_gpio 24 */
1116  kTopEarlgreyPlicIrqIdGpioGpio25 = 62, /**< gpio_gpio 25 */
1117  kTopEarlgreyPlicIrqIdGpioGpio26 = 63, /**< gpio_gpio 26 */
1118  kTopEarlgreyPlicIrqIdGpioGpio27 = 64, /**< gpio_gpio 27 */
1119  kTopEarlgreyPlicIrqIdGpioGpio28 = 65, /**< gpio_gpio 28 */
1120  kTopEarlgreyPlicIrqIdGpioGpio29 = 66, /**< gpio_gpio 29 */
1121  kTopEarlgreyPlicIrqIdGpioGpio30 = 67, /**< gpio_gpio 30 */
1122  kTopEarlgreyPlicIrqIdGpioGpio31 = 68, /**< gpio_gpio 31 */
1123  kTopEarlgreyPlicIrqIdSpiDeviceUploadCmdfifoNotEmpty = 69, /**< spi_device_upload_cmdfifo_not_empty */
1124  kTopEarlgreyPlicIrqIdSpiDeviceUploadPayloadNotEmpty = 70, /**< spi_device_upload_payload_not_empty */
1125  kTopEarlgreyPlicIrqIdSpiDeviceUploadPayloadOverflow = 71, /**< spi_device_upload_payload_overflow */
1126  kTopEarlgreyPlicIrqIdSpiDeviceReadbufWatermark = 72, /**< spi_device_readbuf_watermark */
1127  kTopEarlgreyPlicIrqIdSpiDeviceReadbufFlip = 73, /**< spi_device_readbuf_flip */
1128  kTopEarlgreyPlicIrqIdSpiDeviceTpmHeaderNotEmpty = 74, /**< spi_device_tpm_header_not_empty */
1129  kTopEarlgreyPlicIrqIdSpiDeviceTpmRdfifoCmdEnd = 75, /**< spi_device_tpm_rdfifo_cmd_end */
1130  kTopEarlgreyPlicIrqIdSpiDeviceTpmRdfifoDrop = 76, /**< spi_device_tpm_rdfifo_drop */
1131  kTopEarlgreyPlicIrqIdI2c0FmtThreshold = 77, /**< i2c0_fmt_threshold */
1132  kTopEarlgreyPlicIrqIdI2c0RxThreshold = 78, /**< i2c0_rx_threshold */
1133  kTopEarlgreyPlicIrqIdI2c0AcqThreshold = 79, /**< i2c0_acq_threshold */
1134  kTopEarlgreyPlicIrqIdI2c0RxOverflow = 80, /**< i2c0_rx_overflow */
1135  kTopEarlgreyPlicIrqIdI2c0ControllerHalt = 81, /**< i2c0_controller_halt */
1136  kTopEarlgreyPlicIrqIdI2c0SclInterference = 82, /**< i2c0_scl_interference */
1137  kTopEarlgreyPlicIrqIdI2c0SdaInterference = 83, /**< i2c0_sda_interference */
1138  kTopEarlgreyPlicIrqIdI2c0StretchTimeout = 84, /**< i2c0_stretch_timeout */
1139  kTopEarlgreyPlicIrqIdI2c0SdaUnstable = 85, /**< i2c0_sda_unstable */
1140  kTopEarlgreyPlicIrqIdI2c0CmdComplete = 86, /**< i2c0_cmd_complete */
1141  kTopEarlgreyPlicIrqIdI2c0TxStretch = 87, /**< i2c0_tx_stretch */
1142  kTopEarlgreyPlicIrqIdI2c0TxThreshold = 88, /**< i2c0_tx_threshold */
1143  kTopEarlgreyPlicIrqIdI2c0AcqStretch = 89, /**< i2c0_acq_stretch */
1144  kTopEarlgreyPlicIrqIdI2c0UnexpStop = 90, /**< i2c0_unexp_stop */
1145  kTopEarlgreyPlicIrqIdI2c0HostTimeout = 91, /**< i2c0_host_timeout */
1146  kTopEarlgreyPlicIrqIdI2c1FmtThreshold = 92, /**< i2c1_fmt_threshold */
1147  kTopEarlgreyPlicIrqIdI2c1RxThreshold = 93, /**< i2c1_rx_threshold */
1148  kTopEarlgreyPlicIrqIdI2c1AcqThreshold = 94, /**< i2c1_acq_threshold */
1149  kTopEarlgreyPlicIrqIdI2c1RxOverflow = 95, /**< i2c1_rx_overflow */
1150  kTopEarlgreyPlicIrqIdI2c1ControllerHalt = 96, /**< i2c1_controller_halt */
1151  kTopEarlgreyPlicIrqIdI2c1SclInterference = 97, /**< i2c1_scl_interference */
1152  kTopEarlgreyPlicIrqIdI2c1SdaInterference = 98, /**< i2c1_sda_interference */
1153  kTopEarlgreyPlicIrqIdI2c1StretchTimeout = 99, /**< i2c1_stretch_timeout */
1154  kTopEarlgreyPlicIrqIdI2c1SdaUnstable = 100, /**< i2c1_sda_unstable */
1155  kTopEarlgreyPlicIrqIdI2c1CmdComplete = 101, /**< i2c1_cmd_complete */
1156  kTopEarlgreyPlicIrqIdI2c1TxStretch = 102, /**< i2c1_tx_stretch */
1157  kTopEarlgreyPlicIrqIdI2c1TxThreshold = 103, /**< i2c1_tx_threshold */
1158  kTopEarlgreyPlicIrqIdI2c1AcqStretch = 104, /**< i2c1_acq_stretch */
1159  kTopEarlgreyPlicIrqIdI2c1UnexpStop = 105, /**< i2c1_unexp_stop */
1160  kTopEarlgreyPlicIrqIdI2c1HostTimeout = 106, /**< i2c1_host_timeout */
1161  kTopEarlgreyPlicIrqIdI2c2FmtThreshold = 107, /**< i2c2_fmt_threshold */
1162  kTopEarlgreyPlicIrqIdI2c2RxThreshold = 108, /**< i2c2_rx_threshold */
1163  kTopEarlgreyPlicIrqIdI2c2AcqThreshold = 109, /**< i2c2_acq_threshold */
1164  kTopEarlgreyPlicIrqIdI2c2RxOverflow = 110, /**< i2c2_rx_overflow */
1165  kTopEarlgreyPlicIrqIdI2c2ControllerHalt = 111, /**< i2c2_controller_halt */
1166  kTopEarlgreyPlicIrqIdI2c2SclInterference = 112, /**< i2c2_scl_interference */
1167  kTopEarlgreyPlicIrqIdI2c2SdaInterference = 113, /**< i2c2_sda_interference */
1168  kTopEarlgreyPlicIrqIdI2c2StretchTimeout = 114, /**< i2c2_stretch_timeout */
1169  kTopEarlgreyPlicIrqIdI2c2SdaUnstable = 115, /**< i2c2_sda_unstable */
1170  kTopEarlgreyPlicIrqIdI2c2CmdComplete = 116, /**< i2c2_cmd_complete */
1171  kTopEarlgreyPlicIrqIdI2c2TxStretch = 117, /**< i2c2_tx_stretch */
1172  kTopEarlgreyPlicIrqIdI2c2TxThreshold = 118, /**< i2c2_tx_threshold */
1173  kTopEarlgreyPlicIrqIdI2c2AcqStretch = 119, /**< i2c2_acq_stretch */
1174  kTopEarlgreyPlicIrqIdI2c2UnexpStop = 120, /**< i2c2_unexp_stop */
1175  kTopEarlgreyPlicIrqIdI2c2HostTimeout = 121, /**< i2c2_host_timeout */
1176  kTopEarlgreyPlicIrqIdPattgenDoneCh0 = 122, /**< pattgen_done_ch0 */
1177  kTopEarlgreyPlicIrqIdPattgenDoneCh1 = 123, /**< pattgen_done_ch1 */
1178  kTopEarlgreyPlicIrqIdRvTimerTimerExpiredHart0Timer0 = 124, /**< rv_timer_timer_expired_hart0_timer0 */
1179  kTopEarlgreyPlicIrqIdOtpCtrlOtpOperationDone = 125, /**< otp_ctrl_otp_operation_done */
1180  kTopEarlgreyPlicIrqIdOtpCtrlOtpError = 126, /**< otp_ctrl_otp_error */
1181  kTopEarlgreyPlicIrqIdAlertHandlerClassa = 127, /**< alert_handler_classa */
1182  kTopEarlgreyPlicIrqIdAlertHandlerClassb = 128, /**< alert_handler_classb */
1183  kTopEarlgreyPlicIrqIdAlertHandlerClassc = 129, /**< alert_handler_classc */
1184  kTopEarlgreyPlicIrqIdAlertHandlerClassd = 130, /**< alert_handler_classd */
1185  kTopEarlgreyPlicIrqIdSpiHost0Error = 131, /**< spi_host0_error */
1186  kTopEarlgreyPlicIrqIdSpiHost0SpiEvent = 132, /**< spi_host0_spi_event */
1187  kTopEarlgreyPlicIrqIdSpiHost1Error = 133, /**< spi_host1_error */
1188  kTopEarlgreyPlicIrqIdSpiHost1SpiEvent = 134, /**< spi_host1_spi_event */
1189  kTopEarlgreyPlicIrqIdUsbdevPktReceived = 135, /**< usbdev_pkt_received */
1190  kTopEarlgreyPlicIrqIdUsbdevPktSent = 136, /**< usbdev_pkt_sent */
1191  kTopEarlgreyPlicIrqIdUsbdevDisconnected = 137, /**< usbdev_disconnected */
1192  kTopEarlgreyPlicIrqIdUsbdevHostLost = 138, /**< usbdev_host_lost */
1193  kTopEarlgreyPlicIrqIdUsbdevLinkReset = 139, /**< usbdev_link_reset */
1194  kTopEarlgreyPlicIrqIdUsbdevLinkSuspend = 140, /**< usbdev_link_suspend */
1195  kTopEarlgreyPlicIrqIdUsbdevLinkResume = 141, /**< usbdev_link_resume */
1196  kTopEarlgreyPlicIrqIdUsbdevAvOutEmpty = 142, /**< usbdev_av_out_empty */
1197  kTopEarlgreyPlicIrqIdUsbdevRxFull = 143, /**< usbdev_rx_full */
1198  kTopEarlgreyPlicIrqIdUsbdevAvOverflow = 144, /**< usbdev_av_overflow */
1199  kTopEarlgreyPlicIrqIdUsbdevLinkInErr = 145, /**< usbdev_link_in_err */
1200  kTopEarlgreyPlicIrqIdUsbdevRxCrcErr = 146, /**< usbdev_rx_crc_err */
1201  kTopEarlgreyPlicIrqIdUsbdevRxPidErr = 147, /**< usbdev_rx_pid_err */
1202  kTopEarlgreyPlicIrqIdUsbdevRxBitstuffErr = 148, /**< usbdev_rx_bitstuff_err */
1203  kTopEarlgreyPlicIrqIdUsbdevFrame = 149, /**< usbdev_frame */
1204  kTopEarlgreyPlicIrqIdUsbdevPowered = 150, /**< usbdev_powered */
1205  kTopEarlgreyPlicIrqIdUsbdevLinkOutErr = 151, /**< usbdev_link_out_err */
1206  kTopEarlgreyPlicIrqIdUsbdevAvSetupEmpty = 152, /**< usbdev_av_setup_empty */
1207  kTopEarlgreyPlicIrqIdPwrmgrAonWakeup = 153, /**< pwrmgr_aon_wakeup */
1208  kTopEarlgreyPlicIrqIdSysrstCtrlAonEventDetected = 154, /**< sysrst_ctrl_aon_event_detected */
1209  kTopEarlgreyPlicIrqIdAdcCtrlAonMatchPending = 155, /**< adc_ctrl_aon_match_pending */
1210  kTopEarlgreyPlicIrqIdAonTimerAonWkupTimerExpired = 156, /**< aon_timer_aon_wkup_timer_expired */
1211  kTopEarlgreyPlicIrqIdAonTimerAonWdogTimerBark = 157, /**< aon_timer_aon_wdog_timer_bark */
1212  kTopEarlgreyPlicIrqIdSensorCtrlAonIoStatusChange = 158, /**< sensor_ctrl_aon_io_status_change */
1213  kTopEarlgreyPlicIrqIdSensorCtrlAonInitStatusChange = 159, /**< sensor_ctrl_aon_init_status_change */
1214  kTopEarlgreyPlicIrqIdFlashCtrlProgEmpty = 160, /**< flash_ctrl_prog_empty */
1215  kTopEarlgreyPlicIrqIdFlashCtrlProgLvl = 161, /**< flash_ctrl_prog_lvl */
1216  kTopEarlgreyPlicIrqIdFlashCtrlRdFull = 162, /**< flash_ctrl_rd_full */
1217  kTopEarlgreyPlicIrqIdFlashCtrlRdLvl = 163, /**< flash_ctrl_rd_lvl */
1218  kTopEarlgreyPlicIrqIdFlashCtrlOpDone = 164, /**< flash_ctrl_op_done */
1219  kTopEarlgreyPlicIrqIdFlashCtrlCorrErr = 165, /**< flash_ctrl_corr_err */
1220  kTopEarlgreyPlicIrqIdHmacHmacDone = 166, /**< hmac_hmac_done */
1221  kTopEarlgreyPlicIrqIdHmacFifoEmpty = 167, /**< hmac_fifo_empty */
1222  kTopEarlgreyPlicIrqIdHmacHmacErr = 168, /**< hmac_hmac_err */
1223  kTopEarlgreyPlicIrqIdKmacKmacDone = 169, /**< kmac_kmac_done */
1224  kTopEarlgreyPlicIrqIdKmacFifoEmpty = 170, /**< kmac_fifo_empty */
1225  kTopEarlgreyPlicIrqIdKmacKmacErr = 171, /**< kmac_kmac_err */
1226  kTopEarlgreyPlicIrqIdOtbnDone = 172, /**< otbn_done */
1227  kTopEarlgreyPlicIrqIdKeymgrOpDone = 173, /**< keymgr_op_done */
1228  kTopEarlgreyPlicIrqIdCsrngCsCmdReqDone = 174, /**< csrng_cs_cmd_req_done */
1229  kTopEarlgreyPlicIrqIdCsrngCsEntropyReq = 175, /**< csrng_cs_entropy_req */
1230  kTopEarlgreyPlicIrqIdCsrngCsHwInstExc = 176, /**< csrng_cs_hw_inst_exc */
1231  kTopEarlgreyPlicIrqIdCsrngCsFatalErr = 177, /**< csrng_cs_fatal_err */
1232  kTopEarlgreyPlicIrqIdEntropySrcEsEntropyValid = 178, /**< entropy_src_es_entropy_valid */
1233  kTopEarlgreyPlicIrqIdEntropySrcEsHealthTestFailed = 179, /**< entropy_src_es_health_test_failed */
1234  kTopEarlgreyPlicIrqIdEntropySrcEsObserveFifoReady = 180, /**< entropy_src_es_observe_fifo_ready */
1235  kTopEarlgreyPlicIrqIdEntropySrcEsFatalErr = 181, /**< entropy_src_es_fatal_err */
1236  kTopEarlgreyPlicIrqIdEdn0EdnCmdReqDone = 182, /**< edn0_edn_cmd_req_done */
1237  kTopEarlgreyPlicIrqIdEdn0EdnFatalErr = 183, /**< edn0_edn_fatal_err */
1238  kTopEarlgreyPlicIrqIdEdn1EdnCmdReqDone = 184, /**< edn1_edn_cmd_req_done */
1239  kTopEarlgreyPlicIrqIdEdn1EdnFatalErr = 185, /**< edn1_edn_fatal_err */
1240  kTopEarlgreyPlicIrqIdLast = 185, /**< \internal The Last Valid Interrupt ID. */
1242 
1243 /**
1244  * PLIC Interrupt Source to Peripheral Map
1245  *
1246  * This array is a mapping from `top_earlgrey_plic_irq_id_t` to
1247  * `top_earlgrey_plic_peripheral_t`.
1248  */
1249 extern const top_earlgrey_plic_peripheral_t
1251 
1252 /**
1253  * PLIC Interrupt Target.
1254  *
1255  * Enumeration used to determine which set of IE, CC, threshold registers to
1256  * access for a given interrupt target.
1257  */
1259  kTopEarlgreyPlicTargetIbex0 = 0, /**< Ibex Core 0 */
1260  kTopEarlgreyPlicTargetLast = 0, /**< \internal Final PLIC target */
1262 
1263 /**
1264  * Alert Handler Source Peripheral.
1265  *
1266  * Enumeration used to determine which peripheral asserted the corresponding
1267  * alert.
1268  */
1280  kTopEarlgreyAlertPeripheralRvTimer = 10, /**< rv_timer */
1281  kTopEarlgreyAlertPeripheralOtpCtrl = 11, /**< otp_ctrl */
1283  kTopEarlgreyAlertPeripheralSpiHost0 = 13, /**< spi_host0 */
1284  kTopEarlgreyAlertPeripheralSpiHost1 = 14, /**< spi_host1 */
1286  kTopEarlgreyAlertPeripheralPwrmgrAon = 16, /**< pwrmgr_aon */
1287  kTopEarlgreyAlertPeripheralRstmgrAon = 17, /**< rstmgr_aon */
1288  kTopEarlgreyAlertPeripheralClkmgrAon = 18, /**< clkmgr_aon */
1289  kTopEarlgreyAlertPeripheralSysrstCtrlAon = 19, /**< sysrst_ctrl_aon */
1290  kTopEarlgreyAlertPeripheralAdcCtrlAon = 20, /**< adc_ctrl_aon */
1292  kTopEarlgreyAlertPeripheralPinmuxAon = 22, /**< pinmux_aon */
1293  kTopEarlgreyAlertPeripheralAonTimerAon = 23, /**< aon_timer_aon */
1294  kTopEarlgreyAlertPeripheralSensorCtrlAon = 24, /**< sensor_ctrl_aon */
1295  kTopEarlgreyAlertPeripheralSramCtrlRetAon = 25, /**< sram_ctrl_ret_aon */
1296  kTopEarlgreyAlertPeripheralFlashCtrl = 26, /**< flash_ctrl */
1305  kTopEarlgreyAlertPeripheralEntropySrc = 35, /**< entropy_src */
1308  kTopEarlgreyAlertPeripheralSramCtrlMain = 38, /**< sram_ctrl_main */
1309  kTopEarlgreyAlertPeripheralRomCtrl = 39, /**< rom_ctrl */
1310  kTopEarlgreyAlertPeripheralRvCoreIbex = 40, /**< rv_core_ibex */
1311  kTopEarlgreyAlertPeripheralLast = 40, /**< \internal Final Alert peripheral */
1313 
1314 /**
1315  * Alert Handler Alert Source.
1316  *
1317  * Enumeration of all Alert Handler Alert Sources. The alert sources belonging to
1318  * the same peripheral are guaranteed to be consecutive.
1319  */
1321  kTopEarlgreyAlertIdUart0FatalFault = 0, /**< uart0_fatal_fault */
1322  kTopEarlgreyAlertIdUart1FatalFault = 1, /**< uart1_fatal_fault */
1323  kTopEarlgreyAlertIdUart2FatalFault = 2, /**< uart2_fatal_fault */
1324  kTopEarlgreyAlertIdUart3FatalFault = 3, /**< uart3_fatal_fault */
1325  kTopEarlgreyAlertIdGpioFatalFault = 4, /**< gpio_fatal_fault */
1326  kTopEarlgreyAlertIdSpiDeviceFatalFault = 5, /**< spi_device_fatal_fault */
1327  kTopEarlgreyAlertIdI2c0FatalFault = 6, /**< i2c0_fatal_fault */
1328  kTopEarlgreyAlertIdI2c1FatalFault = 7, /**< i2c1_fatal_fault */
1329  kTopEarlgreyAlertIdI2c2FatalFault = 8, /**< i2c2_fatal_fault */
1330  kTopEarlgreyAlertIdPattgenFatalFault = 9, /**< pattgen_fatal_fault */
1331  kTopEarlgreyAlertIdRvTimerFatalFault = 10, /**< rv_timer_fatal_fault */
1332  kTopEarlgreyAlertIdOtpCtrlFatalMacroError = 11, /**< otp_ctrl_fatal_macro_error */
1333  kTopEarlgreyAlertIdOtpCtrlFatalCheckError = 12, /**< otp_ctrl_fatal_check_error */
1334  kTopEarlgreyAlertIdOtpCtrlFatalBusIntegError = 13, /**< otp_ctrl_fatal_bus_integ_error */
1335  kTopEarlgreyAlertIdOtpCtrlFatalPrimOtpAlert = 14, /**< otp_ctrl_fatal_prim_otp_alert */
1336  kTopEarlgreyAlertIdOtpCtrlRecovPrimOtpAlert = 15, /**< otp_ctrl_recov_prim_otp_alert */
1337  kTopEarlgreyAlertIdLcCtrlFatalProgError = 16, /**< lc_ctrl_fatal_prog_error */
1338  kTopEarlgreyAlertIdLcCtrlFatalStateError = 17, /**< lc_ctrl_fatal_state_error */
1339  kTopEarlgreyAlertIdLcCtrlFatalBusIntegError = 18, /**< lc_ctrl_fatal_bus_integ_error */
1340  kTopEarlgreyAlertIdSpiHost0FatalFault = 19, /**< spi_host0_fatal_fault */
1341  kTopEarlgreyAlertIdSpiHost1FatalFault = 20, /**< spi_host1_fatal_fault */
1342  kTopEarlgreyAlertIdUsbdevFatalFault = 21, /**< usbdev_fatal_fault */
1343  kTopEarlgreyAlertIdPwrmgrAonFatalFault = 22, /**< pwrmgr_aon_fatal_fault */
1344  kTopEarlgreyAlertIdRstmgrAonFatalFault = 23, /**< rstmgr_aon_fatal_fault */
1345  kTopEarlgreyAlertIdRstmgrAonFatalCnstyFault = 24, /**< rstmgr_aon_fatal_cnsty_fault */
1346  kTopEarlgreyAlertIdClkmgrAonRecovFault = 25, /**< clkmgr_aon_recov_fault */
1347  kTopEarlgreyAlertIdClkmgrAonFatalFault = 26, /**< clkmgr_aon_fatal_fault */
1348  kTopEarlgreyAlertIdSysrstCtrlAonFatalFault = 27, /**< sysrst_ctrl_aon_fatal_fault */
1349  kTopEarlgreyAlertIdAdcCtrlAonFatalFault = 28, /**< adc_ctrl_aon_fatal_fault */
1350  kTopEarlgreyAlertIdPwmAonFatalFault = 29, /**< pwm_aon_fatal_fault */
1351  kTopEarlgreyAlertIdPinmuxAonFatalFault = 30, /**< pinmux_aon_fatal_fault */
1352  kTopEarlgreyAlertIdAonTimerAonFatalFault = 31, /**< aon_timer_aon_fatal_fault */
1353  kTopEarlgreyAlertIdSensorCtrlAonRecovAlert = 32, /**< sensor_ctrl_aon_recov_alert */
1354  kTopEarlgreyAlertIdSensorCtrlAonFatalAlert = 33, /**< sensor_ctrl_aon_fatal_alert */
1355  kTopEarlgreyAlertIdSramCtrlRetAonFatalError = 34, /**< sram_ctrl_ret_aon_fatal_error */
1356  kTopEarlgreyAlertIdFlashCtrlRecovErr = 35, /**< flash_ctrl_recov_err */
1357  kTopEarlgreyAlertIdFlashCtrlFatalStdErr = 36, /**< flash_ctrl_fatal_std_err */
1358  kTopEarlgreyAlertIdFlashCtrlFatalErr = 37, /**< flash_ctrl_fatal_err */
1359  kTopEarlgreyAlertIdFlashCtrlFatalPrimFlashAlert = 38, /**< flash_ctrl_fatal_prim_flash_alert */
1360  kTopEarlgreyAlertIdFlashCtrlRecovPrimFlashAlert = 39, /**< flash_ctrl_recov_prim_flash_alert */
1361  kTopEarlgreyAlertIdRvDmFatalFault = 40, /**< rv_dm_fatal_fault */
1362  kTopEarlgreyAlertIdRvPlicFatalFault = 41, /**< rv_plic_fatal_fault */
1363  kTopEarlgreyAlertIdAesRecovCtrlUpdateErr = 42, /**< aes_recov_ctrl_update_err */
1364  kTopEarlgreyAlertIdAesFatalFault = 43, /**< aes_fatal_fault */
1365  kTopEarlgreyAlertIdHmacFatalFault = 44, /**< hmac_fatal_fault */
1366  kTopEarlgreyAlertIdKmacRecovOperationErr = 45, /**< kmac_recov_operation_err */
1367  kTopEarlgreyAlertIdKmacFatalFaultErr = 46, /**< kmac_fatal_fault_err */
1368  kTopEarlgreyAlertIdOtbnFatal = 47, /**< otbn_fatal */
1369  kTopEarlgreyAlertIdOtbnRecov = 48, /**< otbn_recov */
1370  kTopEarlgreyAlertIdKeymgrRecovOperationErr = 49, /**< keymgr_recov_operation_err */
1371  kTopEarlgreyAlertIdKeymgrFatalFaultErr = 50, /**< keymgr_fatal_fault_err */
1372  kTopEarlgreyAlertIdCsrngRecovAlert = 51, /**< csrng_recov_alert */
1373  kTopEarlgreyAlertIdCsrngFatalAlert = 52, /**< csrng_fatal_alert */
1374  kTopEarlgreyAlertIdEntropySrcRecovAlert = 53, /**< entropy_src_recov_alert */
1375  kTopEarlgreyAlertIdEntropySrcFatalAlert = 54, /**< entropy_src_fatal_alert */
1376  kTopEarlgreyAlertIdEdn0RecovAlert = 55, /**< edn0_recov_alert */
1377  kTopEarlgreyAlertIdEdn0FatalAlert = 56, /**< edn0_fatal_alert */
1378  kTopEarlgreyAlertIdEdn1RecovAlert = 57, /**< edn1_recov_alert */
1379  kTopEarlgreyAlertIdEdn1FatalAlert = 58, /**< edn1_fatal_alert */
1380  kTopEarlgreyAlertIdSramCtrlMainFatalError = 59, /**< sram_ctrl_main_fatal_error */
1381  kTopEarlgreyAlertIdRomCtrlFatal = 60, /**< rom_ctrl_fatal */
1382  kTopEarlgreyAlertIdRvCoreIbexFatalSwErr = 61, /**< rv_core_ibex_fatal_sw_err */
1383  kTopEarlgreyAlertIdRvCoreIbexRecovSwErr = 62, /**< rv_core_ibex_recov_sw_err */
1384  kTopEarlgreyAlertIdRvCoreIbexFatalHwErr = 63, /**< rv_core_ibex_fatal_hw_err */
1385  kTopEarlgreyAlertIdRvCoreIbexRecovHwErr = 64, /**< rv_core_ibex_recov_hw_err */
1386  kTopEarlgreyAlertIdLast = 64, /**< \internal The Last Valid Alert ID. */
1388 
1389 /**
1390  * Alert Handler Alert Source to Peripheral Map
1391  *
1392  * This array is a mapping from `top_earlgrey_alert_id_t` to
1393  * `top_earlgrey_alert_peripheral_t`.
1394  */
1397 
1398 #define PINMUX_MIO_PERIPH_INSEL_IDX_OFFSET 2
1399 
1400 // PERIPH_INSEL ranges from 0 to NUM_MIO_PADS + 2 -1}
1401 // 0 and 1 are tied to value 0 and 1
1402 #define NUM_MIO_PADS 47
1403 #define NUM_DIO_PADS 16
1404 
1405 #define PINMUX_PERIPH_OUTSEL_IDX_OFFSET 3
1406 
1407 /**
1408  * Pinmux Peripheral Input.
1409  */
1411  kTopEarlgreyPinmuxPeripheralInGpioGpio0 = 0, /**< Peripheral Input 0 */
1412  kTopEarlgreyPinmuxPeripheralInGpioGpio1 = 1, /**< Peripheral Input 1 */
1413  kTopEarlgreyPinmuxPeripheralInGpioGpio2 = 2, /**< Peripheral Input 2 */
1414  kTopEarlgreyPinmuxPeripheralInGpioGpio3 = 3, /**< Peripheral Input 3 */
1415  kTopEarlgreyPinmuxPeripheralInGpioGpio4 = 4, /**< Peripheral Input 4 */
1416  kTopEarlgreyPinmuxPeripheralInGpioGpio5 = 5, /**< Peripheral Input 5 */
1417  kTopEarlgreyPinmuxPeripheralInGpioGpio6 = 6, /**< Peripheral Input 6 */
1418  kTopEarlgreyPinmuxPeripheralInGpioGpio7 = 7, /**< Peripheral Input 7 */
1419  kTopEarlgreyPinmuxPeripheralInGpioGpio8 = 8, /**< Peripheral Input 8 */
1420  kTopEarlgreyPinmuxPeripheralInGpioGpio9 = 9, /**< Peripheral Input 9 */
1421  kTopEarlgreyPinmuxPeripheralInGpioGpio10 = 10, /**< Peripheral Input 10 */
1422  kTopEarlgreyPinmuxPeripheralInGpioGpio11 = 11, /**< Peripheral Input 11 */
1423  kTopEarlgreyPinmuxPeripheralInGpioGpio12 = 12, /**< Peripheral Input 12 */
1424  kTopEarlgreyPinmuxPeripheralInGpioGpio13 = 13, /**< Peripheral Input 13 */
1425  kTopEarlgreyPinmuxPeripheralInGpioGpio14 = 14, /**< Peripheral Input 14 */
1426  kTopEarlgreyPinmuxPeripheralInGpioGpio15 = 15, /**< Peripheral Input 15 */
1427  kTopEarlgreyPinmuxPeripheralInGpioGpio16 = 16, /**< Peripheral Input 16 */
1428  kTopEarlgreyPinmuxPeripheralInGpioGpio17 = 17, /**< Peripheral Input 17 */
1429  kTopEarlgreyPinmuxPeripheralInGpioGpio18 = 18, /**< Peripheral Input 18 */
1430  kTopEarlgreyPinmuxPeripheralInGpioGpio19 = 19, /**< Peripheral Input 19 */
1431  kTopEarlgreyPinmuxPeripheralInGpioGpio20 = 20, /**< Peripheral Input 20 */
1432  kTopEarlgreyPinmuxPeripheralInGpioGpio21 = 21, /**< Peripheral Input 21 */
1433  kTopEarlgreyPinmuxPeripheralInGpioGpio22 = 22, /**< Peripheral Input 22 */
1434  kTopEarlgreyPinmuxPeripheralInGpioGpio23 = 23, /**< Peripheral Input 23 */
1435  kTopEarlgreyPinmuxPeripheralInGpioGpio24 = 24, /**< Peripheral Input 24 */
1436  kTopEarlgreyPinmuxPeripheralInGpioGpio25 = 25, /**< Peripheral Input 25 */
1437  kTopEarlgreyPinmuxPeripheralInGpioGpio26 = 26, /**< Peripheral Input 26 */
1438  kTopEarlgreyPinmuxPeripheralInGpioGpio27 = 27, /**< Peripheral Input 27 */
1439  kTopEarlgreyPinmuxPeripheralInGpioGpio28 = 28, /**< Peripheral Input 28 */
1440  kTopEarlgreyPinmuxPeripheralInGpioGpio29 = 29, /**< Peripheral Input 29 */
1441  kTopEarlgreyPinmuxPeripheralInGpioGpio30 = 30, /**< Peripheral Input 30 */
1442  kTopEarlgreyPinmuxPeripheralInGpioGpio31 = 31, /**< Peripheral Input 31 */
1443  kTopEarlgreyPinmuxPeripheralInI2c0Sda = 32, /**< Peripheral Input 32 */
1444  kTopEarlgreyPinmuxPeripheralInI2c0Scl = 33, /**< Peripheral Input 33 */
1445  kTopEarlgreyPinmuxPeripheralInI2c1Sda = 34, /**< Peripheral Input 34 */
1446  kTopEarlgreyPinmuxPeripheralInI2c1Scl = 35, /**< Peripheral Input 35 */
1447  kTopEarlgreyPinmuxPeripheralInI2c2Sda = 36, /**< Peripheral Input 36 */
1448  kTopEarlgreyPinmuxPeripheralInI2c2Scl = 37, /**< Peripheral Input 37 */
1449  kTopEarlgreyPinmuxPeripheralInSpiHost1Sd0 = 38, /**< Peripheral Input 38 */
1450  kTopEarlgreyPinmuxPeripheralInSpiHost1Sd1 = 39, /**< Peripheral Input 39 */
1451  kTopEarlgreyPinmuxPeripheralInSpiHost1Sd2 = 40, /**< Peripheral Input 40 */
1452  kTopEarlgreyPinmuxPeripheralInSpiHost1Sd3 = 41, /**< Peripheral Input 41 */
1453  kTopEarlgreyPinmuxPeripheralInUart0Rx = 42, /**< Peripheral Input 42 */
1454  kTopEarlgreyPinmuxPeripheralInUart1Rx = 43, /**< Peripheral Input 43 */
1455  kTopEarlgreyPinmuxPeripheralInUart2Rx = 44, /**< Peripheral Input 44 */
1456  kTopEarlgreyPinmuxPeripheralInUart3Rx = 45, /**< Peripheral Input 45 */
1457  kTopEarlgreyPinmuxPeripheralInSpiDeviceTpmCsb = 46, /**< Peripheral Input 46 */
1458  kTopEarlgreyPinmuxPeripheralInFlashCtrlTck = 47, /**< Peripheral Input 47 */
1459  kTopEarlgreyPinmuxPeripheralInFlashCtrlTms = 48, /**< Peripheral Input 48 */
1460  kTopEarlgreyPinmuxPeripheralInFlashCtrlTdi = 49, /**< Peripheral Input 49 */
1462  kTopEarlgreyPinmuxPeripheralInSysrstCtrlAonKey0In = 51, /**< Peripheral Input 51 */
1463  kTopEarlgreyPinmuxPeripheralInSysrstCtrlAonKey1In = 52, /**< Peripheral Input 52 */
1464  kTopEarlgreyPinmuxPeripheralInSysrstCtrlAonKey2In = 53, /**< Peripheral Input 53 */
1465  kTopEarlgreyPinmuxPeripheralInSysrstCtrlAonPwrbIn = 54, /**< Peripheral Input 54 */
1466  kTopEarlgreyPinmuxPeripheralInSysrstCtrlAonLidOpen = 55, /**< Peripheral Input 55 */
1467  kTopEarlgreyPinmuxPeripheralInUsbdevSense = 56, /**< Peripheral Input 56 */
1468  kTopEarlgreyPinmuxPeripheralInLast = 56, /**< \internal Last valid peripheral input */
1470 
1471 /**
1472  * Pinmux MIO Input Selector.
1473  */
1475  kTopEarlgreyPinmuxInselConstantZero = 0, /**< Tie constantly to zero */
1476  kTopEarlgreyPinmuxInselConstantOne = 1, /**< Tie constantly to one */
1477  kTopEarlgreyPinmuxInselIoa0 = 2, /**< MIO Pad 0 */
1478  kTopEarlgreyPinmuxInselIoa1 = 3, /**< MIO Pad 1 */
1479  kTopEarlgreyPinmuxInselIoa2 = 4, /**< MIO Pad 2 */
1480  kTopEarlgreyPinmuxInselIoa3 = 5, /**< MIO Pad 3 */
1481  kTopEarlgreyPinmuxInselIoa4 = 6, /**< MIO Pad 4 */
1482  kTopEarlgreyPinmuxInselIoa5 = 7, /**< MIO Pad 5 */
1483  kTopEarlgreyPinmuxInselIoa6 = 8, /**< MIO Pad 6 */
1484  kTopEarlgreyPinmuxInselIoa7 = 9, /**< MIO Pad 7 */
1485  kTopEarlgreyPinmuxInselIoa8 = 10, /**< MIO Pad 8 */
1486  kTopEarlgreyPinmuxInselIob0 = 11, /**< MIO Pad 9 */
1487  kTopEarlgreyPinmuxInselIob1 = 12, /**< MIO Pad 10 */
1488  kTopEarlgreyPinmuxInselIob2 = 13, /**< MIO Pad 11 */
1489  kTopEarlgreyPinmuxInselIob3 = 14, /**< MIO Pad 12 */
1490  kTopEarlgreyPinmuxInselIob4 = 15, /**< MIO Pad 13 */
1491  kTopEarlgreyPinmuxInselIob5 = 16, /**< MIO Pad 14 */
1492  kTopEarlgreyPinmuxInselIob6 = 17, /**< MIO Pad 15 */
1493  kTopEarlgreyPinmuxInselIob7 = 18, /**< MIO Pad 16 */
1494  kTopEarlgreyPinmuxInselIob8 = 19, /**< MIO Pad 17 */
1495  kTopEarlgreyPinmuxInselIob9 = 20, /**< MIO Pad 18 */
1496  kTopEarlgreyPinmuxInselIob10 = 21, /**< MIO Pad 19 */
1497  kTopEarlgreyPinmuxInselIob11 = 22, /**< MIO Pad 20 */
1498  kTopEarlgreyPinmuxInselIob12 = 23, /**< MIO Pad 21 */
1499  kTopEarlgreyPinmuxInselIoc0 = 24, /**< MIO Pad 22 */
1500  kTopEarlgreyPinmuxInselIoc1 = 25, /**< MIO Pad 23 */
1501  kTopEarlgreyPinmuxInselIoc2 = 26, /**< MIO Pad 24 */
1502  kTopEarlgreyPinmuxInselIoc3 = 27, /**< MIO Pad 25 */
1503  kTopEarlgreyPinmuxInselIoc4 = 28, /**< MIO Pad 26 */
1504  kTopEarlgreyPinmuxInselIoc5 = 29, /**< MIO Pad 27 */
1505  kTopEarlgreyPinmuxInselIoc6 = 30, /**< MIO Pad 28 */
1506  kTopEarlgreyPinmuxInselIoc7 = 31, /**< MIO Pad 29 */
1507  kTopEarlgreyPinmuxInselIoc8 = 32, /**< MIO Pad 30 */
1508  kTopEarlgreyPinmuxInselIoc9 = 33, /**< MIO Pad 31 */
1509  kTopEarlgreyPinmuxInselIoc10 = 34, /**< MIO Pad 32 */
1510  kTopEarlgreyPinmuxInselIoc11 = 35, /**< MIO Pad 33 */
1511  kTopEarlgreyPinmuxInselIoc12 = 36, /**< MIO Pad 34 */
1512  kTopEarlgreyPinmuxInselIor0 = 37, /**< MIO Pad 35 */
1513  kTopEarlgreyPinmuxInselIor1 = 38, /**< MIO Pad 36 */
1514  kTopEarlgreyPinmuxInselIor2 = 39, /**< MIO Pad 37 */
1515  kTopEarlgreyPinmuxInselIor3 = 40, /**< MIO Pad 38 */
1516  kTopEarlgreyPinmuxInselIor4 = 41, /**< MIO Pad 39 */
1517  kTopEarlgreyPinmuxInselIor5 = 42, /**< MIO Pad 40 */
1518  kTopEarlgreyPinmuxInselIor6 = 43, /**< MIO Pad 41 */
1519  kTopEarlgreyPinmuxInselIor7 = 44, /**< MIO Pad 42 */
1520  kTopEarlgreyPinmuxInselIor10 = 45, /**< MIO Pad 43 */
1521  kTopEarlgreyPinmuxInselIor11 = 46, /**< MIO Pad 44 */
1522  kTopEarlgreyPinmuxInselIor12 = 47, /**< MIO Pad 45 */
1523  kTopEarlgreyPinmuxInselIor13 = 48, /**< MIO Pad 46 */
1524  kTopEarlgreyPinmuxInselLast = 48, /**< \internal Last valid insel value */
1526 
1527 /**
1528  * Pinmux MIO Output.
1529  */
1531  kTopEarlgreyPinmuxMioOutIoa0 = 0, /**< MIO Pad 0 */
1532  kTopEarlgreyPinmuxMioOutIoa1 = 1, /**< MIO Pad 1 */
1533  kTopEarlgreyPinmuxMioOutIoa2 = 2, /**< MIO Pad 2 */
1534  kTopEarlgreyPinmuxMioOutIoa3 = 3, /**< MIO Pad 3 */
1535  kTopEarlgreyPinmuxMioOutIoa4 = 4, /**< MIO Pad 4 */
1536  kTopEarlgreyPinmuxMioOutIoa5 = 5, /**< MIO Pad 5 */
1537  kTopEarlgreyPinmuxMioOutIoa6 = 6, /**< MIO Pad 6 */
1538  kTopEarlgreyPinmuxMioOutIoa7 = 7, /**< MIO Pad 7 */
1539  kTopEarlgreyPinmuxMioOutIoa8 = 8, /**< MIO Pad 8 */
1540  kTopEarlgreyPinmuxMioOutIob0 = 9, /**< MIO Pad 9 */
1541  kTopEarlgreyPinmuxMioOutIob1 = 10, /**< MIO Pad 10 */
1542  kTopEarlgreyPinmuxMioOutIob2 = 11, /**< MIO Pad 11 */
1543  kTopEarlgreyPinmuxMioOutIob3 = 12, /**< MIO Pad 12 */
1544  kTopEarlgreyPinmuxMioOutIob4 = 13, /**< MIO Pad 13 */
1545  kTopEarlgreyPinmuxMioOutIob5 = 14, /**< MIO Pad 14 */
1546  kTopEarlgreyPinmuxMioOutIob6 = 15, /**< MIO Pad 15 */
1547  kTopEarlgreyPinmuxMioOutIob7 = 16, /**< MIO Pad 16 */
1548  kTopEarlgreyPinmuxMioOutIob8 = 17, /**< MIO Pad 17 */
1549  kTopEarlgreyPinmuxMioOutIob9 = 18, /**< MIO Pad 18 */
1550  kTopEarlgreyPinmuxMioOutIob10 = 19, /**< MIO Pad 19 */
1551  kTopEarlgreyPinmuxMioOutIob11 = 20, /**< MIO Pad 20 */
1552  kTopEarlgreyPinmuxMioOutIob12 = 21, /**< MIO Pad 21 */
1553  kTopEarlgreyPinmuxMioOutIoc0 = 22, /**< MIO Pad 22 */
1554  kTopEarlgreyPinmuxMioOutIoc1 = 23, /**< MIO Pad 23 */
1555  kTopEarlgreyPinmuxMioOutIoc2 = 24, /**< MIO Pad 24 */
1556  kTopEarlgreyPinmuxMioOutIoc3 = 25, /**< MIO Pad 25 */
1557  kTopEarlgreyPinmuxMioOutIoc4 = 26, /**< MIO Pad 26 */
1558  kTopEarlgreyPinmuxMioOutIoc5 = 27, /**< MIO Pad 27 */
1559  kTopEarlgreyPinmuxMioOutIoc6 = 28, /**< MIO Pad 28 */
1560  kTopEarlgreyPinmuxMioOutIoc7 = 29, /**< MIO Pad 29 */
1561  kTopEarlgreyPinmuxMioOutIoc8 = 30, /**< MIO Pad 30 */
1562  kTopEarlgreyPinmuxMioOutIoc9 = 31, /**< MIO Pad 31 */
1563  kTopEarlgreyPinmuxMioOutIoc10 = 32, /**< MIO Pad 32 */
1564  kTopEarlgreyPinmuxMioOutIoc11 = 33, /**< MIO Pad 33 */
1565  kTopEarlgreyPinmuxMioOutIoc12 = 34, /**< MIO Pad 34 */
1566  kTopEarlgreyPinmuxMioOutIor0 = 35, /**< MIO Pad 35 */
1567  kTopEarlgreyPinmuxMioOutIor1 = 36, /**< MIO Pad 36 */
1568  kTopEarlgreyPinmuxMioOutIor2 = 37, /**< MIO Pad 37 */
1569  kTopEarlgreyPinmuxMioOutIor3 = 38, /**< MIO Pad 38 */
1570  kTopEarlgreyPinmuxMioOutIor4 = 39, /**< MIO Pad 39 */
1571  kTopEarlgreyPinmuxMioOutIor5 = 40, /**< MIO Pad 40 */
1572  kTopEarlgreyPinmuxMioOutIor6 = 41, /**< MIO Pad 41 */
1573  kTopEarlgreyPinmuxMioOutIor7 = 42, /**< MIO Pad 42 */
1574  kTopEarlgreyPinmuxMioOutIor10 = 43, /**< MIO Pad 43 */
1575  kTopEarlgreyPinmuxMioOutIor11 = 44, /**< MIO Pad 44 */
1576  kTopEarlgreyPinmuxMioOutIor12 = 45, /**< MIO Pad 45 */
1577  kTopEarlgreyPinmuxMioOutIor13 = 46, /**< MIO Pad 46 */
1578  kTopEarlgreyPinmuxMioOutLast = 46, /**< \internal Last valid mio output */
1580 
1581 /**
1582  * Pinmux Peripheral Output Selector.
1583  */
1585  kTopEarlgreyPinmuxOutselConstantZero = 0, /**< Tie constantly to zero */
1586  kTopEarlgreyPinmuxOutselConstantOne = 1, /**< Tie constantly to one */
1587  kTopEarlgreyPinmuxOutselConstantHighZ = 2, /**< Tie constantly to high-Z */
1588  kTopEarlgreyPinmuxOutselGpioGpio0 = 3, /**< Peripheral Output 0 */
1589  kTopEarlgreyPinmuxOutselGpioGpio1 = 4, /**< Peripheral Output 1 */
1590  kTopEarlgreyPinmuxOutselGpioGpio2 = 5, /**< Peripheral Output 2 */
1591  kTopEarlgreyPinmuxOutselGpioGpio3 = 6, /**< Peripheral Output 3 */
1592  kTopEarlgreyPinmuxOutselGpioGpio4 = 7, /**< Peripheral Output 4 */
1593  kTopEarlgreyPinmuxOutselGpioGpio5 = 8, /**< Peripheral Output 5 */
1594  kTopEarlgreyPinmuxOutselGpioGpio6 = 9, /**< Peripheral Output 6 */
1595  kTopEarlgreyPinmuxOutselGpioGpio7 = 10, /**< Peripheral Output 7 */
1596  kTopEarlgreyPinmuxOutselGpioGpio8 = 11, /**< Peripheral Output 8 */
1597  kTopEarlgreyPinmuxOutselGpioGpio9 = 12, /**< Peripheral Output 9 */
1598  kTopEarlgreyPinmuxOutselGpioGpio10 = 13, /**< Peripheral Output 10 */
1599  kTopEarlgreyPinmuxOutselGpioGpio11 = 14, /**< Peripheral Output 11 */
1600  kTopEarlgreyPinmuxOutselGpioGpio12 = 15, /**< Peripheral Output 12 */
1601  kTopEarlgreyPinmuxOutselGpioGpio13 = 16, /**< Peripheral Output 13 */
1602  kTopEarlgreyPinmuxOutselGpioGpio14 = 17, /**< Peripheral Output 14 */
1603  kTopEarlgreyPinmuxOutselGpioGpio15 = 18, /**< Peripheral Output 15 */
1604  kTopEarlgreyPinmuxOutselGpioGpio16 = 19, /**< Peripheral Output 16 */
1605  kTopEarlgreyPinmuxOutselGpioGpio17 = 20, /**< Peripheral Output 17 */
1606  kTopEarlgreyPinmuxOutselGpioGpio18 = 21, /**< Peripheral Output 18 */
1607  kTopEarlgreyPinmuxOutselGpioGpio19 = 22, /**< Peripheral Output 19 */
1608  kTopEarlgreyPinmuxOutselGpioGpio20 = 23, /**< Peripheral Output 20 */
1609  kTopEarlgreyPinmuxOutselGpioGpio21 = 24, /**< Peripheral Output 21 */
1610  kTopEarlgreyPinmuxOutselGpioGpio22 = 25, /**< Peripheral Output 22 */
1611  kTopEarlgreyPinmuxOutselGpioGpio23 = 26, /**< Peripheral Output 23 */
1612  kTopEarlgreyPinmuxOutselGpioGpio24 = 27, /**< Peripheral Output 24 */
1613  kTopEarlgreyPinmuxOutselGpioGpio25 = 28, /**< Peripheral Output 25 */
1614  kTopEarlgreyPinmuxOutselGpioGpio26 = 29, /**< Peripheral Output 26 */
1615  kTopEarlgreyPinmuxOutselGpioGpio27 = 30, /**< Peripheral Output 27 */
1616  kTopEarlgreyPinmuxOutselGpioGpio28 = 31, /**< Peripheral Output 28 */
1617  kTopEarlgreyPinmuxOutselGpioGpio29 = 32, /**< Peripheral Output 29 */
1618  kTopEarlgreyPinmuxOutselGpioGpio30 = 33, /**< Peripheral Output 30 */
1619  kTopEarlgreyPinmuxOutselGpioGpio31 = 34, /**< Peripheral Output 31 */
1620  kTopEarlgreyPinmuxOutselI2c0Sda = 35, /**< Peripheral Output 32 */
1621  kTopEarlgreyPinmuxOutselI2c0Scl = 36, /**< Peripheral Output 33 */
1622  kTopEarlgreyPinmuxOutselI2c1Sda = 37, /**< Peripheral Output 34 */
1623  kTopEarlgreyPinmuxOutselI2c1Scl = 38, /**< Peripheral Output 35 */
1624  kTopEarlgreyPinmuxOutselI2c2Sda = 39, /**< Peripheral Output 36 */
1625  kTopEarlgreyPinmuxOutselI2c2Scl = 40, /**< Peripheral Output 37 */
1626  kTopEarlgreyPinmuxOutselSpiHost1Sd0 = 41, /**< Peripheral Output 38 */
1627  kTopEarlgreyPinmuxOutselSpiHost1Sd1 = 42, /**< Peripheral Output 39 */
1628  kTopEarlgreyPinmuxOutselSpiHost1Sd2 = 43, /**< Peripheral Output 40 */
1629  kTopEarlgreyPinmuxOutselSpiHost1Sd3 = 44, /**< Peripheral Output 41 */
1630  kTopEarlgreyPinmuxOutselUart0Tx = 45, /**< Peripheral Output 42 */
1631  kTopEarlgreyPinmuxOutselUart1Tx = 46, /**< Peripheral Output 43 */
1632  kTopEarlgreyPinmuxOutselUart2Tx = 47, /**< Peripheral Output 44 */
1633  kTopEarlgreyPinmuxOutselUart3Tx = 48, /**< Peripheral Output 45 */
1634  kTopEarlgreyPinmuxOutselPattgenPda0Tx = 49, /**< Peripheral Output 46 */
1635  kTopEarlgreyPinmuxOutselPattgenPcl0Tx = 50, /**< Peripheral Output 47 */
1636  kTopEarlgreyPinmuxOutselPattgenPda1Tx = 51, /**< Peripheral Output 48 */
1637  kTopEarlgreyPinmuxOutselPattgenPcl1Tx = 52, /**< Peripheral Output 49 */
1638  kTopEarlgreyPinmuxOutselSpiHost1Sck = 53, /**< Peripheral Output 50 */
1639  kTopEarlgreyPinmuxOutselSpiHost1Csb = 54, /**< Peripheral Output 51 */
1640  kTopEarlgreyPinmuxOutselFlashCtrlTdo = 55, /**< Peripheral Output 52 */
1641  kTopEarlgreyPinmuxOutselSensorCtrlAonAstDebugOut0 = 56, /**< Peripheral Output 53 */
1642  kTopEarlgreyPinmuxOutselSensorCtrlAonAstDebugOut1 = 57, /**< Peripheral Output 54 */
1643  kTopEarlgreyPinmuxOutselSensorCtrlAonAstDebugOut2 = 58, /**< Peripheral Output 55 */
1644  kTopEarlgreyPinmuxOutselSensorCtrlAonAstDebugOut3 = 59, /**< Peripheral Output 56 */
1645  kTopEarlgreyPinmuxOutselSensorCtrlAonAstDebugOut4 = 60, /**< Peripheral Output 57 */
1646  kTopEarlgreyPinmuxOutselSensorCtrlAonAstDebugOut5 = 61, /**< Peripheral Output 58 */
1647  kTopEarlgreyPinmuxOutselSensorCtrlAonAstDebugOut6 = 62, /**< Peripheral Output 59 */
1648  kTopEarlgreyPinmuxOutselSensorCtrlAonAstDebugOut7 = 63, /**< Peripheral Output 60 */
1649  kTopEarlgreyPinmuxOutselSensorCtrlAonAstDebugOut8 = 64, /**< Peripheral Output 61 */
1650  kTopEarlgreyPinmuxOutselPwmAonPwm0 = 65, /**< Peripheral Output 62 */
1651  kTopEarlgreyPinmuxOutselPwmAonPwm1 = 66, /**< Peripheral Output 63 */
1652  kTopEarlgreyPinmuxOutselPwmAonPwm2 = 67, /**< Peripheral Output 64 */
1653  kTopEarlgreyPinmuxOutselPwmAonPwm3 = 68, /**< Peripheral Output 65 */
1654  kTopEarlgreyPinmuxOutselPwmAonPwm4 = 69, /**< Peripheral Output 66 */
1655  kTopEarlgreyPinmuxOutselPwmAonPwm5 = 70, /**< Peripheral Output 67 */
1656  kTopEarlgreyPinmuxOutselOtpCtrlTest0 = 71, /**< Peripheral Output 68 */
1657  kTopEarlgreyPinmuxOutselSysrstCtrlAonBatDisable = 72, /**< Peripheral Output 69 */
1658  kTopEarlgreyPinmuxOutselSysrstCtrlAonKey0Out = 73, /**< Peripheral Output 70 */
1659  kTopEarlgreyPinmuxOutselSysrstCtrlAonKey1Out = 74, /**< Peripheral Output 71 */
1660  kTopEarlgreyPinmuxOutselSysrstCtrlAonKey2Out = 75, /**< Peripheral Output 72 */
1661  kTopEarlgreyPinmuxOutselSysrstCtrlAonPwrbOut = 76, /**< Peripheral Output 73 */
1662  kTopEarlgreyPinmuxOutselSysrstCtrlAonZ3Wakeup = 77, /**< Peripheral Output 74 */
1663  kTopEarlgreyPinmuxOutselLast = 77, /**< \internal Last valid outsel value */
1665 
1666 /**
1667  * Dedicated Pad Selects
1668  */
1670  kTopEarlgreyDirectPadsUsbdevUsbDp = 0, /**< */
1671  kTopEarlgreyDirectPadsUsbdevUsbDn = 1, /**< */
1672  kTopEarlgreyDirectPadsSpiHost0Sd0 = 2, /**< */
1673  kTopEarlgreyDirectPadsSpiHost0Sd1 = 3, /**< */
1674  kTopEarlgreyDirectPadsSpiHost0Sd2 = 4, /**< */
1675  kTopEarlgreyDirectPadsSpiHost0Sd3 = 5, /**< */
1676  kTopEarlgreyDirectPadsSpiDeviceSd0 = 6, /**< */
1677  kTopEarlgreyDirectPadsSpiDeviceSd1 = 7, /**< */
1678  kTopEarlgreyDirectPadsSpiDeviceSd2 = 8, /**< */
1679  kTopEarlgreyDirectPadsSpiDeviceSd3 = 9, /**< */
1680  kTopEarlgreyDirectPadsSysrstCtrlAonEcRstL = 10, /**< */
1681  kTopEarlgreyDirectPadsSysrstCtrlAonFlashWpL = 11, /**< */
1682  kTopEarlgreyDirectPadsSpiDeviceSck = 12, /**< */
1683  kTopEarlgreyDirectPadsSpiDeviceCsb = 13, /**< */
1684  kTopEarlgreyDirectPadsSpiHost0Sck = 14, /**< */
1685  kTopEarlgreyDirectPadsSpiHost0Csb = 15, /**< */
1686  kTopEarlgreyDirectPadsLast = 15, /**< \internal Last valid direct pad */
1688 
1689 /**
1690  * Muxed Pad Selects
1691  */
1693  kTopEarlgreyMuxedPadsIoa0 = 0, /**< */
1694  kTopEarlgreyMuxedPadsIoa1 = 1, /**< */
1695  kTopEarlgreyMuxedPadsIoa2 = 2, /**< */
1696  kTopEarlgreyMuxedPadsIoa3 = 3, /**< */
1697  kTopEarlgreyMuxedPadsIoa4 = 4, /**< */
1698  kTopEarlgreyMuxedPadsIoa5 = 5, /**< */
1699  kTopEarlgreyMuxedPadsIoa6 = 6, /**< */
1700  kTopEarlgreyMuxedPadsIoa7 = 7, /**< */
1701  kTopEarlgreyMuxedPadsIoa8 = 8, /**< */
1702  kTopEarlgreyMuxedPadsIob0 = 9, /**< */
1703  kTopEarlgreyMuxedPadsIob1 = 10, /**< */
1704  kTopEarlgreyMuxedPadsIob2 = 11, /**< */
1705  kTopEarlgreyMuxedPadsIob3 = 12, /**< */
1706  kTopEarlgreyMuxedPadsIob4 = 13, /**< */
1707  kTopEarlgreyMuxedPadsIob5 = 14, /**< */
1708  kTopEarlgreyMuxedPadsIob6 = 15, /**< */
1709  kTopEarlgreyMuxedPadsIob7 = 16, /**< */
1710  kTopEarlgreyMuxedPadsIob8 = 17, /**< */
1711  kTopEarlgreyMuxedPadsIob9 = 18, /**< */
1712  kTopEarlgreyMuxedPadsIob10 = 19, /**< */
1713  kTopEarlgreyMuxedPadsIob11 = 20, /**< */
1714  kTopEarlgreyMuxedPadsIob12 = 21, /**< */
1715  kTopEarlgreyMuxedPadsIoc0 = 22, /**< */
1716  kTopEarlgreyMuxedPadsIoc1 = 23, /**< */
1717  kTopEarlgreyMuxedPadsIoc2 = 24, /**< */
1718  kTopEarlgreyMuxedPadsIoc3 = 25, /**< */
1719  kTopEarlgreyMuxedPadsIoc4 = 26, /**< */
1720  kTopEarlgreyMuxedPadsIoc5 = 27, /**< */
1721  kTopEarlgreyMuxedPadsIoc6 = 28, /**< */
1722  kTopEarlgreyMuxedPadsIoc7 = 29, /**< */
1723  kTopEarlgreyMuxedPadsIoc8 = 30, /**< */
1724  kTopEarlgreyMuxedPadsIoc9 = 31, /**< */
1725  kTopEarlgreyMuxedPadsIoc10 = 32, /**< */
1726  kTopEarlgreyMuxedPadsIoc11 = 33, /**< */
1727  kTopEarlgreyMuxedPadsIoc12 = 34, /**< */
1728  kTopEarlgreyMuxedPadsIor0 = 35, /**< */
1729  kTopEarlgreyMuxedPadsIor1 = 36, /**< */
1730  kTopEarlgreyMuxedPadsIor2 = 37, /**< */
1731  kTopEarlgreyMuxedPadsIor3 = 38, /**< */
1732  kTopEarlgreyMuxedPadsIor4 = 39, /**< */
1733  kTopEarlgreyMuxedPadsIor5 = 40, /**< */
1734  kTopEarlgreyMuxedPadsIor6 = 41, /**< */
1735  kTopEarlgreyMuxedPadsIor7 = 42, /**< */
1736  kTopEarlgreyMuxedPadsIor10 = 43, /**< */
1737  kTopEarlgreyMuxedPadsIor11 = 44, /**< */
1738  kTopEarlgreyMuxedPadsIor12 = 45, /**< */
1739  kTopEarlgreyMuxedPadsIor13 = 46, /**< */
1740  kTopEarlgreyMuxedPadsLast = 46, /**< \internal Last valid muxed pad */
1742 
1743 /**
1744  * Power Manager Wakeup Signals
1745  */
1747  kTopEarlgreyPowerManagerWakeUpsSysrstCtrlAonWkupReq = 0, /**< */
1748  kTopEarlgreyPowerManagerWakeUpsAdcCtrlAonWkupReq = 1, /**< */
1749  kTopEarlgreyPowerManagerWakeUpsPinmuxAonPinWkupReq = 2, /**< */
1750  kTopEarlgreyPowerManagerWakeUpsPinmuxAonUsbWkupReq = 3, /**< */
1751  kTopEarlgreyPowerManagerWakeUpsAonTimerAonWkupReq = 4, /**< */
1752  kTopEarlgreyPowerManagerWakeUpsSensorCtrlAonWkupReq = 5, /**< */
1753  kTopEarlgreyPowerManagerWakeUpsLast = 5, /**< \internal Last valid pwrmgr wakeup signal */
1755 
1756 /**
1757  * Reset Manager Software Controlled Resets
1758  */
1760  kTopEarlgreyResetManagerSwResetsSpiDevice = 0, /**< */
1761  kTopEarlgreyResetManagerSwResetsSpiHost0 = 1, /**< */
1762  kTopEarlgreyResetManagerSwResetsSpiHost1 = 2, /**< */
1763  kTopEarlgreyResetManagerSwResetsUsb = 3, /**< */
1764  kTopEarlgreyResetManagerSwResetsUsbAon = 4, /**< */
1765  kTopEarlgreyResetManagerSwResetsI2c0 = 5, /**< */
1766  kTopEarlgreyResetManagerSwResetsI2c1 = 6, /**< */
1767  kTopEarlgreyResetManagerSwResetsI2c2 = 7, /**< */
1768  kTopEarlgreyResetManagerSwResetsLast = 7, /**< \internal Last valid rstmgr software reset request */
1770 
1771 /**
1772  * Power Manager Reset Request Signals
1773  */
1775  kTopEarlgreyPowerManagerResetRequestsSysrstCtrlAonRstReq = 0, /**< */
1776  kTopEarlgreyPowerManagerResetRequestsAonTimerAonAonTimerRstReq = 1, /**< */
1777  kTopEarlgreyPowerManagerResetRequestsLast = 1, /**< \internal Last valid pwrmgr reset_request signal */
1779 
1780 /**
1781  * Clock Manager Software-Controlled ("Gated") Clocks.
1782  *
1783  * The Software has full control over these clocks.
1784  */
1786  kTopEarlgreyGateableClocksIoDiv4Peri = 0, /**< Clock clk_io_div4_peri in group peri */
1787  kTopEarlgreyGateableClocksIoDiv2Peri = 1, /**< Clock clk_io_div2_peri in group peri */
1788  kTopEarlgreyGateableClocksIoPeri = 2, /**< Clock clk_io_peri in group peri */
1789  kTopEarlgreyGateableClocksUsbPeri = 3, /**< Clock clk_usb_peri in group peri */
1790  kTopEarlgreyGateableClocksLast = 3, /**< \internal Last Valid Gateable Clock */
1792 
1793 /**
1794  * Clock Manager Software-Hinted Clocks.
1795  *
1796  * The Software has partial control over these clocks. It can ask them to stop,
1797  * but the clock manager is in control of whether the clock actually is stopped.
1798  */
1800  kTopEarlgreyHintableClocksMainAes = 0, /**< Clock clk_main_aes in group trans */
1801  kTopEarlgreyHintableClocksMainHmac = 1, /**< Clock clk_main_hmac in group trans */
1802  kTopEarlgreyHintableClocksMainKmac = 2, /**< Clock clk_main_kmac in group trans */
1803  kTopEarlgreyHintableClocksMainOtbn = 3, /**< Clock clk_main_otbn in group trans */
1804  kTopEarlgreyHintableClocksLast = 3, /**< \internal Last Valid Hintable Clock */
1806 
1807 /**
1808  * MMIO Region
1809  *
1810  * MMIO region excludes any memory that is separate from the module
1811  * configuration space, i.e. ROM, main SRAM, and flash are excluded but
1812  * retention SRAM, spi_device memory, or usbdev memory are included.
1813  */
1814 #define TOP_EARLGREY_MMIO_BASE_ADDR 0x40000000u
1815 #define TOP_EARLGREY_MMIO_SIZE_BYTES 0x10000000u
1816 
1817 // Header Extern Guard
1818 #ifdef __cplusplus
1819 } // extern "C"
1820 #endif
1821 
1822 #endif // OPENTITAN_HW_TOP_EARLGREY_SW_AUTOGEN_TOP_EARLGREY_H_