From patchwork Mon Sep 27 06:36:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12519167 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A882DC433F5 for ; Mon, 27 Sep 2021 06:40:02 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7235D6113D for ; Mon, 27 Sep 2021 06:40:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7235D6113D Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=dvUU36ec7VgxQU8ID3emOk450GdhLcwG8SmLgvcQfk4=; b=klVsBn5fPBkhqh PdpPaxbf+/6ah9u5v88mux2ejKF/ejEJkl04JspcqGlMZcnWLBYoexvp4qMXZ2WRoAUGPHqGt67bO RtUk53lSQQOwl7W7TKWzUvPz7nh971Mp8vOyZqzQtmQLzVoA7aCLhg+8Tk1umAE+LMTe2qWXkY8hD Z1MiNPLQ7CD6Yv9kA2Lnq5HflSGRfy2V3fpVMJDdOuAm83SbMI8eQqh5dkfKJMxwBOmB68epHXNJK LIwe3h4CZsA/3FmOkhB3eSxBvGcApjy7Ptu+VSd77nKJoRNWJ4uBLPzoOl+7mxPwwlYhwzZSaVs6D PQaSwKw83L5rTHHKrqJg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mUkHH-001hAE-UM; Mon, 27 Sep 2021 06:38:16 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mUkGq-001h74-5u for linux-arm-kernel@lists.infradead.org; Mon, 27 Sep 2021 06:37:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1632724667; x=1664260667; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=9zp3CVezY7kqKbQ0dlcpLUAzQumJ6y0zLma5cS1ayNU=; b=BZDRtfT70lcThxfhx7W1M+IPDwXS6E6xcPHTvop5psr1SjFKNcKVG7Tn kQSz5TfO5/ghgJMbePcNFJlg/kDitXDs70oF01FUF/H/9hKApOnqR9iPF fPPVTjbJrW3RDAttKSzeZEC8YQhH1d6ii+Rr83vAL9C6wKrx2ZCted/wW 6hgzOwjrLS/weA9jqoDPpaZydCoiYGtC22uptIPIV0RzY7kb/iYwZLPhC xKudp6OzraIsQ4uoYbulekVdRVeHVfxL6MKsZyDtJWhLUbdf47sdkYyaH YN6xdAl6xFZ0cA0fVB4KUwUdXEByehYaL9s0lpug3hc8p6owlYTy8bsDT A==; IronPort-SDR: fMJIPbj9qIRhaaUc1LwcmSIOXCISAciDCQIvYi1oZ7xhVOFFTTCa0wjI3IGJp4J6fXENQts5fp 9KUqrzoI8W805P5LCk5ePhC/SbgwMs5lTfvHmHdHfPsZL6v+y2lPMME5n1yawe0IuxdBQkdACc uOvQVRLEhMnR47S2N0XnwKM3SYFDldGBS+uYdbL1uBjrcr8NtKihII/7nqO901prSePLuFBfXM 5Po1Ix+Raoqn0h2kxVGsyA9Of2F5gF9XtxSpajPgCqjzkvkhT2OsrviozPsfcXF5hCa9Vlh66w rAVCr1JwMWruA4PppcLlRsv0 X-IronPort-AV: E=Sophos;i="5.85,325,1624345200"; d="scan'208";a="130749939" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 26 Sep 2021 23:37:39 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Sun, 26 Sep 2021 23:37:39 -0700 Received: from rob-dk-mpu01.microchip.com (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Sun, 26 Sep 2021 23:37:37 -0700 From: Claudiu Beznea To: , , CC: , , , Claudiu Beznea Subject: [PATCH v5 0/2] irqchip/mchp-eic: add driver for Microchip EIC Date: Mon, 27 Sep 2021 09:36:55 +0300 Message-ID: <20210927063657.2157676-1-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210926_233748_309638_129BF265 X-CRM114-Status: GOOD ( 12.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, This series adds support for Microchip External Interrupt Controller present on SAMA7G5. The controller supports for 2 external interrupt lines and is connected to GIC as follows: pinX +------+ EXT_IRQ0 +------+ int 153 (for pinX) +------+ ------>| |--------->| |------------------->| | pinY | PIO | EXT_IRQ1 | EIC | int 154 (for pinY) | GIC | ------>| |--------->| |------------------->| | +------+ +------+ +------+ where PIO is the pin controller. Thank you, Claudiu Beznea Changes in v5: - solved the issue with dt bindings (accidentally picked file from v2 in previous version) Changes in v4: - use irq_domain_translate_twocell() instead of mchp_eic_domain_translate() from v2 - use IRQCHIP_PLATFORM_DRIVER_BEGIN(), IRQCHIP_MATCH(), IRQCHIP_PLATFORM_DRIVER_END() instead of builtin_platform_driver() - register suspend/resume functins via syscore_ops; along with this driver private data structure (of type struct mchp_eic has been declared as static: struct mchp_eic *eic;) - collected tags Changes in v3: - fix compilation warning on bindings Changes in v2: - s/mchp/microchip in bindings - get rid of glitch filter settings - use s/eic@/interrupt-controller@ in bindings - removed '' around interrupts in bindings as proposed by Rob - removed glitch filter settings - switched to hierarchical irqchip driver - addressed review comments - use builtin_platform_driver instead of module_platform_driver Claudiu Beznea (2): dt-bindings: microchip,eic: add bindings irqchip/mchp-eic: add support .../interrupt-controller/microchip,eic.yaml | 73 +++++ MAINTAINERS | 6 + drivers/irqchip/Kconfig | 8 + drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-mchp-eic.c | 280 ++++++++++++++++++ 5 files changed, 368 insertions(+) create mode 100644 Documentation/devicetree/bindings/interrupt-controller/microchip,eic.yaml create mode 100644 drivers/irqchip/irq-mchp-eic.c