From patchwork Tue May 26 07:50:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 48971 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 992B121411 for ; Tue, 26 May 2015 07:53:22 +0000 (UTC) Received: by wizk4 with SMTP id k4sf19163760wiz.2 for ; Tue, 26 May 2015 00:53:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id:cc :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list; bh=IvdJ184FD7eKBVIm2elR7UBnwsxyOQMiNvdqCD1wJfs=; b=KDv0FKe1NB+iNBc6UUGlMdE54qHfG4VoJ18gBob2n4vlBZws+cuqxaPiSbGPjkdsuB +R0NXeAjf9Hz9o6j+FrPiM75kEnJsirjr2oqBndcCRnn/Leme3TTrZuLkNKQhkptk+R3 kR/zPrPSOqdIa9iaC8LosmUQxZsWSgB+M6twswg/vxupXfrnDvZQCKENC7Frop4Nz1MW 8XYWbs2qAJ2C39SuXbzDvulFOnViLWJndvNpOFeHip0MiAZNb5t+1GAjI0csBFeDYFYu llbdQ+4PmPCgBulaUsxBCXRXbk70CsKYYqAHqSsus17DcwWerbX28qZzCgzt25IIrHIm u4eA== X-Gm-Message-State: ALoCoQnWBYT7uJp1rF5HIOWk2EVjp/UnPXalvO4TnuqQ9cOP7sCibHOBFveKcpdyJjDCZVDF5M2V X-Received: by 10.112.55.104 with SMTP id r8mr26419017lbp.18.1432626801648; Tue, 26 May 2015 00:53:21 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.7 with SMTP id m7ls856187laj.70.gmail; Tue, 26 May 2015 00:53:21 -0700 (PDT) X-Received: by 10.152.87.108 with SMTP id w12mr101471laz.57.1432626801366; Tue, 26 May 2015 00:53:21 -0700 (PDT) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com. [209.85.215.48]) by mx.google.com with ESMTPS id i6si10321679laa.144.2015.05.26.00.53.21 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 May 2015 00:53:21 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) client-ip=209.85.215.48; Received: by laat2 with SMTP id t2so61795471laa.1 for ; Tue, 26 May 2015 00:53:21 -0700 (PDT) X-Received: by 10.112.150.100 with SMTP id uh4mr17005454lbb.112.1432626801267; Tue, 26 May 2015 00:53:21 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp2354524lbb; Tue, 26 May 2015 00:53:20 -0700 (PDT) X-Received: by 10.66.222.130 with SMTP id qm2mr46502679pac.39.1432626799386; Tue, 26 May 2015 00:53:19 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id y10si19842252pdn.1.2015.05.26.00.53.18 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 May 2015 00:53:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Yx9e3-00032i-9a; Tue, 26 May 2015 07:51:27 +0000 Received: from mail-lb0-f182.google.com ([209.85.217.182]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Yx9dz-0002wt-4E for linux-arm-kernel@lists.infradead.org; Tue, 26 May 2015 07:51:23 +0000 Received: by lbcmx3 with SMTP id mx3so64397401lbc.1 for ; Tue, 26 May 2015 00:50:59 -0700 (PDT) X-Received: by 10.152.116.49 with SMTP id jt17mr21361266lab.82.1432626659343; Tue, 26 May 2015 00:50:59 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id j6sm2846157laj.13.2015.05.26.00.50.57 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 May 2015 00:50:58 -0700 (PDT) From: Linus Walleij To: linux-arm-kernel@lists.infradead.org, Liviu Dudau Subject: [PATCH 1/2] ARM64: juno: add GPIO keys Date: Tue, 26 May 2015 09:50:53 +0200 Message-Id: <1432626653-17201-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.9.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150526_005123_383841_ABCB562C X-CRM114-Status: GOOD ( 11.65 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.217.182 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.217.182 listed in wl.mailspike.net] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders Cc: Catalin Marinas , Linus Walleij , Will Deacon X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 The Juno board has two keys connected to a PL061 GPIO block, in accordance to DDI0524B "ARM Versatile Express Juno Development Platform" revision 1.0, table 2-4 "GPIO (0) and GPIO (1) used for additional user key entry". By trial-and-error I found that these are connected to the two keys named "power" and "home" on the motherboard. Register the GPIO block and these two keys in the device tree using the PL061 GPIO driver and the generic gpio keys. Signed-off-by: Linus Walleij --- arch/arm64/boot/dts/arm/juno-motherboard.dtsi | 33 +++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/arch/arm64/boot/dts/arm/juno-motherboard.dtsi b/arch/arm64/boot/dts/arm/juno-motherboard.dtsi index 351c95bda89e..6458ec53a61d 100644 --- a/arch/arm64/boot/dts/arm/juno-motherboard.dtsi +++ b/arch/arm64/boot/dts/arm/juno-motherboard.dtsi @@ -54,6 +54,27 @@ regulator-always-on; }; + gpio_keys { + compatible = "gpio-keys"; + #address-cells = <1>; + #size-cells = <0>; + + button@1 { + debounce_interval = <50>; + wakeup = <1>; + linux,code = <116>; + label = "power"; + gpios = <&iofpga_gpio 0 0x4>; + }; + button@2 { + debounce_interval = <50>; + wakeup = <1>; + linux,code = <102>; + label = "home"; + gpios = <&iofpga_gpio 1 0x4>; + }; + }; + ethernet@2,00000000 { compatible = "smsc,lan9118", "smsc,lan9115"; reg = <2 0x00000000 0x10000>; @@ -148,5 +169,17 @@ clocks = <&soc_smc50mhz>; clock-names = "apb_pclk"; }; + + iofpga_gpio: gpio@1d0000 { + compatible = "arm,pl061", "arm,primecell"; + reg = <0x1d0000 0x1000>; + interrupts = <6>; + clocks = <&soc_smc50mhz>; + clock-names = "apb_pclk"; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; }; };