xref: /openbmc/linux/Documentation/devicetree/bindings/interrupt-controller/ti,sci-intr.yaml (revision b8713af858997c3df5bc5b48e66ac1f1bfe19779)
1*b8713af8SLokesh Vutla# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2*b8713af8SLokesh Vutla%YAML 1.2
3*b8713af8SLokesh Vutla---
4*b8713af8SLokesh Vutla$id: http://devicetree.org/schemas/interrupt-controller/ti,sci-intr.yaml#
5*b8713af8SLokesh Vutla$schema: http://devicetree.org/meta-schemas/core.yaml#
6*b8713af8SLokesh Vutla
7*b8713af8SLokesh Vutlatitle: Texas Instruments K3 Interrupt Router
8*b8713af8SLokesh Vutla
9*b8713af8SLokesh Vutlamaintainers:
10*b8713af8SLokesh Vutla  - Lokesh Vutla <lokeshvutla@ti.com>
11*b8713af8SLokesh Vutla
12*b8713af8SLokesh VutlaallOf:
13*b8713af8SLokesh Vutla  - $ref: /schemas/arm/keystone/ti,k3-sci-common.yaml#
14*b8713af8SLokesh Vutla
15*b8713af8SLokesh Vutladescription: |
16*b8713af8SLokesh Vutla  The Interrupt Router (INTR) module provides a mechanism to mux M
17*b8713af8SLokesh Vutla  interrupt inputs to N interrupt outputs, where all M inputs are selectable
18*b8713af8SLokesh Vutla  to be driven per N output. An Interrupt Router can either handle edge
19*b8713af8SLokesh Vutla  triggered or level triggered interrupts and that is fixed in hardware.
20*b8713af8SLokesh Vutla
21*b8713af8SLokesh Vutla                                   Interrupt Router
22*b8713af8SLokesh Vutla                               +----------------------+
23*b8713af8SLokesh Vutla                               |  Inputs     Outputs  |
24*b8713af8SLokesh Vutla          +-------+            | +------+    +-----+  |
25*b8713af8SLokesh Vutla          | GPIO  |----------->| | irq0 |    |  0  |  |       Host IRQ
26*b8713af8SLokesh Vutla          +-------+            | +------+    +-----+  |      controller
27*b8713af8SLokesh Vutla                               |    .           .     |      +-------+
28*b8713af8SLokesh Vutla          +-------+            |    .           .     |----->|  IRQ  |
29*b8713af8SLokesh Vutla          | INTA  |----------->|    .           .     |      +-------+
30*b8713af8SLokesh Vutla          +-------+            |    .        +-----+  |
31*b8713af8SLokesh Vutla                               | +------+    |  N  |  |
32*b8713af8SLokesh Vutla                               | | irqM |    +-----+  |
33*b8713af8SLokesh Vutla                               | +------+             |
34*b8713af8SLokesh Vutla                               |                      |
35*b8713af8SLokesh Vutla                               +----------------------+
36*b8713af8SLokesh Vutla
37*b8713af8SLokesh Vutla  There is one register per output (MUXCNTL_N) that controls the selection.
38*b8713af8SLokesh Vutla  Configuration of these MUXCNTL_N registers is done by a system controller
39*b8713af8SLokesh Vutla  (like the Device Memory and Security Controller on K3 AM654 SoC). System
40*b8713af8SLokesh Vutla  controller will keep track of the used and unused registers within the Router.
41*b8713af8SLokesh Vutla  Driver should request the system controller to get the range of GIC IRQs
42*b8713af8SLokesh Vutla  assigned to the requesting hosts. It is the drivers responsibility to keep
43*b8713af8SLokesh Vutla  track of Host IRQs.
44*b8713af8SLokesh Vutla
45*b8713af8SLokesh Vutla  Communication between the host processor running an OS and the system
46*b8713af8SLokesh Vutla  controller happens through a protocol called TI System Control Interface
47*b8713af8SLokesh Vutla  (TISCI protocol).
48*b8713af8SLokesh Vutla
49*b8713af8SLokesh Vutlaproperties:
50*b8713af8SLokesh Vutla  compatible:
51*b8713af8SLokesh Vutla    const: ti,sci-intr
52*b8713af8SLokesh Vutla
53*b8713af8SLokesh Vutla  ti,intr-trigger-type:
54*b8713af8SLokesh Vutla    $ref: /schemas/types.yaml#/definitions/uint32
55*b8713af8SLokesh Vutla    enum: [1, 4]
56*b8713af8SLokesh Vutla    description: |
57*b8713af8SLokesh Vutla      Should be one of the following.
58*b8713af8SLokesh Vutla        1 = If intr supports edge triggered interrupts.
59*b8713af8SLokesh Vutla        4 = If intr supports level triggered interrupts.
60*b8713af8SLokesh Vutla
61*b8713af8SLokesh Vutla  interrupt-controller: true
62*b8713af8SLokesh Vutla
63*b8713af8SLokesh Vutla  '#interrupt-cells':
64*b8713af8SLokesh Vutla    const: 1
65*b8713af8SLokesh Vutla    description: |
66*b8713af8SLokesh Vutla      The 1st cell should contain interrupt router input hw number.
67*b8713af8SLokesh Vutla
68*b8713af8SLokesh Vutla  ti,interrupt-ranges:
69*b8713af8SLokesh Vutla    $ref: /schemas/types.yaml#/definitions/uint32-matrix
70*b8713af8SLokesh Vutla    description: |
71*b8713af8SLokesh Vutla      Interrupt ranges that converts the INTR output hw irq numbers
72*b8713af8SLokesh Vutla      to parents's input interrupt numbers.
73*b8713af8SLokesh Vutla    items:
74*b8713af8SLokesh Vutla      items:
75*b8713af8SLokesh Vutla        - description: |
76*b8713af8SLokesh Vutla            "output_irq" specifies the base for intr output irq
77*b8713af8SLokesh Vutla        - description: |
78*b8713af8SLokesh Vutla            "parent's input irq" specifies the base for parent irq
79*b8713af8SLokesh Vutla        - description: |
80*b8713af8SLokesh Vutla            "limit" specifies the limit for translation
81*b8713af8SLokesh Vutla
82*b8713af8SLokesh Vutlarequired:
83*b8713af8SLokesh Vutla  - compatible
84*b8713af8SLokesh Vutla  - ti,intr-trigger-type
85*b8713af8SLokesh Vutla  - interrupt-controller
86*b8713af8SLokesh Vutla  - '#interrupt-cells'
87*b8713af8SLokesh Vutla  - ti,sci
88*b8713af8SLokesh Vutla  - ti,sci-dev-id
89*b8713af8SLokesh Vutla  - ti,interrupt-ranges
90*b8713af8SLokesh Vutla
91*b8713af8SLokesh Vutlaexamples:
92*b8713af8SLokesh Vutla  - |
93*b8713af8SLokesh Vutla    main_gpio_intr: interrupt-controller0 {
94*b8713af8SLokesh Vutla        compatible = "ti,sci-intr";
95*b8713af8SLokesh Vutla        ti,intr-trigger-type = <1>;
96*b8713af8SLokesh Vutla        interrupt-controller;
97*b8713af8SLokesh Vutla        interrupt-parent = <&gic500>;
98*b8713af8SLokesh Vutla        #interrupt-cells = <1>;
99*b8713af8SLokesh Vutla        ti,sci = <&dmsc>;
100*b8713af8SLokesh Vutla        ti,sci-dev-id = <131>;
101*b8713af8SLokesh Vutla        ti,interrupt-ranges = <0 360 32>;
102*b8713af8SLokesh Vutla    };
103