ath79: do not build TP-Link tiny images by default
[oweals/openwrt.git] / target / linux / apm821xx / dts / netgear-wndr4700.dts
1 /*
2  * Device Tree Source for Netgear WNDR4700/WNDR4720 Series
3  *
4  * Copyright 2008 DENX Software Engineering, Stefan Roese <sr@denx.de>
5  *
6  * This file is licensed under the terms of the GNU General Public
7  * License version 2.  This program is licensed "as is" without
8  * any warranty of any kind, whether express or implied.
9  */
10
11 /dts-v1/;
12
13 #include "apm82181.dtsi"
14 #include <dt-bindings/thermal/thermal.h>
15
16 / {
17         model = "Netgear WNDR4700/WNDR4720 Series";
18         compatible = "netgear,wndr4700";
19
20         aliases {
21                 serial0 = &UART0;
22                 led-boot = &status;
23                 led-failsafe = &failsafe;
24                 led-running = &status;
25                 led-upgrade = &status;
26         };
27
28         chosen {
29                 stdout-path = "/plb/opb/serial@ef600300:115200n8";
30         };
31
32         thermal-zones {
33                 cpu_thermal: cpu-thermal {
34                         polling-delay-passive = <10000>; /* milliseconds */
35                         polling-delay = <20000>; /* milliseconds */
36
37                         thermal-sensors = <&temp0 1>;
38
39                         /*
40                          * REVISIT:
41                          *
42                          * Add the <&drive_temp>; sensor there and wire up
43                          * the coefficients = <1 1>; property.
44                          *
45                          * Note: The kernel does not yet support more than
46                          * one sensor (see of_thermal.c's function:
47                          * thermal_of_build_thermal_zon()). Once this is
48                          * implemented.
49                          */
50
51                         trips {
52                                 /*
53                                  * Once the thermal governers are a bit smarter
54                                  * and do hysteresis properly, we can disable
55                                  * the fan when the HDD and CPU has < 39 C.
56                                  */
57                                 cpu_alert0: board-alert0 {
58                                         temperature = <25000>;
59                                         hysteresis = <2000>;
60                                         type = "active";
61                                 };
62
63                                 cpu_alert1: cpu-alert1 {
64                                         temperature = <27000>; /* millicelsius */
65                                         hysteresis = <2000>; /* millicelsius */
66                                         type = "active";
67                                 };
68
69                                 cpu_alert2: cpu-alert2 {
70                                         temperature = <65000>; /* millicelsius */
71                                         hysteresis = <2000>; /* millicelsius */
72                                         type = "active";
73                                 };
74
75                                 cpu_alert3: cpu-alert3 {
76                                         temperature = <70000>; /* millicelsius */
77                                         hysteresis = <2000>; /* millicelsius */
78                                         type = "active";
79                                 };
80
81                                 cpu_alert4: cpu-alert4 {
82                                         temperature = <75000>; /* millicelsius */
83                                         hysteresis = <2000>; /* millicelsius */
84                                         type = "active";
85                                 };
86
87                                 cpu_alert5: cpu-alert5 {
88                                         temperature = <80000>; /* millicelsius */
89                                         hysteresis = <2000>; /* millicelsius */
90                                         type = "active";
91                                 };
92
93                                 cpu_alert6: cpu-alert6 {
94                                         temperature = <85000>; /* millicelsius */
95                                         hysteresis = <2000>; /* millicelsius */
96                                         type = "active";
97                                 };
98
99                                 cpu_crit: cpu-crit {
100                                         temperature = <90000>; /* millicelsius */
101                                         hysteresis = <2000>; /* millicelsius */
102                                         type = "critical";
103                                 };
104                         };
105
106                         cooling-maps {
107                                 map0 {
108                                         trip = <&cpu_alert0>;
109                                         cooling-device = <&fan0 THERMAL_NO_LIMIT 0>;
110                                 };
111
112                                 map1 {
113                                         trip = <&cpu_alert1>;
114                                         cooling-device = <&fan0 1 76>;
115                                 };
116
117                                 map2 {
118                                         trip = <&cpu_alert2>;
119                                         cooling-device = <&fan0 77 101>;
120                                 };
121
122                                 map3 {
123                                         trip = <&cpu_alert3>;
124                                         cooling-device = <&fan0 102 147>;
125                                 };
126
127                                 map4 {
128                                         trip = <&cpu_alert4>;
129                                         cooling-device = <&fan0 148 207>;
130                                 };
131
132                                 map5 {
133                                         trip = <&cpu_alert5>;
134                                         cooling-device = <&fan0 208 231>;
135                                 };
136
137                                 map6 {
138                                         trip = <&cpu_alert6>;
139                                         cooling-device =<&fan0 232 THERMAL_NO_LIMIT>;
140                                 };
141                         };
142                 };
143         };
144 };
145
146 &CRYPTO {
147         status = "okay";
148 };
149
150 &PKA {
151         status = "okay";
152 };
153
154 &TRNG {
155         status = "okay";
156 };
157
158 &SATA1 {
159         status = "okay";
160
161         /*
162          * This drive may have a temperature sensor with a
163          * thermal zone we can use for thermal control of the
164          * chassis temperature using the fan.
165          */
166
167         drive_temp: sata-port@0 {
168                 reg = <0>;
169                 #thermal-sensor-cells = <0>;
170         };
171 };
172
173 &USBOTG0 {
174         status = "okay";
175         dr_mode = "host";
176 };
177
178 &EBC0 {
179         ndfc@1,0 {
180                 status = "okay";
181                 /* 128 MiB Nand Flash */
182                 nand {
183                         partition0,0@0 {
184                                 label = "NAND 128MiB 3,3V 8-bit";
185                                 reg = <0x00000000 0x08000000>;
186                                 read-only;
187                         };
188
189                         partition0,1@0 {
190                                 label = "uboot";
191                                 reg = <0x00000000 0x00180000>;
192                                 read-only;
193                         };
194
195                         partition0,2@180000 {
196                                 label = "device-tree";
197                                 reg = <0x00180000 0x00020000>;
198                         };
199
200                         partition0,3@180000 {
201                                 label = "kernel";
202                                 reg = <0x00180000 0x00380000>;
203                                 /*
204                                  * device-tree is @ 0x00180000 - 0x001fffff
205                                  * kernel starts from 0x200000.
206                                  * this is coded into netgear's u-boot.
207                                  *
208                                  * this partition will also contain a
209                                  * fake/empty rootfs at the end to fool
210                                  * Netgear's uboot rootfs integrety checks.
211                                  */
212                         };
213
214                         partition0,4@500000 {
215                                 label = "ubi";
216                                 reg = <0x00500000 0x014e0000>;
217                         };
218
219                         partition0,5@19e0000 {
220                                 label = "config";
221                                 reg = <0x019e0000 0x00080000>;
222                                 read-only;
223                         };
224
225                         partition0,6@1a60000 {
226                                 label = "pot";
227                                 reg = <0x01a60000 0x00080000>;
228                                 read-only;
229                         };
230
231                         partition0,7@1ae0000 {
232                                 label = "traffic_meter";
233                                 reg = <0x01ae0000 0x00300000>;
234                                 read-only;
235                         };
236
237                         partition0,8@1de0000 {
238                                 label = "language";
239                                 reg = <0x01de0000 0x001c0000>;
240                                 read-only;
241                         };
242
243                         partition0,9@1fa0000 {
244                                 label = "ecos";
245                                 reg = <0x01fa0000 0x06020000>;
246                                 read-only;
247                         };
248
249                         partition0,10@7fc0000 {
250                                 label = "wifi_data";
251                                 reg = <0x07fc0000 0x00040000>;
252                                 read-only;
253                         };
254
255                         partition0,11@180000 {
256                                 label = "firmware";
257                                 reg = <0x00180000 0x01860000>;
258                                 read-only;
259                         };
260                 };
261         };
262 };
263
264 &UART0 {
265         status = "okay";
266 };
267
268 &GPIO0 {
269         status = "okay";
270 };
271
272 &IIC0 {
273         status = "okay";
274
275         fan0: fan@1b {
276                 compatible = "microchip,tc654";
277                 reg = <0x1b>;
278                 cooling-min-level = <0>;
279                 cooling-max-level = <255>;
280                 #cooling-cells = <2>; /* min followed by max */
281
282                 gpios = <&GPIO0 16 GPIO_ACTIVE_LOW>; /* fan status */
283                 alarm-gpios = <&GPIO0 5 GPIO_ACTIVE_LOW>; /* fault */
284                 interrupt-parent = <&UIC3>;
285                 interrupts = <0x16 IRQ_TYPE_EDGE_FALLING>; /* fault */
286         };
287
288         temp0: temp@4d {
289                 compatible = "gmt,g781";
290                 reg = <0x4d>;
291                 #thermal-sensor-cells = <1>;
292
293                 /*
294                  * The LM90 has two sensors:
295                  *   temp0 -> internal to LM90
296                  *   temp1 -> external NTC near CPU
297                  */
298         };
299 };
300
301
302 &EMAC0 {
303         status = "okay";
304         phy-handle = <&phy0>;
305         fifo-entry-size = <10>;
306
307         mdio {
308                 #address-cells = <1>;
309                 #size-cells = <0>;
310                 phy0: ethernet-phy@0 {
311                         device_type = "ethernet-phy";
312                         reg = <0>;
313                         qca,mib-poll-interval = <500>;
314
315                         qca,ar8327-initvals = <
316                                 0x0010 0x40000000
317                                 0x0624 0x007f7f7f
318                                 0x0004 0x07a00000       /* PAD0_MODE */
319                                 0x000c 0x01000000       /* PAD6_MODE */
320                                 0x007c 0x0000007e       /* PORT0_STATUS */
321                         >;
322                 };
323         };
324 };
325
326 &POB0 {
327
328         keys {
329                 compatible = "gpio-keys";
330
331                 reset {
332                         label = "Reset button";
333                         gpios = <&GPIO0 15 GPIO_ACTIVE_LOW>;
334                         linux,code = <KEY_RESTART>;
335                         interrupt-parent = <&UIC1>;
336                         interrupts = <0x14 IRQ_TYPE_EDGE_FALLING>;
337                         debounce-interval = <60>;
338                 };
339
340                 backup_hd {
341                         label = "Backup HD button";
342                         gpios = <&GPIO0 19 GPIO_ACTIVE_LOW>;
343                         linux,code = <BTN_0>;
344                         interrupt-parent = <&UIC1>;
345                         interrupts = <0x1e IRQ_TYPE_EDGE_FALLING>;
346                         debounce-interval = <60>;
347                 };
348
349                 rfkill {
350                         label = "RFKILL button";
351                         gpios = <&GPIO0 20 GPIO_ACTIVE_LOW>;
352                         linux,code = <KEY_RFKILL>;
353                         interrupt-parent = <&UIC1>;
354                         interrupts = <0x1f IRQ_TYPE_EDGE_FALLING>;
355                         debounce-interval = <60>;
356                 };
357
358                 wps {
359                         label = "WPS button";
360                         gpios = <&GPIO0 23 GPIO_ACTIVE_LOW>;
361                         linux,code = <KEY_WPS_BUTTON>;
362                         interrupt-parent = <&UIC2>;
363                         interrupts = <0x19 IRQ_TYPE_EDGE_FALLING>;
364                         debounce-interval = <60>;
365                 };
366         };
367
368         leds {
369                 compatible = "gpio-leds";
370                 status: power-green {
371                         label = "wndr4700:green:power";
372                         gpios = <&GPIO0 8 GPIO_ACTIVE_HIGH>;
373                 };
374
375                 failsafe: power-orange {
376                         label = "wndr4700:orange:power";
377                         gpios = <&GPIO0 9 GPIO_ACTIVE_LOW>;
378                         linux,default-trigger = "panic";
379                 };
380
381                 usb-blue {
382                         label = "wndr4700:blue:usb";
383                         gpios = <&GPIO0 10 GPIO_ACTIVE_HIGH>;
384                 };
385
386                 logo-white {
387                         label = "wndr4700:white:logo";
388                         gpios = <&GPIO0 11 GPIO_ACTIVE_HIGH>;
389                 };
390
391                 wan-yellow {
392                         label = "wndr4700:yellow:wan";
393                         gpios = <&GPIO0 3 GPIO_ACTIVE_HIGH>;
394                 };
395
396                 wan-green {
397                         label = "wndr4700:green:wan";
398                         gpios = <&GPIO0 12 GPIO_ACTIVE_HIGH>;
399                 };
400
401                 hd-green {
402                         label = "wndr4700:green:hd";
403                         gpios = <&GPIO0 14 GPIO_ACTIVE_HIGH>;
404                         linux,default-trigger = "disk-activity";
405                 };
406
407                 hd-red {
408                         label = "wndr4700:red:hd";
409                         gpios = <&GPIO0 17 GPIO_ACTIVE_HIGH>;
410                 };
411
412                 wlan-blue {
413                         label = "wndr4700:blue:wlan";
414                         gpios = <&GPIO0 18 GPIO_ACTIVE_HIGH>;
415                 };
416         };
417 };
418
419 &PCIE0 {
420         status = "okay";
421 };
422
423 &MSI {
424         status = "okay";
425 };