ramips: add support for Rostelecom RT-FE-1A
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / mt7621_rostelecom_rt-fe-1a.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8
9 / {
10 compatible = "rostelecom,rt-fe-1a", "mediatek,mt7621-soc";
11 model = "Rostelecom RT-FE-1A";
12
13 aliases {
14 label-mac-device = &gmac0;
15
16 led-boot = &led_status_green;
17 led-failsafe = &led_status_green;
18 led-running = &led_status_green;
19 led-upgrade = &led_status_green;
20 };
21
22 leds {
23 compatible = "gpio-leds";
24
25 led-0 {
26 color = <LED_COLOR_ID_BLUE>;
27 function = LED_FUNCTION_WLAN;
28 function-enumerator = <50>;
29 gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
30 linux,default-trigger = "phy1tpt";
31 };
32
33 led-1 {
34 color = <LED_COLOR_ID_BLUE>;
35 function = LED_FUNCTION_WLAN;
36 function-enumerator = <24>;
37 gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
38 linux,default-trigger = "phy0tpt";
39 };
40
41 led_status_green: led-2 {
42 color = <LED_COLOR_ID_GREEN>;
43 function = LED_FUNCTION_STATUS;
44 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
45 };
46 };
47
48 keys {
49 compatible = "gpio-keys";
50
51 button-0 {
52 label = "wps";
53 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
54 linux,code = <KEY_WPS_BUTTON>;
55 };
56
57 button-1 {
58 label = "reset";
59 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
60 linux,code = <KEY_RESTART>;
61 };
62 };
63
64 ubi-concat {
65 compatible = "mtd-concat";
66 devices = <&ubiconcat0 &ubiconcat1 &ubiconcat2 \
67 &ubiconcat3>;
68
69 partitions {
70 compatible = "fixed-partitions";
71 #address-cells = <1>;
72 #size-cells = <1>;
73
74 partition@0 {
75 label = "ubi";
76 reg = <0x0 0x5420000>;
77 };
78 };
79 };
80 };
81
82 &nand {
83 status = "okay";
84
85 partitions {
86 compatible = "sercomm,sc-partitions", "fixed-partitions";
87 #address-cells = <1>;
88 #size-cells = <1>;
89
90 partition@0 {
91 label = "u-boot";
92 reg = <0x0 0x100000>;
93 sercomm,scpart-id = <0>;
94 read-only;
95 };
96
97 partition@100000 {
98 label = "dynamic partition map";
99 reg = <0x100000 0x100000>;
100 sercomm,scpart-id = <1>;
101 read-only;
102 };
103
104 partition@200000 {
105 label = "Factory";
106 reg = <0x200000 0x100000>;
107 sercomm,scpart-id = <2>;
108 read-only;
109
110 nvmem-layout {
111 compatible = "fixed-layout";
112 #address-cells = <1>;
113 #size-cells = <1>;
114
115 eeprom_2g: eeprom@0 {
116 reg = <0x0 0x400>;
117 };
118
119 eeprom_5g: eeprom@8000 {
120 reg = <0x8000 0x4da8>;
121 };
122
123 macaddr_label: macaddr@21000 {
124 compatible = "mac-base";
125 reg = <0x21000 0x6>;
126 #nvmem-cell-cells = <1>;
127 };
128 };
129 };
130
131 partition@300000 {
132 label = "Boot Flag";
133 reg = <0x300000 0x100000>;
134 sercomm,scpart-id = <3>;
135 };
136
137 partition@400000 {
138 label = "kernel";
139 reg = <0x400000 0x600000>;
140 sercomm,scpart-id = <4>;
141 };
142
143 partition@a00000 {
144 label = "Kernel 2";
145 reg = <0xa00000 0x600000>;
146 sercomm,scpart-id = <5>;
147 read-only;
148 };
149
150 ubiconcat0: partition@1000000 {
151 label = "File System 1";
152 reg = <0x1000000 0x1800000>;
153 sercomm,scpart-id = <6>;
154 };
155
156 partition@2800000 {
157 label = "File System 2";
158 reg = <0x2800000 0x1800000>;
159 sercomm,scpart-id = <7>;
160 read-only;
161 };
162
163 ubiconcat1: partition@4000000 {
164 label = "Configuration/log";
165 reg = <0x4000000 0x800000>;
166 sercomm,scpart-id = <8>;
167 };
168
169 ubiconcat2: partition@4800000 {
170 label = "application tmp buffer (Ftool)";
171 reg = <0x4800000 0xc00000>;
172 sercomm,scpart-id = <9>;
173 };
174
175 ubiconcat3: partition@5400000 {
176 label = "free space (in stock firmware)";
177 reg = <0x5400000 0x2820000>;
178 sercomm,scpart-id = <10>;
179 };
180 };
181 };
182
183 &pcie {
184 status = "okay";
185 };
186
187 &pcie0 {
188 wifi@0,0 {
189 compatible = "mediatek,mt76";
190 reg = <0x0000 0 0 0 0>;
191 ieee80211-freq-limit = <5000000 6000000>;
192
193 nvmem-cells = <&eeprom_5g>, <&macaddr_label 3>;
194 nvmem-cell-names = "eeprom", "mac-address";
195
196 led {
197 led-active-low;
198 };
199 };
200 };
201
202 &pcie1 {
203 wifi@0,0 {
204 compatible = "mediatek,mt76";
205 reg = <0x0000 0 0 0 0>;
206 ieee80211-freq-limit = <2400000 2500000>;
207
208 nvmem-cells = <&eeprom_2g>, <&macaddr_label 2>;
209 nvmem-cell-names = "eeprom", "mac-address";
210
211 led {
212 led-active-low;
213 };
214 };
215 };
216
217 &gmac0 {
218 nvmem-cells = <&macaddr_label 0>;
219 nvmem-cell-names = "mac-address";
220 };
221
222 &gmac1 {
223 status = "okay";
224 label = "wan";
225 phy-handle = <&ethphy0>;
226
227 nvmem-cells = <&macaddr_label 11>;
228 nvmem-cell-names = "mac-address";
229 };
230
231 &mdio {
232 ethphy0: ethernet-phy@0 {
233 reg = <0>;
234 };
235 };
236
237 &switch0 {
238 ports {
239 port@1 {
240 status = "okay";
241 label = "lan1";
242 };
243
244 port@2 {
245 status = "okay";
246 label = "lan2";
247 };
248
249 port@3 {
250 status = "okay";
251 label = "lan3";
252 };
253
254 port@4 {
255 status = "okay";
256 label = "lan4";
257 };
258 };
259 };
260
261 &state_default {
262 gpio {
263 groups = "jtag", "uart2", "uart3", "wdt";
264 function = "gpio";
265 };
266 };