From patchwork Fri Dec 4 17:31:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martyn Welch X-Patchwork-Id: 7770871 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6349CBEEE1 for ; Fri, 4 Dec 2015 17:38:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 88FC6203E3 for ; Fri, 4 Dec 2015 17:38:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9D2ED20495 for ; Fri, 4 Dec 2015 17:38:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752696AbbLDRb2 (ORCPT ); Fri, 4 Dec 2015 12:31:28 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:59959 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752858AbbLDRbZ (ORCPT ); Fri, 4 Dec 2015 12:31:25 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: martyn) with ESMTPSA id 863E5261201 Received: from martyn by hermes with local (Exim 4.84) (envelope-from ) id 1a4uCX-0007Kw-AJ; Fri, 04 Dec 2015 17:31:21 +0000 From: Martyn Welch To: Arnd Bergmann , Greg Kroah-Hartman Cc: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Russell King , Kukjin Kim , Krzysztof Kozlowski , Martyn Welch , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Olof Johansson Subject: [PATCH 3/3] ARM: dts: Addition of binding for gpio switches on peach-pi Date: Fri, 4 Dec 2015 17:31:15 +0000 Message-Id: <1449250275-23435-4-git-send-email-martyn.welch@collabora.co.uk> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1449250275-23435-1-git-send-email-martyn.welch@collabora.co.uk> References: <1449250275-23435-1-git-send-email-martyn.welch@collabora.co.uk> 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 The peach pi has a GPIO connected to the firmware write protect, developer mode and recovery mode lines (which are primarily controlled via external switches on developer test board). This patch adds the required nodes to the device tree to configure the pinmuxing and allow these to be read from user space. Signed-off-by: Martyn Welch --- arch/arm/boot/dts/exynos5800-peach-pi.dts | 46 +++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/arch/arm/boot/dts/exynos5800-peach-pi.dts b/arch/arm/boot/dts/exynos5800-peach-pi.dts index 49a4f43..2937372 100644 --- a/arch/arm/boot/dts/exynos5800-peach-pi.dts +++ b/arch/arm/boot/dts/exynos5800-peach-pi.dts @@ -53,6 +53,31 @@ }; }; + gpio-switch { + compatible = "gpio-switch"; + + pinctrl-names = "default"; + pinctrl-0 = <&wp_gpio &dev_mode &rec_mode>; + + write-protect { + label = "write-protect"; + gpios = <&gpx3 0 GPIO_ACTIVE_LOW>; + read-only; + }; + + developer-switch { + label = "developer-switch"; + gpios = <&gpx1 3 GPIO_ACTIVE_HIGH>; + read-only; + }; + + recovery-switch { + label = "recovery-switch"; + gpios = <&gpx0 7 GPIO_ACTIVE_LOW>; + read-only; + }; + }; + gpio-keys { compatible = "gpio-keys"; @@ -731,6 +756,13 @@ samsung,pin-val = <0>; }; + rec_mode: rec-mode { + samsung,pins = "gpx0-7"; + samsung,pin-function = <0>; + samsung,pin-pud = <0>; + samsung,pin-drv = <0>; + }; + tpm_irq: tpm-irq { samsung,pins = "gpx1-0"; samsung,pin-function = <0>; @@ -752,6 +784,13 @@ samsung,pin-drv = <0>; }; + dev_mode: dev-mode { + samsung,pins = "gpx1-3"; + samsung,pin-function = <0>; + samsung,pin-pud = <3>; + samsung,pin-drv = <0>; + }; + ec_irq: ec-irq { samsung,pins = "gpx1-5"; samsung,pin-function = <0>; @@ -773,6 +812,13 @@ samsung,pin-drv = <0>; }; + wp_gpio: wp_gpio { + samsung,pins = "gpx3-0"; + samsung,pin-function = <0>; + samsung,pin-pud = <0>; + samsung,pin-drv = <0>; + }; + max77802_irq: max77802-irq { samsung,pins = "gpx3-1"; samsung,pin-function = <0>;