From patchwork Wed Apr 3 10:54:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 10883477 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 01336922 for ; Wed, 3 Apr 2019 11:01:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D974C287BD for ; Wed, 3 Apr 2019 11:01:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CD70B28965; Wed, 3 Apr 2019 11:01:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 74D81287BD for ; Wed, 3 Apr 2019 11:01:54 +0000 (UTC) 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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To: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:List-Owner; bh=9g1c+TzHvEj+octsgn683Hqeb30AcWIvsHoeyaWQJnY=; b=RnNgLRqFP9zZldc1yY4v5aBuJy L1NK7aFq96+x8lnaqMyiHAUZr7MHlEEmopGdR/6iEf/0HVhoZBF2EQ3r14TPx5+2HzfyAhAdTXeqS qRGySmrCXHexCdHf6edYBLoA68yuVfl9cN+nyKhyD/6CEAvYI+vmLpy2U6KRUuflFZZlJVWsK4hwL Qz9OfH0gz3RQe6/LD0v3RvyZRr9/nifrSFsCckXjP/Z3EMDF7QSF5KcfNDU6WAnL3o2ero0eiQaW2 c/aPS8kX88O2sj/RyCnxsvlZaWeVj0U0ko6EIC3vJbtKBA5VtX08Xp9toLiOzeXzeZpx3qHg4l9iP WLzg9JyQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hBdeS-0004nV-98; Wed, 03 Apr 2019 11:01:52 +0000 Received: from kirsty.vergenet.net ([202.4.237.240]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hBdeA-0000my-WF for linux-arm-kernel@lists.infradead.org; Wed, 03 Apr 2019 11:01:49 +0000 Received: from reginn.horms.nl (watermunt.horms.nl [80.127.179.77]) by kirsty.vergenet.net (Postfix) with ESMTPA id 348BB25BEF5; Wed, 3 Apr 2019 21:54:17 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=verge.net.au; s=mail; t=1554288857; bh=45pDTNGCqHDRDA0GpK0b7ffSM0KQdjewQuzzHnZm5Xg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SdnKnKu9aCgYjrBLl/tHxr7U+OOjR54Vgu3N4He2nUPpbefuMqh1jF6OjsaaI09vM mcRFzY0vthehz9ru19PfGITM5/4sNPlozAek43PvvZcte50sTtVsP/oZST3ygF9mxI a5ZYoZDOnsn197nz063We8s8GZ7PaqB+ShtfduKw= Received: by reginn.horms.nl (Postfix, from userid 7100) id 2F897940B26; Wed, 3 Apr 2019 12:54:12 +0200 (CEST) From: Simon Horman To: linux-renesas-soc@vger.kernel.org Subject: [PATCH 26/26] arm64: dts: renesas: salvator-common: Add GPIO keys support Date: Wed, 3 Apr 2019 12:54:09 +0200 Message-Id: X-Mailer: git-send-email 2.11.0 In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190403_040135_348313_A2FB9056 X-CRM114-Status: GOOD ( 10.29 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Simon Horman , Laurent Pinchart , Magnus Damm , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Laurent Pinchart The Salvator-X and XS boards have a 4 lines DIP switch and 3 push buttons connected to SoC GPIOs, meant to be used as general-purpose test keys. Add a corresponding node in DT, mapping (semi-randomly) the DIP switch to keys 1-4 and the push buttons to keys A-C. Signed-off-by: Laurent Pinchart Signed-off-by: Simon Horman --- arch/arm64/boot/dts/renesas/salvator-common.dtsi | 63 ++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/salvator-common.dtsi b/arch/arm64/boot/dts/renesas/salvator-common.dtsi index 0e5a76fee5fc..2dba1328acfa 100644 --- a/arch/arm64/boot/dts/renesas/salvator-common.dtsi +++ b/arch/arm64/boot/dts/renesas/salvator-common.dtsi @@ -29,6 +29,7 @@ */ #include +#include / { aliases { @@ -86,6 +87,63 @@ }; }; + keys { + compatible = "gpio-keys"; + + pinctrl-0 = <&keys_pins>; + pinctrl-names = "default"; + + key-1 { + gpios = <&gpio5 17 GPIO_ACTIVE_LOW>; + linux,code = ; + label = "SW4-1"; + wakeup-source; + debounce-interval = <20>; + }; + key-2 { + gpios = <&gpio5 20 GPIO_ACTIVE_LOW>; + linux,code = ; + label = "SW4-2"; + wakeup-source; + debounce-interval = <20>; + }; + key-3 { + gpios = <&gpio5 22 GPIO_ACTIVE_LOW>; + linux,code = ; + label = "SW4-3"; + wakeup-source; + debounce-interval = <20>; + }; + key-4 { + gpios = <&gpio5 23 GPIO_ACTIVE_LOW>; + linux,code = ; + label = "SW4-4"; + wakeup-source; + debounce-interval = <20>; + }; + key-a { + gpios = <&gpio6 11 GPIO_ACTIVE_LOW>; + linux,code = ; + label = "TSW0"; + wakeup-source; + debounce-interval = <20>; + }; + key-b { + gpios = <&gpio6 12 GPIO_ACTIVE_LOW>; + linux,code = ; + label = "TSW1"; + wakeup-source; + debounce-interval = <20>; + }; + key-c { + gpios = <&gpio6 13 GPIO_ACTIVE_LOW>; + linux,code = ; + label = "TSW2"; + wakeup-source; + debounce-interval = <20>; + }; + }; + reg_1p8v: regulator0 { compatible = "regulator-fixed"; regulator-name = "fixed-1.8V"; @@ -572,6 +630,11 @@ function = "intc_ex"; }; + keys_pins: keys { + pins = "GP_5_17", "GP_5_20", "GP_5_22"; + bias-pull-up; + }; + pwm1_pins: pwm1 { groups = "pwm1_a"; function = "pwm1";