Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp316061yba; Sat, 20 Apr 2019 03:14:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqyHYHptf4g9gDp0DQyOwjkr6BwwdBrI3O83q8KEq6ADqVxg46/+sLtqNACoerBbD4GJCCTo X-Received: by 2002:a17:902:31c3:: with SMTP id x61mr8727826plb.143.1555755263540; Sat, 20 Apr 2019 03:14:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555755263; cv=none; d=google.com; s=arc-20160816; b=XR6ItZYPOdWII6qGaG/RY7fj6xKYmZUzRdYvFYPh9P1dpjrMQwiVPmzZyxEpr4C0md YaiOm9HReWKyvnxAokQ7fdoR/HZPhGPGhcqUXtYTpIWlZLBVNVuO2ZoThLVikwW5bnuH dHiR+XE5ijByfL8cZca6CLrJT4KXTEbE6LdIRUnIvfKT4VqHCCEEgj9h2+UcV9f22mTK b6aTAvTTKZ4eiT65QnRPM22RTm8oq8JK9eisS81vBapDayiXLL7vV3aRn5MaLFGzGvTm o6i93mdXnGpIKU2FmVNZeHGEqa6ACFm9mCrJIjwasHn2JhXNkETzROXPWKWlSEXMU00S bVng== 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=xQDbruDGAOPCjEmOJRT1Pn+gagYkthvX210zVPFfOsQ=; b=mN+juzHpAo/fuMFr0usjWg8wuSWQmsBa/zhcfRbRejiDXozBE3HNsfbs3NwV+v7TBN uh7iP9RGNofD1Eu+TycAwox082sXG9kdeBQ5Y07oeZqpNLbbWzI4LB11wbeEf7H2AS4M EvSuzd6kEsZbZPLthXHUtNxn3mJNpV2pdKc47MStHbkxfMlOGh+cHgg1WfB7Z4aDlOe1 RTwBb3UcI2UzNqew4++xZbLLRNKu82HNWDukmATpYLWi42cO60BD2yCjE5WvxTvbShZK Q1zH/qcpxhW8Ire7MJJYWRv+y/JoKIc5og4EoavQn/R8E8gpjQ3MNEAEKmVC1voZEZ+X hMnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="JvvcaAB/"; 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 r10si6965864pgp.30.2019.04.20.03.13.33; Sat, 20 Apr 2019 03:14:23 -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="JvvcaAB/"; 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 S1727963AbfDTKK6 (ORCPT + 99 others); Sat, 20 Apr 2019 06:10:58 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:45746 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726109AbfDTKKu (ORCPT ); Sat, 20 Apr 2019 06:10:50 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x3KAAMOI007903; Sat, 20 Apr 2019 05:10:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1555755022; bh=xQDbruDGAOPCjEmOJRT1Pn+gagYkthvX210zVPFfOsQ=; h=From:To:CC:Subject:Date; b=JvvcaAB/NXDkYWFy/kpuMlL7pTemLBC2G6S2GuAg1F/PFWH1kGb8lCLVnegWBV73T QyaBDbm3GhWNZXa5IRnZMa1bGtJllBQ1rwDaJPqAKXakWKTO5BLT9UKjvwFMzi2tda 7QclL2yJ/JAWNidzS9xr9OBsVF1NIliHchy0LYuo= Received: from DFLE101.ent.ti.com (dfle101.ent.ti.com [10.64.6.22]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x3KAAME4097115 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Sat, 20 Apr 2019 05:10:22 -0500 Received: from DFLE106.ent.ti.com (10.64.6.27) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Sat, 20 Apr 2019 05:10:22 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) 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; Sat, 20 Apr 2019 05:10:22 -0500 Received: from uda0131933.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x3KAAHZp070234; Sat, 20 Apr 2019 05:10:18 -0500 From: Lokesh Vutla To: Marc Zyngier , Santosh Shilimkar , Rob Herring , Nishanth Menon , , CC: Linux ARM Mailing List , , Tero Kristo , Sekhar Nori , Tony Lindgren , , Peter Ujfalusi , Grygorii Strashko , Lokesh Vutla , Device Tree Mailing List Subject: [PATCH v7 00/14] Add support for TISCI Interrupt controller drivers Date: Sat, 20 Apr 2019 15:39:36 +0530 Message-ID: <20190420100950.7997-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 v6: - Each patch has respective changes mentioned. Grygorii Strashko (1): firmware: ti_sci: Add support to get TISCI handle using of_phandle Lokesh Vutla (12): 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 genirq: Introduce irq_chip_{request,release}_resource_parent() apis gpio: thunderx: Use the default parent apis for {request,release}_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 arm64: arch_k3: Enable interrupt controller drivers 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 | 84 +++ MAINTAINERS | 6 + arch/arm64/Kconfig.platforms | 5 + drivers/firmware/ti_sci.c | 666 ++++++++++++++++++ drivers/firmware/ti_sci.h | 102 +++ drivers/gpio/gpio-thunderx.c | 16 +- drivers/irqchip/Kconfig | 23 + drivers/irqchip/Makefile | 2 + drivers/irqchip/irq-ti-sci-inta.c | 627 +++++++++++++++++ drivers/irqchip/irq-ti-sci-intr.c | 285 ++++++++ drivers/soc/ti/Kconfig | 6 + drivers/soc/ti/Makefile | 1 + drivers/soc/ti/ti_sci_inta_msi.c | 146 ++++ include/linux/irq.h | 2 + include/linux/irqdomain.h | 1 + include/linux/msi.h | 10 + include/linux/soc/ti/ti_sci_inta_msi.h | 23 + include/linux/soc/ti/ti_sci_protocol.h | 126 ++++ kernel/irq/chip.c | 27 + 21 files changed, 2214 insertions(+), 13 deletions(-) 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