1*4882a593SmuzhiyunBroadcom BCM7120-style Level 2 interrupt controller 2*4882a593Smuzhiyun 3*4882a593SmuzhiyunThis interrupt controller hardware is a second level interrupt controller that 4*4882a593Smuzhiyunis hooked to a parent interrupt controller: e.g: ARM GIC for ARM-based 5*4882a593Smuzhiyunplatforms. It can be found on BCM7xxx products starting with BCM7120. 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunSuch an interrupt controller has the following hardware design: 8*4882a593Smuzhiyun 9*4882a593Smuzhiyun- outputs multiple interrupts signals towards its interrupt controller parent 10*4882a593Smuzhiyun 11*4882a593Smuzhiyun- controls how some of the interrupts will be flowing, whether they will 12*4882a593Smuzhiyun directly output an interrupt signal towards the interrupt controller parent, 13*4882a593Smuzhiyun or if they will output an interrupt signal at this 2nd level interrupt 14*4882a593Smuzhiyun controller, in particular for UARTs 15*4882a593Smuzhiyun 16*4882a593Smuzhiyun- has one 32-bit enable word and one 32-bit status word 17*4882a593Smuzhiyun 18*4882a593Smuzhiyun- no atomic set/clear operations 19*4882a593Smuzhiyun 20*4882a593Smuzhiyun- not all bits within the interrupt controller actually map to an interrupt 21*4882a593Smuzhiyun 22*4882a593SmuzhiyunThe typical hardware layout for this controller is represented below: 23*4882a593Smuzhiyun 24*4882a593Smuzhiyun2nd level interrupt line Outputs for the parent controller (e.g: ARM GIC) 25*4882a593Smuzhiyun 26*4882a593Smuzhiyun0 -----[ MUX ] ------------|==========> GIC interrupt 75 27*4882a593Smuzhiyun \-----------\ 28*4882a593Smuzhiyun | 29*4882a593Smuzhiyun1 -----[ MUX ] --------)---|==========> GIC interrupt 76 30*4882a593Smuzhiyun \------------| 31*4882a593Smuzhiyun | 32*4882a593Smuzhiyun2 -----[ MUX ] --------)---|==========> GIC interrupt 77 33*4882a593Smuzhiyun \------------| 34*4882a593Smuzhiyun | 35*4882a593Smuzhiyun3 ---------------------| 36*4882a593Smuzhiyun4 ---------------------| 37*4882a593Smuzhiyun5 ---------------------| 38*4882a593Smuzhiyun7 ---------------------|---|===========> GIC interrupt 66 39*4882a593Smuzhiyun9 ---------------------| 40*4882a593Smuzhiyun10 --------------------| 41*4882a593Smuzhiyun11 --------------------/ 42*4882a593Smuzhiyun 43*4882a593Smuzhiyun6 ------------------------\ 44*4882a593Smuzhiyun |===========> GIC interrupt 64 45*4882a593Smuzhiyun8 ------------------------/ 46*4882a593Smuzhiyun 47*4882a593Smuzhiyun12 ........................ X 48*4882a593Smuzhiyun13 ........................ X (not connected) 49*4882a593Smuzhiyun.. 50*4882a593Smuzhiyun31 ........................ X 51*4882a593Smuzhiyun 52*4882a593SmuzhiyunRequired properties: 53*4882a593Smuzhiyun 54*4882a593Smuzhiyun- compatible: should be "brcm,bcm7120-l2-intc" 55*4882a593Smuzhiyun- reg: specifies the base physical address and size of the registers 56*4882a593Smuzhiyun- interrupt-controller: identifies the node as an interrupt controller 57*4882a593Smuzhiyun- #interrupt-cells: specifies the number of cells needed to encode an interrupt 58*4882a593Smuzhiyun source, should be 1. 59*4882a593Smuzhiyun- interrupts: specifies the interrupt line(s) in the interrupt-parent controller 60*4882a593Smuzhiyun node, valid values depend on the type of parent interrupt controller 61*4882a593Smuzhiyun- brcm,int-map-mask: 32-bits bit mask describing how many and which interrupts 62*4882a593Smuzhiyun are wired to this 2nd level interrupt controller, and how they match their 63*4882a593Smuzhiyun respective interrupt parents. Should match exactly the number of interrupts 64*4882a593Smuzhiyun specified in the 'interrupts' property. 65*4882a593Smuzhiyun 66*4882a593SmuzhiyunOptional properties: 67*4882a593Smuzhiyun 68*4882a593Smuzhiyun- brcm,irq-can-wake: if present, this means the L2 controller can be used as a 69*4882a593Smuzhiyun wakeup source for system suspend/resume. 70*4882a593Smuzhiyun 71*4882a593Smuzhiyun- brcm,int-fwd-mask: if present, a bit mask to configure the interrupts which 72*4882a593Smuzhiyun have a mux gate, typically UARTs. Setting these bits will make their 73*4882a593Smuzhiyun respective interrupt outputs bypass this 2nd level interrupt controller 74*4882a593Smuzhiyun completely; it is completely transparent for the interrupt controller 75*4882a593Smuzhiyun parent. This should have one 32-bit word per enable/status pair. 76*4882a593Smuzhiyun 77*4882a593SmuzhiyunExample: 78*4882a593Smuzhiyun 79*4882a593Smuzhiyunirq0_intc: interrupt-controller@f0406800 { 80*4882a593Smuzhiyun compatible = "brcm,bcm7120-l2-intc"; 81*4882a593Smuzhiyun interrupt-parent = <&intc>; 82*4882a593Smuzhiyun #interrupt-cells = <1>; 83*4882a593Smuzhiyun reg = <0xf0406800 0x8>; 84*4882a593Smuzhiyun interrupt-controller; 85*4882a593Smuzhiyun interrupts = <0x0 0x42 0x0>, <0x0 0x40 0x0>; 86*4882a593Smuzhiyun brcm,int-map-mask = <0xeb8>, <0x140>; 87*4882a593Smuzhiyun brcm,int-fwd-mask = <0x7>; 88*4882a593Smuzhiyun}; 89