kernel: remove non-existant symbols
[oweals/openwrt.git] / target / linux / ramips / dts / mt7621.dtsi
1 #include <dt-bindings/interrupt-controller/mips-gic.h>
2 #include <dt-bindings/clock/mt7621-clk.h>
3 #include <dt-bindings/gpio/gpio.h>
4
5 / {
6         #address-cells = <1>;
7         #size-cells = <1>;
8         compatible = "mediatek,mt7621-soc";
9
10         cpus {
11                 #address-cells = <1>;
12                 #size-cells = <0>;
13
14                 cpu@0 {
15                         device_type = "cpu";
16                         compatible = "mips,mips1004Kc";
17                         reg = <0>;
18                 };
19
20                 cpu@1 {
21                         device_type = "cpu";
22                         compatible = "mips,mips1004Kc";
23                         reg = <1>;
24                 };
25         };
26
27         cpuintc: cpuintc {
28                 #address-cells = <0>;
29                 #interrupt-cells = <1>;
30                 interrupt-controller;
31                 compatible = "mti,cpu-interrupt-controller";
32         };
33
34         aliases {
35                 serial0 = &uartlite;
36         };
37
38         pll: pll {
39                 compatible = "mediatek,mt7621-pll", "syscon";
40
41                 #clock-cells = <1>;
42                 clock-output-names = "cpu", "bus";
43         };
44
45         sysclock: sysclock {
46                 #clock-cells = <0>;
47                 compatible = "fixed-clock";
48
49                 /* FIXME: there should be way to detect this */
50                 clock-frequency = <50000000>;
51         };
52
53         palmbus: palmbus@1E000000 {
54                 compatible = "palmbus";
55                 reg = <0x1E000000 0x100000>;
56                 ranges = <0x0 0x1E000000 0x0FFFFF>;
57
58                 #address-cells = <1>;
59                 #size-cells = <1>;
60
61                 sysc: sysc@0 {
62                         compatible = "mtk,mt7621-sysc";
63                         reg = <0x0 0x100>;
64                 };
65
66                 wdt: wdt@100 {
67                         compatible = "mediatek,mt7621-wdt";
68                         reg = <0x100 0x100>;
69                 };
70
71                 gpio: gpio@600 {
72                         #gpio-cells = <2>;
73                         #interrupt-cells = <2>;
74                         compatible = "mediatek,mt7621-gpio";
75                         gpio-controller;
76                         interrupt-controller;
77                         reg = <0x600 0x100>;
78                         interrupt-parent = <&gic>;
79                         interrupts = <GIC_SHARED 12 IRQ_TYPE_LEVEL_HIGH>;
80                 };
81
82                 i2c: i2c@900 {
83                         compatible = "mediatek,mt7621-i2c";
84                         reg = <0x900 0x100>;
85
86                         clocks = <&sysclock>;
87
88                         resets = <&rstctrl 16>;
89                         reset-names = "i2c";
90
91                         #address-cells = <1>;
92                         #size-cells = <0>;
93
94                         status = "disabled";
95
96                         pinctrl-names = "default";
97                         pinctrl-0 = <&i2c_pins>;
98                 };
99
100                 i2s: i2s@a00 {
101                         compatible = "mediatek,mt7621-i2s";
102                         reg = <0xa00 0x100>;
103
104                         clocks = <&sysclock>;
105
106                         resets = <&rstctrl 17>;
107                         reset-names = "i2s";
108
109                         interrupt-parent = <&gic>;
110                         interrupts = <GIC_SHARED 16 IRQ_TYPE_LEVEL_HIGH>;
111
112                         txdma-req = <2>;
113                         rxdma-req = <3>;
114
115                         dmas = <&gdma 4>,
116                                 <&gdma 6>;
117                         dma-names = "tx", "rx";
118
119                         status = "disabled";
120                 };
121
122                 systick: systick@500 {
123                         compatible = "ralink,mt7621-systick", "ralink,cevt-systick";
124                         reg = <0x500 0x10>;
125
126                         resets = <&rstctrl 28>;
127                         reset-names = "intc";
128
129                         interrupt-parent = <&gic>;
130                         interrupts = <GIC_SHARED 5 IRQ_TYPE_LEVEL_HIGH>;
131                 };
132
133                 memc: memc@5000 {
134                         compatible = "mtk,mt7621-memc";
135                         reg = <0x5000 0x1000>;
136                 };
137
138                 cpc: cpc@1fbf0000 {
139                         compatible = "mtk,mt7621-cpc";
140                         reg = <0x1fbf0000 0x8000>;
141                 };
142
143                 mc: mc@1fbf8000 {
144                         compatible = "mtk,mt7621-mc";
145                         reg = <0x1fbf8000 0x8000>;
146                 };
147
148                 uartlite: uartlite@c00 {
149                         compatible = "ns16550a";
150                         reg = <0xc00 0x100>;
151
152                         clock-frequency = <50000000>;
153
154                         interrupt-parent = <&gic>;
155                         interrupts = <GIC_SHARED 26 IRQ_TYPE_LEVEL_HIGH>;
156
157                         reg-shift = <2>;
158                         reg-io-width = <4>;
159                         no-loopback-test;
160                 };
161
162                 uartlite2: uartlite2@d00 {
163                         compatible = "ns16550a";
164                         reg = <0xd00 0x100>;
165
166                         clock-frequency = <50000000>;
167
168                         interrupt-parent = <&gic>;
169                         interrupts = <GIC_SHARED 27 IRQ_TYPE_LEVEL_HIGH>;
170
171                         reg-shift = <2>;
172                         reg-io-width = <4>;
173
174                         pinctrl-names = "default";
175                         pinctrl-0 = <&uart2_pins>;
176
177                         status = "disabled";
178                 };
179
180                 uartlite3: uartlite3@e00 {
181                         compatible = "ns16550a";
182                         reg = <0xe00 0x100>;
183
184                         clock-frequency = <50000000>;
185
186                         interrupt-parent = <&gic>;
187                         interrupts = <GIC_SHARED 28 IRQ_TYPE_LEVEL_HIGH>;
188
189                         reg-shift = <2>;
190                         reg-io-width = <4>;
191
192                         pinctrl-names = "default";
193                         pinctrl-0 = <&uart3_pins>;
194
195                         status = "disabled";
196                 };
197
198                 spi0: spi@b00 {
199                         status = "disabled";
200
201                         compatible = "ralink,mt7621-spi";
202                         reg = <0xb00 0x100>;
203
204                         clocks = <&pll MT7621_CLK_BUS>;
205
206                         resets = <&rstctrl 18>;
207                         reset-names = "spi";
208
209                         #address-cells = <1>;
210                         #size-cells = <0>;
211
212                         pinctrl-names = "default";
213                         pinctrl-0 = <&spi_pins>;
214                 };
215
216                 gdma: gdma@2800 {
217                         compatible = "ralink,rt3883-gdma";
218                         reg = <0x2800 0x800>;
219
220                         resets = <&rstctrl 14>;
221                         reset-names = "dma";
222
223                         interrupt-parent = <&gic>;
224                         interrupts = <0 13 4>;
225
226                         #dma-cells = <1>;
227                         #dma-channels = <16>;
228                         #dma-requests = <16>;
229
230                         status = "disabled";
231                 };
232
233                 hsdma: hsdma@7000 {
234                         compatible = "mediatek,mt7621-hsdma";
235                         reg = <0x7000 0x1000>;
236
237                         resets = <&rstctrl 5>;
238                         reset-names = "hsdma";
239
240                         interrupt-parent = <&gic>;
241                         interrupts = <0 11 4>;
242
243                         #dma-cells = <1>;
244                         #dma-channels = <1>;
245                         #dma-requests = <1>;
246
247                         status = "disabled";
248                 };
249         };
250
251         pinctrl: pinctrl {
252                 compatible = "ralink,rt2880-pinmux";
253                 pinctrl-names = "default";
254                 pinctrl-0 = <&state_default>;
255
256                 state_default: pinctrl0 {
257                 };
258
259                 i2c_pins: i2c_pins {
260                         i2c_pins {
261                                 groups = "i2c";
262                                 function = "i2c";
263                         };
264                 };
265
266                 spi_pins: spi_pins {
267                         spi_pins {
268                                 groups = "spi";
269                                 function = "spi";
270                         };
271                 };
272
273                 uart1_pins: uart1 {
274                         uart1 {
275                                 groups = "uart1";
276                                 function = "uart1";
277                         };
278                 };
279
280                 uart2_pins: uart2 {
281                         uart2 {
282                                 groups = "uart2";
283                                 function = "uart2";
284                         };
285                 };
286
287                 uart3_pins: uart3 {
288                         uart3 {
289                                 groups = "uart3";
290                                 function = "uart3";
291                         };
292                 };
293
294                 rgmii1_pins: rgmii1 {
295                         rgmii1 {
296                                 groups = "rgmii1";
297                                 function = "rgmii1";
298                         };
299                 };
300
301                 rgmii2_pins: rgmii2 {
302                         rgmii2 {
303                                 groups = "rgmii2";
304                                 function = "rgmii2";
305                         };
306                 };
307
308                 mdio_pins: mdio {
309                         mdio {
310                                 groups = "mdio";
311                                 function = "mdio";
312                         };
313                 };
314
315                 pcie_pins: pcie {
316                         pcie {
317                                 groups = "pcie";
318                                 function = "gpio";
319                         };
320                 };
321
322                 nand_pins: nand {
323                         spi-nand {
324                                 groups = "spi";
325                                 function = "nand1";
326                         };
327
328                         sdhci-nand {
329                                 groups = "sdhci";
330                                 function = "nand2";
331                         };
332                 };
333
334                 sdhci_pins: sdhci {
335                         sdhci {
336                                 groups = "sdhci";
337                                 function = "sdhci";
338                         };
339                 };
340         };
341
342         rstctrl: rstctrl {
343                 compatible = "ralink,rt2880-reset";
344                 #reset-cells = <1>;
345         };
346
347         clkctrl: clkctrl {
348                 compatible = "ralink,rt2880-clock";
349                 #clock-cells = <1>;
350         };
351
352         sdhci: sdhci@1E130000 {
353                 status = "disabled";
354
355                 compatible = "ralink,mt7620-sdhci";
356                 reg = <0x1E130000 0x4000>;
357
358                 interrupt-parent = <&gic>;
359                 interrupts = <GIC_SHARED 20 IRQ_TYPE_LEVEL_HIGH>;
360
361                 pinctrl-names = "default";
362                 pinctrl-0 = <&sdhci_pins>;
363         };
364
365         xhci: xhci@1E1C0000 {
366                 #address-cells = <1>;
367                 #size-cells = <0>;
368                 status = "okay";
369
370                 compatible = "mediatek,mt8173-xhci";
371                 reg = <0x1e1c0000 0x1000
372                        0x1e1d0700 0x0100>;
373                 reg-names = "mac", "ippc";
374
375                 clocks = <&sysclock>;
376                 clock-names = "sys_ck";
377
378                 interrupt-parent = <&gic>;
379                 interrupts = <GIC_SHARED 22 IRQ_TYPE_LEVEL_HIGH>;
380
381                 /*
382                  * Port 1 of both hubs is one usb slot and referenced here.
383                  * The binding doesn't allow to address individual hubs.
384                  * hub 1 - port 1 is ehci and ohci, hub 2 - port 1 is xhci.
385                  */
386                 xhci_ehci_port1: port@1 {
387                         reg = <1>;
388                         #trigger-source-cells = <0>;
389                 };
390
391                 /*
392                  * Only the second usb hub has a second port. That port serves
393                  * ehci and ohci.
394                  */
395                 ehci_port2: port@2 {
396                         reg = <2>;
397                         #trigger-source-cells = <0>;
398                 };
399         };
400
401         gic: interrupt-controller@1fbc0000 {
402                 compatible = "mti,gic";
403                 reg = <0x1fbc0000 0x2000>;
404
405                 interrupt-controller;
406                 #interrupt-cells = <3>;
407
408                 mti,reserved-cpu-vectors = <7>;
409
410                 timer {
411                         compatible = "mti,gic-timer";
412                         interrupts = <GIC_LOCAL 1 IRQ_TYPE_NONE>;
413                         clocks = <&pll MT7621_CLK_CPU>;
414                 };
415         };
416
417         nficlock: nficlock {
418                 #clock-cells = <0>;
419                 compatible = "fixed-clock";
420
421                 clock-frequency = <125000000>;
422         };
423
424         nand: nand@1e003000 {
425                 status = "disabled";
426
427                 compatible = "mediatek,mt7621-nfc";
428                 reg = <0x1e003000 0x800
429                         0x1e003800 0x800>;
430                 reg-names = "nfi", "ecc";
431
432                 clocks = <&nficlock>;
433                 clock-names = "nfi_clk";
434         };
435
436         ethsys: syscon@1e000000 {
437                 compatible = "mediatek,mt7621-ethsys",
438                              "syscon";
439                 reg = <0x1e000000 0x1000>;
440                 #clock-cells = <1>;
441         };
442
443         ethernet: ethernet@1e100000 {
444                 compatible = "mediatek,mt7621-eth";
445                 reg = <0x1e100000 0x10000>;
446
447                 clocks = <&sysclock>;
448                 clock-names = "ethif";
449
450                 #address-cells = <1>;
451                 #size-cells = <0>;
452
453                 resets = <&rstctrl 6 &rstctrl 23>;
454                 reset-names = "fe", "eth";
455
456                 interrupt-parent = <&gic>;
457                 interrupts = <GIC_SHARED 3 IRQ_TYPE_LEVEL_HIGH>;
458
459                 mediatek,ethsys = <&ethsys>;
460
461                 gmac0: mac@0 {
462                         compatible = "mediatek,eth-mac";
463                         reg = <0>;
464                         phy-mode = "rgmii";
465
466                         fixed-link {
467                                 speed = <1000>;
468                                 full-duplex;
469                                 pause;
470                         };
471                 };
472
473                 gmac1: mac@1 {
474                         compatible = "mediatek,eth-mac";
475                         reg = <1>;
476                         status = "disabled";
477                         phy-mode = "rgmii-rxid";
478                 };
479
480                 mdio: mdio-bus {
481                         #address-cells = <1>;
482                         #size-cells = <0>;
483
484                         switch0: switch@1f {
485                                 compatible = "mediatek,mt7621";
486                                 #address-cells = <1>;
487                                 #size-cells = <0>;
488                                 reg = <0x1f>;
489                                 mediatek,mcm;
490                                 resets = <&rstctrl 2>;
491                                 reset-names = "mcm";
492
493                                 ports {
494                                         #address-cells = <1>;
495                                         #size-cells = <0>;
496                                         reg = <0>;
497
498                                         port@0 {
499                                                 status = "disabled";
500                                                 reg = <0>;
501                                                 label = "lan0";
502                                         };
503
504                                         port@1 {
505                                                 status = "disabled";
506                                                 reg = <1>;
507                                                 label = "lan1";
508                                         };
509
510                                         port@2 {
511                                                 status = "disabled";
512                                                 reg = <2>;
513                                                 label = "lan2";
514                                         };
515
516                                         port@3 {
517                                                 status = "disabled";
518                                                 reg = <3>;
519                                                 label = "lan3";
520                                         };
521
522                                         port@4 {
523                                                 status = "disabled";
524                                                 reg = <4>;
525                                                 label = "lan4";
526                                         };
527
528                                         port@6 {
529                                                 reg = <6>;
530                                                 label = "cpu";
531                                                 ethernet = <&gmac0>;
532                                                 phy-mode = "rgmii";
533
534                                                 fixed-link {
535                                                         speed = <1000>;
536                                                         full-duplex;
537                                                 };
538                                         };
539                                 };
540                         };
541                 };
542         };
543
544         gsw: gsw@1e110000 {
545                 compatible = "mediatek,mt7621-gsw";
546                 reg = <0x1e110000 0x8000>;
547                 interrupt-parent = <&gic>;
548                 interrupts = <GIC_SHARED 23 IRQ_TYPE_LEVEL_HIGH>;
549         };
550
551         pcie: pcie@1e140000 {
552                 compatible = "mediatek,mt7621-pci";
553                 reg = <0x1e140000 0x100     /* host-pci bridge registers */
554                         0x1e142000 0x100    /* pcie port 0 RC control registers */
555                         0x1e143000 0x100    /* pcie port 1 RC control registers */
556                         0x1e144000 0x100>;  /* pcie port 2 RC control registers */
557                 #address-cells = <3>;
558                 #size-cells = <2>;
559
560                 pinctrl-names = "default";
561                 pinctrl-0 = <&pcie_pins>;
562
563                 device_type = "pci";
564
565                 bus-range = <0 255>;
566                 ranges = <
567                         0x02000000 0 0x00000000 0x60000000 0 0x10000000 /* pci memory */
568                         0x01000000 0 0x00000000 0x1e160000 0 0x00010000 /* io space */
569                 >;
570
571                 #interrupt-cells = <1>;
572                 interrupt-map-mask = <0xF0000 0 0 1>;
573                 interrupt-map = <0x10000 0 0 1 &gic GIC_SHARED 4 IRQ_TYPE_LEVEL_HIGH>,
574                                 <0x20000 0 0 1 &gic GIC_SHARED 24 IRQ_TYPE_LEVEL_HIGH>,
575                                 <0x30000 0 0 1 &gic GIC_SHARED 25 IRQ_TYPE_LEVEL_HIGH>;
576
577                 status = "disabled";
578
579                 resets = <&rstctrl 24 &rstctrl 25 &rstctrl 26>;
580                 reset-names = "pcie0", "pcie1", "pcie2";
581                 clocks = <&clkctrl 24 &clkctrl 25 &clkctrl 26>;
582                 clock-names = "pcie0", "pcie1", "pcie2";
583                 phys = <&pcie0_phy 1>, <&pcie2_phy 0>;
584                 phy-names = "pcie-phy0", "pcie-phy2";
585
586                 reset-gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
587
588                 pcie0: pcie@0,0 {
589                         reg = <0x0000 0 0 0 0>;
590                         #address-cells = <3>;
591                         #size-cells = <2>;
592                         ranges;
593                         bus-range = <0x00 0xff>;
594                 };
595
596                 pcie1: pcie@1,0 {
597                         reg = <0x0800 0 0 0 0>;
598                         #address-cells = <3>;
599                         #size-cells = <2>;
600                         ranges;
601                         bus-range = <0x00 0xff>;
602                 };
603
604                 pcie2: pcie@2,0 {
605                         reg = <0x1000 0 0 0 0>;
606                         #address-cells = <3>;
607                         #size-cells = <2>;
608                         ranges;
609                         bus-range = <0x00 0xff>;
610                 };
611         };
612
613         pcie0_phy: pcie-phy@1e149000 {
614                 compatible = "mediatek,mt7621-pci-phy";
615                 reg = <0x1e149000 0x0700>;
616                 #phy-cells = <1>;
617         };
618
619         pcie2_phy: pcie-phy@1e14a000 {
620                 compatible = "mediatek,mt7621-pci-phy";
621                 reg = <0x1e14a000 0x0700>;
622                 #phy-cells = <1>;
623         };
624 };