Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1284100

[PATCH 3/3] ARM: dts: Addition of binding for gpio switches on peach-pi

From Martyn Welch <martyn.welch@collabora.co.uk>
Newsgroups linux.kernel
Subject [PATCH 3/3] ARM: dts: Addition of binding for gpio switches on peach-pi
Date 2015-12-04 18:40 +0100
Message-ID <qC2uV-5Kw-81@gated-at.bofh.it> (permalink)
References <qC2uT-5Kw-37@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 <martyn.welch@collabora.co.uk>
---
 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>;
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Add support for monitoring gpio switches Martyn Welch <martyn.welch@collabora.co.uk> - 2015-12-04 18:40 +0100
  [PATCH 2/3] Add support for monitoring gpio switches Martyn Welch <martyn.welch@collabora.co.uk> - 2015-12-04 18:40 +0100
    [PATCH] fix noderef.cocci warnings kbuild test robot <lkp@intel.com> - 2015-12-04 19:20 +0100
    Re: [PATCH 2/3] Add support for monitoring gpio switches kbuild test robot <lkp@intel.com> - 2015-12-04 19:20 +0100
    Re: [PATCH 2/3] Add support for monitoring gpio switches Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-04 20:00 +0100
      Re: [PATCH 2/3] Add support for monitoring gpio switches Martyn Welch <martyn.welch@collabora.co.uk> - 2015-12-05 11:50 +0100
    Re: [PATCH 2/3] Add support for monitoring gpio switches Linus Walleij <linus.walleij@linaro.org> - 2015-12-11 10:10 +0100
  [PATCH 1/3] Device tree binding documentation for gpio-switch Martyn Welch <martyn.welch@collabora.co.uk> - 2015-12-04 18:40 +0100
    Re: [PATCH 1/3] Device tree binding documentation for gpio-switch Rob Herring <robh@kernel.org> - 2015-12-07 18:40 +0100
      Re: [PATCH 1/3] Device tree binding documentation for gpio-switch Martyn Welch <martyn.welch@collabora.co.uk> - 2015-12-07 22:20 +0100
    Re: [PATCH 1/3] Device tree binding documentation for gpio-switch Linus Walleij <linus.walleij@linaro.org> - 2015-12-11 13:50 +0100
      Re: [PATCH 1/3] Device tree binding documentation for gpio-switch Rob Herring <robh+dt@kernel.org> - 2015-12-11 15:10 +0100
  [PATCH 3/3] ARM: dts: Addition of binding for gpio switches on peach-pi Martyn Welch <martyn.welch@collabora.co.uk> - 2015-12-04 18:40 +0100

csiph-web