From patchwork Wed Dec 18 21:51:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 3373311 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2E7649F314 for ; Wed, 18 Dec 2013 21:51:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3697F20430 for ; Wed, 18 Dec 2013 21:51:30 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2E7D9200E3 for ; Wed, 18 Dec 2013 21:51:28 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VtP1X-0001Mc-A7; Wed, 18 Dec 2013 21:51:23 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VtP1U-00055O-RA; Wed, 18 Dec 2013 21:51:20 +0000 Received: from mail-pd0-f176.google.com ([209.85.192.176]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VtP1R-00054H-Tr for linux-arm-kernel@lists.infradead.org; Wed, 18 Dec 2013 21:51:18 +0000 Received: by mail-pd0-f176.google.com with SMTP id w10so221593pde.35 for ; Wed, 18 Dec 2013 13:50:50 -0800 (PST) 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:subject:date:message-id; bh=iTgdcWGgLcgffSZzWNNv4eqT52b1P+iZWYg+C14jebU=; b=evXRIBl+UVgWaVIMRkvVa5jt14L5eMj3Lswy5HqLxXujtxYMJLmcCwqHhcO1t7D7dB QQOgtOnd9+jwTBy+09PA+b0/Zpy8OEcemtyU83e6rDHb4H+ZeiqTsCgzkvFzkX8WFPGh SOM+q/0VIyb8DDT7NR3p2OXHfCx2qpUQOtlXm/3g0Md4vgp6Ptk0ieyZ7WofzbxTOr+4 JE2qSEtMZxPTcT+HCLfR8gp7qlGVTsmCBLORrt2casMxaMEzjNWQs/cCBxDb3tQVOFds ZQYahUSh/2QfChPs+nDL8PnycxPpe7styrGDEZj2N+NQfEmRrt1U6sAbFbiCvxqhqSvK 1kdw== X-Gm-Message-State: ALoCoQmfkbHxBek5xcELPDOfWHxPNaCcvOFbzuu81ten/JtfTQAkQ6DGg/vpw1cc0lGFelzZTWAe X-Received: by 10.66.180.200 with SMTP id dq8mr36832835pac.104.1387403448888; Wed, 18 Dec 2013 13:50:48 -0800 (PST) Received: from officeserver-2 ([63.226.49.26]) by mx.google.com with ESMTPSA id bz4sm2305097pbb.12.2013.12.18.13.50.47 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 18 Dec 2013 13:50:47 -0800 (PST) Received: from tkisky by officeserver-2 with local (Exim 4.80) (envelope-from ) id 1VtP1t-0006nU-MM; Wed, 18 Dec 2013 14:51:45 -0700 From: Troy Kisky To: shawn.guo@linaro.org Subject: [PATCH V3 1/1] ARM: dts: imx6qdl-sabrelite: add gpio-keys Date: Wed, 18 Dec 2013 14:51:44 -0700 Message-Id: <1387403504-26097-1-git-send-email-troy.kisky@boundarydevices.com> X-Mailer: git-send-email 1.8.1.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131218_165118_029616_0E8258C8 X-CRM114-Status: UNSURE ( 8.94 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) Cc: marex@denx.de, eric.nelson@boundarydevices.com, festevam@gmail.com, linux-arm-kernel@lists.infradead.org, Troy Kisky X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 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+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Add power, menu, home, back, volume up, and volume down buttons. Also, apply same changes to imx6qdl-nitrogen6x. Signed-off-by: Troy Kisky --- v3: add pinctrl_gpio_keys, make same changes to imx6qdl-nitrogen6x.dtsi v2: add #include to substitute KEY_POWER for 116 --- arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi | 61 +++++++++++++++++++++++++++++++ arch/arm/boot/dts/imx6qdl-sabrelite.dtsi | 61 +++++++++++++++++++++++++++++++ 2 files changed, 122 insertions(+) diff --git a/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi b/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi index eab77df..78fe8b0 100644 --- a/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi +++ b/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi @@ -10,6 +10,8 @@ * http://www.opensource.org/licenses/gpl-license.html * http://www.gnu.org/copyleft/gpl.html */ +#include +#include / { memory { @@ -50,6 +52,48 @@ }; }; + gpio-keys { + compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_gpio_keys>; + power { + label = "Power Button"; + gpios = <&gpio2 3 GPIO_ACTIVE_LOW>; + linux,code = ; + gpio-key,wakeup; + }; + + menu { + label = "Menu"; + gpios = <&gpio2 1 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + home { + label = "Home"; + gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + back { + label = "Back"; + gpios = <&gpio2 2 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + volume-up { + label = "Volume Up"; + gpios = <&gpio7 13 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + volume-down { + label = "Volume Down"; + gpios = <&gpio4 5 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + sound { compatible = "fsl,imx6q-nitrogen6x-sgtl5000", "fsl,imx-audio-sgtl5000"; @@ -183,6 +227,23 @@ >; }; + pinctrl_gpio_keys: gpio_keysgrp { + fsl,pins = < + /* Power Button */ + MX6QDL_PAD_NANDF_D3__GPIO2_IO03 0x1b0b0 + /* Menu Button */ + MX6QDL_PAD_NANDF_D1__GPIO2_IO01 0x1b0b0 + /* Home Button */ + MX6QDL_PAD_NANDF_D4__GPIO2_IO04 0x1b0b0 + /* Back Button */ + MX6QDL_PAD_NANDF_D2__GPIO2_IO02 0x1b0b0 + /* Volume Up Button */ + MX6QDL_PAD_GPIO_18__GPIO7_IO13 0x1b0b0 + /* Volume Down Button */ + MX6QDL_PAD_GPIO_19__GPIO4_IO05 0x1b0b0 + >; + }; + pinctrl_i2c1: i2c1grp { fsl,pins = ; }; diff --git a/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi b/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi index dbfc040..d28f501 100644 --- a/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi +++ b/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi @@ -9,6 +9,8 @@ * http://www.opensource.org/licenses/gpl-license.html * http://www.gnu.org/copyleft/gpl.html */ +#include +#include / { memory { @@ -49,6 +51,48 @@ }; }; + gpio-keys { + compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_gpio_keys>; + power { + label = "Power Button"; + gpios = <&gpio2 3 GPIO_ACTIVE_LOW>; + linux,code = ; + gpio-key,wakeup; + }; + + menu { + label = "Menu"; + gpios = <&gpio2 1 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + home { + label = "Home"; + gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + back { + label = "Back"; + gpios = <&gpio2 2 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + volume-up { + label = "Volume Up"; + gpios = <&gpio7 13 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + volume-down { + label = "Volume Down"; + gpios = <&gpio4 5 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + sound { compatible = "fsl,imx6q-sabrelite-sgtl5000", "fsl,imx-audio-sgtl5000"; @@ -182,6 +226,23 @@ >; }; + pinctrl_gpio_keys: gpio_keysgrp { + fsl,pins = < + /* Power Button */ + MX6QDL_PAD_NANDF_D3__GPIO2_IO03 0x1b0b0 + /* Menu Button */ + MX6QDL_PAD_NANDF_D1__GPIO2_IO01 0x1b0b0 + /* Home Button */ + MX6QDL_PAD_NANDF_D4__GPIO2_IO04 0x1b0b0 + /* Back Button */ + MX6QDL_PAD_NANDF_D2__GPIO2_IO02 0x1b0b0 + /* Volume Up Button */ + MX6QDL_PAD_GPIO_18__GPIO7_IO13 0x1b0b0 + /* Volume Down Button */ + MX6QDL_PAD_GPIO_19__GPIO4_IO05 0x1b0b0 + >; + }; + pinctrl_i2c1: i2c1grp { fsl,pins = ; };