1b9da2fccSAlexandre Torgue# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2b9da2fccSAlexandre Torgue%YAML 1.2
3b9da2fccSAlexandre Torgue---
4b9da2fccSAlexandre Torgue$id: http://devicetree.org/schemas/interrupt-controller/st,stm32-exti.yaml#
5b9da2fccSAlexandre Torgue$schema: http://devicetree.org/meta-schemas/core.yaml#
6b9da2fccSAlexandre Torgue
7b9da2fccSAlexandre Torguetitle: STM32 External Interrupt Controller Device Tree Bindings
8b9da2fccSAlexandre Torgue
9b9da2fccSAlexandre Torguemaintainers:
10b9da2fccSAlexandre Torgue  - Alexandre Torgue <alexandre.torgue@st.com>
11b9da2fccSAlexandre Torgue  - Ludovic Barre <ludovic.barre@st.com>
12b9da2fccSAlexandre Torgue
13b9da2fccSAlexandre Torgueproperties:
14b9da2fccSAlexandre Torgue  compatible:
15b9da2fccSAlexandre Torgue    oneOf:
16b9da2fccSAlexandre Torgue      - items:
17b9da2fccSAlexandre Torgue          - enum:
18b9da2fccSAlexandre Torgue              - st,stm32-exti
19b9da2fccSAlexandre Torgue              - st,stm32h7-exti
20b9da2fccSAlexandre Torgue      - items:
21b9da2fccSAlexandre Torgue          - enum:
22b9da2fccSAlexandre Torgue              - st,stm32mp1-exti
23b9da2fccSAlexandre Torgue          - const: syscon
24b9da2fccSAlexandre Torgue
25b9da2fccSAlexandre Torgue  "#interrupt-cells":
26b9da2fccSAlexandre Torgue    const: 2
27b9da2fccSAlexandre Torgue
28b9da2fccSAlexandre Torgue  reg:
29b9da2fccSAlexandre Torgue    maxItems: 1
30b9da2fccSAlexandre Torgue
31b9da2fccSAlexandre Torgue  interrupt-controller: true
32b9da2fccSAlexandre Torgue
33b9da2fccSAlexandre Torgue  hwlocks:
34b9da2fccSAlexandre Torgue    maxItems: 1
35b9da2fccSAlexandre Torgue    description:
36b9da2fccSAlexandre Torgue      Reference to a phandle of a hardware spinlock provider node.
37b9da2fccSAlexandre Torgue
38b9da2fccSAlexandre Torgue  interrupts:
39*0499220dSRob Herring    minItems: 1
40*0499220dSRob Herring    maxItems: 96
41b9da2fccSAlexandre Torgue    description:
42b9da2fccSAlexandre Torgue      Interrupts references to primary interrupt controller
43b9da2fccSAlexandre Torgue
44b9da2fccSAlexandre Torguerequired:
45b9da2fccSAlexandre Torgue  - "#interrupt-cells"
46b9da2fccSAlexandre Torgue  - compatible
47b9da2fccSAlexandre Torgue  - reg
48b9da2fccSAlexandre Torgue  - interrupt-controller
49b9da2fccSAlexandre Torgue
50b9da2fccSAlexandre TorgueallOf:
51b9da2fccSAlexandre Torgue  - $ref: /schemas/interrupt-controller.yaml#
52b9da2fccSAlexandre Torgue  - if:
53b9da2fccSAlexandre Torgue      properties:
54b9da2fccSAlexandre Torgue        compatible:
55b9da2fccSAlexandre Torgue          contains:
56b9da2fccSAlexandre Torgue            enum:
57b9da2fccSAlexandre Torgue              - st,stm32-exti
58b9da2fccSAlexandre Torgue    then:
59b9da2fccSAlexandre Torgue      properties:
60b9da2fccSAlexandre Torgue        interrupts:
61b9da2fccSAlexandre Torgue          minItems: 1
62b9da2fccSAlexandre Torgue          maxItems: 32
63b9da2fccSAlexandre Torgue      required:
64b9da2fccSAlexandre Torgue        - interrupts
65b9da2fccSAlexandre Torgue  - if:
66b9da2fccSAlexandre Torgue      properties:
67b9da2fccSAlexandre Torgue        compatible:
68b9da2fccSAlexandre Torgue          contains:
69b9da2fccSAlexandre Torgue            enum:
70b9da2fccSAlexandre Torgue              - st,stm32h7-exti
71b9da2fccSAlexandre Torgue    then:
72b9da2fccSAlexandre Torgue      properties:
73b9da2fccSAlexandre Torgue        interrupts:
74b9da2fccSAlexandre Torgue          minItems: 1
75b9da2fccSAlexandre Torgue          maxItems: 96
76b9da2fccSAlexandre Torgue      required:
77b9da2fccSAlexandre Torgue        - interrupts
78b9da2fccSAlexandre Torgue
79b9da2fccSAlexandre TorgueadditionalProperties: false
80b9da2fccSAlexandre Torgue
81b9da2fccSAlexandre Torgueexamples:
82b9da2fccSAlexandre Torgue  - |
83b9da2fccSAlexandre Torgue    //Example 1
84b9da2fccSAlexandre Torgue    exti1: interrupt-controller@5000d000 {
85b9da2fccSAlexandre Torgue        compatible = "st,stm32mp1-exti", "syscon";
86b9da2fccSAlexandre Torgue        interrupt-controller;
87b9da2fccSAlexandre Torgue        #interrupt-cells = <2>;
88b9da2fccSAlexandre Torgue        reg = <0x5000d000 0x400>;
89b9da2fccSAlexandre Torgue    };
90b9da2fccSAlexandre Torgue
91b9da2fccSAlexandre Torgue    //Example 2
92b9da2fccSAlexandre Torgue    exti2: interrupt-controller@40013c00 {
93b9da2fccSAlexandre Torgue        compatible = "st,stm32-exti";
94b9da2fccSAlexandre Torgue        interrupt-controller;
95b9da2fccSAlexandre Torgue        #interrupt-cells = <2>;
96b9da2fccSAlexandre Torgue        reg = <0x40013C00 0x400>;
97b9da2fccSAlexandre Torgue        interrupts = <1>, <2>, <3>, <6>, <7>, <8>, <9>, <10>, <23>, <40>, <41>, <42>, <62>, <76>;
98b9da2fccSAlexandre Torgue    };
99b9da2fccSAlexandre Torgue
100b9da2fccSAlexandre Torgue...
101