RTEMS 7.0-rc1
Loading...
Searching...
No Matches
raspberrypi.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
11/*
12 * Copyright (c) 2022 Mohd Noor Aman
13 * Copyright (c) 2024 Ning Yang
14 * Copyright (c) 2025 Shaunak Datar
15 *
16 * Redistribution and use in source and binary forms, with or without
17 * modification, are permitted provided that the following conditions
18 * are met:
19 * 1. Redistributions of source code must retain the above copyright
20 * notice, this list of conditions and the following disclaimer.
21 * 2. Redistributions in binary form must reproduce the above copyright
22 * notice, this list of conditions and the following disclaimer in the
23 * documentation and/or other materials provided with the distribution.
24 *
25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
29 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 * POSSIBILITY OF SUCH DAMAGE.
36 */
37
38#ifndef LIBBSP_AARCH64_RASPBERRYPI_RASPBERRYPI_4_H
39#define LIBBSP_AARCH64_RASPBERRYPI_RASPBERRYPI_4_H
40
41#include <bsp/utility.h>
42#include <bspopts.h>
43#include <stdint.h>
44
45#ifdef __cplusplus
46extern "C" {
47#endif
48
65#define BCM2711_REG( x ) ( *(volatile uintptr_t *) ( x ) )
66#define BCM2711_BIT( n ) ( 1 << ( n ) )
67#define BCM2835_REG( addr ) ( *(volatile uint32_t *) (uintptr_t) ( addr ) )
68
77#define RPI_PERIPHERAL_BASE 0xFE000000
78#define BASE_OFFSET 0xFE000000
79#define RPI_PERIPHERAL_SIZE 0x01800000
80
86#define BUS_TO_PHY( x ) ( ( x ) - BASE_OFFSET )
87
96#define BCM2711_CLOCK_FREQ 250000000
97
98#define BCM2711_TIMER_BASE ( RPI_PERIPHERAL_BASE + 0xB400 )
99
100#define BCM2711_TIMER_LOD ( BCM2711_TIMER_BASE + 0x00 )
101#define BCM2711_TIMER_VAL ( BCM2711_TIMER_BASE + 0x04 )
102#define BCM2711_TIMER_CTL ( BCM2711_TIMER_BASE + 0x08 )
103#define BCM2711_TIMER_CLI ( BCM2711_TIMER_BASE + 0x0C )
104#define BCM2711_TIMER_RIS ( BCM2711_TIMER_BASE + 0x10 )
105#define BCM2711_TIMER_MIS ( BCM2711_TIMER_BASE + 0x14 )
106#define BCM2711_TIMER_RLD ( BCM2711_TIMER_BASE + 0x18 )
107#define BCM2711_TIMER_DIV ( BCM2711_TIMER_BASE + 0x1C )
108#define BCM2711_TIMER_CNT ( BCM2711_TIMER_BASE + 0x20 )
109
110#define BCM2711_TIMER_PRESCALE 0xF9
111
120#define BCM2711_PM_PASSWD_MAGIC 0x5a000000
121
122#define BCM2711_PM_BASE ( RPI_PERIPHERAL_BASE + 0x100000 )
123
124#define BCM2711_PM_GNRIC ( BCM2711_PM_BASE + 0x00 )
125#define BCM2711_PM_GNRIC_POWUP 0x00000001
126#define BCM2711_PM_GNRIC_POWOK 0x00000002
127#define BCM2711_PM_GNRIC_ISPOW 0x00000004
128#define BCM2711_PM_GNRIC_MEMREP 0x00000008
129#define BCM2711_PM_GNRIC_MRDONE 0x00000010
130#define BCM2711_PM_GNRIC_ISFUNC 0x00000020
131#define BCM2711_PM_GNRIC_RSTN 0x00000fc0
132#define BCM2711_PM_GNRIC_ENAB 0x00001000
133#define BCM2711_PM_GNRIC_CFG 0x007f0000
134
135#define BCM2711_PM_AUDIO ( BCM2711_PM_BASE + 0x04 )
136#define BCM2711_PM_AUDIO_APSM 0x000fffff
137#define BCM2711_PM_AUDIO_CTRLEN 0x00100000
138#define BCM2711_PM_AUDIO_RSTN 0x00200000
139
140#define BCM2711_PM_STATUS ( BCM2711_PM_BASE + 0x18 )
141
142#define BCM2711_PM_RSTC ( BCM2711_PM_BASE + 0x1c )
143#define BCM2711_PM_RSTC_DRCFG 0x00000003
144#define BCM2711_PM_RSTC_WRCFG 0x00000030
145#define BCM2711_PM_RSTC_WRCFG_FULL 0x00000020
146#define BCM2711_PM_RSTC_WRCFG_CLR 0xffffffcf
147#define BCM2711_PM_RSTC_SRCFG 0x00000300
148#define BCM2711_PM_RSTC_QRCFG 0x00003000
149#define BCM2711_PM_RSTC_FRCFG 0x00030000
150#define BCM2711_PM_RSTC_HRCFG 0x00300000
151#define BCM2711_PM_RSTC_RESET 0x00000102
152
153#define BCM2711_PM_RSTS ( BCM2711_PM_BASE + 0x20 )
154#define BCM2711_PM_RSTS_HADDRQ 0x00000001
155#define BCM2711_PM_RSTS_HADDRF 0x00000002
156#define BCM2711_PM_RSTS_HADDRH 0x00000004
157#define BCM2711_PM_RSTS_HADWRQ 0x00000010
158#define BCM2711_PM_RSTS_HADWRF 0x0000002
159#define BCM2711_PM_RSTS_HADWRH 0x00000040
160#define BCM2711_PM_RSTS_HADSRQ 0x00000100
161#define BCM2711_PM_RSTS_HADSRF 0x00000200
162#define BCM2711_PM_RSTS_HADSRH 0x00000400
163#define BCM2711_PM_RSTS_HADPOR 0x00001000
164
165#define BCM2711_PM_WDOG ( BCM2711_PM_BASE + 0x24 )
166#define BCM2711_PM_WDOG_MASK 0x000fffff
167
178#define BCM2711_AUX_BASE ( RPI_PERIPHERAL_BASE + 0x215000 )
179
180#define AUX_ENABLES ( BCM2711_AUX_BASE + 0x04 )
181#define AUX_MU_IO_REG ( BCM2711_AUX_BASE + 0x40 )
182#define AUX_MU_IER_REG ( BCM2711_AUX_BASE + 0x44 )
183#define AUX_MU_IIR_REG ( BCM2711_AUX_BASE + 0x48 )
184#define AUX_MU_LCR_REG ( BCM2711_AUX_BASE + 0x4C )
185#define AUX_MU_MCR_REG ( BCM2711_AUX_BASE + 0x50 )
186#define AUX_MU_LSR_REG ( BCM2711_AUX_BASE + 0x54 )
187#define AUX_MU_MSR_REG ( BCM2711_AUX_BASE + 0x58 )
188#define AUX_MU_SCRATCH ( BCM2711_AUX_BASE + 0x5C )
189#define AUX_MU_CNTL_REG ( BCM2711_AUX_BASE + 0x60 )
190#define AUX_MU_STAT_REG ( BCM2711_AUX_BASE + 0x64 )
191#define AUX_MU_BAUD_REG ( BCM2711_AUX_BASE + 0x68 )
192
200#define BCM2711_PL011_BASE ( RPI_PERIPHERAL_BASE + 0x201000 )
201#define BCM2711_PL011_SIZE 0xc00
202#define BCM2711_PL011_DEVICE_SIZE 0x200
203
204#define BCM2711_UART0_BASE ( BCM2711_PL011_BASE + 0x000 )
205#define BCM2711_UART0_SIZE BCM2711_PL011_DEVICE_SIZE
206#define BCM2711_UART2_BASE ( BCM2711_PL011_BASE + 0x400 )
207#define BCM2711_UART2_SIZE BCM2711_PL011_DEVICE_SIZE
208#define BCM2711_UART3_BASE ( BCM2711_PL011_BASE + 0x600 )
209#define BCM2711_UART3_SIZE BCM2711_PL011_DEVICE_SIZE
210#define BCM2711_UART4_BASE ( BCM2711_PL011_BASE + 0x800 )
211#define BCM2711_UART4_SIZE BCM2711_PL011_DEVICE_SIZE
212#define BCM2711_UART5_BASE ( BCM2711_PL011_BASE + 0xa00 )
213#define BCM2711_UART5_SIZE BCM2711_PL011_DEVICE_SIZE
227#define BCM2711_GPU_TIMER_BASE ( RPI_PERIPHERAL_BASE + 0x3000 )
228
229#define BCM2711_GPU_TIMER_CS ( BCM2711_GPU_TIMER_BASE + 0x00 )
230#define BCM2711_GPU_TIMER_CS_M0 0x00000001
231#define BCM2711_GPU_TIMER_CS_M1 0x00000002
232#define BCM2711_GPU_TIMER_CS_M2 0x00000004
233#define BCM2711_GPU_TIMER_CS_M3 0x00000008
234#define BCM2711_GPU_TIMER_CLO ( BCM2711_GPU_TIMER_BASE + 0x04 )
235#define BCM2711_GPU_TIMER_CHI ( BCM2711_GPU_TIMER_BASE + 0x08 )
236#define BCM2711_GPU_TIMER_C0 ( BCM2711_GPU_TIMER_BASE + 0x0C )
237#define BCM2711_GPU_TIMER_C1 ( BCM2711_GPU_TIMER_BASE + 0x10 )
238#define BCM2711_GPU_TIMER_C2 ( BCM2711_GPU_TIMER_BASE + 0x14 )
239#define BCM2711_GPU_TIMER_C3 ( BCM2711_GPU_TIMER_BASE + 0x18 )
240
244#define BCM2835_GPU_TIMER_CS_M3 BCM2711_GPU_TIMER_CS_M3
245#define BCM2835_GPU_TIMER_C3 BCM2711_GPU_TIMER_C3
246#define BCM2835_GPU_TIMER_CLO BCM2711_GPU_TIMER_CLO
247#define BCM2835_GPU_TIMER_CS BCM2711_GPU_TIMER_CS
256#define BCM2711_GPIO_BASE ( RPI_PERIPHERAL_BASE + 0x200000 )
257#define BCM2711_GPIO_SIZE 0xf4
258
259#define BCM2711_GPIO_PIN_COUNT 58
260
274#define BCM2711_EMMC_BASE ( RPI_PERIPHERAL_BASE + 0x300000 )
275
284#define BCM2711_SPI0_BASE ( RPI_PERIPHERAL_BASE + 0x204000 )
285#define BCM2711_SPI3_BASE ( RPI_PERIPHERAL_BASE + 0x204600 )
286#define BCM2711_SPI4_BASE ( RPI_PERIPHERAL_BASE + 0x204800 )
287#define BCM2711_SPI5_BASE ( RPI_PERIPHERAL_BASE + 0x204A00 )
288#define BCM2711_SPI6_BASE ( RPI_PERIPHERAL_BASE + 0x204C00 )
296#define BCM2711_CM_PWM_BASE ( RPI_PERIPHERAL_BASE + 0x00101000 )
297#define BCM2711_CM_PWM_CTL 0xA0
298#define BCM2711_CM_PWM_DIV 0xA4
299#define CM_PWM_PASSWD ( 0x5A << 24 )
300#define CM_PWM_CTL_SRC_OSC BSP_BIT32( 0 )
301#define CM_PWM_CTL_BUSY BSP_BIT32( 7 )
302#define CM_PWM_CTL_ENAB BSP_BIT32( 4 )
303#define CM_PWM_DIV_MASK 0xFFF
311#define BCM2711_PWM0_BASE ( RPI_PERIPHERAL_BASE + 0x0020C000 )
312#define BCM2711_PWM1_BASE ( RPI_PERIPHERAL_BASE + 0x0020C800 )
313#define BCM2711_PWM_CONTROL 0x00
314#define BCM2711_PWM_STATUS 0x04
315#define BCM2711_PWM_DMAC 0x08
316#define BCM2711_PWM_RNG1 0x10
317#define BCM2711_PWM_DAT1 0x14
318#define BCM2711_PWM_FIFO 0x18
319#define BCM2711_PWM_RNG2 0x20
320#define BCM2711_PWM_DAT2 0x24
328#define BCM2711_I2C0_BASE ( RPI_PERIPHERAL_BASE + 0x00205000 )
329#define BCM2711_I2C1_BASE ( RPI_PERIPHERAL_BASE + 0x00804000 )
330#define BCM2711_I2C3_BASE ( RPI_PERIPHERAL_BASE + 0x00205600 )
331#define BCM2711_I2C4_BASE ( RPI_PERIPHERAL_BASE + 0x00205800 )
332#define BCM2711_I2C5_BASE ( RPI_PERIPHERAL_BASE + 0x00205a80 )
333#define BCM2711_I2C6_BASE ( RPI_PERIPHERAL_BASE + 0x00205c00 )
334#define BCM2711_I2C_CONTROL 0x0
335#define BCM2711_I2C_STATUS 0x4
336#define BCM2711_I2C_DLEN 0x8
337#define BCM2711_I2C_SLAVE_ADDRESS 0xc
338#define BCM2711_I2C_FIFO 0x10
339#define BCM2711_I2C_DIV 0x14
340#define BCM2711_DELAY 0x18
341#define BCM2711_I2C_CLKT 0x1c
342#define BCM2711_I2C_FIFO_MASK 0xFF
343#define BCM2711_I2C_DLEN_MASK 0xFFFF
344#define BCM2711_10_BIT_ADDR_MASK 0x78
353#define BCM2711_DMA0_BASE ( RPI_PERIPHERAL_BASE + 0x00007000 )
354#define BCM2711_DMA1_BASE ( BCM2711_DMA0_BASE + 0x100 )
355#define BCM2711_DMA2_BASE ( BCM2711_DMA0_BASE + 0x200 )
356#define BCM2711_DMA3_BASE ( BCM2711_DMA0_BASE + 0x300 )
357#define BCM2711_DMA4_BASE ( BCM2711_DMA0_BASE + 0x400 )
358#define BCM2711_DMA5_BASE ( BCM2711_DMA0_BASE + 0x500 )
359#define BCM2711_DMA6_BASE ( BCM2711_DMA0_BASE + 0x600 )
360#define BCM2711_DMA7_BASE ( BCM2711_DMA0_BASE + 0x700 )
361#define BCM2711_DMA8_BASE ( BCM2711_DMA0_BASE + 0x800 )
362#define BCM2711_DMA9_BASE ( BCM2711_DMA0_BASE + 0x900 )
363#define BCM2711_DMA10_BASE ( BCM2711_DMA0_BASE + 0xa00 )
364#define BCM2711_DMA11_BASE ( BCM2711_DMA0_BASE + 0xb00 )
365#define BCM2711_DMA12_BASE ( BCM2711_DMA0_BASE + 0xc00 )
366#define BCM2711_DMA13_BASE ( BCM2711_DMA0_BASE + 0xd00 )
367#define BCM2711_DMA14_BASE ( BCM2711_DMA0_BASE + 0xe00 )
368#define ENABLE ( RPI_PERIPHERAL_BASE + 0x00007FF0 )
369#define CS_OFFSET 0x00
370#define CONBLK_AD_OFFSET 0x04
371#define DEBUG_OFFSET 0x020
372#define INT_STATUS_OFFSET 0xfe0
373#define CS_RESET ( 1 << 31 )
374#define CS_ABORT ( 1 << 30 )
375#define CS_END ( 1 << 1 )
376#define CS_WAIT_FOR_OUTSTANDING_WRITES ( 1 << 28 )
377#define CS_PRIORITY_SHIFT ( 1 << 16 )
378#define CS_PANIC_PRIORITY_SHIFT ( 15 << 20 )
379#define CS_ACTIVE ( 1 << 0 )
380#define CS_ERROR ( 1 << 8 )
381#define TI_DEST_INC ( 1 << 4 )
382#define TI_SRC_INC ( 1 << 8 )
383#define TI_SRC_WIDTH ( 1 << 9 )
384#define TI_DEST_WIDTH ( 1 << 5 )
385#define TI_PERMAP( x ) ( ( x ) << 16 )
386#define TI_SRC_DREQ ( 1 << 10 )
387#define TI_DEST_DREQ ( 1 << 6 )
388#define TI_WAIT_RESP ( 1 << 3 )
389#define TI_NO_WIDE_BURSTS ( 1 << 26 )
390#define SI_SRC_INC ( 1 << 12 )
391#define DI_DEST_INC ( 1 << 12 )
400#define BCM2711_MBOX_BASE ( RPI_PERIPHERAL_BASE + 0xB880 )
401
402#define BCM2711_MBOX_READ ( BCM2711_MBOX_BASE + 0x00 )
403#define BCM2711_MBOX_PEEK ( BCM2711_MBOX_BASE + 0x10 )
404#define BCM2711_MBOX_SENDER ( BCM2711_MBOX_BASE + 0x14 )
405#define BCM2711_MBOX_STATUS ( BCM2711_MBOX_BASE + 0x18 )
406#define BCM2711_MBOX_WRITE ( BCM2711_MBOX_BASE + 0x20 )
407#define BCM2711_MBOX_CONFIG ( BCM2711_MBOX_BASE + 0x1C )
408
409#define BCM2711_MBOX_RESPONSE 0x80000000
410#define BCM2711_MBOX_FULL 0x80000000
411#define BCM2711_MBOX_EMPTY 0x40000000
412
421/* Power Manager channel */
422#define BCM2711_MBOX_CHANNEL_PM 0
423/* Framebuffer channel */
424#define BCM2711_MBOX_CHANNEL_FB 1
425/* Virtual UART channel */
426#define BCM2711_MBOX_CHANNEL_VUART 2
427/* VCHIQ channel */
428#define BCM2711_MBOX_CHANNEL_VCHIQ 3
429/* LEDs channel */
430#define BCM2711_MBOX_CHANNEL_LED 4
431/* Button channel */
432#define BCM2711_MBOX_CHANNEL_BUTTON 5
433/* Touch screen channel */
434#define BCM2711_MBOX_CHANNEL_TOUCHS 6
435
436#define BCM2711_MBOX_CHANNEL_COUNT 7
437/* Property tags (ARM <-> VC) channel */
438#define BCM2711_MBOX_CHANNEL_PROP_AVC 8
439/* Property tags (VC <-> ARM) channel */
440#define BCM2711_MBOX_CHANNEL_PROP_VCA 9
441
450/* Timers interrupt control registers */
451#define BCM2711_CORE0_TIMER_IRQ_CTRL_BASE 0xFF800040
452#define BCM2711_CORE1_TIMER_IRQ_CTRL_BASE 0xFF800044
453#define BCM2711_CORE2_TIMER_IRQ_CTRL_BASE 0xFF800048
454#define BCM2711_CORE3_TIMER_IRQ_CTRL_BASE 0xFF80004C
455
456#define BCM2711_CORE_TIMER_IRQ_CTRL( cpuidx ) \
457 ( BCM2711_CORE0_TIMER_IRQ_CTRL_BASE + 0x4 * ( cpuidx ) )
458
465#define BCM2711_LOCAL_REGS_BASE 0x4C0000000
466#define BCM2711_LOCAL_REGS_SIZE 0x100
467
468#define BCM2711_LOCAL_ARM_CONTROL ( BCM2711_LOCAL_REGS_BASE + 0x00 )
469#define BCM2711_LOCAL_CORE_IRQ_CONTROL ( BCM2711_LOCAL_REGS_BASE + 0x0c )
470#define BCM2711_LOCAL_PMU_CONTROL_SET ( BCM2711_LOCAL_REGS_BASE + 0x10 )
471#define BCM2711_LOCAL_PMU_CONTROL_CLR ( BCM2711_LOCAL_REGS_BASE + 0x14 )
472#define BCM2711_LOCAL_PERI_IRQ_ROUTE0 ( BCM2711_LOCAL_REGS_BASE + 0x24 )
473#define BCM2711_LOCAL_AXI_QUIET_TIME ( BCM2711_LOCAL_REGS_BASE + 0x30 )
474#define BCM2711_LOCAL_LOCAL_TIMER_CONTROL ( BCM2711_LOCAL_REGS_BASE + 0x34 )
475#define BCM2711_LOCAL_LOCAL_TIMER_IRQ ( BCM2711_LOCAL_REGS_BASE + 0x38 )
476
477#define BCM2711_LOCAL_TIMER_CNTRL0 ( BCM2711_LOCAL_REGS_BASE + 0x40 )
478#define BCM2711_LOCAL_TIMER_CNTRL1 ( BCM2711_LOCAL_REGS_BASE + 0x44 )
479#define BCM2711_LOCAL_TIMER_CNTRL2 ( BCM2711_LOCAL_REGS_BASE + 0x48 )
480#define BCM2711_LOCAL_TIMER_CNTRL3 ( BCM2711_LOCAL_REGS_BASE + 0x4c )
481
482#define BCM2711_LOCAL_MAILBOX_CNTRL0 ( BCM2711_LOCAL_REGS_BASE + 0x50 )
483#define BCM2711_LOCAL_MAILBOX_CNTRL1 ( BCM2711_LOCAL_REGS_BASE + 0x54 )
484#define BCM2711_LOCAL_MAILBOX_CNTRL2 ( BCM2711_LOCAL_REGS_BASE + 0x58 )
485#define BCM2711_LOCAL_MAILBOX_CNTRL3 ( BCM2711_LOCAL_REGS_BASE + 0x5c )
486
487#define BCM2711_LOCAL_IRQ_SOURCE0 ( BCM2711_LOCAL_REGS_BASE + 0x60 )
488#define BCM2711_LOCAL_IRQ_SOURCE1 ( BCM2711_LOCAL_REGS_BASE + 0x64 )
489#define BCM2711_LOCAL_IRQ_SOURCE2 ( BCM2711_LOCAL_REGS_BASE + 0x68 )
490#define BCM2711_LOCAL_IRQ_SOURCE3 ( BCM2711_LOCAL_REGS_BASE + 0x6c )
491
492#define BCM2711_LOCAL_FIQ_SOURCE0 ( BCM2711_LOCAL_REGS_BASE + 0x70 )
493#define BCM2711_LOCAL_FIQ_SOURCE1 ( BCM2711_LOCAL_REGS_BASE + 0x74 )
494#define BCM2711_LOCAL_FIQ_SOURCE2 ( BCM2711_LOCAL_REGS_BASE + 0x78 )
495#define BCM2711_LOCAL_FIQ_SOURCE3 ( BCM2711_LOCAL_REGS_BASE + 0x7c )
496
503#define BCM2711_MAILBOX_00_WRITE_SET_BASE 0x4C000080
504#define BCM2711_MAILBOX_01_WRITE_SET_BASE 0x4C000084
505#define BCM2711_MAILBOX_02_WRITE_SET_BASE 0x4C000088
506#define BCM2711_MAILBOX_03_WRITE_SET_BASE 0x4C00008C
507#define BCM2711_MAILBOX_04_WRITE_SET_BASE 0x4C000090
508#define BCM2711_MAILBOX_05_WRITE_SET_BASE 0x4C000094
509#define BCM2711_MAILBOX_06_WRITE_SET_BASE 0x4C000098
510#define BCM2711_MAILBOX_07_WRITE_SET_BASE 0x4C00009C
511#define BCM2711_MAILBOX_08_WRITE_SET_BASE 0x4C0000A0
512#define BCM2711_MAILBOX_09_WRITE_SET_BASE 0x4C0000A4
513#define BCM2711_MAILBOX_10_WRITE_SET_BASE 0x4C0000A8
514#define BCM2711_MAILBOX_11_WRITE_SET_BASE 0x4C0000AC
515#define BCM2711_MAILBOX_12_WRITE_SET_BASE 0x4C0000B0
516#define BCM2711_MAILBOX_13_WRITE_SET_BASE 0x4C0000B4
517#define BCM2711_MAILBOX_14_WRITE_SET_BASE 0x4C0000B8
518#define BCM2711_MAILBOX_15_WRITE_SET_BASE 0x4C0000BC
519
520#define BCM2711_MAILBOX_00_READ_CLEAR_BASE 0x4C0000C0
521#define BCM2711_MAILBOX_01_READ_CLEAR_BASE 0x4C0000C4
522#define BCM2711_MAILBOX_02_READ_CLEAR_BASE 0x4C0000C8
523#define BCM2711_MAILBOX_03_READ_CLEAR_BASE 0x4C0000CC
524#define BCM2711_MAILBOX_04_READ_CLEAR_BASE 0x4C0000D0
525#define BCM2711_MAILBOX_05_READ_CLEAR_BASE 0x4C0000D4
526#define BCM2711_MAILBOX_06_READ_CLEAR_BASE 0x4C0000D8
527#define BCM2711_MAILBOX_07_READ_CLEAR_BASE 0x4C0000DC
528#define BCM2711_MAILBOX_08_READ_CLEAR_BASE 0x4C0000E0
529#define BCM2711_MAILBOX_09_READ_CLEAR_BASE 0x4C0000E4
530#define BCM2711_MAILBOX_10_READ_CLEAR_BASE 0x4C0000E8
531#define BCM2711_MAILBOX_11_READ_CLEAR_BASE 0x4C0000EC
532#define BCM2711_MAILBOX_12_READ_CLEAR_BASE 0x4C0000F0
533#define BCM2711_MAILBOX_13_READ_CLEAR_BASE 0x4C0000F4
534#define BCM2711_MAILBOX_14_READ_CLEAR_BASE 0x4C0000F8
535#define BCM2711_MAILBOX_15_READ_CLEAR_BASE 0x4C0000FC
536
543#define BCM2711_ARMC_REGS_BASE ( RPI_PERIPHERAL_BASE + 0xB200 )
544#define BCM2711_ARMC_REGS_SIZE 0x200
545
546#define BCM2711_ARMC_IRQ0_PENDING0 ( BCM2711_ARMC_REGS_BASE + 0x00 )
547#define BCM2711_ARMC_IRQ0_PENDING1 ( BCM2711_ARMC_REGS_BASE + 0x04 )
548#define BCM2711_ARMC_IRQ0_PENDING2 ( BCM2711_ARMC_REGS_BASE + 0x08 )
549#define BCM2711_ARMC_IRQ0_SET_EN_0 ( BCM2711_ARMC_REGS_BASE + 0x10 )
550#define BCM2711_ARMC_IRQ0_SET_EN_1 ( BCM2711_ARMC_REGS_BASE + 0x14 )
551#define BCM2711_ARMC_IRQ0_SET_EN_2 ( BCM2711_ARMC_REGS_BASE + 0x18 )
552#define BCM2711_ARMC_IRQ0_CLR_EN_0 ( BCM2711_ARMC_REGS_BASE + 0x20 )
553#define BCM2711_ARMC_IRQ0_CLR_EN_1 ( BCM2711_ARMC_REGS_BASE + 0x24 )
554#define BCM2711_ARMC_IRQ0_CLR_EN_2 ( BCM2711_ARMC_REGS_BASE + 0x28 )
555
556#define BCM2711_ARMC_IRQ_STATUS0 ( BCM2711_ARMC_REGS_BASE + 0x30 )
557#define BCM2711_ARMC_IRQ_STATUS1 ( BCM2711_ARMC_REGS_BASE + 0x34 )
558#define BCM2711_ARMC_IRQ_STATUS2 ( BCM2711_ARMC_REGS_BASE + 0x38 )
559
560#define BCM2711_ARMC_IRQ1_PENDING0 ( BCM2711_ARMC_REGS_BASE + 0x40 )
561#define BCM2711_ARMC_IRQ1_PENDING1 ( BCM2711_ARMC_REGS_BASE + 0x44 )
562#define BCM2711_ARMC_IRQ1_PENDING2 ( BCM2711_ARMC_REGS_BASE + 0x48 )
563#define BCM2711_ARMC_IRQ1_SET_EN_0 ( BCM2711_ARMC_REGS_BASE + 0x50 )
564#define BCM2711_ARMC_IRQ1_SET_EN_1 ( BCM2711_ARMC_REGS_BASE + 0x54 )
565#define BCM2711_ARMC_IRQ1_SET_EN_2 ( BCM2711_ARMC_REGS_BASE + 0x58 )
566#define BCM2711_ARMC_IRQ1_CLR_EN_0 ( BCM2711_ARMC_REGS_BASE + 0x60 )
567#define BCM2711_ARMC_IRQ1_CLR_EN_1 ( BCM2711_ARMC_REGS_BASE + 0x64 )
568#define BCM2711_ARMC_IRQ1_CLR_EN_2 ( BCM2711_ARMC_REGS_BASE + 0x68 )
569
570#define BCM2711_ARMC_IRQ2_PENDING0 ( BCM2711_ARMC_REGS_BASE + 0x80 )
571#define BCM2711_ARMC_IRQ2_PENDING1 ( BCM2711_ARMC_REGS_BASE + 0x84 )
572#define BCM2711_ARMC_IRQ2_PENDING2 ( BCM2711_ARMC_REGS_BASE + 0x88 )
573#define BCM2711_ARMC_IRQ2_SET_EN_0 ( BCM2711_ARMC_REGS_BASE + 0x90 )
574#define BCM2711_ARMC_IRQ2_SET_EN_1 ( BCM2711_ARMC_REGS_BASE + 0x94 )
575#define BCM2711_ARMC_IRQ2_SET_EN_2 ( BCM2711_ARMC_REGS_BASE + 0x98 )
576#define BCM2711_ARMC_IRQ2_CLR_EN_0 ( BCM2711_ARMC_REGS_BASE + 0xA0 )
577#define BCM2711_ARMC_IRQ2_CLR_EN_1 ( BCM2711_ARMC_REGS_BASE + 0xA4 )
578#define BCM2711_ARMC_IRQ2_CLR_EN_2 ( BCM2711_ARMC_REGS_BASE + 0xA8 )
579
580#define BCM2711_ARMC_IRQ3_PENDING0 ( BCM2711_ARMC_REGS_BASE + 0xC0 )
581#define BCM2711_ARMC_IRQ3_PENDING1 ( BCM2711_ARMC_REGS_BASE + 0xC4 )
582#define BCM2711_ARMC_IRQ3_PENDING2 ( BCM2711_ARMC_REGS_BASE + 0xC8 )
583#define BCM2711_ARMC_IRQ3_SET_EN_0 ( BCM2711_ARMC_REGS_BASE + 0xD0 )
584#define BCM2711_ARMC_IRQ3_SET_EN_1 ( BCM2711_ARMC_REGS_BASE + 0xD4 )
585#define BCM2711_ARMC_IRQ3_SET_EN_2 ( BCM2711_ARMC_REGS_BASE + 0xD8 )
586#define BCM2711_ARMC_IRQ3_CLR_EN_0 ( BCM2711_ARMC_REGS_BASE + 0xE0 )
587#define BCM2711_ARMC_IRQ3_CLR_EN_1 ( BCM2711_ARMC_REGS_BASE + 0xE4 )
588#define BCM2711_ARMC_IRQ3_CLR_EN_2 ( BCM2711_ARMC_REGS_BASE + 0xE8 )
589
590#define BCM2711_ARMC_FIQ0_PENDING0 ( BCM2711_ARMC_REGS_BASE + 0x100 )
591#define BCM2711_ARMC_FIQ0_PENDING1 ( BCM2711_ARMC_REGS_BASE + 0x104 )
592#define BCM2711_ARMC_FIQ0_PENDING2 ( BCM2711_ARMC_REGS_BASE + 0x108 )
593#define BCM2711_ARMC_FIQ0_SET_EN_0 ( BCM2711_ARMC_REGS_BASE + 0x110 )
594#define BCM2711_ARMC_FIQ0_SET_EN_1 ( BCM2711_ARMC_REGS_BASE + 0x114 )
595#define BCM2711_ARMC_FIQ0_SET_EN_2 ( BCM2711_ARMC_REGS_BASE + 0x118 )
596#define BCM2711_ARMC_FIQ0_CLR_EN_0 ( BCM2711_ARMC_REGS_BASE + 0x120 )
597#define BCM2711_ARMC_FIQ0_CLR_EN_1 ( BCM2711_ARMC_REGS_BASE + 0x124 )
598#define BCM2711_ARMC_FIQ0_CLR_EN_2 ( BCM2711_ARMC_REGS_BASE + 0x128 )
599
600#define BCM2711_ARMC_FIQ1_PENDING0 ( BCM2711_ARMC_REGS_BASE + 0x140 )
601#define BCM2711_ARMC_FIQ1_PENDING1 ( BCM2711_ARMC_REGS_BASE + 0x144 )
602#define BCM2711_ARMC_FIQ1_PENDING2 ( BCM2711_ARMC_REGS_BASE + 0x148 )
603#define BCM2711_ARMC_FIQ1_SET_EN_0 ( BCM2711_ARMC_REGS_BASE + 0x150 )
604#define BCM2711_ARMC_FIQ1_SET_EN_1 ( BCM2711_ARMC_REGS_BASE + 0x154 )
605#define BCM2711_ARMC_FIQ1_SET_EN_2 ( BCM2711_ARMC_REGS_BASE + 0x158 )
606#define BCM2711_ARMC_FIQ1_CLR_EN_0 ( BCM2711_ARMC_REGS_BASE + 0x160 )
607#define BCM2711_ARMC_FIQ1_CLR_EN_1 ( BCM2711_ARMC_REGS_BASE + 0x164 )
608#define BCM2711_ARMC_FIQ1_CLR_EN_2 ( BCM2711_ARMC_REGS_BASE + 0x168 )
609
610#define BCM2711_ARMC_FIQ2_PENDING0 ( BCM2711_ARMC_REGS_BASE + 0x180 )
611#define BCM2711_ARMC_FIQ2_PENDING1 ( BCM2711_ARMC_REGS_BASE + 0x184 )
612#define BCM2711_ARMC_FIQ2_PENDING2 ( BCM2711_ARMC_REGS_BASE + 0x188 )
613#define BCM2711_ARMC_FIQ2_SET_EN_0 ( BCM2711_ARMC_REGS_BASE + 0x190 )
614#define BCM2711_ARMC_FIQ2_SET_EN_1 ( BCM2711_ARMC_REGS_BASE + 0x194 )
615#define BCM2711_ARMC_FIQ2_SET_EN_2 ( BCM2711_ARMC_REGS_BASE + 0x198 )
616#define BCM2711_ARMC_FIQ2_CLR_EN_0 ( BCM2711_ARMC_REGS_BASE + 0x1A0 )
617#define BCM2711_ARMC_FIQ2_CLR_EN_1 ( BCM2711_ARMC_REGS_BASE + 0x1A4 )
618#define BCM2711_ARMC_FIQ2_CLR_EN_2 ( BCM2711_ARMC_REGS_BASE + 0x1A8 )
619
620#define BCM2711_ARMC_FIQ3_PENDING0 ( BCM2711_ARMC_REGS_BASE + 0x1C0 )
621#define BCM2711_ARMC_FIQ3_PENDING1 ( BCM2711_ARMC_REGS_BASE + 0x1C4 )
622#define BCM2711_ARMC_FIQ3_PENDING2 ( BCM2711_ARMC_REGS_BASE + 0x1C8 )
623#define BCM2711_ARMC_FIQ3_SET_EN_0 ( BCM2711_ARMC_REGS_BASE + 0x1D0 )
624#define BCM2711_ARMC_FIQ3_SET_EN_1 ( BCM2711_ARMC_REGS_BASE + 0x1D4 )
625#define BCM2711_ARMC_FIQ3_SET_EN_2 ( BCM2711_ARMC_REGS_BASE + 0x1D8 )
626#define BCM2711_ARMC_FIQ3_CLR_EN_0 ( BCM2711_ARMC_REGS_BASE + 0x1E0 )
627#define BCM2711_ARMC_FIQ3_CLR_EN_1 ( BCM2711_ARMC_REGS_BASE + 0x1E4 )
628#define BCM2711_ARMC_FIQ3_CLR_EN_2 ( BCM2711_ARMC_REGS_BASE + 0x1E8 )
629
630#define BCM2711_ARMC_SWIRQ_SET ( BCM2711_ARMC_REGS_BASE + 0x1F0 )
631#define BCM2711_ARMC_SWIRQ_CLEAR ( BCM2711_ARMC_REGS_BASE + 0x1F4 )
632
635#ifdef __cplusplus
636}
637#endif /* __cplusplus */
638
639#endif /* LIBBSP_ARM_RASPBERRYPI_RASPBERRYPI_H */
This header file provides utility macros for BSPs.