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