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

dt-bindings: interrupt-controller: Convert stm32-exti to json-schema

Convert the STM32 external interrupt controller (EXTI) binding to DT
schema format using json-schema.

Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com>
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Alexandre Torgue and committed by
Rob Herring
b9da2fcc ceced4ac

+98 -29
-29
Documentation/devicetree/bindings/interrupt-controller/st,stm32-exti.txt
··· 1 - STM32 External Interrupt Controller 2 - 3 - Required properties: 4 - 5 - - compatible: Should be: 6 - "st,stm32-exti" 7 - "st,stm32h7-exti" 8 - "st,stm32mp1-exti" 9 - - reg: Specifies base physical address and size of the registers 10 - - interrupt-controller: Indentifies the node as an interrupt controller 11 - - #interrupt-cells: Specifies the number of cells to encode an interrupt 12 - specifier, shall be 2 13 - - interrupts: interrupts references to primary interrupt controller 14 - (only needed for exti controller with multiple exti under 15 - same parent interrupt: st,stm32-exti and st,stm32h7-exti) 16 - 17 - Optional properties: 18 - 19 - - hwlocks: reference to a phandle of a hardware spinlock provider node. 20 - 21 - Example: 22 - 23 - exti: interrupt-controller@40013c00 { 24 - compatible = "st,stm32-exti"; 25 - interrupt-controller; 26 - #interrupt-cells = <2>; 27 - reg = <0x40013C00 0x400>; 28 - interrupts = <1>, <2>, <3>, <6>, <7>, <8>, <9>, <10>, <23>, <40>, <41>, <42>, <62>, <76>; 29 - };
+98
Documentation/devicetree/bindings/interrupt-controller/st,stm32-exti.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/st,stm32-exti.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: STM32 External Interrupt Controller Device Tree Bindings 8 + 9 + maintainers: 10 + - Alexandre Torgue <alexandre.torgue@st.com> 11 + - Ludovic Barre <ludovic.barre@st.com> 12 + 13 + properties: 14 + compatible: 15 + oneOf: 16 + - items: 17 + - enum: 18 + - st,stm32-exti 19 + - st,stm32h7-exti 20 + - items: 21 + - enum: 22 + - st,stm32mp1-exti 23 + - const: syscon 24 + 25 + "#interrupt-cells": 26 + const: 2 27 + 28 + reg: 29 + maxItems: 1 30 + 31 + interrupt-controller: true 32 + 33 + hwlocks: 34 + maxItems: 1 35 + description: 36 + Reference to a phandle of a hardware spinlock provider node. 37 + 38 + interrupts: 39 + description: 40 + Interrupts references to primary interrupt controller 41 + 42 + required: 43 + - "#interrupt-cells" 44 + - compatible 45 + - reg 46 + - interrupt-controller 47 + 48 + allOf: 49 + - $ref: /schemas/interrupt-controller.yaml# 50 + - if: 51 + properties: 52 + compatible: 53 + contains: 54 + enum: 55 + - st,stm32-exti 56 + then: 57 + properties: 58 + interrupts: 59 + minItems: 1 60 + maxItems: 32 61 + required: 62 + - interrupts 63 + - if: 64 + properties: 65 + compatible: 66 + contains: 67 + enum: 68 + - st,stm32h7-exti 69 + then: 70 + properties: 71 + interrupts: 72 + minItems: 1 73 + maxItems: 96 74 + required: 75 + - interrupts 76 + 77 + additionalProperties: false 78 + 79 + examples: 80 + - | 81 + //Example 1 82 + exti1: interrupt-controller@5000d000 { 83 + compatible = "st,stm32mp1-exti", "syscon"; 84 + interrupt-controller; 85 + #interrupt-cells = <2>; 86 + reg = <0x5000d000 0x400>; 87 + }; 88 + 89 + //Example 2 90 + exti2: interrupt-controller@40013c00 { 91 + compatible = "st,stm32-exti"; 92 + interrupt-controller; 93 + #interrupt-cells = <2>; 94 + reg = <0x40013C00 0x400>; 95 + interrupts = <1>, <2>, <3>, <6>, <7>, <8>, <9>, <10>, <23>, <40>, <41>, <42>, <62>, <76>; 96 + }; 97 + 98 + ...