Merge branch 'timers-2038-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[cascardo/linux.git] / Documentation / devicetree / bindings / interrupt-controller / brcm,bcm7120-l2-intc.txt
1 Broadcom BCM7120-style Level 2 interrupt controller
2
3 This interrupt controller hardware is a second level interrupt controller that
4 is hooked to a parent interrupt controller: e.g: ARM GIC for ARM-based
5 platforms. It can be found on BCM7xxx products starting with BCM7120.
6
7 Such an interrupt controller has the following hardware design:
8
9 - outputs multiple interrupts signals towards its interrupt controller parent
10
11 - controls how some of the interrupts will be flowing, whether they will
12   directly output an interrupt signal towards the interrupt controller parent,
13   or if they will output an interrupt signal at this 2nd level interrupt
14   controller, in particular for UARTs
15
16 - typically has one 32-bit enable word and one 32-bit status word, but on
17   some hardware may have more than one enable/status pair
18
19 - no atomic set/clear operations
20
21 - not all bits within the interrupt controller actually map to an interrupt
22
23 The typical hardware layout for this controller is represented below:
24
25 2nd level interrupt line                Outputs for the parent controller (e.g: ARM GIC)
26
27 0 -----[ MUX ] ------------|==========> GIC interrupt 75
28           \-----------\
29                        |
30 1 -----[ MUX ] --------)---|==========> GIC interrupt 76
31           \------------|
32                        |
33 2 -----[ MUX ] --------)---|==========> GIC interrupt 77
34           \------------|
35                        |
36 3 ---------------------|
37 4 ---------------------|
38 5 ---------------------|
39 7 ---------------------|---|===========> GIC interrupt 66
40 9 ---------------------|
41 10 --------------------|
42 11 --------------------/
43
44 6 ------------------------\
45                            |===========> GIC interrupt 64
46 8 ------------------------/
47
48 12 ........................ X
49 13 ........................ X           (not connected)
50 ..
51 31 ........................ X
52
53 Required properties:
54
55 - compatible: should be "brcm,bcm7120-l2-intc"
56 - reg: specifies the base physical address and size of the registers;
57   multiple pairs may be specified, with the first pair handling IRQ offsets
58   0..31 and the second pair handling 32..63
59 - interrupt-controller: identifies the node as an interrupt controller
60 - #interrupt-cells: specifies the number of cells needed to encode an interrupt
61   source, should be 1.
62 - interrupt-parent: specifies the phandle to the parent interrupt controller
63   this one is cascaded from
64 - interrupts: specifies the interrupt line(s) in the interrupt-parent controller
65   node, valid values depend on the type of parent interrupt controller
66 - brcm,int-map-mask: 32-bits bit mask describing how many and which interrupts
67   are wired to this 2nd level interrupt controller, and how they match their
68   respective interrupt parents. Should match exactly the number of interrupts
69   specified in the 'interrupts' property, multiplied by the number of
70   enable/status register pairs implemented by this controller.  For
71   multiple parent IRQs with multiple enable/status words, this looks like:
72   <irq0_w0 irq0_w1 irq1_w0 irq1_w1 ...>
73
74 Optional properties:
75
76 - brcm,irq-can-wake: if present, this means the L2 controller can be used as a
77   wakeup source for system suspend/resume.
78
79 - brcm,int-fwd-mask: if present, a bit mask to configure the interrupts which
80   have a mux gate, typically UARTs. Setting these bits will make their
81   respective interrupt outputs bypass this 2nd level interrupt controller
82   completely; it is completely transparent for the interrupt controller
83   parent. This should have one 32-bit word per enable/status pair.
84
85 Example:
86
87 irq0_intc: interrupt-controller@f0406800 {
88         compatible = "brcm,bcm7120-l2-intc";
89         interrupt-parent = <&intc>;
90         #interrupt-cells = <1>;
91         reg = <0xf0406800 0x8>;
92         interrupt-controller;
93         interrupts = <0x0 0x42 0x0>, <0x0 0x40 0x0>;
94         brcm,int-map-mask = <0xeb8>, <0x140>;
95         brcm,int-fwd-mask = <0x7>;
96 };