aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-3.18/0070-Adding-w1-gpio-device-tree-overlays.patch
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2015-02-11 10:17:55 +0000
committerJohn Crispin <john@openwrt.org>2015-02-11 10:17:55 +0000
commit408c9696264f8e25e4e4f6410e93d2edd06e59dd (patch)
tree1c9e8fbacb1508e8561c43f87389edf02cfb0955 /target/linux/brcm2708/patches-3.18/0070-Adding-w1-gpio-device-tree-overlays.patch
parentf90d9d486a8842077e68e90bba2b276ac1336bab (diff)
downloadupstream-408c9696264f8e25e4e4f6410e93d2edd06e59dd.tar.gz
upstream-408c9696264f8e25e4e4f6410e93d2edd06e59dd.tar.bz2
upstream-408c9696264f8e25e4e4f6410e93d2edd06e59dd.zip
brcm2708: update to v3.18
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> SVN-Revision: 44392
Diffstat (limited to 'target/linux/brcm2708/patches-3.18/0070-Adding-w1-gpio-device-tree-overlays.patch')
-rwxr-xr-xtarget/linux/brcm2708/patches-3.18/0070-Adding-w1-gpio-device-tree-overlays.patch115
1 files changed, 115 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-3.18/0070-Adding-w1-gpio-device-tree-overlays.patch b/target/linux/brcm2708/patches-3.18/0070-Adding-w1-gpio-device-tree-overlays.patch
new file mode 100755
index 0000000000..772a550880
--- /dev/null
+++ b/target/linux/brcm2708/patches-3.18/0070-Adding-w1-gpio-device-tree-overlays.patch
@@ -0,0 +1,115 @@
+From 2fea9b14e39bd6c64e362ba7d170b67d09206987 Mon Sep 17 00:00:00 2001
+From: Phil Elwell <phil@raspberrypi.org>
+Date: Thu, 15 Jan 2015 10:39:06 +0000
+Subject: [PATCH 070/114] Adding w1-gpio device tree overlays
+
+N.B. Requires firmware supporting multi-target overrides
+
+w1-gpio-overlay:
+ Use if a pullup pin is not required.
+ Parameters:
+ gpiopin=<i/o pin> // default 4
+
+w1-gpio-pullup-overlay:
+ Use if a pullup pin is required.
+ Parameters:
+ gpiopin=<i/o pin> // default 4
+ pullup=<pullup pin> // default 5
+---
+ arch/arm/boot/dts/w1-gpio-overlay.dts | 37 ++++++++++++++++++++++++++
+ arch/arm/boot/dts/w1-gpio-pullup-overlay.dts | 39 ++++++++++++++++++++++++++++
+ 2 files changed, 76 insertions(+)
+ create mode 100644 arch/arm/boot/dts/w1-gpio-overlay.dts
+ create mode 100644 arch/arm/boot/dts/w1-gpio-pullup-overlay.dts
+
+diff --git a/arch/arm/boot/dts/w1-gpio-overlay.dts b/arch/arm/boot/dts/w1-gpio-overlay.dts
+new file mode 100644
+index 0000000..b2c5ee2
+--- /dev/null
++++ b/arch/arm/boot/dts/w1-gpio-overlay.dts
+@@ -0,0 +1,37 @@
++// Definitions for lirc-rpi module
++/dts-v1/;
++/plugin/;
++
++/ {
++ compatible = "brcm,bcm2708";
++
++ fragment@0 {
++ target-path = "/";
++ __overlay__ {
++
++ w1: onewire@0 {
++ compatible = "w1-gpio";
++ pinctrl-names = "default";
++ pinctrl-0 = <&w1_pins>;
++ gpios = <&gpio 4 0>;
++ status = "okay";
++ };
++ };
++ };
++
++ fragment@1 {
++ target = <&gpio>;
++ __overlay__ {
++ w1_pins: w1_pins {
++ brcm,pins = <4>;
++ brcm,function = <0>; // in (initially)
++ brcm,pull = <0>; // off
++ };
++ };
++ };
++
++ __overrides__ {
++ gpiopin = <&w1>,"gpios:4",
++ <&w1_pins>,"brcm,pins:0";
++ };
++};
+diff --git a/arch/arm/boot/dts/w1-gpio-pullup-overlay.dts b/arch/arm/boot/dts/w1-gpio-pullup-overlay.dts
+new file mode 100644
+index 0000000..b3e97c2
+--- /dev/null
++++ b/arch/arm/boot/dts/w1-gpio-pullup-overlay.dts
+@@ -0,0 +1,39 @@
++// Definitions for lirc-rpi module
++/dts-v1/;
++/plugin/;
++
++/ {
++ compatible = "brcm,bcm2708";
++
++ fragment@0 {
++ target-path = "/";
++ __overlay__ {
++
++ w1: onewire@0 {
++ compatible = "w1-gpio";
++ pinctrl-names = "default";
++ pinctrl-0 = <&w1_pins>;
++ gpios = <&gpio 4 0>, <&gpio 5 1>;
++ status = "okay";
++ };
++ };
++ };
++
++ fragment@1 {
++ target = <&gpio>;
++ __overlay__ {
++ w1_pins: w1_pins {
++ brcm,pins = <4 5>;
++ brcm,function = <0 1>; // in out
++ brcm,pull = <0 0>; // off off
++ };
++ };
++ };
++
++ __overrides__ {
++ gpiopin = <&w1>,"gpios:4",
++ <&w1_pins>,"brcm,pins:0";
++ pullup = <&w1>,"gpios:16",
++ <&w1_pins>,"brcm,pins:4";
++ };
++};
+--
+1.8.3.2
+