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