ramips: convert to new LED color/function format where possible
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7621_buffalo_wsr-600dhp.dts
1 #include "mt7621.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5 #include <dt-bindings/leds/common.h>
6
7 / {
8 compatible = "buffalo,wsr-600dhp", "mediatek,mt7621-soc";
9 model = "Buffalo WSR-600DHP";
10
11 aliases {
12 led-boot = &led_power;
13 led-failsafe = &led_power;
14 led-running = &led_power;
15 led-upgrade = &led_power;
16 };
17
18 leds {
19 compatible = "gpio-leds";
20
21 led_power: power {
22 function = LED_FUNCTION_POWER;
23 color = <LED_COLOR_ID_GREEN>;
24 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
25 };
26
27 wifi_o {
28 label = "orange:wifi";
29 gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
30 };
31
32 diag {
33 label = "orange:diag";
34 gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
35 };
36
37 wifi_g {
38 label = "green:wifi";
39 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
40 };
41
42 router_o {
43 label = "orange:router";
44 gpios = <&gpio 45 GPIO_ACTIVE_LOW>;
45 };
46
47 router_g {
48 label = "green:router";
49 gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
50 };
51
52 internet_o {
53 label = "orange:internet";
54 gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
55 };
56
57 internet_g {
58 label = "green:internet";
59 gpios = <&gpio 48 GPIO_ACTIVE_LOW>;
60 };
61 };
62
63 keys {
64 compatible = "gpio-keys";
65
66 power {
67 label = "power";
68 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
69 linux,code = <KEY_POWER>;
70 };
71
72 reset {
73 label = "reset";
74 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
75 linux,code = <KEY_RESTART>;
76 };
77
78 aoss {
79 label = "aoss";
80 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
81 linux,code = <KEY_WPS_BUTTON>;
82 };
83
84 auto {
85 label = "mode";
86 gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
87 linux,code = <BTN_0>;
88 linux,input-type = <EV_SW>;
89 };
90
91 ap {
92 label = "ap";
93 gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
94 linux,code = <BTN_0>;
95 linux,input-type = <EV_SW>;
96 };
97
98 router {
99 label = "router";
100 gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
101 linux,code = <BTN_0>;
102 linux,input-type = <EV_SW>;
103 };
104 };
105
106 gpio_poweroff {
107 compatible = "gpio-poweroff";
108 gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
109 };
110 };
111
112 &spi0 {
113 status = "okay";
114
115 flash@0 {
116 compatible = "jedec,spi-nor";
117 reg = <0>;
118 spi-max-frequency = <10000000>;
119
120 partitions {
121 compatible = "fixed-partitions";
122 #address-cells = <1>;
123 #size-cells = <1>;
124
125 partition@0 {
126 label = "u-boot";
127 reg = <0x0 0x30000>;
128 read-only;
129 };
130
131 partition@30000 {
132 label = "u-boot-env";
133 reg = <0x30000 0x10000>;
134 read-only;
135 };
136
137 factory: partition@40000 {
138 label = "factory";
139 reg = <0x40000 0x10000>;
140 read-only;
141
142 nvmem-layout {
143 compatible = "fixed-layout";
144 #address-cells = <1>;
145 #size-cells = <1>;
146
147 eeprom_factory_0: eeprom@0 {
148 reg = <0x0 0x400>;
149 };
150
151 eeprom_factory_8000: eeprom@8000 {
152 reg = <0x8000 0x200>;
153 };
154
155 macaddr_factory_4: macaddr@4 {
156 reg = <0x4 0x6>;
157 };
158 };
159 };
160
161 partition@50000 {
162 compatible = "denx,uimage";
163 label = "firmware";
164 reg = <0x50000 0xfb0000>;
165 };
166 };
167 };
168 };
169
170 &state_default {
171 gpio {
172 groups = "i2c", "uart2", "uart3", "sdhci";
173 function = "gpio";
174 };
175 };
176
177 &pcie {
178 status = "okay";
179 };
180
181 &pcie0 {
182 rt5592@0,0 {
183 reg = <0x0000 0 0 0 0>;
184 nvmem-cells = <&eeprom_factory_8000>;
185 nvmem-cell-names = "eeprom";
186 };
187 };
188
189 &pcie1 {
190 mt76@0,0 {
191 reg = <0x0000 0 0 0 0>;
192 nvmem-cells = <&eeprom_factory_0>;
193 nvmem-cell-names = "eeprom";
194 };
195 };
196
197 &gmac0 {
198 nvmem-cells = <&macaddr_factory_4>;
199 nvmem-cell-names = "mac-address";
200 };
201
202 &gmac1 {
203 status = "okay";
204 label = "wan";
205 phy-handle = <&ethphy4>;
206
207 nvmem-cells = <&macaddr_factory_4>;
208 nvmem-cell-names = "mac-address";
209 };
210
211 &mdio {
212 ethphy4: ethernet-phy@4 {
213 reg = <4>;
214 };
215 };
216
217 &switch0 {
218 ports {
219 port@0 {
220 status = "okay";
221 label = "lan1";
222 };
223
224 port@1 {
225 status = "okay";
226 label = "lan2";
227 };
228
229 port@2 {
230 status = "okay";
231 label = "lan3";
232 };
233
234 port@3 {
235 status = "okay";
236 label = "lan4";
237 };
238 };
239 };
240
241 &xhci {
242 status = "disabled";
243 };