lantiq: Use the BAR0 base address in the ath PCI fixup code
[openwrt/openwrt.git] / target / linux / brcm2708 / patches-3.18 / 0070-Adding-w1-gpio-device-tree-overlays.patch
1 From 2fea9b14e39bd6c64e362ba7d170b67d09206987 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Thu, 15 Jan 2015 10:39:06 +0000
4 Subject: [PATCH 070/114] Adding w1-gpio device tree overlays
5
6 N.B. Requires firmware supporting multi-target overrides
7
8 w1-gpio-overlay:
9 Use if a pullup pin is not required.
10 Parameters:
11 gpiopin=<i/o pin> // default 4
12
13 w1-gpio-pullup-overlay:
14 Use if a pullup pin is required.
15 Parameters:
16 gpiopin=<i/o pin> // default 4
17 pullup=<pullup pin> // default 5
18 ---
19 arch/arm/boot/dts/w1-gpio-overlay.dts | 37 ++++++++++++++++++++++++++
20 arch/arm/boot/dts/w1-gpio-pullup-overlay.dts | 39 ++++++++++++++++++++++++++++
21 2 files changed, 76 insertions(+)
22 create mode 100644 arch/arm/boot/dts/w1-gpio-overlay.dts
23 create mode 100644 arch/arm/boot/dts/w1-gpio-pullup-overlay.dts
24
25 --- /dev/null
26 +++ b/arch/arm/boot/dts/w1-gpio-overlay.dts
27 @@ -0,0 +1,37 @@
28 +// Definitions for lirc-rpi module
29 +/dts-v1/;
30 +/plugin/;
31 +
32 +/ {
33 + compatible = "brcm,bcm2708";
34 +
35 + fragment@0 {
36 + target-path = "/";
37 + __overlay__ {
38 +
39 + w1: onewire@0 {
40 + compatible = "w1-gpio";
41 + pinctrl-names = "default";
42 + pinctrl-0 = <&w1_pins>;
43 + gpios = <&gpio 4 0>;
44 + status = "okay";
45 + };
46 + };
47 + };
48 +
49 + fragment@1 {
50 + target = <&gpio>;
51 + __overlay__ {
52 + w1_pins: w1_pins {
53 + brcm,pins = <4>;
54 + brcm,function = <0>; // in (initially)
55 + brcm,pull = <0>; // off
56 + };
57 + };
58 + };
59 +
60 + __overrides__ {
61 + gpiopin = <&w1>,"gpios:4",
62 + <&w1_pins>,"brcm,pins:0";
63 + };
64 +};
65 --- /dev/null
66 +++ b/arch/arm/boot/dts/w1-gpio-pullup-overlay.dts
67 @@ -0,0 +1,39 @@
68 +// Definitions for lirc-rpi module
69 +/dts-v1/;
70 +/plugin/;
71 +
72 +/ {
73 + compatible = "brcm,bcm2708";
74 +
75 + fragment@0 {
76 + target-path = "/";
77 + __overlay__ {
78 +
79 + w1: onewire@0 {
80 + compatible = "w1-gpio";
81 + pinctrl-names = "default";
82 + pinctrl-0 = <&w1_pins>;
83 + gpios = <&gpio 4 0>, <&gpio 5 1>;
84 + status = "okay";
85 + };
86 + };
87 + };
88 +
89 + fragment@1 {
90 + target = <&gpio>;
91 + __overlay__ {
92 + w1_pins: w1_pins {
93 + brcm,pins = <4 5>;
94 + brcm,function = <0 1>; // in out
95 + brcm,pull = <0 0>; // off off
96 + };
97 + };
98 + };
99 +
100 + __overrides__ {
101 + gpiopin = <&w1>,"gpios:4",
102 + <&w1_pins>,"brcm,pins:0";
103 + pullup = <&w1>,"gpios:16",
104 + <&w1_pins>,"brcm,pins:4";
105 + };
106 +};