From patchwork Tue Feb 16 02:46:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 8320691 X-Patchwork-Delegate: horms@verge.net.au Return-Path: X-Original-To: patchwork-linux-renesas-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C409E9F372 for ; Tue, 16 Feb 2016 02:43:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0ECAA20381 for ; Tue, 16 Feb 2016 02:43:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 20B4E2037C for ; Tue, 16 Feb 2016 02:43:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752799AbcBPCnU (ORCPT ); Mon, 15 Feb 2016 21:43:20 -0500 Received: from mail-pf0-f180.google.com ([209.85.192.180]:32769 "EHLO mail-pf0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752484AbcBPCnU (ORCPT ); Mon, 15 Feb 2016 21:43:20 -0500 Received: by mail-pf0-f180.google.com with SMTP id q63so96397893pfb.0 for ; Mon, 15 Feb 2016 18:43:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:subject; bh=xfdLLpPjUgzrpAZ7kwglxd9Sk4tA/0vfzdhT56cZMMI=; b=pMFdXLL5TqvExwAgetW02VX82Bh5jAYlQbW3/uILCTbFIIhiJWcOIMn7XRB3NRQ0mk SjSxjATGdvDGHNAfkak2d0CDXEHWqeBSQIo+u0hy7xBA0WAaUyYmQ2L9ze6JysPdsUlq DQSixenT0PHujapSonXD7P6xNXLjhRY/c5m/EMnzCn27RChwQztRpDz3bZ8Y7fSrp9qQ zoPzlv9Jd4i79TBkwk8UMWg15nd9rfZZrYtRB2lwQUObfV2hkA393TDfAHzufvCtCGyP R+Qb0gR4DYpQ7TaOVJOyfZD/on4F1VAGr48NOQaoH+T+KoFnJT++Nj9Z7yCRVzL8kFb0 m4Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:date:message-id:subject; bh=xfdLLpPjUgzrpAZ7kwglxd9Sk4tA/0vfzdhT56cZMMI=; b=YSONktsC+Ll5W+zBB9+idmRGEI/SbJnH4XDPBhqePRo/IbHHWNHQJyZUNV4zdAXImE s+catP4rdVTWDlIf6seHZYMKUXqOz3bON/pk+F2d1E32010VR9RejYd0Ux58M23vFksT LqaF2UdmXT0nnclmamDCCyDwg5cOJg+y5RTwtqi/KAKQebh7FutQh/bij6T57luEYfOK J2HEoR0p4WUrFYY9X78vS49tet+VFjmOd6YlehNcJ0xYNOICJA68x21wCTTrYS5JYBK/ 8Nto9r2VjCXwIDd/+pcKyz7OI8svp50m84uR9YACGDAmrAIgZWYA3pQUf2my74YRd8pT KhRw== X-Gm-Message-State: AG10YOQYf38kQ565eO0lN+5UZqlEVZ5o426oaj19yporuObtLEvNUL64F45sYBW0E7pUsg== X-Received: by 10.98.17.129 with SMTP id 1mr28025673pfr.30.1455590599700; Mon, 15 Feb 2016 18:43:19 -0800 (PST) Received: from [127.0.0.1] (s214090.ppp.asahi-net.or.jp. [220.157.214.90]) by smtp.gmail.com with ESMTPSA id b2sm41397087pfd.24.2016.02.15.18.43.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Feb 2016 18:43:18 -0800 (PST) From: Magnus Damm To: linux-renesas-soc@vger.kernel.org Cc: horms+renesas@verge.net.au, Magnus Damm , laurent.pinchart+renesas@ideasonboard.com, geert+renesas@glider.be Date: Tue, 16 Feb 2016 11:46:08 +0900 Message-Id: <20160216024608.14281.20516.sendpatchset@little-apple> Subject: [PATCH/RFC] arm64: dts: r8a7795: Salvator-X INTC-EX IRQ2 test prototype Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Magnus Damm This patch is a prototype hack that can be used to test INTC-EX using the IRQ2 signal on r8a7795 Salvator-X with a loop back adapter. The external loop back adapter is connected to EXIO_D and connects pin 9 (IRQ2/GP2_02) and pin 26 (ExA22/GP2_06). To test enable CONFIG_GPIO_SYSFS and CONFIG_KEYBOARD_GPIO and export GP2_06 via /sys/class/gpio/export and then change the value of the pin and see how interrupt debug messages are output on the console from the irq-renesas-irqc.c driver. Not for upstream merge. Not-Yet-Signed-off-by: Magnus Damm --- Written on top of renesas-drivers-2016-02-09-v4.5-rc3 and [PATCH 00/02] arm64: r8a7795 INTC-EX support using RENESAS_IRQC [PATCH 01/02] arm64: dts: r8a7795: Add INTC-EX device node [PATCH 02/02] arm64: renesas: Enable RENESAS_IRQC [PATCH] pinctrl: sh-pfc: r8a7795: Add support for INTC-EX IRQ pins [PATCH] clk: shmobile: r8a7795: Add INTC-EX clock arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 31 ++++++++++++++++++++ drivers/irqchip/irq-renesas-irqc.c | 2 - 2 files changed, 32 insertions(+), 1 deletion(-) --- 0001/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts +++ work/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts 2016-02-16 11:32:50.420513000 +0900 @@ -33,6 +33,8 @@ /dts-v1/; #include "r8a7795.dtsi" +#include +#include / { model = "Renesas Salvator-X board based on r8a7795"; @@ -55,6 +57,30 @@ reg = <0x0 0x48000000 0x0 0x38000000>; }; + keyboard { + compatible = "gpio-keys"; + + pinctrl-0 = <&gpiokey_pins>; + pinctrl-names = "default"; + + button@1 { + linux,code = ; + label = "SW21"; + wakeup-source; + debounce-interval = <20>; + gpios = <&gpio6 12 GPIO_ACTIVE_LOW>; + }; + button@2 { + linux,code = ; + label = "SW22"; + wakeup-source; + debounce-interval = <20>; + gpios = <&gpio6 13 GPIO_ACTIVE_LOW>; + interrupt-parent = <&intc_ex>; + interrupts = <2 IRQ_TYPE_LEVEL_LOW>; + }; + }; + x12_clk: x12_clk { compatible = "fixed-clock"; #clock-cells = <0>; @@ -96,6 +122,11 @@ pinctrl-0 = <&scif_clk_pins>; pinctrl-names = "default"; + gpiokey_pins: gpiokey1 { + renesas,groups = "intc_ex_irq2"; + renesas,function = "intc_ex"; + }; + scif1_pins: scif1 { renesas,groups = "scif1_data_a", "scif1_ctrl"; renesas,function = "scif1"; --- 0001/drivers/irqchip/irq-renesas-irqc.c +++ work/drivers/irqchip/irq-renesas-irqc.c 2016-02-16 11:32:13.130513000 +0900 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - +#define DEBUG #include #include #include