ramips: mt7621: add interrupt-controller
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620a_netcore_nw5212.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "netcore,nw5212", "ralink,mt7620a-soc";
10 model = "Netcore NW5212";
11
12 aliases {
13 label-mac-device = &ethernet;
14 };
15
16 leds {
17 compatible = "gpio-leds";
18
19 lan4 {
20 label = "green:lan4";
21 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
22 };
23
24 lan3 {
25 label = "green:lan3";
26 gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
27 };
28
29 lan2 {
30 label = "green:lan2";
31 gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
32 };
33
34 lan1 {
35 label = "green:lan1";
36 gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
37 };
38
39 wan {
40 label = "green:wan";
41 gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
42 };
43
44 wlan2g {
45 label = "green:wlan2g";
46 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
47 linux,default-trigger = "phy0tpt";
48 };
49 };
50
51 keys {
52 compatible = "gpio-keys";
53
54 reset {
55 label = "reset";
56 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
57 linux,code = <KEY_RESTART>;
58 };
59 };
60 };
61
62 &gpio2 {
63 status = "okay";
64 };
65
66 &gpio3 {
67 status = "okay";
68 };
69
70 &spi0 {
71 status = "okay";
72
73 flash@0 {
74 compatible = "jedec,spi-nor";
75 reg = <0>;
76 spi-max-frequency = <70000000>;
77 m25p,fast-read;
78
79 partitions {
80 compatible = "fixed-partitions";
81 #address-cells = <1>;
82 #size-cells = <1>;
83
84 partition@0 {
85 label = "u-boot";
86 reg = <0x0 0x30000>;
87 read-only;
88 };
89
90 partition@30000 {
91 label = "u-boot-env";
92 reg = <0x30000 0x10000>;
93 };
94
95 factory: partition@40000 {
96 label = "factory";
97 reg = <0x40000 0x10000>;
98 read-only;
99
100 nvmem-layout {
101 compatible = "fixed-layout";
102 #address-cells = <1>;
103 #size-cells = <1>;
104
105 eeprom_factory_0: eeprom@0 {
106 reg = <0x0 0x200>;
107 };
108
109 macaddr_factory_28: macaddr@28 {
110 reg = <0x28 0x6>;
111 };
112 };
113 };
114
115 partition@50000 {
116 compatible = "denx,uimage";
117 label = "firmware";
118 reg = <0x50000 0xfb0000>;
119 };
120 };
121 };
122 };
123
124 &state_default {
125 gpio {
126 groups = "uartf", "wled", "ephy";
127 function = "gpio";
128 };
129 };
130
131 &ethernet {
132 mediatek,portmap = "llllw";
133 nvmem-cells = <&macaddr_factory_28>;
134 nvmem-cell-names = "mac-address";
135 };
136
137 &ehci {
138 status = "okay";
139 };
140
141 &ohci {
142 status = "okay";
143 };
144
145 &wmac {
146 nvmem-cells = <&eeprom_factory_0>;
147 nvmem-cell-names = "eeprom";
148 };