From patchwork Wed Jul 26 14:44:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 13328189 X-Patchwork-Delegate: geert@linux-m68k.org 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29FAAC41513 for ; Wed, 26 Jul 2023 14:45:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232146AbjGZOpF (ORCPT ); Wed, 26 Jul 2023 10:45:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232569AbjGZOpD (ORCPT ); Wed, 26 Jul 2023 10:45:03 -0400 Received: from laurent.telenet-ops.be (laurent.telenet-ops.be [IPv6:2a02:1800:110:4::f00:19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F4EFCE for ; Wed, 26 Jul 2023 07:44:58 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed40:d80c:aaca:e11d:6940]) by laurent.telenet-ops.be with bizsmtp id Rqkv2A00Z4qLm8F01qkv3H; Wed, 26 Jul 2023 16:44:56 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1qOfko-002Ym3-FH; Wed, 26 Jul 2023 16:44:55 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1qOfl1-00A8Hj-K1; Wed, 26 Jul 2023 16:44:55 +0200 From: Geert Uytterhoeven To: Magnus Damm , Yoshihiro Shimoda , Kieran Bingham Cc: linux-renesas-soc@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 1/3] dt-bindings: irqchip: renesas,irqc: Add r8a779f0 support Date: Wed, 26 Jul 2023 16:44:41 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org Document support for the Interrupt Controller for External Devices (INT-EX) in the Renesas R-Car S4-8 (R8A779F0) SoC. Signed-off-by: Geert Uytterhoeven Reviewed-by: Kieran Bingham --- .../devicetree/bindings/interrupt-controller/renesas,irqc.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/interrupt-controller/renesas,irqc.yaml b/Documentation/devicetree/bindings/interrupt-controller/renesas,irqc.yaml index 95033cb514fbd8f6..b417341fc8ae049b 100644 --- a/Documentation/devicetree/bindings/interrupt-controller/renesas,irqc.yaml +++ b/Documentation/devicetree/bindings/interrupt-controller/renesas,irqc.yaml @@ -37,6 +37,7 @@ properties: - renesas,intc-ex-r8a77990 # R-Car E3 - renesas,intc-ex-r8a77995 # R-Car D3 - renesas,intc-ex-r8a779a0 # R-Car V3U + - renesas,intc-ex-r8a779f0 # R-Car S4-8 - renesas,intc-ex-r8a779g0 # R-Car V4H - const: renesas,irqc From patchwork Wed Jul 26 14:44:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 13328188 X-Patchwork-Delegate: geert@linux-m68k.org 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7928CC001DC for ; Wed, 26 Jul 2023 14:45:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232569AbjGZOpG (ORCPT ); Wed, 26 Jul 2023 10:45:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232389AbjGZOpD (ORCPT ); Wed, 26 Jul 2023 10:45:03 -0400 Received: from albert.telenet-ops.be (albert.telenet-ops.be [IPv6:2a02:1800:110:4::f00:1a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27D0419A1 for ; Wed, 26 Jul 2023 07:44:58 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed40:d80c:aaca:e11d:6940]) by albert.telenet-ops.be with bizsmtp id Rqkv2A00C4qLm8F06qkvoa; Wed, 26 Jul 2023 16:44:56 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1qOfko-002Ym2-FH; Wed, 26 Jul 2023 16:44:55 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1qOfl1-00A8Hm-KY; Wed, 26 Jul 2023 16:44:55 +0200 From: Geert Uytterhoeven To: Magnus Damm , Yoshihiro Shimoda , Kieran Bingham Cc: linux-renesas-soc@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 2/3] arm64: dts: renesas: r8a779f0: Add INTC-EX node Date: Wed, 26 Jul 2023 16:44:42 +0200 Message-Id: <6c709d2c7776b2b31e127b14c2127195732c592e.1690382328.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org Add the device node for the Interrupt Controller for External Devices (INTC-EX) on the Renesas R-Car S4-8 (R8A779F0) SoC, which serves external IRQ pins IRQ[0-5]. Signed-off-by: Geert Uytterhoeven Tested-by: Kieran Bingham Reviewed-by: Kieran Bingham --- arch/arm64/boot/dts/renesas/r8a779f0.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a779f0.dtsi b/arch/arm64/boot/dts/renesas/r8a779f0.dtsi index 1d5426e6293c5616..0059c9c580f3f9ef 100644 --- a/arch/arm64/boot/dts/renesas/r8a779f0.dtsi +++ b/arch/arm64/boot/dts/renesas/r8a779f0.dtsi @@ -466,6 +466,21 @@ tsc: thermal@e6198000 { #thermal-sensor-cells = <1>; }; + intc_ex: interrupt-controller@e61c0000 { + compatible = "renesas,intc-ex-r8a779f0", "renesas,irqc"; + #interrupt-cells = <2>; + interrupt-controller; + reg = <0 0xe61c0000 0 0x200>; + interrupts = , + , + , + , + , + ; + clocks = <&cpg CPG_CORE R8A779F0_CLK_CL16M>; + power-domains = <&sysc R8A779F0_PD_ALWAYS_ON>; + }; + tmu0: timer@e61e0000 { compatible = "renesas,tmu-r8a779f0", "renesas,tmu"; reg = <0 0xe61e0000 0 0x30>; From patchwork Wed Jul 26 14:44:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 13328187 X-Patchwork-Delegate: geert@linux-m68k.org 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0862C001DE for ; Wed, 26 Jul 2023 14:45:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231566AbjGZOpF (ORCPT ); Wed, 26 Jul 2023 10:45:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232146AbjGZOpD (ORCPT ); Wed, 26 Jul 2023 10:45:03 -0400 Received: from baptiste.telenet-ops.be (baptiste.telenet-ops.be [IPv6:2a02:1800:120:4::f00:13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27F8019A4 for ; Wed, 26 Jul 2023 07:44:58 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed40:d80c:aaca:e11d:6940]) by baptiste.telenet-ops.be with bizsmtp id Rqkv2A00T4qLm8F01qkvNV; Wed, 26 Jul 2023 16:44:56 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1qOfko-002Ym4-FX; Wed, 26 Jul 2023 16:44:55 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1qOfl1-00A8Hp-L9; Wed, 26 Jul 2023 16:44:55 +0200 From: Geert Uytterhoeven To: Magnus Damm , Yoshihiro Shimoda , Kieran Bingham Cc: linux-renesas-soc@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH/RFT 3/3] arm64: dts: renesas: spider: Add keyboard to test IRQ[0145] Date: Wed, 26 Jul 2023 16:44:43 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org Add an interrupt-controlled keyboard to test operation of the Interrupt Controller for External Devices (INTC-EX) on the Spider development board. Test procedure: - Run "evtest" (select device event number "0"), - Pull one of the following signals on the Spider Breakout Board low to trigger the corresponding interrupt and keypress (key release is automatic): - Test point CP18 -> IRQ0 (KEY_0), - Test point CP17 -> IRQ1 (KEY_1), - CN37 pin 4 -> IRQ4 (KEY_4), - CN37 pin 2 -> IRQ5 (KEY_5). GND is available on e.g. pin 8 of CN37 (MSIOF0 PIN HEADER). Signed-off-by: Geert Uytterhoeven Tested-by: Kieran Bingham Tested-by: Yoshihiro Shimoda --- Not intended for upstream merge. I do not have physical access to a Spider development board. Thanks for testing! Note that this IRQ conflicts with operation of LED7, so do not apply the LED patch while testing. --- .../boot/dts/renesas/r8a779f0-spider.dts | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a779f0-spider.dts b/arch/arm64/boot/dts/renesas/r8a779f0-spider.dts index 7aac3f4d319c330c..a73251da1f215141 100644 --- a/arch/arm64/boot/dts/renesas/r8a779f0-spider.dts +++ b/arch/arm64/boot/dts/renesas/r8a779f0-spider.dts @@ -6,12 +6,56 @@ */ /dts-v1/; + +#include + #include "r8a779f0-spider-cpu.dtsi" #include "r8a779f0-spider-ethernet.dtsi" / { model = "Renesas Spider CPU and Breakout boards based on r8a779f0"; compatible = "renesas,spider-breakout", "renesas,spider-cpu", "renesas,r8a779f0"; + + keyboard-irq { + compatible = "gpio-keys"; + + pinctrl-0 = <&keyboard_irq_pins>; + pinctrl-names = "default"; + + interrupt-parent = <&intc_ex>; + + key-0 { + interrupts = <0 IRQ_TYPE_EDGE_FALLING>; + linux,code = ; + label = "Breakabout Board CP18"; + wakeup-source; + debounce-interval = <20>; + }; + + key-1 { + interrupts = <1 IRQ_TYPE_EDGE_FALLING>; + linux,code = ; + label = "Breakabout Board CP17"; + wakeup-source; + debounce-interval = <20>; + }; + + key-4 { + interrupts = <4 IRQ_TYPE_EDGE_FALLING>; + linux,code = ; + label = "Breakout Board CN37-4"; + wakeup-source; + debounce-interval = <20>; + }; + + key-5 { + interrupts = <5 IRQ_TYPE_EDGE_FALLING>; + linux,code = ; + label = "Breakout Board CN37-2"; + wakeup-source; + debounce-interval = <20>; + }; + }; }; &i2c4 { @@ -22,3 +66,11 @@ eeprom@51 { pagesize = <8>; }; }; + +&pfc { + keyboard_irq_pins: keyboard-irq { + groups = "intc_ex_irq0", "intc_ex_irq1", "intc_ex_irq4", + "intc_ex_irq5"; + function = "intc_ex"; + }; +};