From patchwork Wed Jul 4 08:37:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Robinson X-Patchwork-Id: 10506155 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9ADFF60325 for ; Wed, 4 Jul 2018 08:40:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 394DD28D5E for ; Wed, 4 Jul 2018 08:40:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2DB1A28D66; Wed, 4 Jul 2018 08:40:47 +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=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B8FD528D5E for ; Wed, 4 Jul 2018 08:40:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933844AbeGDIkl (ORCPT ); Wed, 4 Jul 2018 04:40:41 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:38519 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932363AbeGDIik (ORCPT ); Wed, 4 Jul 2018 04:38:40 -0400 Received: by mail-wm0-f65.google.com with SMTP id 69-v6so4789550wmf.3; Wed, 04 Jul 2018 01:38:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=WIwcP7kdeyY0mRP3ExCPY+ybw3+mWvnElOrEAlQ7UHg=; b=muI2Xm3c9N1DDUQ5r7nZjo1nse1X/i0/36GwF5zpUhotwv6ZUR8DoTmHcv/MkGo7Q4 D41uSQt478UGwmGFEUUg8vsupfWLFsLEi4g4Iot6f42b69JyH+6ET+meBUfVSUIIYrcc qJqrgkRdcv5k9AnA/k+sTUfsHbGACMvUOr87haw18vyN7nWX3IX65teyWK2aqMud540u 8ZU/HPSkK1DDgkFIoEkokzxQR4jG3qZB1+pu7kk7JMNrMYL4tOE9kvxjYKkaGXLh91op pl541PRRbPtj9fJLr/XcJmBdJr4/EhyPlOv8yH7mxU+KGzHIKSVszaFpsU05oMn40BbI thDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=WIwcP7kdeyY0mRP3ExCPY+ybw3+mWvnElOrEAlQ7UHg=; b=VCUCex2KX4cjVX9HJUQmT3BIEbnKdLZ1Y9w8HfbJ2XBiqNPZyLaOlaQSl1Qbuh7CtS byeSkmGu65GE9SsIzerGgqzJCTxsTaQbRhcJ79AXOK81+1LoZAnr1nFhrTwKmMJnoEGv rcJAeWIuGzBnWfw2wzwViWeRN7i3iO2YbERhLjyaml9ipQ5xZ96W5WpeJKmebh74HotQ q3h2uecBxJFkkDJM2eLOfJkVF+SIS0qDnY/RkznDUNjZfvxJSv2XCe3oYX3kiQZuIGtu G5SDjY/6eI6sAe5F9sud+P3UzMZM3OzMSeoV5XwsyC1wLtQ/77IT9xAkC5A+TOm4F8vU zsvQ== X-Gm-Message-State: APt69E2XC41bp7HYaUeh5qrprZ9ZkNXQayG7X6R4+a6q3B6Y/UHP2kRE t0hYg2nSejpuNHVqMc02rk127fX6 X-Google-Smtp-Source: AAOMgpdf91c8uJhmKn1hf6wsTOO37ZWma/Hui5iW72j8ImAvIU3R4AKBifBOWf4lMU4xlFQIwc8bJw== X-Received: by 2002:a1c:e455:: with SMTP id b82-v6mr1027037wmh.93.1530693519626; Wed, 04 Jul 2018 01:38:39 -0700 (PDT) Received: from neo.roving-it.com (6.0.0.6.e.3.3.3.4.9.d.f.4.6.d.d.1.8.6.2.1.1.b.f.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:fb11:2681:dd64:fd94:333e:6006]) by smtp.googlemail.com with ESMTPSA id d15-v6sm12140050wmb.0.2018.07.04.01.38.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 04 Jul 2018 01:38:38 -0700 (PDT) From: Peter Robinson To: =?UTF-8?q?Beno=C3=AEt=20Cousson?= , Tony Lindgren , linux-omap@vger.kernel.org, devicetree@vger.kernel.org Cc: Peter Robinson Subject: [PATCH] ARM: dts: pandaboard: add gpio user button Date: Wed, 4 Jul 2018 09:37:38 +0100 Message-Id: <20180704083738.32452-1-pbrobinson@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The PandaBoard has a user button connected to GPIO. On the ES this is connected to GPIO 113, on all the other Panda editons this is GPIO 121. Signed-off-by: Peter Robinson --- arch/arm/boot/dts/omap4-panda-common.dtsi | 22 ++++++++++++++++++++++ arch/arm/boot/dts/omap4-panda-es.dts | 12 ++++++++++++ 2 files changed, 34 insertions(+) diff --git a/arch/arm/boot/dts/omap4-panda-common.dtsi b/arch/arm/boot/dts/omap4-panda-common.dtsi index 5501d1b4e6cdf..9be08db960feb 100644 --- a/arch/arm/boot/dts/omap4-panda-common.dtsi +++ b/arch/arm/boot/dts/omap4-panda-common.dtsi @@ -5,6 +5,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include #include "elpida_ecb240abacn.dtsi" / { @@ -43,6 +44,21 @@ }; }; + gpio_keys: gpio_keys { + compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = < + &button_pins + >; + + buttonS2 { + label = "button S2"; + gpios = <&gpio4 25 GPIO_ACTIVE_LOW>; /* gpio_121 */ + linux,code = ; + wakeup-source; + }; + }; + sound: sound { compatible = "ti,abe-twl6040"; ti,model = "PandaBoard"; @@ -357,6 +373,12 @@ OMAP4_IOPAD(0x152, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat3.sdmmc5_dat3 */ >; }; + + button_pins: pinmux_button_pins { + pinctrl-single,pins = < + OMAP4_IOPAD(0x114, PIN_INPUT_PULLUP | MUX_MODE3) /* gpio_121 */ + >; + }; }; &omap4_pmx_wkup { diff --git a/arch/arm/boot/dts/omap4-panda-es.dts b/arch/arm/boot/dts/omap4-panda-es.dts index 940fe4f7c5f6e..984f642639fab 100644 --- a/arch/arm/boot/dts/omap4-panda-es.dts +++ b/arch/arm/boot/dts/omap4-panda-es.dts @@ -46,6 +46,12 @@ OMAP4_IOPAD(0x0f6, PIN_OUTPUT | MUX_MODE3) /* gpio_110 */ >; }; + + button_pins: pinmux_button_pins { + pinctrl-single,pins = < + OMAP4_IOPAD(0x11b, PIN_INPUT_PULLUP | MUX_MODE3) /* gpio_113 */ + >; + }; }; &led_wkgpio_pins { @@ -68,6 +74,12 @@ }; }; +&gpio_keys { + buttonS2 { + gpios = <&gpio4 17 GPIO_ACTIVE_LOW>; /* gpio_113 */ + }; +}; + &gpio1 { ti,no-reset-on-init; };