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