From patchwork Thu Nov 21 05:01:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 11255291 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E3C38138C for ; Thu, 21 Nov 2019 05:03:21 +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 BCB432084D for ; Thu, 21 Nov 2019 05:03:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="NrzCfOub" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BCB432084D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject: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=FRPfqi+Ikeoax+LcosJQbaa2F4ORiQOhW+YHt3AyP5k=; b=NrzCfOubzmnbUe +l1K+eX2eTMavcVcg6EtwTvujVRYEjmk74pC9/PaQbprkS+47JVECMvZZ5LIaQ2k2PF3NZpLM9TKs c8DftNAPjiD5T9QxpTAHIxss6ikIwhW4vmtSX8wWPoxLGtSGOuU/MXSMtXX5ytrifsepaofMhT/uT eC+IR/Oov7cFh/Xj191VatpMfGp4UsyiTgUp1zZFux0Q0DbqrJyPrrScaI11cw54Rq7ktKcF6EuMs mshOwcXP0SY1jF3uTRKbQohhAhAKord0MkXDEB+G+SKQ5arMMKmRlootPkfZxZZbdq6VIo3yLHd1/ 6BOpWu0xuk/gdlsYOLJQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iXech-0004pP-P0; Thu, 21 Nov 2019 05:03:19 +0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iXebm-00044Y-26; Thu, 21 Nov 2019 05:02:25 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id F1DE8AFF4; Thu, 21 Nov 2019 05:02:18 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [PATCH v5 0/9] ARM: Realtek RTD1195/RTD1295/RTD1395 IRQ mux Date: Thu, 21 Nov 2019 06:01:59 +0100 Message-Id: <20191121050208.11324-1-afaerber@suse.de> X-Mailer: git-send-email 2.16.4 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191120_210222_404721_257F6AB4 X-CRM114-Status: GOOD ( 10.35 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, James Tai , Jason Cooper , Andrew Lunn , Marc Zyngier , linux-kernel@vger.kernel.org, Thomas Gleixner , =?utf-8?q?Andreas_F=C3=A4rber?= , linux-arm-kernel@lists.infradead.org, Aleix Roca Nonell Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Hello, This series adds two IRQ muxes for the Realtek RTD1195, RTD1295 and RTD1395 SoC families. The implementation is based on register offsets seen in the vendor DT, split up into two separate nodes, as well as code from QNAP's rtk119x and Synology's RTD1293/96 GPL code dumps and Banana Bi W2/M4 BSP repositories. v5 cleans up mask/unmask, ack and naming. From /proc/interrupts on RTD1195: 24: 158 iso 2 Edge ttyS0 From /proc/interrupts on RTD1395: 9: 110 0 0 0 iso 2 Edge ttyS0 The chip name now no longer overflows the columns, but irq type is still wrong. @Realtek: Patch 8/9 contains a question about RTD1395. More experimental patches at: https://github.com/afaerber/linux/commits/rtd1295-next Have a lot of fun! Cheers, Andreas v4 -> v5: * Renamed enable/disable to unmask/mask (Marc) * Factored out ack (Marc) * Clear all interrupts * Mapped RTD1195 WDOG_NMI * Added and mapped RTD1295 WDOG_NMI * Suppress mapping NMIs and reserved bits (Marc) * Drop mask checks in mask/unmask (Marc) * Drop mask check in interrupt handler * Renamed RTD1295 misc bits with MIS_ for consistency * Renamed RTD1395 misc bits from MISC_ to MIS_ for consistency * Renamed irq_chip to distinguish iso vs. misc * Implemented .irq_get_irqchip_state v3 -> v4: * Drop no-op .irq_set_affinity callback (Thomas) * Disable all interrupts (James) * Updated SPDX-License-identifier * Use tabular formatting (Thomas) * Adopt different braces style (Thomas) * Use raw_spinlock_t (Thomas) * Shortened callback name (Thomas) * Fixed of_iomap() error handling * Don't mask unmapped NMIs * Cache SCPU_INT_EN (Thomas) * Renamed binding and source files * Dropped UART1/UART2 TO interrupts * Expanded commit messages * Added RTD1395 patches v2 -> v3: * Rebased, adding nodes to rtd129x.dtsi instead of rtd1295.dtsi * Adopted {readl,writel}_relaxed() (Marc) * Adopted spin_lock_irqsave() (Marc) * Implemented RTD1195 * Implemented mapping for non-linear bits such as i2c3 v1 -> v2: * Rebased, avoiding dependency on reset series for DT nodes * Don't forward set_affinity to GIC (Marc) * Added more spinlocks (Marc) * Code cleanups * Investigated quirk * Fixed spinlock initialization (Andrew) Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Cc: devicetree@vger.kernel.org Cc: Andrew Lunn Cc: Aleix Roca Nonell Cc: James Tai Andreas Färber (9): dt-bindings: interrupt-controller: Add Realtek RTD1195/RTD1295 mux irqchip: Add Realtek RTD1295 mux driver irqchip: rtd1195-mux: Implement irq_get_irqchip_state arm64: dts: realtek: rtd129x: Add irq muxes and UART interrupts irqchip: rtd1195-mux: Add RTD1195 definitions ARM: dts: rtd1195: Add irq muxes and UART interrupts dt-bindings: interrupt-controller: rtd1195-mux: Add RTD1395 irqchip: rtd1195-mux: Add RTD1395 definitions arm64: dts: realtek: rtd139x: Add irq muxes and UART interrupts .../interrupt-controller/realtek,rtd1195-mux.yaml | 55 +++ arch/arm/boot/dts/rtd1195.dtsi | 20 + arch/arm64/boot/dts/realtek/rtd129x.dtsi | 22 + arch/arm64/boot/dts/realtek/rtd139x.dtsi | 22 + drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-rtd1195-mux.c | 512 +++++++++++++++++++++ 6 files changed, 632 insertions(+) create mode 100644 Documentation/devicetree/bindings/interrupt-controller/realtek,rtd1195-mux.yaml create mode 100644 drivers/irqchip/irq-rtd1195-mux.c