xref: /linux/Documentation/devicetree/bindings/interrupt-controller/aspeed,ast2700-interrupt.yaml (revision 0eaed89c18aeedf0898baf2dbf5ff027c6795152)
1*51561ad8SRyan Chen# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*51561ad8SRyan Chen%YAML 1.2
3*51561ad8SRyan Chen---
4*51561ad8SRyan Chen$id: http://devicetree.org/schemas/interrupt-controller/aspeed,ast2700-interrupt.yaml#
5*51561ad8SRyan Chen$schema: http://devicetree.org/meta-schemas/core.yaml#
6*51561ad8SRyan Chen
7*51561ad8SRyan Chentitle: ASPEED AST2700 Interrupt Controllers (INTC0/INTC1)
8*51561ad8SRyan Chen
9*51561ad8SRyan Chendescription: |
10*51561ad8SRyan Chen  The ASPEED AST2700 SoC integrates two interrupt controller designs:
11*51561ad8SRyan Chen
12*51561ad8SRyan Chen    - INTC0: Primary controller that routes interrupt sources to upstream,
13*51561ad8SRyan Chen      processor-specific interrupt controllers
14*51561ad8SRyan Chen
15*51561ad8SRyan Chen    - INTC1: Secondary controller whose interrupt outputs feed into INTC0
16*51561ad8SRyan Chen
17*51561ad8SRyan Chen  The SoC contains four processors to which interrupts can be routed:
18*51561ad8SRyan Chen
19*51561ad8SRyan Chen    - PSP: Primary Service Processor (Cortex-A35)
20*51561ad8SRyan Chen    - SSP: Secondary Service Processor (Cortex-M4)
21*51561ad8SRyan Chen    - TSP: Tertiary Service Processor (Cortex-M4)
22*51561ad8SRyan Chen    - BMCU: Boot MCU (a RISC-V microcontroller)
23*51561ad8SRyan Chen
24*51561ad8SRyan Chen  The following diagram illustrates the overall architecture of the
25*51561ad8SRyan Chen  ASPEED AST2700 interrupt controllers:
26*51561ad8SRyan Chen
27*51561ad8SRyan Chen                  +-----------+                +-----------+
28*51561ad8SRyan Chen                  |   INTC0   |                | INTC1(0)  |
29*51561ad8SRyan Chen                  +-----------+                +-----------+
30*51561ad8SRyan Chen                  |   Router  | +-----------+  |   Router  |
31*51561ad8SRyan Chen                  | out   int | +Peripheral +  | out   int |
32*51561ad8SRyan Chen  +-----------+   |  0     0  <-+Controllers+  | INTM      | +-----------+
33*51561ad8SRyan Chen  |PSP GIC  <-|---+  .     .  | +-----------+  |  .     .  <-+Peripheral +
34*51561ad8SRyan Chen  +-----------+   |  .     .  |                |  .     .  | +Controllers+
35*51561ad8SRyan Chen  +-----------+   |  .     .  |                |  .     .  | +-----------+
36*51561ad8SRyan Chen  |SSP NVIC <-|---+  .     .  <----------------+  .     .  |
37*51561ad8SRyan Chen  +-----------+   |  .     .  |                |  .     .  |
38*51561ad8SRyan Chen  +-----------+   |  .     .  <--------        |  .     .  |
39*51561ad8SRyan Chen  |TSP NVIC <-|---+  .     .  |       |    ----+  .     .  |
40*51561ad8SRyan Chen  +-----------+   |  .     .  |       |    |   |  O     P  |
41*51561ad8SRyan Chen                  |  .     .  |       |    |   +-----------+
42*51561ad8SRyan Chen                  |  .     .  <----   |    --------------------
43*51561ad8SRyan Chen                  |  .     .  |   |   |        +-----------+  |
44*51561ad8SRyan Chen                  |  M     N  |   |   ---------+  INTC1(1) |  |
45*51561ad8SRyan Chen                  +-----------+   |            +-----------+  |
46*51561ad8SRyan Chen                                  |                  .        |
47*51561ad8SRyan Chen                                  |            +-----------+  |
48*51561ad8SRyan Chen                                  -------------+  INTC1(N) |  |
49*51561ad8SRyan Chen                                               +-----------+  |
50*51561ad8SRyan Chen  +--------------+                                            |
51*51561ad8SRyan Chen  + BMCU APLIC <-+---------------------------------------------
52*51561ad8SRyan Chen  +--------------+
53*51561ad8SRyan Chen
54*51561ad8SRyan Chen  INTC0 supports:
55*51561ad8SRyan Chen    - 128 local peripheral interrupt inputs
56*51561ad8SRyan Chen    - Fan-in from up to three INTC1 instances via banked interrupt lines (INTM)
57*51561ad8SRyan Chen    - Local peripheral interrupt outputs
58*51561ad8SRyan Chen    - Merged interrupt outputs
59*51561ad8SRyan Chen    - Software interrupt outputs (SWINT)
60*51561ad8SRyan Chen    - Configurable interrupt routes targeting the PSP, SSP, and TSP
61*51561ad8SRyan Chen
62*51561ad8SRyan Chen  INTC1 supports:
63*51561ad8SRyan Chen    - 192 local peripheral interrupt inputs
64*51561ad8SRyan Chen    - Banked interrupt outputs (INTM, 5 x 6 banks x 32 interrupts per bank)
65*51561ad8SRyan Chen    - Configurable interrupt routes targeting the PSP, SSP, TSP, and BMCU
66*51561ad8SRyan Chen
67*51561ad8SRyan Chen  One INTC1 instance is always present, on the SoC's IO die. A further two
68*51561ad8SRyan Chen  instances may be attached to the SoC's one INTC0 instance via LTPI (LVDS
69*51561ad8SRyan Chen  Tunneling Protocol & Interface).
70*51561ad8SRyan Chen
71*51561ad8SRyan Chen  Interrupt numbering model
72*51561ad8SRyan Chen  -------------------------
73*51561ad8SRyan Chen  The binding uses a controller-local numbering model. Peripheral device
74*51561ad8SRyan Chen  nodes use the INTCx local interrupt number (hwirq) in their 'interrupts' or
75*51561ad8SRyan Chen  'interrupts-extended' properties.
76*51561ad8SRyan Chen
77*51561ad8SRyan Chen  For AST2700, INTC0 exposes the following (inclusive) input ranges:
78*51561ad8SRyan Chen
79*51561ad8SRyan Chen    - 000..479: Independent interrupts
80*51561ad8SRyan Chen    - 480..489: INTM0-INTM9
81*51561ad8SRyan Chen    - 490..499: INTM10-INTM19
82*51561ad8SRyan Chen    - 500..509: INTM20-INTM29
83*51561ad8SRyan Chen    - 510..519: INTM30-INTM39
84*51561ad8SRyan Chen    - 520..529: INTM40-INTM49
85*51561ad8SRyan Chen
86*51561ad8SRyan Chen  INTC0's (inclusive) output ranges are as follows:
87*51561ad8SRyan Chen
88*51561ad8SRyan Chen    - 000..127: 1:1 local peripheral interrupt output to PSP
89*51561ad8SRyan Chen    - 144..151: Software interrupts from the SSP output to PSP
90*51561ad8SRyan Chen    - 152..159: Software interrupts from the TSP output to PSP
91*51561ad8SRyan Chen    - 192..201: INTM0-INTM9 banked outputs to PSP
92*51561ad8SRyan Chen    - 208..217: INTM30-INTM39 banked outputs to PSP
93*51561ad8SRyan Chen    - 224..233: INTM40-INTM49 banked outputs to PSP
94*51561ad8SRyan Chen    - 256..383: 1:1 local peripheral interrupt output to SSP
95*51561ad8SRyan Chen    - 384..393: INTM10-INTM19 banked outputs to SSP
96*51561ad8SRyan Chen    - 400..407: Software interrupts from the PSP output to SSP
97*51561ad8SRyan Chen    - 408..415: Software interrupts from the TSP output to SSP
98*51561ad8SRyan Chen    - 426..553: 1:1 local peripheral interrupt output to TSP
99*51561ad8SRyan Chen    - 554..563: INTM20-INTM29 banked outputs to TSP
100*51561ad8SRyan Chen    - 570..577: Software interrupts from the PSP output to TSP
101*51561ad8SRyan Chen    - 578..585: Software interrupts from the SSP output to TSP
102*51561ad8SRyan Chen
103*51561ad8SRyan Chen  Inputs and outputs for INTC1 instances are context-dependent. However, for the
104*51561ad8SRyan Chen  first instance of INTC1, the (inclusive) output ranges are:
105*51561ad8SRyan Chen
106*51561ad8SRyan Chen    - 00..05: INTM0-INTM5
107*51561ad8SRyan Chen    - 10..15: INTM10-INTM15
108*51561ad8SRyan Chen    - 20..25: INTM20-INTM25
109*51561ad8SRyan Chen    - 30..35: INTM30-INTM35
110*51561ad8SRyan Chen    - 40..45: INTM40-INTM45
111*51561ad8SRyan Chen    - 50..50: BootMCU
112*51561ad8SRyan Chen
113*51561ad8SRyan Chenmaintainers:
114*51561ad8SRyan Chen  - Ryan Chen <ryan_chen@aspeedtech.com>
115*51561ad8SRyan Chen  - Andrew Jeffery <andrew@codeconstruct.com.au>
116*51561ad8SRyan Chen
117*51561ad8SRyan Chenproperties:
118*51561ad8SRyan Chen  compatible:
119*51561ad8SRyan Chen    enum:
120*51561ad8SRyan Chen      - aspeed,ast2700-intc0
121*51561ad8SRyan Chen      - aspeed,ast2700-intc1
122*51561ad8SRyan Chen
123*51561ad8SRyan Chen  reg:
124*51561ad8SRyan Chen    maxItems: 1
125*51561ad8SRyan Chen
126*51561ad8SRyan Chen  interrupt-controller: true
127*51561ad8SRyan Chen
128*51561ad8SRyan Chen  '#interrupt-cells':
129*51561ad8SRyan Chen    const: 1
130*51561ad8SRyan Chen    description: Single cell encoding the INTC local interrupt number (hwirq).
131*51561ad8SRyan Chen
132*51561ad8SRyan Chen  aspeed,interrupt-ranges:
133*51561ad8SRyan Chen    description: |
134*51561ad8SRyan Chen      Describes how ranges of controller output pins are routed to a parent
135*51561ad8SRyan Chen      interrupt controller.
136*51561ad8SRyan Chen
137*51561ad8SRyan Chen      Each range entry is encoded as:
138*51561ad8SRyan Chen
139*51561ad8SRyan Chen        <out count phandle parent-specifier...>
140*51561ad8SRyan Chen
141*51561ad8SRyan Chen      where:
142*51561ad8SRyan Chen        - out:     First controller interrupt output index in the range.
143*51561ad8SRyan Chen        - count:   Number of consecutive controller interrupt outputs and parent
144*51561ad8SRyan Chen                   interrupt inputs in this range.
145*51561ad8SRyan Chen        - phandle: Phandle to the parent interrupt controller node.
146*51561ad8SRyan Chen        - parent-specifier: Interrupt specifier, as defined by the parent
147*51561ad8SRyan Chen                            interrupt controller binding.
148*51561ad8SRyan Chen    $ref: /schemas/types.yaml#/definitions/uint32-array
149*51561ad8SRyan Chen    minItems: 3
150*51561ad8SRyan Chen    items:
151*51561ad8SRyan Chen      description: Range descriptors with a parent interrupt specifier.
152*51561ad8SRyan Chen
153*51561ad8SRyan Chenrequired:
154*51561ad8SRyan Chen  - compatible
155*51561ad8SRyan Chen  - reg
156*51561ad8SRyan Chen  - interrupt-controller
157*51561ad8SRyan Chen  - '#interrupt-cells'
158*51561ad8SRyan Chen  - aspeed,interrupt-ranges
159*51561ad8SRyan Chen
160*51561ad8SRyan ChenadditionalProperties: false
161*51561ad8SRyan Chen
162*51561ad8SRyan Chenexamples:
163*51561ad8SRyan Chen  - |
164*51561ad8SRyan Chen    #include <dt-bindings/interrupt-controller/arm-gic.h>
165*51561ad8SRyan Chen
166*51561ad8SRyan Chen    interrupt-controller@12100000 {
167*51561ad8SRyan Chen        compatible = "aspeed,ast2700-intc0";
168*51561ad8SRyan Chen        reg = <0x12100000 0x3b00>;
169*51561ad8SRyan Chen        interrupt-parent = <&gic>;
170*51561ad8SRyan Chen        interrupt-controller;
171*51561ad8SRyan Chen        #interrupt-cells = <1>;
172*51561ad8SRyan Chen
173*51561ad8SRyan Chen        aspeed,interrupt-ranges =
174*51561ad8SRyan Chen          <0 128 &gic GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
175*51561ad8SRyan Chen          <144 8 &gic GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>,
176*51561ad8SRyan Chen          <152 8 &gic GIC_SPI 152 IRQ_TYPE_LEVEL_HIGH>,
177*51561ad8SRyan Chen          <192 10 &gic GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>,
178*51561ad8SRyan Chen          <208 10 &gic GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>,
179*51561ad8SRyan Chen          <224 10 &gic GIC_SPI 224 IRQ_TYPE_LEVEL_HIGH>,
180*51561ad8SRyan Chen          <256 128 &ssp_nvic 0 0>,
181*51561ad8SRyan Chen          <384 10 &ssp_nvic 160 0>,
182*51561ad8SRyan Chen          <400 8 &ssp_nvic 144 0>,
183*51561ad8SRyan Chen          <408 8 &ssp_nvic 152 0>,
184*51561ad8SRyan Chen          <426 128 &tsp_nvic 0 0>,
185*51561ad8SRyan Chen          <554 10 &tsp_nvic 160 0>,
186*51561ad8SRyan Chen          <570 8 &tsp_nvic 144 0>,
187*51561ad8SRyan Chen          <578 8 &tsp_nvic 152 0>;
188*51561ad8SRyan Chen    };
189