xref: /openbmc/linux/Documentation/devicetree/bindings/interrupt-controller/ti,pruss-intc.yaml (revision c900529f3d9161bfde5cca0754f83b4d3c3e0220)
1*440b075bSKrzysztof Kozlowski# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
28a1b09edSSuman Anna%YAML 1.2
38a1b09edSSuman Anna---
48a1b09edSSuman Anna$id: http://devicetree.org/schemas/interrupt-controller/ti,pruss-intc.yaml#
58a1b09edSSuman Anna$schema: http://devicetree.org/meta-schemas/core.yaml#
68a1b09edSSuman Anna
78a1b09edSSuman Annatitle: TI PRU-ICSS Local Interrupt Controller
88a1b09edSSuman Anna
98a1b09edSSuman Annamaintainers:
108a1b09edSSuman Anna  - Suman Anna <s-anna@ti.com>
118a1b09edSSuman Anna
128a1b09edSSuman Annadescription: |
138a1b09edSSuman Anna  Each PRU-ICSS has a single interrupt controller instance that is common
148a1b09edSSuman Anna  to all the PRU cores. Most interrupt controllers can route 64 input events
158a1b09edSSuman Anna  which are then mapped to 10 possible output interrupts through two levels
168a1b09edSSuman Anna  of mapping. The input events can be triggered by either the PRUs and/or
178a1b09edSSuman Anna  various other PRUSS internal and external peripherals. The first 2 output
188a1b09edSSuman Anna  interrupts (0, 1) are fed exclusively to the internal PRU cores, with the
198a1b09edSSuman Anna  remaining 8 (2 through 9) connected to external interrupt controllers
208a1b09edSSuman Anna  including the MPU and/or other PRUSS instances, DSPs or devices.
218a1b09edSSuman Anna
228a1b09edSSuman Anna  The property "ti,irqs-reserved" is used for denoting the connection
238a1b09edSSuman Anna  differences on the output interrupts 2 through 9. If this property is not
248a1b09edSSuman Anna  defined, it implies that all the PRUSS INTC output interrupts 2 through 9
258a1b09edSSuman Anna  (host_intr0 through host_intr7) are connected exclusively to the Arm interrupt
268a1b09edSSuman Anna  controller.
278a1b09edSSuman Anna
288a1b09edSSuman Anna  The K3 family of SoCs can handle 160 input events that can be mapped to 20
298a1b09edSSuman Anna  different possible output interrupts. The additional output interrupts (10
308a1b09edSSuman Anna  through 19) are connected to new sub-modules within the ICSSG instances.
318a1b09edSSuman Anna
328a1b09edSSuman Anna  This interrupt-controller node should be defined as a child node of the
338a1b09edSSuman Anna  corresponding PRUSS node. The node should be named "interrupt-controller".
348a1b09edSSuman Anna
358a1b09edSSuman Annaproperties:
365ab93140SSuman Anna  $nodename:
375ab93140SSuman Anna    pattern: "^interrupt-controller@[0-9a-f]+$"
385ab93140SSuman Anna
398a1b09edSSuman Anna  compatible:
408a1b09edSSuman Anna    enum:
418a1b09edSSuman Anna      - ti,pruss-intc
428a1b09edSSuman Anna      - ti,icssg-intc
438a1b09edSSuman Anna    description: |
448a1b09edSSuman Anna      Use "ti,pruss-intc" for OMAP-L13x/AM18x/DA850 SoCs,
458a1b09edSSuman Anna                              AM335x family of SoCs,
468a1b09edSSuman Anna                              AM437x family of SoCs,
478a1b09edSSuman Anna                              AM57xx family of SoCs
488a1b09edSSuman Anna                              66AK2G family of SoCs
49977b3167SSuman Anna      Use "ti,icssg-intc" for K3 AM65x, J721E and AM64x family of SoCs
508a1b09edSSuman Anna
518a1b09edSSuman Anna  reg:
528a1b09edSSuman Anna    maxItems: 1
538a1b09edSSuman Anna
548a1b09edSSuman Anna  interrupts:
558a1b09edSSuman Anna    minItems: 1
568a1b09edSSuman Anna    maxItems: 8
578a1b09edSSuman Anna    description: |
588a1b09edSSuman Anna      All the interrupts generated towards the main host processor in the SoC.
598a1b09edSSuman Anna      A shared interrupt can be skipped if the desired destination and usage is
608a1b09edSSuman Anna      by a different processor/device.
618a1b09edSSuman Anna
628a1b09edSSuman Anna  interrupt-names:
638a1b09edSSuman Anna    minItems: 1
648a1b09edSSuman Anna    maxItems: 8
658a1b09edSSuman Anna    items:
668a1b09edSSuman Anna      pattern: host_intr[0-7]
678a1b09edSSuman Anna    description: |
688a1b09edSSuman Anna      Should use one of the above names for each valid host event interrupt
698a1b09edSSuman Anna      connected to Arm interrupt controller, the name should match the
708a1b09edSSuman Anna      corresponding host event interrupt number.
718a1b09edSSuman Anna
728a1b09edSSuman Anna  interrupt-controller: true
738a1b09edSSuman Anna
748a1b09edSSuman Anna  "#interrupt-cells":
758a1b09edSSuman Anna    const: 3
768a1b09edSSuman Anna    description: |
778a1b09edSSuman Anna      Client users shall use the PRU System event number (the interrupt source
788a1b09edSSuman Anna      that the client is interested in) [cell 1], PRU channel [cell 2] and PRU
798a1b09edSSuman Anna      host_event (target) [cell 3] as the value of the interrupts property in
808a1b09edSSuman Anna      their node.  The system events can be mapped to some output host
818a1b09edSSuman Anna      interrupts through 2 levels of many-to-one mapping i.e. events to channel
828a1b09edSSuman Anna      mapping and channels to host interrupts so through this property entire
838a1b09edSSuman Anna      mapping is provided.
848a1b09edSSuman Anna
858a1b09edSSuman Anna  ti,irqs-reserved:
86d69c6dddSRob Herring    $ref: /schemas/types.yaml#/definitions/uint8
878a1b09edSSuman Anna    description: |
888a1b09edSSuman Anna      Bitmask of host interrupts between 0 and 7 (corresponding to PRUSS INTC
898a1b09edSSuman Anna      output interrupts 2 through 9) that are not connected to the Arm interrupt
908a1b09edSSuman Anna      controller or are shared and used by other devices or processors in the
918a1b09edSSuman Anna      SoC. Define this property when any of 8 interrupts should not be handled
928a1b09edSSuman Anna      by Arm interrupt controller.
938a1b09edSSuman Anna        Eg: - AM437x and 66AK2G SoCs do not have "host_intr5" interrupt
948a1b09edSSuman Anna              connected to MPU
958a1b09edSSuman Anna            - AM65x and J721E SoCs have "host_intr5", "host_intr6" and
968a1b09edSSuman Anna              "host_intr7" interrupts connected to MPU, and other ICSSG
978a1b09edSSuman Anna              instances.
98977b3167SSuman Anna            - AM64x SoCs have all the 8 host interrupts connected to various
99977b3167SSuman Anna              other SoC entities
1008a1b09edSSuman Anna
1018a1b09edSSuman Annarequired:
1028a1b09edSSuman Anna  - compatible
1038a1b09edSSuman Anna  - reg
1048a1b09edSSuman Anna  - interrupts
1058a1b09edSSuman Anna  - interrupt-names
1068a1b09edSSuman Anna  - interrupt-controller
1078a1b09edSSuman Anna  - "#interrupt-cells"
1088a1b09edSSuman Anna
1098a1b09edSSuman AnnaadditionalProperties: false
1108a1b09edSSuman Anna
1118a1b09edSSuman Annaexamples:
1128a1b09edSSuman Anna  - |
1138a1b09edSSuman Anna    /* AM33xx PRU-ICSS */
1148a1b09edSSuman Anna    pruss: pruss@0 {
1158a1b09edSSuman Anna        compatible = "ti,am3356-pruss";
1168a1b09edSSuman Anna        reg = <0x0 0x80000>;
1178a1b09edSSuman Anna        #address-cells = <1>;
1188a1b09edSSuman Anna        #size-cells = <1>;
1198a1b09edSSuman Anna        ranges;
1208a1b09edSSuman Anna
1218a1b09edSSuman Anna        pruss_intc: interrupt-controller@20000 {
1228a1b09edSSuman Anna            compatible = "ti,pruss-intc";
1238a1b09edSSuman Anna            reg = <0x20000 0x2000>;
1248a1b09edSSuman Anna            interrupts = <20 21 22 23 24 25 26 27>;
1258a1b09edSSuman Anna            interrupt-names = "host_intr0", "host_intr1",
1268a1b09edSSuman Anna                              "host_intr2", "host_intr3",
1278a1b09edSSuman Anna                              "host_intr4", "host_intr5",
1288a1b09edSSuman Anna                              "host_intr6", "host_intr7";
1298a1b09edSSuman Anna            interrupt-controller;
1308a1b09edSSuman Anna            #interrupt-cells = <3>;
1318a1b09edSSuman Anna        };
1328a1b09edSSuman Anna    };
1338a1b09edSSuman Anna
1348a1b09edSSuman Anna  - |
1358a1b09edSSuman Anna
1368a1b09edSSuman Anna    /* AM4376 PRU-ICSS */
1378a1b09edSSuman Anna    #include <dt-bindings/interrupt-controller/arm-gic.h>
1388a1b09edSSuman Anna    pruss@0 {
1398676e8e7SSudeep Holla        compatible = "ti,am4376-pruss1";
1408a1b09edSSuman Anna        reg = <0x0 0x40000>;
1418a1b09edSSuman Anna        #address-cells = <1>;
1428a1b09edSSuman Anna        #size-cells = <1>;
1438a1b09edSSuman Anna        ranges;
1448a1b09edSSuman Anna
1458a1b09edSSuman Anna        interrupt-controller@20000 {
1468a1b09edSSuman Anna            compatible = "ti,pruss-intc";
1478a1b09edSSuman Anna            reg = <0x20000 0x2000>;
1488a1b09edSSuman Anna            interrupt-controller;
1498a1b09edSSuman Anna            #interrupt-cells = <3>;
1508a1b09edSSuman Anna            interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>,
1518a1b09edSSuman Anna                   <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>,
1528a1b09edSSuman Anna                   <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>,
1538a1b09edSSuman Anna                   <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>,
1548a1b09edSSuman Anna                   <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>,
1558a1b09edSSuman Anna                   <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>,
1568a1b09edSSuman Anna                   <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
1578a1b09edSSuman Anna            interrupt-names = "host_intr0", "host_intr1",
1588a1b09edSSuman Anna                              "host_intr2", "host_intr3",
1598a1b09edSSuman Anna                              "host_intr4",
1608a1b09edSSuman Anna                              "host_intr6", "host_intr7";
1618a1b09edSSuman Anna            ti,irqs-reserved = /bits/ 8 <0x20>; /* BIT(5) */
1628a1b09edSSuman Anna        };
1638a1b09edSSuman Anna    };
164