xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/interrupt-controller/ti,pruss-intc.yaml (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
2*4882a593Smuzhiyun%YAML 1.2
3*4882a593Smuzhiyun---
4*4882a593Smuzhiyun$id: http://devicetree.org/schemas/interrupt-controller/ti,pruss-intc.yaml#
5*4882a593Smuzhiyun$schema: http://devicetree.org/meta-schemas/core.yaml#
6*4882a593Smuzhiyun
7*4882a593Smuzhiyuntitle: TI PRU-ICSS Local Interrupt Controller
8*4882a593Smuzhiyun
9*4882a593Smuzhiyunmaintainers:
10*4882a593Smuzhiyun  - Suman Anna <s-anna@ti.com>
11*4882a593Smuzhiyun
12*4882a593Smuzhiyundescription: |
13*4882a593Smuzhiyun  Each PRU-ICSS has a single interrupt controller instance that is common
14*4882a593Smuzhiyun  to all the PRU cores. Most interrupt controllers can route 64 input events
15*4882a593Smuzhiyun  which are then mapped to 10 possible output interrupts through two levels
16*4882a593Smuzhiyun  of mapping. The input events can be triggered by either the PRUs and/or
17*4882a593Smuzhiyun  various other PRUSS internal and external peripherals. The first 2 output
18*4882a593Smuzhiyun  interrupts (0, 1) are fed exclusively to the internal PRU cores, with the
19*4882a593Smuzhiyun  remaining 8 (2 through 9) connected to external interrupt controllers
20*4882a593Smuzhiyun  including the MPU and/or other PRUSS instances, DSPs or devices.
21*4882a593Smuzhiyun
22*4882a593Smuzhiyun  The property "ti,irqs-reserved" is used for denoting the connection
23*4882a593Smuzhiyun  differences on the output interrupts 2 through 9. If this property is not
24*4882a593Smuzhiyun  defined, it implies that all the PRUSS INTC output interrupts 2 through 9
25*4882a593Smuzhiyun  (host_intr0 through host_intr7) are connected exclusively to the Arm interrupt
26*4882a593Smuzhiyun  controller.
27*4882a593Smuzhiyun
28*4882a593Smuzhiyun  The K3 family of SoCs can handle 160 input events that can be mapped to 20
29*4882a593Smuzhiyun  different possible output interrupts. The additional output interrupts (10
30*4882a593Smuzhiyun  through 19) are connected to new sub-modules within the ICSSG instances.
31*4882a593Smuzhiyun
32*4882a593Smuzhiyun  This interrupt-controller node should be defined as a child node of the
33*4882a593Smuzhiyun  corresponding PRUSS node. The node should be named "interrupt-controller".
34*4882a593Smuzhiyun
35*4882a593Smuzhiyunproperties:
36*4882a593Smuzhiyun  compatible:
37*4882a593Smuzhiyun    enum:
38*4882a593Smuzhiyun      - ti,pruss-intc
39*4882a593Smuzhiyun      - ti,icssg-intc
40*4882a593Smuzhiyun    description: |
41*4882a593Smuzhiyun      Use "ti,pruss-intc" for OMAP-L13x/AM18x/DA850 SoCs,
42*4882a593Smuzhiyun                              AM335x family of SoCs,
43*4882a593Smuzhiyun                              AM437x family of SoCs,
44*4882a593Smuzhiyun                              AM57xx family of SoCs
45*4882a593Smuzhiyun                              66AK2G family of SoCs
46*4882a593Smuzhiyun      Use "ti,icssg-intc" for K3 AM65x & J721E family of SoCs
47*4882a593Smuzhiyun
48*4882a593Smuzhiyun  reg:
49*4882a593Smuzhiyun    maxItems: 1
50*4882a593Smuzhiyun
51*4882a593Smuzhiyun  interrupts:
52*4882a593Smuzhiyun    minItems: 1
53*4882a593Smuzhiyun    maxItems: 8
54*4882a593Smuzhiyun    description: |
55*4882a593Smuzhiyun      All the interrupts generated towards the main host processor in the SoC.
56*4882a593Smuzhiyun      A shared interrupt can be skipped if the desired destination and usage is
57*4882a593Smuzhiyun      by a different processor/device.
58*4882a593Smuzhiyun
59*4882a593Smuzhiyun  interrupt-names:
60*4882a593Smuzhiyun    minItems: 1
61*4882a593Smuzhiyun    maxItems: 8
62*4882a593Smuzhiyun    items:
63*4882a593Smuzhiyun      pattern: host_intr[0-7]
64*4882a593Smuzhiyun    description: |
65*4882a593Smuzhiyun      Should use one of the above names for each valid host event interrupt
66*4882a593Smuzhiyun      connected to Arm interrupt controller, the name should match the
67*4882a593Smuzhiyun      corresponding host event interrupt number.
68*4882a593Smuzhiyun
69*4882a593Smuzhiyun  interrupt-controller: true
70*4882a593Smuzhiyun
71*4882a593Smuzhiyun  "#interrupt-cells":
72*4882a593Smuzhiyun    const: 3
73*4882a593Smuzhiyun    description: |
74*4882a593Smuzhiyun      Client users shall use the PRU System event number (the interrupt source
75*4882a593Smuzhiyun      that the client is interested in) [cell 1], PRU channel [cell 2] and PRU
76*4882a593Smuzhiyun      host_event (target) [cell 3] as the value of the interrupts property in
77*4882a593Smuzhiyun      their node.  The system events can be mapped to some output host
78*4882a593Smuzhiyun      interrupts through 2 levels of many-to-one mapping i.e. events to channel
79*4882a593Smuzhiyun      mapping and channels to host interrupts so through this property entire
80*4882a593Smuzhiyun      mapping is provided.
81*4882a593Smuzhiyun
82*4882a593Smuzhiyun  ti,irqs-reserved:
83*4882a593Smuzhiyun    $ref: /schemas/types.yaml#definitions/uint8
84*4882a593Smuzhiyun    description: |
85*4882a593Smuzhiyun      Bitmask of host interrupts between 0 and 7 (corresponding to PRUSS INTC
86*4882a593Smuzhiyun      output interrupts 2 through 9) that are not connected to the Arm interrupt
87*4882a593Smuzhiyun      controller or are shared and used by other devices or processors in the
88*4882a593Smuzhiyun      SoC. Define this property when any of 8 interrupts should not be handled
89*4882a593Smuzhiyun      by Arm interrupt controller.
90*4882a593Smuzhiyun        Eg: - AM437x and 66AK2G SoCs do not have "host_intr5" interrupt
91*4882a593Smuzhiyun              connected to MPU
92*4882a593Smuzhiyun            - AM65x and J721E SoCs have "host_intr5", "host_intr6" and
93*4882a593Smuzhiyun              "host_intr7" interrupts connected to MPU, and other ICSSG
94*4882a593Smuzhiyun              instances.
95*4882a593Smuzhiyun
96*4882a593Smuzhiyunrequired:
97*4882a593Smuzhiyun  - compatible
98*4882a593Smuzhiyun  - reg
99*4882a593Smuzhiyun  - interrupts
100*4882a593Smuzhiyun  - interrupt-names
101*4882a593Smuzhiyun  - interrupt-controller
102*4882a593Smuzhiyun  - "#interrupt-cells"
103*4882a593Smuzhiyun
104*4882a593SmuzhiyunadditionalProperties: false
105*4882a593Smuzhiyun
106*4882a593Smuzhiyunexamples:
107*4882a593Smuzhiyun  - |
108*4882a593Smuzhiyun    /* AM33xx PRU-ICSS */
109*4882a593Smuzhiyun    pruss: pruss@0 {
110*4882a593Smuzhiyun        compatible = "ti,am3356-pruss";
111*4882a593Smuzhiyun        reg = <0x0 0x80000>;
112*4882a593Smuzhiyun        #address-cells = <1>;
113*4882a593Smuzhiyun        #size-cells = <1>;
114*4882a593Smuzhiyun        ranges;
115*4882a593Smuzhiyun
116*4882a593Smuzhiyun        pruss_intc: interrupt-controller@20000 {
117*4882a593Smuzhiyun            compatible = "ti,pruss-intc";
118*4882a593Smuzhiyun            reg = <0x20000 0x2000>;
119*4882a593Smuzhiyun            interrupts = <20 21 22 23 24 25 26 27>;
120*4882a593Smuzhiyun            interrupt-names = "host_intr0", "host_intr1",
121*4882a593Smuzhiyun                              "host_intr2", "host_intr3",
122*4882a593Smuzhiyun                              "host_intr4", "host_intr5",
123*4882a593Smuzhiyun                              "host_intr6", "host_intr7";
124*4882a593Smuzhiyun            interrupt-controller;
125*4882a593Smuzhiyun            #interrupt-cells = <3>;
126*4882a593Smuzhiyun        };
127*4882a593Smuzhiyun    };
128*4882a593Smuzhiyun
129*4882a593Smuzhiyun  - |
130*4882a593Smuzhiyun
131*4882a593Smuzhiyun    /* AM4376 PRU-ICSS */
132*4882a593Smuzhiyun    #include <dt-bindings/interrupt-controller/arm-gic.h>
133*4882a593Smuzhiyun    pruss@0 {
134*4882a593Smuzhiyun        compatible = "ti,am4376-pruss";
135*4882a593Smuzhiyun        reg = <0x0 0x40000>;
136*4882a593Smuzhiyun        #address-cells = <1>;
137*4882a593Smuzhiyun        #size-cells = <1>;
138*4882a593Smuzhiyun        ranges;
139*4882a593Smuzhiyun
140*4882a593Smuzhiyun        interrupt-controller@20000 {
141*4882a593Smuzhiyun            compatible = "ti,pruss-intc";
142*4882a593Smuzhiyun            reg = <0x20000 0x2000>;
143*4882a593Smuzhiyun            interrupt-controller;
144*4882a593Smuzhiyun            #interrupt-cells = <3>;
145*4882a593Smuzhiyun            interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>,
146*4882a593Smuzhiyun                   <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>,
147*4882a593Smuzhiyun                   <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>,
148*4882a593Smuzhiyun                   <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>,
149*4882a593Smuzhiyun                   <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>,
150*4882a593Smuzhiyun                   <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>,
151*4882a593Smuzhiyun                   <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
152*4882a593Smuzhiyun            interrupt-names = "host_intr0", "host_intr1",
153*4882a593Smuzhiyun                              "host_intr2", "host_intr3",
154*4882a593Smuzhiyun                              "host_intr4",
155*4882a593Smuzhiyun                              "host_intr6", "host_intr7";
156*4882a593Smuzhiyun            ti,irqs-reserved = /bits/ 8 <0x20>; /* BIT(5) */
157*4882a593Smuzhiyun        };
158*4882a593Smuzhiyun    };
159