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

dt-bindings: interrupt-controller: Convert Atmel AIC to json-schema

Convert the Atmel AIC binding document to DT schema format using
json-schema.

Signed-off-by: Dharma Balasubiramani <dharma.b@microchip.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20240222090738.41628-1-dharma.b@microchip.com
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Dharma Balasubiramani and committed by
Rob Herring
aaef9cdc c5839535

+89 -43
-43
Documentation/devicetree/bindings/interrupt-controller/atmel,aic.txt
··· 1 - * Advanced Interrupt Controller (AIC) 2 - 3 - Required properties: 4 - - compatible: Should be: 5 - - "atmel,<chip>-aic" where <chip> can be "at91rm9200", "sama5d2", 6 - "sama5d3" or "sama5d4" 7 - - "microchip,<chip>-aic" where <chip> can be "sam9x60" 8 - 9 - - interrupt-controller: Identifies the node as an interrupt controller. 10 - - #interrupt-cells: The number of cells to define the interrupts. It should be 3. 11 - The first cell is the IRQ number (aka "Peripheral IDentifier" on datasheet). 12 - The second cell is used to specify flags: 13 - bits[3:0] trigger type and level flags: 14 - 1 = low-to-high edge triggered. 15 - 2 = high-to-low edge triggered. 16 - 4 = active high level-sensitive. 17 - 8 = active low level-sensitive. 18 - Valid combinations are 1, 2, 3, 4, 8. 19 - Default flag for internal sources should be set to 4 (active high). 20 - The third cell is used to specify the irq priority from 0 (lowest) to 7 21 - (highest). 22 - - reg: Should contain AIC registers location and length 23 - - atmel,external-irqs: u32 array of external irqs. 24 - 25 - Examples: 26 - /* 27 - * AIC 28 - */ 29 - aic: interrupt-controller@fffff000 { 30 - compatible = "atmel,at91rm9200-aic"; 31 - interrupt-controller; 32 - #interrupt-cells = <3>; 33 - reg = <0xfffff000 0x200>; 34 - }; 35 - 36 - /* 37 - * An interrupt generating device that is wired to an AIC. 38 - */ 39 - dma: dma-controller@ffffec00 { 40 - compatible = "atmel,at91sam9g45-dma"; 41 - reg = <0xffffec00 0x200>; 42 - interrupts = <21 4 5>; 43 - };
+89
Documentation/devicetree/bindings/interrupt-controller/atmel,aic.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/interrupt-controller/atmel,aic.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Advanced Interrupt Controller (AIC) 8 + 9 + maintainers: 10 + - Nicolas Ferre <nicolas.ferre@microchip.com> 11 + - Dharma balasubiramani <dharma.b@microchip.com> 12 + 13 + description: 14 + The Advanced Interrupt Controller (AIC) is an 8-level priority, individually 15 + maskable, vectored interrupt controller providing handling of up to one 16 + hundred and twenty-eight interrupt sources. 17 + 18 + properties: 19 + compatible: 20 + enum: 21 + - atmel,at91rm9200-aic 22 + - atmel,sama5d2-aic 23 + - atmel,sama5d3-aic 24 + - atmel,sama5d4-aic 25 + - microchip,sam9x60-aic 26 + 27 + reg: 28 + maxItems: 1 29 + 30 + interrupt-controller: true 31 + 32 + "#interrupt-cells": 33 + const: 3 34 + description: | 35 + The 1st cell is the IRQ number (Peripheral IDentifier on datasheet). 36 + The 2nd cell specifies flags: 37 + bits[3:0] trigger type and level flags: 38 + 1 = low-to-high edge triggered. 39 + 2 = high-to-low edge triggered. 40 + 4 = active high level-sensitive. 41 + 8 = active low level-sensitive. 42 + Valid combinations: 1, 2, 3, 4, 8. 43 + Default for internal sources: 4 (active high). 44 + The 3rd cell specifies irq priority from 0 (lowest) to 7 (highest). 45 + 46 + interrupts: 47 + maxItems: 1 48 + 49 + atmel,external-irqs: 50 + $ref: /schemas/types.yaml#/definitions/uint32-array 51 + description: u32 array of external irqs. 52 + 53 + allOf: 54 + - $ref: /schemas/interrupt-controller.yaml# 55 + - if: 56 + properties: 57 + compatible: 58 + contains: 59 + const: atmel,at91rm9200-aic 60 + then: 61 + properties: 62 + atmel,external-irqs: 63 + minItems: 1 64 + maxItems: 7 65 + else: 66 + properties: 67 + atmel,external-irqs: 68 + minItems: 1 69 + maxItems: 1 70 + 71 + required: 72 + - compatible 73 + - reg 74 + - interrupt-controller 75 + - "#interrupt-cells" 76 + - atmel,external-irqs 77 + 78 + unevaluatedProperties: false 79 + 80 + examples: 81 + - | 82 + interrupt-controller@fffff000 { 83 + compatible = "atmel,at91rm9200-aic"; 84 + reg = <0xfffff000 0x200>; 85 + interrupt-controller; 86 + #interrupt-cells = <3>; 87 + atmel,external-irqs = <31>; 88 + }; 89 + ...