From patchwork Tue Jul 1 07:20:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 4456901 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0B1F5BEEAA for ; Tue, 1 Jul 2014 07:20:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 304B32037D for ; Tue, 1 Jul 2014 07:20:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DF8AB20379 for ; Tue, 1 Jul 2014 07:20:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753177AbaGAHU0 (ORCPT ); Tue, 1 Jul 2014 03:20:26 -0400 Received: from mailout4.w1.samsung.com ([210.118.77.14]:23773 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753109AbaGAHUZ (ORCPT ); Tue, 1 Jul 2014 03:20:25 -0400 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N8000F7AV1QRS70@mailout4.w1.samsung.com> for linux-samsung-soc@vger.kernel.org; Tue, 01 Jul 2014 08:20:15 +0100 (BST) X-AuditID: cbfec7f4-b7fac6d000006cfe-cb-53b26136f5b3 Received: from eusync1.samsung.com ( [203.254.199.211]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 2D.3C.27902.63162B35; Tue, 01 Jul 2014 08:20:22 +0100 (BST) Received: from amdc1339.digital.local ([106.116.147.30]) by eusync1.samsung.com (Oracle Communications Messaging Server 7u4-23.01 (7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0N8000ETHV1U0P20@eusync1.samsung.com>; Tue, 01 Jul 2014 08:20:22 +0100 (BST) From: Marek Szyprowski To: linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Kukjin Kim , Kamil Debski , Sylwester Nawrocki , Tobias Jakobi , Daniel Drake Subject: [PATCH] ARM: dts: exynos4412-odroid: add support for GPIO buttons Date: Tue, 01 Jul 2014 09:20:09 +0200 Message-id: <1404199209-9722-1-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.2 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrBJMWRmVeSWpSXmKPExsVy+t/xy7pmiZuCDc5s47N4NP8xs8WP1xfY LHoXXGWzmHF+H5NF18+fbBZrj9xltzj8pp3Vgd1j0fcsj8Wb9rN59G1ZxejxeZNcAEsUl01K ak5mWWqRvl0CV8b8f40sBd9EK7auv8XcwHhNsIuRg0NCwERixcOcLkZOIFNM4sK99WxdjFwc QgJLGSWmzdzHBOH0MUlcXLOAEaSKTcBQouttFxuILSKgKvG5bQE7SBGzwGdGiccdj8ASwgJe Er3vt7OA2CxARW29T5lBbF4Bd4kDB1YzQ6yTk/j/cgXTBEbuBYwMqxhFU0uTC4qT0nMN9YoT c4tL89L1kvNzNzFCQuPLDsbFx6wOMQpwMCrx8Dau2BAsxJpYVlyZe4hRgoNZSYSX029TsBBv SmJlVWpRfnxRaU5q8SFGJg5OqQbGwO2eihyJHrtLvrUrFMv/PWGjc7JaIZLzMuf1RN7Picv0 llgGsz7RyZ34/cL5Be2cln/mFl0ta+B0Ml7StIdr+RGepMWXF+6Rm/vtkL2G9dsY45f9vVYX nFI4l68/09Z/eIK0Vm/z56/sbxbc2Lnp5rdo1xN/9t38sK7H6fuSuosx7LMUD73rVWIpzkg0 1GIuKk4EALXlqoDrAQAA Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 This patch adds support for simple GPIO-based button availabled on Exynos4 based Odroid boards. All supported boards have POWER button, which has been defined in exynos4412-odroid-common.dtsi. X/X2 boards also have additional user-configurable button which has been mapped to KEY_HOME. All defined keys have been marked as possible wakeup source. Signed-off-by: Marek Szyprowski --- Hello, This patch is a continuation of the '[PATCH v2 0/4] Add Exynos4412 based Odroid X2 and U2/U3/U3+ support' series (http://www.spinics.net/lists/linux-samsung-soc/msg33115.html). Best regards Marek Szyprowski Samsung R&D Institute Poland --- arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 24 ++++++++++++++++++++++++ arch/arm/boot/dts/exynos4412-odroidx.dts | 21 +++++++++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi index ad2cb32a3439..d1b33a8efa9d 100644 --- a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi +++ b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi @@ -7,6 +7,7 @@ * published by the Free Software Foundation. */ +#include #include "exynos4412.dtsi" / { @@ -15,6 +16,22 @@ reg = <0x0204F000 0x1000>; }; + gpio_keys { + compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&gpio_power_key>; + + power_key { + interrupt-parent = <&gpx1>; + interrupts = <3 0>; + gpios = <&gpx1 3 1>; + linux,code = ; + label = "power key"; + debounce-interval = <10>; + gpio-key,wakeup; + }; + }; + mmc@12550000 { pinctrl-0 = <&sd4_clk &sd4_cmd &sd4_bus4 &sd4_bus8>; pinctrl-names = "default"; @@ -316,3 +333,10 @@ status = "okay"; }; }; + +&pinctrl_1 { + gpio_power_key: power_key { + samsung,pins = "gpx1-3"; + samsung,pin-pud = <0>; + }; +}; diff --git a/arch/arm/boot/dts/exynos4412-odroidx.dts b/arch/arm/boot/dts/exynos4412-odroidx.dts index 990a04760313..18c567f5dbea 100644 --- a/arch/arm/boot/dts/exynos4412-odroidx.dts +++ b/arch/arm/boot/dts/exynos4412-odroidx.dts @@ -46,6 +46,20 @@ status = "okay"; }; + gpio_keys { + pinctrl-0 = <&gpio_power_key &gpio_home_key>; + + home_key { + interrupt-parent = <&gpx2>; + interrupts = <2 0>; + gpios = <&gpx2 2 0>; + linux,code = ; + label = "home key"; + debounce-interval = <10>; + gpio-key,wakeup; + }; + }; + regulator_p3v3 { compatible = "regulator-fixed"; regulator-name = "p3v3_en"; @@ -62,3 +76,10 @@ status = "okay"; }; }; + +&pinctrl_1 { + gpio_home_key: home_key { + samsung,pins = "gpx2-2"; + samsung,pin-pud = <0>; + }; +};