Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4503349yba; Tue, 9 Apr 2019 21:46:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqyBOiqs+CLsiyaoELYuUcRj4VBQMvCBc+NdbiJp4tUR6KjGF0rPKDM7sZ28Pjd3LgkiKgya X-Received: by 2002:a62:388d:: with SMTP id f135mr40991919pfa.103.1554871616441; Tue, 09 Apr 2019 21:46:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554871616; cv=none; d=google.com; s=arc-20160816; b=Z5CQXzsbJ8ZshWlRuW1utr74OwyMdYcp0x90AQ1NkOnW7UZHNtGDIItMS1Ta9v4Zv+ 1SfxXAy0tOYpujXXiPmwvM6S1J5GSMbYlyKLNyPUd4Yu1Z4z/3IkFHO2HW7mlUETAQTS eTOM7ZlxtbQu/LGm0wU5FbWBvR1UuXPAFnrUY35gtEAEtZNXZNALrNednEeFs880Z1u9 hctXvKaR7z+Ij+vbtKmF+qPR8TKdwrUGkQH2bm4HmnYu8uhdltkt6j/3MEB7QfJx/qJT Ml2PsxixKzn17t2FjZOT/lFCprwg1JUFpzs1Qu/2I7bDrxGkrnZTcCK6xmXjAwR6cZ3p Gn+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=q6p8vgeXOqYpOKSUi51ll18KZe2VtjCBkLleAdHv030=; b=d4IimfJtkPr1lUQGkLfdrHptGe60lHGupq71sbaX5clRBGyaos0Ee2L46Uftz2KdZl TiumUe1rIsT26XeQPAxtxOBpd73i+Jx3TppdWPCO2MUalTFjMG0XC+HOA3PMW/L2/IUm 20kzHj0sL+OatPx94PArEnmXNBOIFryiNhImuUDuqCJL6nPHl1xQYcugd8mPw0lTgNdc lwyH8R3Asi9Gu09EN3tnDIWLXE9FzFYdvCO23cchCflekU3xL12PJToJ+NvPrXj8Mnmu oSePNBqY51qNtXvHC0SKb53w0ZnibPdVWwcvQfCkMMZ5v2BwnY/1XX9iocJax8NFv/vQ xyHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=dnzTNW5z; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r190si5542345pgr.125.2019.04.09.21.46.40; Tue, 09 Apr 2019 21:46:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=dnzTNW5z; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727242AbfDJEOk (ORCPT + 99 others); Wed, 10 Apr 2019 00:14:40 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:43940 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725976AbfDJEOi (ORCPT ); Wed, 10 Apr 2019 00:14:38 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x3A4EPD9070043; Tue, 9 Apr 2019 23:14:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1554869665; bh=q6p8vgeXOqYpOKSUi51ll18KZe2VtjCBkLleAdHv030=; h=From:To:CC:Subject:Date; b=dnzTNW5z7LanKtnqidbA9glwIDxQXq4K9dPd0tlmhEyWyisOsoU+N+WxGbj18TCo9 gtiO9gYNWJMJTOg+S8QJX0bWW0vZpSEYrBkUDlbyo/5cE00uniT8A6fw1zvimjEcIO bRr/qwC7rJdYcTdGQLude3knK6QqOUsdSZYxviqE= Received: from DFLE106.ent.ti.com (dfle106.ent.ti.com [10.64.6.27]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x3A4EPT5070056 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 9 Apr 2019 23:14:25 -0500 Received: from DFLE106.ent.ti.com (10.64.6.27) by DFLE106.ent.ti.com (10.64.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Tue, 9 Apr 2019 23:14:24 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE106.ent.ti.com (10.64.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Tue, 9 Apr 2019 23:14:24 -0500 Received: from uda0131933.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id x3A4EKZL029255; Tue, 9 Apr 2019 23:14:20 -0500 From: Lokesh Vutla To: Marc Zyngier , Tony Lindgren , Nishanth Menon , Santosh Shilimkar , Rob Herring , CC: Linux ARM Mailing List , , Device Tree Mailing List , Sekhar Nori , Tero Kristo , Peter Ujfalusi , Grygorii Strashko , Lokesh Vutla Subject: [PATCH v6 00/12] Add support for TISCI Interrupt controller drivers Date: Wed, 10 Apr 2019 09:43:46 +0530 Message-ID: <20190410041358.16809-1-lokeshvutla@ti.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org TI AM65x SoC based on K3 architecture introduced support for Events which are message based interrupts with minimal latency. These events are not compatible with regular interrupts and are valid only through an event transport lane. An Interrupt Aggregator(INTA) is introduced to convert these events to interrupts. INTA can also group 64 events into a single interrupt. Now the SoC has many peripherals and a large number of event sources (time sync or DMA), the use of events is completely dependent on a user's specific application, which drives a need for maximum flexibility in which event sources are used in the system. It is also completely up to software control as to how the events are serviced. Because of the huge flexibility there are certain standard peripherals (like GPIO etc)where all interrupts cannot be directly corrected to host interrupt controller. For this purpose, Interrupt Router(INTR) is introduced in the SoC. INTR just does a classic interrupt redirection. So the SoC has 3 types of interrupt controllers: - GIC500 - Interrupt Router - Interrupt Aggregator Below is a diagrammatic view of how SoC integration of these interrupt controllers:(https://pastebin.ubuntu.com/p/9ngV3jdGj2/) Device Index-x Device Index-y | | | | .... \ / \ / \ (global events) / +---------------------------+ +---------+ | | | | | INTA | | GPIO | | | | | +---------------------------+ +---------+ | (vint) | | | \|/ | +---------------------------+ | | |<-------+ | INTR | | | +---------------------------+ | | \|/ (gic irq) +---------------------------+ | | | GIC | | | +---------------------------+ While at it, TISCI abstracts the handling of all above IRQ routes where interrupt sources are not directly connected to host interrupt controller. That would be configuration of Interrupt Aggregator and Interrupt Router. This series adds support for: - TISCI commands needed for IRQ configuration - Interrupt Router(INTR) driver. - Interrupt Aggregator(INTA) driver. - Interrupt Aggregator MSI bus layer. Changes since v5: - Each patch has respective changes mentioned. Grygorii Strashko (1): firmware: ti_sci: Add support to get TISCI handle using of_phandle Lokesh Vutla (10): firmware: ti_sci: Add support for RM core ops firmware: ti_sci: Add support for IRQ management firmware: ti_sci: Add helper apis to manage resources dt-bindings: irqchip: Introduce TISCI Interrupt router bindings irqchip: ti-sci-intr: Add support for Interrupt Router driver dt-bindings: irqchip: Introduce TISCI Interrupt Aggregator bindings irqchip: ti-sci-inta: Add support for Interrupt Aggregator driver soc: ti: Add MSI domain bus support for Interrupt Aggregator irqchip: ti-sci-inta: Add msi domain support soc: ti: am6: Enable interrupt controller driver Peter Ujfalusi (1): firmware: ti_sci: Add RM mapping table for am654 .../bindings/arm/keystone/ti,sci.txt | 3 +- .../interrupt-controller/ti,sci-inta.txt | 66 ++ .../interrupt-controller/ti,sci-intr.txt | 83 +++ MAINTAINERS | 6 + drivers/firmware/ti_sci.c | 666 ++++++++++++++++++ drivers/firmware/ti_sci.h | 102 +++ drivers/irqchip/Kconfig | 23 + drivers/irqchip/Makefile | 2 + drivers/irqchip/irq-ti-sci-inta.c | 659 +++++++++++++++++ drivers/irqchip/irq-ti-sci-intr.c | 289 ++++++++ drivers/soc/ti/Kconfig | 11 + drivers/soc/ti/Makefile | 1 + drivers/soc/ti/ti_sci_inta_msi.c | 167 +++++ include/linux/irqdomain.h | 1 + include/linux/msi.h | 6 + include/linux/soc/ti/ti_sci_inta_msi.h | 23 + include/linux/soc/ti/ti_sci_protocol.h | 126 ++++ 17 files changed, 2233 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/interrupt-controller/ti,sci-inta.txt create mode 100644 Documentation/devicetree/bindings/interrupt-controller/ti,sci-intr.txt create mode 100644 drivers/irqchip/irq-ti-sci-inta.c create mode 100644 drivers/irqchip/irq-ti-sci-intr.c create mode 100644 drivers/soc/ti/ti_sci_inta_msi.c create mode 100644 include/linux/soc/ti/ti_sci_inta_msi.h -- 2.21.0