apm821xx: remove overlapping partitions
[openwrt/staging/dedeckeh.git] / target / linux / apm821xx / dts / netgear-wndr4700.dts
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3 * Device Tree Source for Netgear WNDR4700/WNDR4720 Series
4 *
5 * Copyright 2008 DENX Software Engineering, Stefan Roese <sr@denx.de>
6 */
7
8 /dts-v1/;
9
10 #include <dt-bindings/thermal/thermal.h>
11 #include <dt-bindings/leds/common.h>
12 #include "apm82181.dtsi"
13
14 / {
15 model = "Netgear WNDR4700/WNDR4720 Series";
16 compatible = "netgear,wndr4700", "apm,bluestone";
17
18 aliases {
19 serial0 = &UART0;
20 };
21
22 chosen {
23 stdout-path = "/plb/opb/serial@ef600300:115200n8";
24 };
25
26 thermal-zones {
27 cpu_thermal: cpu-thermal {
28 polling-delay-passive = <10000>; /* milliseconds */
29 polling-delay = <20000>; /* milliseconds */
30
31 thermal-sensors = <&temp0 1>;
32
33 /*
34 * REVISIT:
35 *
36 * Add the <&drive_temp>; sensor there and wire up
37 * the coefficients = <1 1>; property.
38 *
39 * Note: The kernel does not yet support more than
40 * one sensor (see of_thermal.c's function:
41 * thermal_of_build_thermal_zon()). Once this is
42 * implemented.
43 */
44
45 trips {
46 /*
47 * Once the thermal governers are a bit smarter
48 * and do hysteresis properly, we can disable
49 * the fan when the HDD and CPU has < 39 C.
50 */
51 cpu_alert0: board-alert0 {
52 temperature = <25000>;
53 hysteresis = <2000>;
54 type = "active";
55 };
56
57 cpu_alert1: cpu-alert1 {
58 temperature = <27000>; /* millicelsius */
59 hysteresis = <2000>; /* millicelsius */
60 type = "active";
61 };
62
63 cpu_alert2: cpu-alert2 {
64 temperature = <65000>; /* millicelsius */
65 hysteresis = <2000>; /* millicelsius */
66 type = "active";
67 };
68
69 cpu_alert3: cpu-alert3 {
70 temperature = <70000>; /* millicelsius */
71 hysteresis = <2000>; /* millicelsius */
72 type = "active";
73 };
74
75 cpu_alert4: cpu-alert4 {
76 temperature = <75000>; /* millicelsius */
77 hysteresis = <2000>; /* millicelsius */
78 type = "active";
79 };
80
81 cpu_alert5: cpu-alert5 {
82 temperature = <80000>; /* millicelsius */
83 hysteresis = <2000>; /* millicelsius */
84 type = "active";
85 };
86
87 cpu_alert6: cpu-alert6 {
88 temperature = <85000>; /* millicelsius */
89 hysteresis = <2000>; /* millicelsius */
90 type = "active";
91 };
92
93 cpu_crit: cpu-crit {
94 temperature = <90000>; /* millicelsius */
95 hysteresis = <2000>; /* millicelsius */
96 type = "critical";
97 };
98 };
99
100 cooling-maps {
101 map0 {
102 trip = <&cpu_alert0>;
103 cooling-device = <&fan0 THERMAL_NO_LIMIT 0>;
104 };
105
106 map1 {
107 trip = <&cpu_alert1>;
108 cooling-device = <&fan0 1 76>;
109 };
110
111 map2 {
112 trip = <&cpu_alert2>;
113 cooling-device = <&fan0 77 101>;
114 };
115
116 map3 {
117 trip = <&cpu_alert3>;
118 cooling-device = <&fan0 102 147>;
119 };
120
121 map4 {
122 trip = <&cpu_alert4>;
123 cooling-device = <&fan0 148 207>;
124 };
125
126 map5 {
127 trip = <&cpu_alert5>;
128 cooling-device = <&fan0 208 231>;
129 };
130
131 map6 {
132 trip = <&cpu_alert6>;
133 cooling-device =<&fan0 232 THERMAL_NO_LIMIT>;
134 };
135 };
136 };
137 };
138 };
139
140 &CRYPTO {
141 status = "okay";
142 };
143
144 &PKA {
145 status = "okay";
146 };
147
148 &TRNG {
149 status = "okay";
150 };
151
152 &SATA1 {
153 status = "okay";
154
155 /*
156 * This drive may have a temperature sensor with a
157 * thermal zone we can use for thermal control of the
158 * chassis temperature using the fan.
159 */
160
161 drive_temp: sata-port@0 {
162 reg = <0>;
163 #thermal-sensor-cells = <0>;
164 };
165 };
166
167 &USBOTG0 {
168 status = "okay";
169 dr_mode = "host";
170 };
171
172 &EBC0 {
173 ndfc: ndfc@1,0 {
174
175 status = "okay";
176 /* 128 MiB Nand Flash */
177 nand {
178 nand-is-boot-medium;
179
180 partition@0 {
181 label = "uboot";
182 reg = <0x00000000 0x00180000>;
183 read-only;
184 };
185
186 partition@180000 {
187 label = "kernel";
188 reg = <0x00180000 0x00380000>;
189 /*
190 * device-tree is @ 0x00180000 - 0x001fffff
191 * kernel starts from 0x200000.
192 * this is coded into netgear's u-boot.
193 *
194 * this partition will also contain a
195 * fake/empty rootfs at the end to fool
196 * Netgear's uboot rootfs integrety checks.
197 */
198 };
199
200 partition@500000 {
201 label = "ubi";
202 reg = <0x00500000 0x014e0000>;
203 };
204
205
206 /*
207 * Netgear's u-boot in the fw_recovery mode (can be
208 * triggered by holding the reset button, or if
209 * "bootm" fails) will not flash past this point
210 * (= 0x19E0000).
211 */
212
213 partition@19e0000 {
214 label = "config";
215 reg = <0x019e0000 0x00080000>;
216 read-only;
217 };
218
219 partition@1a60000 {
220 label = "pot";
221 reg = <0x01a60000 0x00080000>;
222 read-only;
223 };
224
225 partition@1ae0000 {
226 label = "traffic_meter";
227 reg = <0x01ae0000 0x00300000>;
228 read-only;
229 };
230
231 partition@1de0000 {
232 label = "language";
233 reg = <0x01de0000 0x001c0000>;
234 read-only;
235 };
236
237 partition@1fa0000 {
238 label = "ecos";
239 reg = <0x01fa0000 0x06020000>;
240 read-only;
241 };
242
243 partition@7fc0000 {
244 label = "wifi_data";
245 reg = <0x07fc0000 0x00040000>;
246 read-only;
247 };
248 };
249 };
250 };
251
252 &UART0 {
253 status = "okay";
254 };
255
256 &GPIO0 {
257 status = "okay";
258 };
259
260 &IIC0 {
261 status = "okay";
262
263 fan0: fan@1b {
264 compatible = "microchip,tc654";
265 reg = <0x1b>;
266 cooling-min-level = <0>;
267 cooling-max-level = <255>;
268 #cooling-cells = <2>; /* min followed by max */
269
270 gpios = <&GPIO0 16 GPIO_ACTIVE_LOW>; /* fan status */
271 alarm-gpios = <&GPIO0 5 GPIO_ACTIVE_LOW>; /* fault */
272 interrupt-parent = <&UIC3>;
273 interrupts = <0x16 IRQ_TYPE_EDGE_FALLING>; /* fault */
274 };
275
276 temp0: temp@4d {
277 compatible = "gmt,g781";
278 reg = <0x4d>;
279 #thermal-sensor-cells = <1>;
280
281 /*
282 * The LM90 has two sensors:
283 * temp0 -> internal to LM90
284 * temp1 -> external NTC near CPU
285 */
286 };
287 };
288
289
290 &EMAC0 {
291 status = "okay";
292 phy-handle = <&phy0>;
293 fifo-entry-size = <10>;
294
295 mdio {
296 #address-cells = <1>;
297 #size-cells = <0>;
298 phy0: ethernet-phy@0 {
299 device_type = "ethernet-phy";
300 reg = <0>;
301 qca,mib-poll-interval = <500>;
302
303 qca,ar8327-initvals = <
304 0x0010 0x40000000
305 0x0624 0x007f7f7f
306 0x0004 0x07a00000 /* PAD0_MODE */
307 0x000c 0x01000000 /* PAD6_MODE */
308 0x007c 0x0000007e /* PORT0_STATUS */
309 >;
310 };
311 };
312 };
313
314 &POB0 {
315
316 keys {
317 compatible = "gpio-keys";
318
319 reset {
320 label = "Reset button";
321 gpios = <&GPIO0 15 GPIO_ACTIVE_LOW>;
322 linux,code = <KEY_RESTART>;
323 interrupt-parent = <&UIC1>;
324 interrupts = <0x14 IRQ_TYPE_EDGE_FALLING>;
325 debounce-interval = <60>;
326 };
327
328 backup_hd {
329 label = "Backup HD button";
330 gpios = <&GPIO0 19 GPIO_ACTIVE_LOW>;
331 linux,code = <BTN_0>;
332 interrupt-parent = <&UIC1>;
333 interrupts = <0x1e IRQ_TYPE_EDGE_FALLING>;
334 debounce-interval = <60>;
335 };
336
337 rfkill {
338 label = "RFKILL button";
339 gpios = <&GPIO0 20 GPIO_ACTIVE_LOW>;
340 linux,code = <KEY_RFKILL>;
341 interrupt-parent = <&UIC1>;
342 interrupts = <0x1f IRQ_TYPE_EDGE_FALLING>;
343 debounce-interval = <60>;
344 };
345
346 wps {
347 label = "WPS button";
348 gpios = <&GPIO0 23 GPIO_ACTIVE_LOW>;
349 linux,code = <KEY_WPS_BUTTON>;
350 interrupt-parent = <&UIC2>;
351 interrupts = <0x19 IRQ_TYPE_EDGE_FALLING>;
352 debounce-interval = <60>;
353 };
354 };
355
356 leds {
357 compatible = "gpio-leds";
358
359 led-0 {
360 color = <LED_COLOR_ID_GREEN>;
361 function = LED_FUNCTION_POWER;
362 gpios = <&GPIO0 8 GPIO_ACTIVE_HIGH>;
363 };
364
365 led-1 {
366 color = <LED_COLOR_ID_AMBER>;
367 function = LED_FUNCTION_FAULT;
368 gpios = <&GPIO0 9 GPIO_ACTIVE_LOW>;
369 panic-indicator;
370 };
371
372 led-2 {
373 color = <LED_COLOR_ID_BLUE>;
374 function = LED_FUNCTION_USB;
375 gpios = <&GPIO0 10 GPIO_ACTIVE_HIGH>;
376 trigger-sources = <&usb2_port 1>, <&usb2_port 2>,
377 <&usb3_port 1>, <&usb3_port 2>;
378 linux,default-trigger = "usbport";
379 };
380
381 led-3 {
382 color = <LED_COLOR_ID_WHITE>;
383 function = LED_FUNCTION_INDICATOR;
384 gpios = <&GPIO0 11 GPIO_ACTIVE_HIGH>;
385 };
386
387 led-4 {
388 color = <LED_COLOR_ID_YELLOW>;
389 function = LED_FUNCTION_WAN;
390 gpios = <&GPIO0 3 GPIO_ACTIVE_HIGH>;
391 };
392
393 led-5 {
394 color = <LED_COLOR_ID_GREEN>;
395 function = LED_FUNCTION_WAN;
396 gpios = <&GPIO0 12 GPIO_ACTIVE_HIGH>;
397 };
398
399 led-6 {
400 color = <LED_COLOR_ID_GREEN>;
401 function = LED_FUNCTION_DISK;
402 gpios = <&GPIO0 14 GPIO_ACTIVE_HIGH>;
403 linux,default-trigger = "disk-activity";
404 };
405
406 led-7 {
407 color = <LED_COLOR_ID_RED>;
408 function = LED_FUNCTION_DISK_ERR;
409 gpios = <&GPIO0 17 GPIO_ACTIVE_HIGH>;
410 };
411
412 led-8 {
413 color = <LED_COLOR_ID_BLUE>;
414 function = LED_FUNCTION_WLAN;
415 gpios = <&GPIO0 18 GPIO_ACTIVE_HIGH>;
416 linux,default-trigger = "phy0tpt";
417 };
418 };
419 };
420
421 &PCIE0 {
422 status = "okay";
423
424 /*
425 * relevant lspci topology:
426 *
427 * -+-[0000:40]---00.0-[41-7f]----00.0-[42-45]--+-02.0-[43]----00.0
428 * +-03.0-[44]----00.0
429 * \-04.0-[45]----00.0
430 *
431 */
432
433 bridge@64,0 {
434 reg = <0x00400000 0 0 0 0>;
435 #address-cells = <3>;
436 #size-cells = <2>;
437 ranges;
438
439 bridge@65,0 {
440 /* IDT PES4T4 PCI Express Switch */
441 compatible = "pci111d,803a";
442 reg = <0x00410000 0 0 0 0>;
443 #address-cells = <3>;
444 #size-cells = <2>;
445 ranges;
446
447 bridge@66,2 {
448 compatible = "pci111d,803a";
449 reg = <0x00421000 0 0 0 0>;
450 #address-cells = <3>;
451 #size-cells = <2>;
452 ranges;
453
454 wifi0: wifi@67,0 {
455 /* Atheros AR9380 5GHz */
456 compatible = "pci168c,0030";
457 reg = <0x00430000 0 0 0 0>;
458 interrupts = <3>; /* INTC */
459 qca,no-eeprom;
460 /* wifi CAL & MAC is stored in nvram */
461
462 /*
463 * Because this was such a pain.
464 * Here's the full device path:
465 * pci0000:40/0000:40:00.0/0000:41:00.0/0000:42:02.0/0000:43:00.0
466 */
467 };
468 };
469
470 bridge@66,3 {
471 compatible = "pci111d,803a";
472 reg = <0x00421800 0 0 0 0>;
473 #address-cells = <3>;
474 #size-cells = <2>;
475 ranges;
476
477 wifi1: wifi@68,0 {
478 /* Atheros AR9381 2.4GHz */
479 compatible = "pci168c,0033";
480 reg = <0x00440000 0 0 0 0>;
481 interrupts = <4>; /* INTD */
482 qca,no-eeprom;
483 /* wifi CAL & MAC is stored in nvram */
484 };
485 };
486
487 bridge@66,4 {
488 compatible = "pci111d,803a";
489 reg = <0x00422000 0 0 0 0>;
490 #address-cells = <3>;
491 #size-cells = <2>;
492 ranges;
493
494 usb1: usb@69,0 {
495 /* Renesas uPD720202 */
496 compatible = "pci1912,0015";
497 reg = <0x00450000 0 0 0 0>;
498 interrupts = <1>; /* INTA */
499
500 #address-cells = <1>;
501 #size-cells = <0>;
502
503 usb2_port: port@1 {
504 reg = <1>;
505 #trigger-source-cells = <1>;
506 };
507
508 usb3_port: port@2 {
509 reg = <2>;
510 #trigger-source-cells = <1>;
511 };
512 };
513 };
514 };
515 };
516 };
517
518 &MSI {
519 status = "okay";
520 };