ramips: fix various mistakes in subtargets *.mk profiles
[openwrt.git] / target / linux / bcm53xx / patches-3.18 / 054-ARM-BCM5301X-Add-LEDs-for-Buffalo-devices.patch
1 From 8115a4e8d687427fbc1aa3774f50551563bf87f9 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
3 Date: Wed, 14 Jan 2015 08:20:49 +0100
4 Subject: [PATCH] ARM: BCM5301X: Add LEDs for Buffalo devices
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
10 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 ---
12  arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts  | 67 ++++++++++++++++++++++
13  arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts | 67 ++++++++++++++++++++++
14  2 files changed, 134 insertions(+)
15
16 --- a/arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts
17 +++ b/arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts
18 @@ -23,6 +23,73 @@
19                 reg = <0x00000000 0x08000000>;
20         };
21  
22 +       spi {
23 +               compatible = "spi-gpio";
24 +               num-chipselects = <1>;
25 +               gpio-sck = <&chipcommon 7 0>;
26 +               gpio-mosi = <&chipcommon 4 0>;
27 +               cs-gpios = <&chipcommon 6 0>;
28 +               #address-cells = <1>;
29 +               #size-cells = <0>;
30 +
31 +               hc595: gpio_spi@0 {
32 +                       compatible = "fairchild,74hc595";
33 +                       reg = <0>;
34 +                       registers-number = <1>;
35 +                       spi-max-frequency = <100000>;
36 +
37 +                       gpio-controller;
38 +                       #gpio-cells = <2>;
39 +
40 +               };
41 +       };
42 +
43 +       leds {
44 +               compatible = "gpio-leds";
45 +
46 +               power0 {
47 +                       label = "bcm53xx:red:power";
48 +                       gpios = <&hc595 1 GPIO_ACTIVE_HIGH>;
49 +                       linux,default-trigger = "default-off";
50 +               };
51 +
52 +               power1 {
53 +                       label = "bcm53xx:white:power";
54 +                       gpios = <&hc595 2 GPIO_ACTIVE_HIGH>;
55 +                       linux,default-trigger = "default-on";
56 +               };
57 +
58 +               router0 {
59 +                       label = "bcm53xx:blue:router";
60 +                       gpios = <&hc595 3 GPIO_ACTIVE_HIGH>;
61 +                       linux,default-trigger = "default-on";
62 +               };
63 +
64 +               router1 {
65 +                       label = "bcm53xx:amber:router";
66 +                       gpios = <&hc595 4 GPIO_ACTIVE_HIGH>;
67 +                       linux,default-trigger = "default-off";
68 +               };
69 +
70 +               wan {
71 +                       label = "bcm53xx:blue:wan";
72 +                       gpios = <&hc595 5 GPIO_ACTIVE_HIGH>;
73 +                       linux,default-trigger = "default-on";
74 +               };
75 +
76 +               wireless0 {
77 +                       label = "bcm53xx:blue:wireless";
78 +                       gpios = <&hc595 6 GPIO_ACTIVE_HIGH>;
79 +                       linux,default-trigger = "default-off";
80 +               };
81 +
82 +               wireless1 {
83 +                       label = "bcm53xx:amber:wireless";
84 +                       gpios = <&hc595 7 GPIO_ACTIVE_HIGH>;
85 +                       linux,default-trigger = "default-off";
86 +               };
87 +       };
88 +
89         gpio-keys {
90                 compatible = "gpio-keys";
91                 #address-cells = <1>;
92 --- a/arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts
93 +++ b/arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts
94 @@ -23,6 +23,73 @@
95                 reg = <0x00000000 0x08000000>;
96         };
97  
98 +       spi {
99 +               compatible = "spi-gpio";
100 +               num-chipselects = <1>;
101 +               gpio-sck = <&chipcommon 7 0>;
102 +               gpio-mosi = <&chipcommon 4 0>;
103 +               cs-gpios = <&chipcommon 6 0>;
104 +               #address-cells = <1>;
105 +               #size-cells = <0>;
106 +
107 +               hc595: gpio_spi@0 {
108 +                       compatible = "fairchild,74hc595";
109 +                       reg = <0>;
110 +                       registers-number = <1>;
111 +                       spi-max-frequency = <100000>;
112 +
113 +                       gpio-controller;
114 +                       #gpio-cells = <2>;
115 +
116 +               };
117 +       };
118 +
119 +       leds {
120 +               compatible = "gpio-leds";
121 +
122 +               power0 {
123 +                       label = "bcm53xx:green:power";
124 +                       gpios = <&hc595 1 GPIO_ACTIVE_HIGH>;
125 +                       linux,default-trigger = "default-on";
126 +               };
127 +
128 +               power1 {
129 +                       label = "bcm53xx:red:power";
130 +                       gpios = <&hc595 2 GPIO_ACTIVE_HIGH>;
131 +                       linux,default-trigger = "default-off";
132 +               };
133 +
134 +               router0 {
135 +                       label = "bcm53xx:green:router";
136 +                       gpios = <&hc595 3 GPIO_ACTIVE_HIGH>;
137 +                       linux,default-trigger = "default-on";
138 +               };
139 +
140 +               router1 {
141 +                       label = "bcm53xx:amber:router";
142 +                       gpios = <&hc595 4 GPIO_ACTIVE_HIGH>;
143 +                       linux,default-trigger = "default-off";
144 +               };
145 +
146 +               wan {
147 +                       label = "bcm53xx:green:wan";
148 +                       gpios = <&hc595 5 GPIO_ACTIVE_HIGH>;
149 +                       linux,default-trigger = "default-on";
150 +               };
151 +
152 +               wireless0 {
153 +                       label = "bcm53xx:green:wireless";
154 +                       gpios = <&hc595 6 GPIO_ACTIVE_HIGH>;
155 +                       linux,default-trigger = "default-off";
156 +               };
157 +
158 +               wireless1 {
159 +                       label = "bcm53xx:amber:wireless";
160 +                       gpios = <&hc595 7 GPIO_ACTIVE_HIGH>;
161 +                       linux,default-trigger = "default-off";
162 +               };
163 +       };
164 +
165         gpio-keys {
166                 compatible = "gpio-keys";
167                 #address-cells = <1>;