ramips: add support for TP-Link RE200 v1
[oweals/openwrt.git] / target / linux / ramips / dts / rt3883.dtsi
1 / {
2         #address-cells = <1>;
3         #size-cells = <1>;
4         compatible = "ralink,rt3883-soc";
5
6         cpus {
7                 #address-cells = <1>;
8                 #size-cells = <0>;
9
10                 cpu@0 {
11                         compatible = "mips,mips74Kc";
12                         reg = <0>;
13                 };
14         };
15
16         chosen {
17                 bootargs = "console=ttyS0,57600";
18         };
19
20         aliases {
21                 spi0 = &spi0;
22                 spi1 = &spi1;
23                 serial0 = &uartlite;
24         };
25
26         cpuintc: cpuintc {
27                 #address-cells = <0>;
28                 #interrupt-cells = <1>;
29                 interrupt-controller;
30                 compatible = "mti,cpu-interrupt-controller";
31         };
32
33         palmbus: palmbus@10000000 {
34                 compatible = "palmbus";
35                 reg = <0x10000000 0x200000>;
36                 ranges = <0x0 0x10000000 0x1FFFFF>;
37
38                 #address-cells = <1>;
39                 #size-cells = <1>;
40
41                 sysc: sysc@0 {
42                         compatible = "ralink,rt3883-sysc", "ralink,rt3050-sysc", "syscon";
43                         reg = <0x0 0x100>;
44                 };
45
46                 timer: timer@100 {
47                         compatible = "ralink,rt3883-timer", "ralink,rt2880-timer";
48                         reg = <0x100 0x20>;
49
50                         interrupt-parent = <&intc>;
51                         interrupts = <1>;
52                 };
53
54                 watchdog: watchdog@120 {
55                         compatible = "ralink,rt3883-wdt", "ralink,rt2880-wdt";
56                         reg = <0x120 0x10>;
57
58                         resets = <&rstctrl 8>;
59                         reset-names = "wdt";
60
61                         interrupt-parent = <&intc>;
62                         interrupts = <1>;
63                 };
64
65                 intc: intc@200 {
66                         compatible = "ralink,rt3883-intc", "ralink,rt2880-intc";
67                         reg = <0x200 0x100>;
68
69                         resets = <&rstctrl 19>;
70                         reset-names = "intc";
71
72                         interrupt-controller;
73                         #interrupt-cells = <1>;
74
75                         interrupt-parent = <&cpuintc>;
76                         interrupts = <2>;
77                 };
78
79                 memc: memc@300 {
80                         compatible = "ralink,rt3883-memc", "ralink,rt3050-memc";
81                         reg = <0x300 0x100>;
82
83                         resets = <&rstctrl 20>;
84                         reset-names = "mc";
85
86                         interrupt-parent = <&intc>;
87                         interrupts = <3>;
88                 };
89
90                 uart: uart@500 {
91                         compatible = "ralink,rt3883-uart", "ralink,rt2880-uart", "ns16550a";
92                         reg = <0x500 0x100>;
93
94                         resets = <&rstctrl 12>;
95                         reset-names = "uart";
96
97                         interrupt-parent = <&intc>;
98                         interrupts = <5>;
99
100                         reg-shift = <2>;
101
102                         status = "disabled";
103                 };
104
105                 gpio0: gpio@600 {
106                         compatible = "ralink,rt3883-gpio", "ralink,rt2880-gpio";
107                         reg = <0x600 0x34>;
108
109                         resets = <&rstctrl 13>;
110                         reset-names = "pio";
111
112                         interrupt-parent = <&intc>;
113                         interrupts = <6>;
114
115                         gpio-controller;
116                         #gpio-cells = <2>;
117
118                         ralink,gpio-base = <0>;
119                         ralink,nr-gpio = <24>;
120                         ralink,register-map = [ 00 04 08 0c
121                                                 20 24 28 2c
122                                                 30 34 ];
123                 };
124
125                 gpio1: gpio@638 {
126                         compatible = "ralink,rt3883-gpio", "ralink,rt2880-gpio";
127                         reg = <0x638 0x24>;
128
129                         gpio-controller;
130                         #gpio-cells = <2>;
131
132                         ralink,gpio-base = <24>;
133                         ralink,nr-gpio = <16>;
134                         ralink,register-map = [ 00 04 08 0c
135                                                 10 14 18 1c
136                                                 20 24 ];
137
138                         status = "disabled";
139                 };
140
141                 gpio2: gpio@660 {
142                         compatible = "ralink,rt3883-gpio", "ralink,rt2880-gpio";
143                         reg = <0x660 0x24>;
144
145                         gpio-controller;
146                         #gpio-cells = <2>;
147
148                         ralink,gpio-base = <40>;
149                         ralink,nr-gpio = <32>;
150                         ralink,register-map = [ 00 04 08 0c
151                                                 10 14 18 1c
152                                                 20 24 ];
153
154                         status = "disabled";
155                 };
156
157                 gpio3: gpio@688 {
158                         compatible = "ralink,rt3883-gpio", "ralink,rt2880-gpio";
159                         reg = <0x688 0x24>;
160
161                         gpio-controller;
162                         #gpio-cells = <2>;
163
164                         ralink,gpio-base = <72>;
165                         ralink,nr-gpio = <24>;
166                         ralink,register-map = [ 00 04 08 0c
167                                                 10 14 18 1c
168                                                 20 24 ];
169
170                         status = "disabled";
171                 };
172
173                 i2c@900 {
174                         compatible = "ralink,rt2880-i2c";
175                         reg = <0x900 0x100>;
176
177                         resets = <&rstctrl 16>;
178                         reset-names = "i2c";
179
180                         #address-cells = <1>;
181                         #size-cells = <0>;
182
183                         status = "disabled";
184
185                         pinctrl-names = "default";
186                         pinctrl-0 = <&i2c_pins>;
187                 };
188
189                 i2s@a00 {
190                         compatible = "ralink,rt3883-i2s";
191                         reg = <0xa00 0x100>;
192
193                         resets = <&rstctrl 17>;
194                         reset-names = "i2s";
195
196                         interrupt-parent = <&intc>;
197                         interrupts = <10>;
198
199                         txdma-req = <2>;
200                         rxdma-req = <3>;
201
202                         dmas = <&gdma 4>,
203                                 <&gdma 6>;
204                         dma-names = "tx", "rx";
205
206                         status = "disabled";
207                 };
208
209                 spi0: spi@b00 {
210                         compatible = "ralink,rt3883-spi", "ralink,rt2880-spi";
211                         reg = <0xb00 0x40>;
212                         #address-cells = <1>;
213                         #size-cells = <0>;
214
215                         resets = <&rstctrl 18>;
216                         reset-names = "spi";
217
218                         pinctrl-names = "default";
219                         pinctrl-0 = <&spi_pins>;
220
221                         status = "disabled";
222                 };
223
224                 spi1: spi@b40 {
225                         compatible = "ralink,rt3883-spi", "ralink,rt2880-spi";
226                         reg = <0xb40 0x60>;
227                         #address-cells = <1>;
228                         #size-cells = <0>;
229
230                         resets = <&rstctrl 18>;
231                         reset-names = "spi";
232
233                         pinctrl-names = "default";
234                         pinctrl-0 = <&spi_cs1>;
235
236                         status = "disabled";
237                 };
238
239                 uartlite: uartlite@c00 {
240                         compatible = "ralink,rt3883-uart", "ralink,rt2880-uart", "ns16550a";
241                         reg = <0xc00 0x100>;
242
243                         resets = <&rstctrl 19>;
244                         reset-names = "uartl";
245
246                         interrupt-parent = <&intc>;
247                         interrupts = <12>;
248
249                         reg-shift = <2>;
250
251                         pinctrl-names = "default";
252                         pinctrl-0 = <&uartlite_pins>;
253                 };
254
255                 gdma: gdma@2800 {
256                         compatible = "ralink,rt3883-gdma";
257                         reg = <0x2800 0x800>;
258
259                         resets = <&rstctrl 14>;
260                         reset-names = "dma";
261
262                         interrupt-parent = <&intc>;
263                         interrupts = <7>;
264
265                         #dma-cells = <1>;
266                         #dma-channels = <16>;
267                         #dma-requests = <16>;
268
269                         status = "disabled";
270                 };
271         };
272
273         pinctrl: pinctrl {
274                 compatible = "ralink,rt2880-pinmux";
275
276                 pinctrl-names = "default";
277                 pinctrl-0 = <&state_default>;
278
279                 state_default: pinctrl0 {
280                 };
281
282                 i2c_pins: i2c_pins {
283                         i2c_pins {
284                                 ralink,group = "i2c";
285                                 ralink,function = "i2c";
286                         };
287                 };
288
289                 spi_pins: spi_pins {
290                         spi_pins {
291                                 ralink,group = "spi";
292                                 ralink,function = "spi";
293                         };
294                 };
295
296                 spi_cs1: spi1 {
297                         spi1 {
298                                 ralink,group = "pci";
299                                 ralink,function = "pci-func";
300                         };
301                 };
302
303                 uartlite_pins: uartlite {
304                         uart {
305                                 ralink,group = "uartlite";
306                                 ralink,function = "uartlite";
307                         };
308                 };
309
310                 pci_pins: pci {
311                         pci {
312                                 ralink,group = "pci";
313                                 ralink,function = "pci-fnc";
314                         };
315                 };
316         };
317
318         ethernet: ethernet@10100000 {
319                 compatible = "ralink,rt3883-eth";
320                 #address-cells = <1>;
321                 #size-cells = <0>;
322                 reg = <0x10100000 0x10000>;
323
324                 resets = <&rstctrl 21>;
325                 reset-names = "fe";
326
327                 interrupt-parent = <&cpuintc>;
328                 interrupts = <5>;
329
330                 port@0 {
331                         compatible = "ralink,rt3883-port", "mediatek,eth-port";
332                         reg = <0>;
333                 };
334
335                 mdio-bus {
336                         #address-cells = <1>;
337                         #size-cells = <0>;
338
339                         status = "disabled";
340                 };
341         };
342
343         rstctrl: rstctrl {
344                 compatible = "ralink,rt3883-reset", "ralink,rt2880-reset";
345                 #reset-cells = <1>;
346         };
347
348         clkctrl: clkctrl {
349                 compatible = "ralink,rt2880-clock";
350                 #clock-cells = <1>;
351         };
352
353         pci: pci@10140000 {
354                 compatible = "ralink,rt3883-pci";
355                 reg = <0x10140000 0x20000>;
356                 #address-cells = <1>;
357                 #size-cells = <1>;
358                 ranges; /* direct mapping */
359
360                 pinctrl-names = "default";
361                 pinctrl-0 = <&pci_pins>;
362
363                 status = "disabled";
364
365                 pciintc: interrupt-controller {
366                         interrupt-controller;
367                         #address-cells = <0>;
368                         #interrupt-cells = <1>;
369
370                         interrupt-parent = <&cpuintc>;
371                         interrupts = <4>;
372                 };
373
374                 pci@0 {
375                         #address-cells = <3>;
376                         #size-cells = <2>;
377                         #interrupt-cells = <1>;
378
379                         device_type = "pci";
380
381                         bus-range = <0 255>;
382                         ranges = <
383                                 0x02000000 0 0x00000000 0x20000000 0 0x10000000 /* pci memory */
384                                 0x01000000 0 0x00000000 0x10160000 0 0x00010000 /* io space */
385                         >;
386
387                         interrupt-map-mask = <0xf800 0 0 7>;
388                         interrupt-map = <
389                                 /* IDSEL 17 */
390                                 0x8800 0 0 1 &pciintc 18
391                                 0x8800 0 0 2 &pciintc 18
392                                 0x8800 0 0 3 &pciintc 18
393                                 0x8800 0 0 4 &pciintc 18
394                                 /* IDSEL 18 */
395                                 0x9000 0 0 1 &pciintc 19
396                                 0x9000 0 0 2 &pciintc 19
397                                 0x9000 0 0 3 &pciintc 19
398                                 0x9000 0 0 4 &pciintc 19
399                         >;
400
401                         pci1: pci@1 {
402                                 reg = <0x0800 0 0 0 0>;
403                                 device_type = "pci";
404                                 #interrupt-cells = <1>;
405                                 #address-cells = <3>;
406                                 #size-cells = <2>;
407
408                                 status = "disabled";
409
410                                 interrupt-map-mask = <0x0 0 0 0>;
411                                 interrupt-map = <0x0 0 0 0 &pciintc 20>;
412
413                                 bus-range = <1 255>;
414                                 ranges;
415                         };
416
417                         pci17: pci@11,0 {
418                                 reg = <0x8800 0 0 0 0>;
419                                 #interrupt-cells = <1>;
420                                 #address-cells = <3>;
421                                 #size-cells = <2>;
422
423                                 status = "disabled";
424                         };
425
426                         pci18: pci@12,0 {
427                                 reg = <0x9000 0 0 0 0>;
428                                 #interrupt-cells = <1>;
429                                 #address-cells = <3>;
430                                 #size-cells = <2>;
431
432                                 status = "disabled";
433                         };
434                 };
435         };
436
437         usbphy: usbphy {
438                 compatible = "ralink,rt3352-usbphy";
439                 #phy-cells = <0>;
440
441                 ralink,sysctl = <&sysc>;
442                 resets = <&rstctrl 22 &rstctrl 25>;
443                 reset-names = "host", "device";
444                 clocks = <&clkctrl 22 &clkctrl 25>;
445                 clock-names = "host", "device";
446         };
447
448         wmac: wmac@10180000 {
449                 compatible = "ralink,rt3883-wmac", "ralink,rt2880-wmac";
450                 reg = <0x10180000 0x40000>;
451
452                 interrupt-parent = <&cpuintc>;
453                 interrupts = <6>;
454
455                 ralink,eeprom = "soc_wmac.eeprom";
456         };
457
458         ehci: ehci@101c0000 {
459                 #address-cells = <1>;
460                 #size-cells = <0>;
461                 compatible = "generic-ehci";
462                 reg = <0x101c0000 0x1000>;
463
464                 phys = <&usbphy>;
465                 phy-names = "usb";
466
467                 interrupt-parent = <&intc>;
468                 interrupts = <18>;
469
470                 status = "disabled";
471
472                 ehci_port1: port@1 {
473                         reg = <1>;
474                         #trigger-source-cells = <0>;
475                 };
476         };
477
478         ohci: ohci@101c1000 {
479                 #address-cells = <1>;
480                 #size-cells = <0>;
481                 compatible = "generic-ohci";
482                 reg = <0x101c1000 0x1000>;
483
484                 phys = <&usbphy>;
485                 phy-names = "usb";
486
487                 interrupt-parent = <&intc>;
488                 interrupts = <18>;
489
490                 status = "disabled";
491
492                 ohci_port1: port@1 {
493                         reg = <1>;
494                         #trigger-source-cells = <0>;
495                 };
496         };
497 };