Zephyr API Documentation
4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
bcm2835-armctrl.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2026 Jonathan Elliot Peace <jep@alphabetiq.com>
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
12
13
#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_INTERRUPT_CONTROLLER_BCM2835_ARMCTRL_H_
14
#define ZEPHYR_INCLUDE_DT_BINDINGS_INTERRUPT_CONTROLLER_BCM2835_ARMCTRL_H_
15
17
18
/*
19
* Zephyr IRQ-number layout for the BCM2710 SoC (BCM2836 L1 intc +
20
* BCM2835 ARMC peripheral intc cascaded behind it):
21
*
22
* 0..31 reserved for the L1 ARM-local intc (only 0..9 used --
23
* see <zephyr/dt-bindings/interrupt-controller/bcm2836-l1.h>).
24
* IRQ 8 (L1 GPU IRQ) is the cascade entry; the SoC IRQ
25
* glue resolves it transparently inside z_soc_irq_get_active
26
* so it is never seen by application ISRs.
27
*
28
* 32 + (bank << 5) + bit -- ARMC peripheral IRQs:
29
* bank 0 (basic): 32..39 (IRQ_BASIC_PENDING bits 0..7)
30
* bank 1 (PEND1, GPU 0..31): 64..95
31
* bank 2 (PEND2, GPU 32..63): 96..127
32
*
33
* The bank-shift encoding (offset by +32 for the L1 reservation)
34
* keeps the SoC-layer shortcut/cascade decode a straightforward
35
* arithmetic mapping of the BCM2835 ARMC pending-register layout.
36
*/
37
#define BCM2835_IRQ_BASE 32
38
39
#define BCM2835_HWIRQ(bank, n) (BCM2835_IRQ_BASE + ((bank) << 5) + (n))
40
41
#define BCM2835_BASIC_IRQ(n) BCM2835_HWIRQ(0, n)
/* 32..39 */
42
#define BCM2835_BANK1(n) BCM2835_HWIRQ(1, n)
/* 64..95 */
43
#define BCM2835_BANK2(n) BCM2835_HWIRQ(2, n)
/* 96..127 */
44
45
/* basic bank shortcuts */
46
#define BCM2835_IRQ_ARM_TIMER BCM2835_BASIC_IRQ(0)
47
#define BCM2835_IRQ_ARM_MAILBOX BCM2835_BASIC_IRQ(1)
48
#define BCM2835_IRQ_ARM_DOORBELL0 BCM2835_BASIC_IRQ(2)
49
#define BCM2835_IRQ_ARM_DOORBELL1 BCM2835_BASIC_IRQ(3)
50
#define BCM2835_IRQ_GPU0_HALT BCM2835_BASIC_IRQ(4)
51
#define BCM2835_IRQ_GPU1_HALT BCM2835_BASIC_IRQ(5)
52
#define BCM2835_IRQ_ILLEGAL_TYPE0 BCM2835_BASIC_IRQ(6)
53
#define BCM2835_IRQ_ILLEGAL_TYPE1 BCM2835_BASIC_IRQ(7)
54
55
/* GPU PEND1 (peripheral lower bank) */
56
#define BCM2835_IRQ_TIMER0 BCM2835_BANK1(0)
57
#define BCM2835_IRQ_TIMER1 BCM2835_BANK1(1)
58
#define BCM2835_IRQ_TIMER2 BCM2835_BANK1(2)
59
#define BCM2835_IRQ_TIMER3 BCM2835_BANK1(3)
60
/* USB OTG (Synopsys DWC2). GPU IRQ 9 per the BCM2835 ARM Peripherals
61
* datasheet ch. 7 "ARM peripherals interrupts table".
62
*/
63
#define BCM2835_IRQ_USB BCM2835_BANK1(9)
/* DWC2 USB OTG */
64
/* DMA channel IRQs: channels 0..10 have dedicated lines at PEND1 bits
65
* 16..26; channels 11..14 share bit 27. (PEND1 bit 28, the "any DMA
66
* channel" line, is not exposed.)
67
*/
68
#define BCM2835_IRQ_DMA(n) BCM2835_BANK1(16 + (n))
/* n = 0..10 */
69
#define BCM2835_IRQ_DMA_SHARED BCM2835_BANK1(27)
/* channels 11..14 */
70
#define BCM2835_IRQ_AUX BCM2835_BANK1(29)
/* mini-UART, SPI1, SPI2 */
71
72
/* GPU PEND2 (peripheral upper bank) */
73
#define BCM2835_IRQ_I2C_SPI_SLV BCM2835_BANK2(11)
74
#define BCM2835_IRQ_GPIO0 BCM2835_BANK2(17)
75
#define BCM2835_IRQ_GPIO1 BCM2835_BANK2(18)
76
#define BCM2835_IRQ_GPIO2 BCM2835_BANK2(19)
77
#define BCM2835_IRQ_GPIO3 BCM2835_BANK2(20)
78
#define BCM2835_IRQ_I2C BCM2835_BANK2(21)
79
#define BCM2835_IRQ_SPI BCM2835_BANK2(22)
80
#define BCM2835_IRQ_PCM BCM2835_BANK2(23)
81
#define BCM2835_IRQ_SDHOST BCM2835_BANK2(24)
/* Legacy SDHost (microSD slot) */
82
#define BCM2835_IRQ_UART BCM2835_BANK2(25)
/* PL011 UART0 */
83
#define BCM2835_IRQ_ARASAN_SDIO BCM2835_BANK2(30)
/* Arasan SDHCI / EMMC */
84
85
#ifndef IRQ_TYPE_LEVEL
86
#define IRQ_TYPE_LEVEL 2
87
#endif
88
#ifndef IRQ_TYPE_EDGE
89
#define IRQ_TYPE_EDGE 4
90
#endif
91
93
94
#endif
/* ZEPHYR_INCLUDE_DT_BINDINGS_INTERRUPT_CONTROLLER_BCM2835_ARMCTRL_H_ */
zephyr
dt-bindings
interrupt-controller
bcm2835-armctrl.h
Generated on
for Zephyr API Documentation by
1.16.1