From patchwork Tue Sep 15 11:00:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grzegorz Jaszczyk X-Patchwork-Id: 303986 Delivered-To: patch@linaro.org Received: by 2002:a92:5ad1:0:0:0:0:0 with SMTP id b78csp2426666ilg; Tue, 15 Sep 2020 04:09:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzesNEKTzQU43Vzpkz1R7ZQe2tuTjLUc1o0cnn0F8DoSdnUCI5YKRiK3yFI/JRyhbieF4I4 X-Received: by 2002:a17:906:cb94:: with SMTP id mf20mr20296378ejb.8.1600168160636; Tue, 15 Sep 2020 04:09:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600168160; cv=none; d=google.com; s=arc-20160816; b=QCZ9/GpfK1g3vfELx/QYcDP9jmRXs3HEMlikFLwBIjpTGRbFtB4A5/oMN96heF3KW6 r06mkxvOXQPbacgH8ilceDNTV9Lu4x5WqWCFtP/YFyDQNmjjIm7BoVNVc6a/bhLE0Mpz PZf4m5kkwKBXUY81HvYEsQsl4ZmNkMtYavtGI4DcgGjAi3xf7uItIQiXk+QGTAp5EqIX mdwzcvbTvVQUkpBIcig9ySiZRL1kfwFH3jWIWZvj5qv+SKtt3aP3m4fQYyQxRQrqUViS 4rM9z7AvGvoipESbnJArWaNNrJasqVBDN9JGNH1hUp1EHdCfE7FzduitWNvGufiBq4DB H6qA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=1krlOFwt5acv4dNUHBiS7KyeuG27QFnb15CGGHeer8k=; b=ECr8s2uB8iZQUhNnVPAXbC7/enTehCtiiX3PbnZfc5XPfOKNsBqOYjaw/9oDEgf0Lx T86gfGvrgnTIfg5DCftbvm0lDXCT0APjJz6jvVAsZbeWbzyRuPpyxBY67PmQzqJ6+pm9 t/FkFbrkmDww4DAwgthPojRm3CqN3ZLrAw+wf1Jyw0GQzpytX6RWl6sYS9wNVojJwoR5 KGOkie1n2vuHi8ap6DwrLLWIb1+pmnhUA/NQYQ6ErCO7RdelKdm7WxHGqJGutreKOHGA 9wYU1JBXzLpfkFjuG5ac/TsLwCuyYJofDb/NTB+Kyyd0RQ7Pp7H9pRFwk3+aHs4wsSd7 7kQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=izx0IJCa; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u16si9635274edo.487.2020.09.15.04.09.20; Tue, 15 Sep 2020 04:09:20 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=izx0IJCa; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726131AbgIOLJK (ORCPT + 6 others); Tue, 15 Sep 2020 07:09:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726128AbgIOLIs (ORCPT ); Tue, 15 Sep 2020 07:08:48 -0400 Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB775C06178C for ; Tue, 15 Sep 2020 04:01:19 -0700 (PDT) Received: by mail-lj1-x244.google.com with SMTP id u4so2381329ljd.10 for ; Tue, 15 Sep 2020 04:01:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1krlOFwt5acv4dNUHBiS7KyeuG27QFnb15CGGHeer8k=; b=izx0IJCaUtyiDgxO81wLKP35PoPsTAIVFTd4O+4QTFfVKnlIx7ztx81A+6Mq3wk4vr AZUx3n30JPkkFhhLyCPg+YxLoFe37ObDV6cTLOPVIMSQnMLd4OlTNuED1asdQD3hQ9qh 3i4ngbBuotUFwIVFzSZRLsHizUTTPqoYxwQWTLzRp/LzyAi8HZxCZ3EcxRqH+AhS9J3p g8Ts6e71CqwbEY3+G3ek4Ivl6hK7gY8OHRkR6/uyhlfe+/mPsuKh4iPds2fHINjEb5AN 1ga/iBzH2AssRZMX46iD2zB96ht79RnFhzLI2HMZMQUXHKeR6CZBUj/nJtQl3nuI2jyo zHYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1krlOFwt5acv4dNUHBiS7KyeuG27QFnb15CGGHeer8k=; b=KRgCeelJuxNiJ7SVyYZk3rDt/0XQ1M8TdpmIkduR6Cr8qh7P3gR9btYD7rXmUk0sZ3 0BoZBvqOkzD+Q/hme9K1LU9Ge15pwwBa1bnIWRAFkTjsZCvI3N+nvJTHRr/Tx8nv88QP M35d4N9+kZ+n22zivrNGxDQwYT/SW/r3PuLiRYheFh0LpkHTcY8371cED76rKIBV1GCl V8z/YsB2PZvJrFKKaNOs90SuYyRU2/+49hJHK1xE1GZuAfW6U6GVfO3ZobVhqoTYQB0R hlnpAi/qxXD6ehR5Bkq5oORxvf6kmbMbaXxu0H9289UTjiYfKEokWonb50GD9gxCifWs XZDw== X-Gm-Message-State: AOAM531BSDYkGHMOMfgnOYuKzy8hEb6Gt8ezLFu8Hy89mVyv3jkukgFQ dhttoyYhudwARSo0NXdmZPV8WA== X-Received: by 2002:a2e:9910:: with SMTP id v16mr5963935lji.59.1600167677976; Tue, 15 Sep 2020 04:01:17 -0700 (PDT) Received: from gilgamesh.semihalf.com (193-106-246-138.noc.fibertech.net.pl. [193.106.246.138]) by smtp.gmail.com with ESMTPSA id n3sm4588916ljj.59.2020.09.15.04.01.16 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Sep 2020 04:01:17 -0700 (PDT) From: Grzegorz Jaszczyk To: tglx@linutronix.de, jason@lakedaemon.net, maz@kernel.org, s-anna@ti.com Cc: grzegorz.jaszczyk@linaro.org, robh+dt@kernel.org, lee.jones@linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, david@lechnology.com, praneeth@ti.com, "Andrew F . Davis" , Roger Quadros Subject: [PATCH v6 1/5] dt-bindings: irqchip: Add PRU-ICSS interrupt controller bindings Date: Tue, 15 Sep 2020 13:00:47 +0200 Message-Id: <1600167651-20851-2-git-send-email-grzegorz.jaszczyk@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1600167651-20851-1-git-send-email-grzegorz.jaszczyk@linaro.org> References: <1600167651-20851-1-git-send-email-grzegorz.jaszczyk@linaro.org> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Suman Anna The Programmable Real-Time Unit and Industrial Communication Subsystem (PRU-ICSS or simply PRUSS) contains an interrupt controller (INTC) that can handle various system input events and post interrupts back to the device-level initiators. The INTC can support up to 64 input events on most SoCs with individual control configuration and h/w prioritization. These events are mapped onto 10 output interrupt lines through two levels of many-to-one mapping support. Different interrupt lines are routed to the individual PRU cores or to the host CPU or to other PRUSS instances. The K3 AM65x and J721E SoCs have the next generation of the PRU-ICSS IP, commonly called ICSSG. The ICSSG interrupt controller on K3 SoCs provide a higher number of host interrupts (20 vs 10) and can handle an increased number of input events (160 vs 64) from various SoC interrupt sources. Add the bindings document for these interrupt controllers on all the applicable SoCs. It covers the OMAP architecture SoCs - AM33xx, AM437x and AM57xx; the Keystone 2 architecture based 66AK2G SoC; the Davinci architecture based OMAPL138 SoCs, and the K3 architecture based AM65x and J721E SoCs. Signed-off-by: Suman Anna Signed-off-by: Andrew F. Davis Signed-off-by: Roger Quadros Signed-off-by: Grzegorz Jaszczyk Reviewed-by: Rob Herring --- v5->v6: - No change. v4->v5: - Fix typo in commit description. - Update interrupt-cells description regarding each cells meaning. v3->v4: - Drop allOf references to interrupt-controller.yaml and interrupts.yaml. - Drop items descriptions and use only maxItems: 1 as suggested by Rob. - Convert irqs-reserved property from uint8-array to bitmask. - Minor descriptions updates. - Change interrupt-cells to 3 in order to provide 2-level mapping description for interrupts routed to the main CPU (as Marc requested). - Merge the irqs-reserved and irqs-shared to one property since they can be handled by one logic. - Drop reviewed-by due to introduced changes. - Add another example illustrating irqs-reserved property usage. v2->v3: - Convert dt-binding to YAML v1->v2: - https://patchwork.kernel.org/patch/11069767/ --- .../interrupt-controller/ti,pruss-intc.yaml | 158 +++++++++++++++++++++ 1 file changed, 158 insertions(+) create mode 100644 Documentation/devicetree/bindings/interrupt-controller/ti,pruss-intc.yaml -- 2.7.4 diff --git a/Documentation/devicetree/bindings/interrupt-controller/ti,pruss-intc.yaml b/Documentation/devicetree/bindings/interrupt-controller/ti,pruss-intc.yaml new file mode 100644 index 0000000..bbf79d1 --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/ti,pruss-intc.yaml @@ -0,0 +1,158 @@ +# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/interrupt-controller/ti,pruss-intc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: TI PRU-ICSS Local Interrupt Controller + +maintainers: + - Suman Anna + +description: | + Each PRU-ICSS has a single interrupt controller instance that is common + to all the PRU cores. Most interrupt controllers can route 64 input events + which are then mapped to 10 possible output interrupts through two levels + of mapping. The input events can be triggered by either the PRUs and/or + various other PRUSS internal and external peripherals. The first 2 output + interrupts (0, 1) are fed exclusively to the internal PRU cores, with the + remaining 8 (2 through 9) connected to external interrupt controllers + including the MPU and/or other PRUSS instances, DSPs or devices. + + The property "ti,irqs-reserved" is used for denoting the connection + differences on the output interrupts 2 through 9. If this property is not + defined, it implies that all the PRUSS INTC output interrupts 2 through 9 + (host_intr0 through host_intr7) are connected exclusively to the Arm interrupt + controller. + + The K3 family of SoCs can handle 160 input events that can be mapped to 20 + different possible output interrupts. The additional output interrupts (10 + through 19) are connected to new sub-modules within the ICSSG instances. + + This interrupt-controller node should be defined as a child node of the + corresponding PRUSS node. The node should be named "interrupt-controller". + +properties: + compatible: + enum: + - ti,pruss-intc + - ti,icssg-intc + description: | + Use "ti,pruss-intc" for OMAP-L13x/AM18x/DA850 SoCs, + AM335x family of SoCs, + AM437x family of SoCs, + AM57xx family of SoCs + 66AK2G family of SoCs + Use "ti,icssg-intc" for K3 AM65x & J721E family of SoCs + + reg: + maxItems: 1 + + interrupts: + minItems: 1 + maxItems: 8 + description: | + All the interrupts generated towards the main host processor in the SoC. + A shared interrupt can be skipped if the desired destination and usage is + by a different processor/device. + + interrupt-names: + minItems: 1 + maxItems: 8 + items: + pattern: host_intr[0-7] + description: | + Should use one of the above names for each valid host event interrupt + connected to Arm interrupt controller, the name should match the + corresponding host event interrupt number. + + interrupt-controller: true + + "#interrupt-cells": + const: 3 + description: | + Client users shall use the PRU System event number (the interrupt source + that the client is interested in) [cell 1], PRU channel [cell 2] and PRU + host_event (target) [cell 3] as the value of the interrupts property in + their node. The system events can be mapped to some output host + interrupts through 2 levels of many-to-one mapping i.e. events to channel + mapping and channels to host interrupts so through this property entire + mapping is provided. + + ti,irqs-reserved: + $ref: /schemas/types.yaml#definitions/uint8 + description: | + Bitmask of host interrupts between 0 and 7 (corresponding to PRUSS INTC + output interrupts 2 through 9) that are not connected to the Arm interrupt + controller or are shared and used by other devices or processors in the + SoC. Define this property when any of 8 interrupts should not be handled + by Arm interrupt controller. + Eg: - AM437x and 66AK2G SoCs do not have "host_intr5" interrupt + connected to MPU + - AM65x and J721E SoCs have "host_intr5", "host_intr6" and + "host_intr7" interrupts connected to MPU, and other ICSSG + instances. + +required: + - compatible + - reg + - interrupts + - interrupt-names + - interrupt-controller + - "#interrupt-cells" + +additionalProperties: false + +examples: + - | + /* AM33xx PRU-ICSS */ + pruss: pruss@0 { + compatible = "ti,am3356-pruss"; + reg = <0x0 0x80000>; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + pruss_intc: interrupt-controller@20000 { + compatible = "ti,pruss-intc"; + reg = <0x20000 0x2000>; + interrupts = <20 21 22 23 24 25 26 27>; + interrupt-names = "host_intr0", "host_intr1", + "host_intr2", "host_intr3", + "host_intr4", "host_intr5", + "host_intr6", "host_intr7"; + interrupt-controller; + #interrupt-cells = <3>; + }; + }; + + - | + + /* AM4376 PRU-ICSS */ + #include + pruss@0 { + compatible = "ti,am4376-pruss"; + reg = <0x0 0x40000>; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + interrupt-controller@20000 { + compatible = "ti,pruss-intc"; + reg = <0x20000 0x2000>; + interrupt-controller; + #interrupt-cells = <3>; + interrupts = , + , + , + , + , + , + ; + interrupt-names = "host_intr0", "host_intr1", + "host_intr2", "host_intr3", + "host_intr4", + "host_intr6", "host_intr7"; + ti,irqs-reserved = /bits/ 8 <0x20>; /* BIT(5) */ + }; + };