1e67e8565SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2e67e8565SEmmanuel Vadot%YAML 1.2 3e67e8565SEmmanuel Vadot--- 4e67e8565SEmmanuel Vadot$id: http://devicetree.org/schemas/interrupt-controller/brcm,bcm7120-l2-intc.yaml# 5e67e8565SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6e67e8565SEmmanuel Vadot 7e67e8565SEmmanuel Vadottitle: Broadcom BCM7120-style Level 2 and Broadcom BCM3380 Level 1 / Level 2 8e67e8565SEmmanuel Vadot 9e67e8565SEmmanuel Vadotmaintainers: 10e67e8565SEmmanuel Vadot - Florian Fainelli <f.fainelli@gmail.com> 11e67e8565SEmmanuel Vadot 12e67e8565SEmmanuel Vadotdescription: > 13e67e8565SEmmanuel Vadot This interrupt controller hardware is a second level interrupt controller that 14e67e8565SEmmanuel Vadot is hooked to a parent interrupt controller: e.g: ARM GIC for ARM-based 15e67e8565SEmmanuel Vadot platforms. It can be found on BCM7xxx products starting with BCM7120. 16e67e8565SEmmanuel Vadot 17e67e8565SEmmanuel Vadot Such an interrupt controller has the following hardware design: 18e67e8565SEmmanuel Vadot 19e67e8565SEmmanuel Vadot - outputs multiple interrupts signals towards its interrupt controller parent 20e67e8565SEmmanuel Vadot 21e67e8565SEmmanuel Vadot - controls how some of the interrupts will be flowing, whether they will 22e67e8565SEmmanuel Vadot directly output an interrupt signal towards the interrupt controller parent, 23e67e8565SEmmanuel Vadot or if they will output an interrupt signal at this 2nd level interrupt 24e67e8565SEmmanuel Vadot controller, in particular for UARTs 25e67e8565SEmmanuel Vadot 26e67e8565SEmmanuel Vadot - has one 32-bit enable word and one 32-bit status word 27e67e8565SEmmanuel Vadot 28e67e8565SEmmanuel Vadot - no atomic set/clear operations 29e67e8565SEmmanuel Vadot 30e67e8565SEmmanuel Vadot - not all bits within the interrupt controller actually map to an interrupt 31e67e8565SEmmanuel Vadot 32e67e8565SEmmanuel Vadot The typical hardware layout for this controller is represented below: 33e67e8565SEmmanuel Vadot 34e67e8565SEmmanuel Vadot 2nd level interrupt line Outputs for the parent controller (e.g: ARM GIC) 35e67e8565SEmmanuel Vadot 36e67e8565SEmmanuel Vadot 0 -----[ MUX ] ------------|==========> GIC interrupt 75 37e67e8565SEmmanuel Vadot \-----------\ 38e67e8565SEmmanuel Vadot | 39e67e8565SEmmanuel Vadot 1 -----[ MUX ] --------)---|==========> GIC interrupt 76 40e67e8565SEmmanuel Vadot \------------| 41e67e8565SEmmanuel Vadot | 42e67e8565SEmmanuel Vadot 2 -----[ MUX ] --------)---|==========> GIC interrupt 77 43e67e8565SEmmanuel Vadot \------------| 44e67e8565SEmmanuel Vadot | 45e67e8565SEmmanuel Vadot 3 ---------------------| 46e67e8565SEmmanuel Vadot 4 ---------------------| 47e67e8565SEmmanuel Vadot 5 ---------------------| 48e67e8565SEmmanuel Vadot 7 ---------------------|---|===========> GIC interrupt 66 49e67e8565SEmmanuel Vadot 9 ---------------------| 50e67e8565SEmmanuel Vadot 10 --------------------| 51e67e8565SEmmanuel Vadot 11 --------------------/ 52e67e8565SEmmanuel Vadot 53e67e8565SEmmanuel Vadot 6 ------------------------\ 54e67e8565SEmmanuel Vadot |===========> GIC interrupt 64 55e67e8565SEmmanuel Vadot 8 ------------------------/ 56e67e8565SEmmanuel Vadot 57e67e8565SEmmanuel Vadot 12 ........................ X 58e67e8565SEmmanuel Vadot 13 ........................ X (not connected) 59e67e8565SEmmanuel Vadot .. 60e67e8565SEmmanuel Vadot 31 ........................ X 61e67e8565SEmmanuel Vadot 62*aa1a8ff2SEmmanuel Vadot The BCM3380 Level 1 / Level 2 interrupt controller shows up in various forms 63e67e8565SEmmanuel Vadot on many BCM338x/BCM63xx chipsets. It has the following properties: 64e67e8565SEmmanuel Vadot 65e67e8565SEmmanuel Vadot - outputs a single interrupt signal to its interrupt controller parent 66e67e8565SEmmanuel Vadot 67e67e8565SEmmanuel Vadot - contains one or more enable/status word pairs, which often appear at 68e67e8565SEmmanuel Vadot different offsets in different blocks 69e67e8565SEmmanuel Vadot 70e67e8565SEmmanuel Vadot - no atomic set/clear operations 71e67e8565SEmmanuel Vadot 72e67e8565SEmmanuel VadotallOf: 73e67e8565SEmmanuel Vadot - $ref: /schemas/interrupt-controller.yaml# 74e67e8565SEmmanuel Vadot 75e67e8565SEmmanuel Vadotproperties: 76e67e8565SEmmanuel Vadot compatible: 77e67e8565SEmmanuel Vadot items: 78e67e8565SEmmanuel Vadot - enum: 79e67e8565SEmmanuel Vadot - brcm,bcm7120-l2-intc 80e67e8565SEmmanuel Vadot - brcm,bcm3380-l2-intc 81e67e8565SEmmanuel Vadot 82e67e8565SEmmanuel Vadot reg: 83e67e8565SEmmanuel Vadot minItems: 1 84e67e8565SEmmanuel Vadot maxItems: 4 85e67e8565SEmmanuel Vadot description: > 86e67e8565SEmmanuel Vadot Specifies the base physical address and size of the registers 87e67e8565SEmmanuel Vadot 88e67e8565SEmmanuel Vadot interrupt-controller: true 89e67e8565SEmmanuel Vadot 90e67e8565SEmmanuel Vadot "#interrupt-cells": 91e67e8565SEmmanuel Vadot const: 1 92e67e8565SEmmanuel Vadot 93e67e8565SEmmanuel Vadot interrupts: 94e67e8565SEmmanuel Vadot minItems: 1 95e67e8565SEmmanuel Vadot maxItems: 32 96e67e8565SEmmanuel Vadot 97e67e8565SEmmanuel Vadot brcm,int-map-mask: 98e67e8565SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 99e67e8565SEmmanuel Vadot description: > 100e67e8565SEmmanuel Vadot 32-bits bit mask describing how many and which interrupts are wired to 101e67e8565SEmmanuel Vadot this 2nd level interrupt controller, and how they match their respective 102e67e8565SEmmanuel Vadot interrupt parents. Should match exactly the number of interrupts 103e67e8565SEmmanuel Vadot specified in the 'interrupts' property. 104e67e8565SEmmanuel Vadot 105e67e8565SEmmanuel Vadot brcm,irq-can-wake: 106e67e8565SEmmanuel Vadot type: boolean 107e67e8565SEmmanuel Vadot description: > 108e67e8565SEmmanuel Vadot If present, this means the L2 controller can be used as a wakeup source 109e67e8565SEmmanuel Vadot for system suspend/resume. 110e67e8565SEmmanuel Vadot 111e67e8565SEmmanuel Vadot brcm,int-fwd-mask: 112cb7aa33aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 113cb7aa33aSEmmanuel Vadot maxItems: 1 114e67e8565SEmmanuel Vadot description: > 115e67e8565SEmmanuel Vadot if present, a bit mask to configure the interrupts which have a mux gate, 116e67e8565SEmmanuel Vadot typically UARTs. Setting these bits will make their respective interrupt 117e67e8565SEmmanuel Vadot outputs bypass this 2nd level interrupt controller completely; it is 118e67e8565SEmmanuel Vadot completely transparent for the interrupt controller parent. This should 119e67e8565SEmmanuel Vadot have one 32-bit word per enable/status pair. 120e67e8565SEmmanuel Vadot 121e67e8565SEmmanuel VadotadditionalProperties: false 122e67e8565SEmmanuel Vadot 123e67e8565SEmmanuel Vadotrequired: 124e67e8565SEmmanuel Vadot - compatible 125e67e8565SEmmanuel Vadot - reg 126e67e8565SEmmanuel Vadot - interrupt-controller 127e67e8565SEmmanuel Vadot - "#interrupt-cells" 128e67e8565SEmmanuel Vadot - interrupts 129e67e8565SEmmanuel Vadot 130e67e8565SEmmanuel Vadotexamples: 131e67e8565SEmmanuel Vadot - | 132e67e8565SEmmanuel Vadot irq0_intc: interrupt-controller@f0406800 { 133e67e8565SEmmanuel Vadot compatible = "brcm,bcm7120-l2-intc"; 134e67e8565SEmmanuel Vadot interrupt-parent = <&intc>; 135e67e8565SEmmanuel Vadot #interrupt-cells = <1>; 136e67e8565SEmmanuel Vadot reg = <0xf0406800 0x8>; 137e67e8565SEmmanuel Vadot interrupt-controller; 138e67e8565SEmmanuel Vadot interrupts = <0x0 0x42 0x0>, <0x0 0x40 0x0>; 139e67e8565SEmmanuel Vadot brcm,int-map-mask = <0xeb8>, <0x140>; 140e67e8565SEmmanuel Vadot brcm,int-fwd-mask = <0x7>; 141e67e8565SEmmanuel Vadot }; 142e67e8565SEmmanuel Vadot 143e67e8565SEmmanuel Vadot - | 144e67e8565SEmmanuel Vadot irq1_intc: interrupt-controller@10000020 { 145e67e8565SEmmanuel Vadot compatible = "brcm,bcm3380-l2-intc"; 146e67e8565SEmmanuel Vadot reg = <0x10000024 0x4>, <0x1000002c 0x4>, 147e67e8565SEmmanuel Vadot <0x10000020 0x4>, <0x10000028 0x4>; 148e67e8565SEmmanuel Vadot interrupt-controller; 149e67e8565SEmmanuel Vadot #interrupt-cells = <1>; 150e67e8565SEmmanuel Vadot interrupt-parent = <&cpu_intc>; 151e67e8565SEmmanuel Vadot interrupts = <2>; 152e67e8565SEmmanuel Vadot }; 153