Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: interrupt-controller: Convert BCM7120 L2 to YAML

Convert the Broadcom BCM7120 Level 2 interrupt controller Device Tree
binding to YAML to help with validation.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20211217160546.497012-2-f.fainelli@gmail.com

authored by

Florian Fainelli and committed by
Rob Herring
07f7f686 a5af82a8

+126 -88
-88
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 - - has one 32-bit enable word and one 32-bit status word 17 - 18 - - no atomic set/clear operations 19 - 20 - - not all bits within the interrupt controller actually map to an interrupt 21 - 22 - The typical hardware layout for this controller is represented below: 23 - 24 - 2nd level interrupt line Outputs for the parent controller (e.g: ARM GIC) 25 - 26 - 0 -----[ MUX ] ------------|==========> GIC interrupt 75 27 - \-----------\ 28 - | 29 - 1 -----[ MUX ] --------)---|==========> GIC interrupt 76 30 - \------------| 31 - | 32 - 2 -----[ MUX ] --------)---|==========> GIC interrupt 77 33 - \------------| 34 - | 35 - 3 ---------------------| 36 - 4 ---------------------| 37 - 5 ---------------------| 38 - 7 ---------------------|---|===========> GIC interrupt 66 39 - 9 ---------------------| 40 - 10 --------------------| 41 - 11 --------------------/ 42 - 43 - 6 ------------------------\ 44 - |===========> GIC interrupt 64 45 - 8 ------------------------/ 46 - 47 - 12 ........................ X 48 - 13 ........................ X (not connected) 49 - .. 50 - 31 ........................ X 51 - 52 - Required properties: 53 - 54 - - compatible: should be "brcm,bcm7120-l2-intc" 55 - - reg: specifies the base physical address and size of the registers 56 - - interrupt-controller: identifies the node as an interrupt controller 57 - - #interrupt-cells: specifies the number of cells needed to encode an interrupt 58 - source, should be 1. 59 - - interrupts: specifies the interrupt line(s) in the interrupt-parent controller 60 - node, valid values depend on the type of parent interrupt controller 61 - - brcm,int-map-mask: 32-bits bit mask describing how many and which interrupts 62 - are wired to this 2nd level interrupt controller, and how they match their 63 - respective interrupt parents. Should match exactly the number of interrupts 64 - specified in the 'interrupts' property. 65 - 66 - Optional properties: 67 - 68 - - brcm,irq-can-wake: if present, this means the L2 controller can be used as a 69 - wakeup source for system suspend/resume. 70 - 71 - - brcm,int-fwd-mask: if present, a bit mask to configure the interrupts which 72 - have a mux gate, typically UARTs. Setting these bits will make their 73 - respective interrupt outputs bypass this 2nd level interrupt controller 74 - completely; it is completely transparent for the interrupt controller 75 - parent. This should have one 32-bit word per enable/status pair. 76 - 77 - Example: 78 - 79 - irq0_intc: interrupt-controller@f0406800 { 80 - compatible = "brcm,bcm7120-l2-intc"; 81 - interrupt-parent = <&intc>; 82 - #interrupt-cells = <1>; 83 - reg = <0xf0406800 0x8>; 84 - interrupt-controller; 85 - interrupts = <0x0 0x42 0x0>, <0x0 0x40 0x0>; 86 - brcm,int-map-mask = <0xeb8>, <0x140>; 87 - brcm,int-fwd-mask = <0x7>; 88 - };
+126
Documentation/devicetree/bindings/interrupt-controller/brcm,bcm7120-l2-intc.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/interrupt-controller/brcm,bcm7120-l2-intc.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Broadcom BCM7120-style Level 2 interrupt controller 8 + 9 + maintainers: 10 + - Florian Fainelli <f.fainelli@gmail.com> 11 + 12 + description: > 13 + This interrupt controller hardware is a second level interrupt controller that 14 + is hooked to a parent interrupt controller: e.g: ARM GIC for ARM-based 15 + platforms. It can be found on BCM7xxx products starting with BCM7120. 16 + 17 + Such an interrupt controller has the following hardware design: 18 + 19 + - outputs multiple interrupts signals towards its interrupt controller parent 20 + 21 + - controls how some of the interrupts will be flowing, whether they will 22 + directly output an interrupt signal towards the interrupt controller parent, 23 + or if they will output an interrupt signal at this 2nd level interrupt 24 + controller, in particular for UARTs 25 + 26 + - has one 32-bit enable word and one 32-bit status word 27 + 28 + - no atomic set/clear operations 29 + 30 + - not all bits within the interrupt controller actually map to an interrupt 31 + 32 + The typical hardware layout for this controller is represented below: 33 + 34 + 2nd level interrupt line Outputs for the parent controller (e.g: ARM GIC) 35 + 36 + 0 -----[ MUX ] ------------|==========> GIC interrupt 75 37 + \-----------\ 38 + | 39 + 1 -----[ MUX ] --------)---|==========> GIC interrupt 76 40 + \------------| 41 + | 42 + 2 -----[ MUX ] --------)---|==========> GIC interrupt 77 43 + \------------| 44 + | 45 + 3 ---------------------| 46 + 4 ---------------------| 47 + 5 ---------------------| 48 + 7 ---------------------|---|===========> GIC interrupt 66 49 + 9 ---------------------| 50 + 10 --------------------| 51 + 11 --------------------/ 52 + 53 + 6 ------------------------\ 54 + |===========> GIC interrupt 64 55 + 8 ------------------------/ 56 + 57 + 12 ........................ X 58 + 13 ........................ X (not connected) 59 + .. 60 + 31 ........................ X 61 + 62 + allOf: 63 + - $ref: /schemas/interrupt-controller.yaml# 64 + 65 + properties: 66 + compatible: 67 + const: brcm,bcm7120-l2-intc 68 + 69 + reg: 70 + maxItems: 1 71 + description: > 72 + Specifies the base physical address and size of the registers 73 + 74 + interrupt-controller: true 75 + 76 + "#interrupt-cells": 77 + const: 1 78 + 79 + interrupts: 80 + minItems: 1 81 + maxItems: 32 82 + 83 + brcm,int-map-mask: 84 + $ref: /schemas/types.yaml#/definitions/uint32-array 85 + description: > 86 + 32-bits bit mask describing how many and which interrupts are wired to 87 + this 2nd level interrupt controller, and how they match their respective 88 + interrupt parents. Should match exactly the number of interrupts 89 + specified in the 'interrupts' property. 90 + 91 + brcm,irq-can-wake: 92 + type: boolean 93 + description: > 94 + If present, this means the L2 controller can be used as a wakeup source 95 + for system suspend/resume. 96 + 97 + brcm,int-fwd-mask: 98 + $ref: /schemas/types.yaml#/definitions/uint32 99 + description: > 100 + if present, a bit mask to configure the interrupts which have a mux gate, 101 + typically UARTs. Setting these bits will make their respective interrupt 102 + outputs bypass this 2nd level interrupt controller completely; it is 103 + completely transparent for the interrupt controller parent. This should 104 + have one 32-bit word per enable/status pair. 105 + 106 + additionalProperties: false 107 + 108 + required: 109 + - compatible 110 + - reg 111 + - interrupt-controller 112 + - "#interrupt-cells" 113 + - interrupts 114 + 115 + examples: 116 + - | 117 + irq0_intc: interrupt-controller@f0406800 { 118 + compatible = "brcm,bcm7120-l2-intc"; 119 + interrupt-parent = <&intc>; 120 + #interrupt-cells = <1>; 121 + reg = <0xf0406800 0x8>; 122 + interrupt-controller; 123 + interrupts = <0x0 0x42 0x0>, <0x0 0x40 0x0>; 124 + brcm,int-map-mask = <0xeb8>, <0x140>; 125 + brcm,int-fwd-mask = <0x7>; 126 + };