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: 32844 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f70.google.com (mail-oa0-f70.google.com [209.85.219.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D993020672 for ; Tue, 1 Jul 2014 07:20:28 +0000 (UTC) Received: by mail-oa0-f70.google.com with SMTP id m1sf58805118oag.9 for ; Tue, 01 Jul 2014 00:20:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=XU8Q4aHvdlo8jyiVxUv8IiQP2EaUQcaA3SVA6TEV7tM=; b=HYIz09Hp8qU/PRK/3jm02Ae53zuo3TsY/idRSYKOefgm7VEfu1AywETrY0enEEIvOa auP7RPODQUDu1vup4qJ6zudpOwbLFyBNr5bWMNpirXOb8DazCrwkCn/n6+p//ICDo/V+ 7Duqbyoe0cWGylxb5nj4BPwcHF02+VfI/yOvg/KZpgciaU67l4ZN9jPkxGQO6H1Gt1KZ dy6jn4/Yoowi8yd6GKOc+EwDThxh3X7ywchFBPxYmvhLrdkFSScIXCyiNN6dtdKQaLd6 N4GsjR4MvJnUUUGNPqFrCU6dclwkf2UnKDIh73BAU/ozMNah4B7Vwc8k7l7mLXnYKsXh 2JhA== X-Gm-Message-State: ALoCoQl+A4w85JSc6m31qfyViDPhqVB+e7lwgWqGjHcXbmi0dgxHW8qKovuZP1EBpW2rOcXSapMB X-Received: by 10.182.105.230 with SMTP id gp6mr26205761obb.18.1404199228503; Tue, 01 Jul 2014 00:20:28 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.89.104 with SMTP id u95ls1881801qgd.5.gmail; Tue, 01 Jul 2014 00:20:28 -0700 (PDT) X-Received: by 10.220.161.8 with SMTP id p8mr42810254vcx.4.1404199228341; Tue, 01 Jul 2014 00:20:28 -0700 (PDT) Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com [209.85.128.175]) by mx.google.com with ESMTPS id w6si11092150vek.62.2014.07.01.00.20.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 01 Jul 2014 00:20:28 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.175 as permitted sender) client-ip=209.85.128.175; Received: by mail-ve0-f175.google.com with SMTP id jx11so9174738veb.20 for ; Tue, 01 Jul 2014 00:20:28 -0700 (PDT) X-Received: by 10.52.101.168 with SMTP id fh8mr35717712vdb.34.1404199228254; Tue, 01 Jul 2014 00:20:28 -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.221.37.5 with SMTP id tc5csp195483vcb; Tue, 1 Jul 2014 00:20:27 -0700 (PDT) X-Received: by 10.66.102.39 with SMTP id fl7mr58229105pab.43.1404199227544; Tue, 01 Jul 2014 00:20:27 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ym1si25990551pac.25.2014.07.01.00.20.26; Tue, 01 Jul 2014 00:20:26 -0700 (PDT) Received-SPF: none (google.com: linux-samsung-soc-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753177AbaGAHU0 (ORCPT + 8 others); 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: list List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: m.szyprowski@samsung.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.175 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 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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>; + }; +};