6344f477e8e565e0be69524a3fa995a7286b6f0d
[openwrt/staging/hauke.git] / target / linux / ramips / dts / mt7621_sercomm_s1500.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later
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 aliases {
11 led-boot = &led_status;
12 led-running = &led_status;
13 led-upgrade = &led_wps;
14 led-failsafe = &led_wps;
15 };
16
17 keys {
18 compatible = "gpio-keys";
19
20 reset {
21 label = "reset";
22 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
23 linux,code = <KEY_RESTART>;
24 };
25
26 wps {
27 label = "wps";
28 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
29 linux,code = <KEY_WPS_BUTTON>;
30 };
31 };
32
33 leds {
34 compatible = "gpio-leds";
35
36 led-0 {
37 label = "amber:lan4";
38 color = <LED_COLOR_ID_AMBER>;
39 function = LED_FUNCTION_LAN;
40 function-enumerator = <0>;
41 linux,default-trigger = "mt7530-0:00:1Gbps";
42 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
43 };
44
45 led-1 {
46 label = "green:lan4";
47 color = <LED_COLOR_ID_GREEN>;
48 function = LED_FUNCTION_LAN;
49 function-enumerator = <1>;
50 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
51 };
52
53 led-2 {
54 label = "amber:lan3";
55 color = <LED_COLOR_ID_AMBER>;
56 function = LED_FUNCTION_LAN;
57 function-enumerator = <2>;
58 linux,default-trigger = "mt7530-0:01:1Gbps";
59 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
60 };
61
62 led-3 {
63 label = "green:lan3";
64 color = <LED_COLOR_ID_GREEN>;
65 function = LED_FUNCTION_LAN;
66 function-enumerator = <3>;
67 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
68 };
69
70 led-4 {
71 label = "amber:lan2";
72 color = <LED_COLOR_ID_AMBER>;
73 function = LED_FUNCTION_LAN;
74 function-enumerator = <4>;
75 linux,default-trigger = "mt7530-0:02:1Gbps";
76 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
77 };
78
79 led-5 {
80 label = "amber:lan1";
81 color = <LED_COLOR_ID_AMBER>;
82 function = LED_FUNCTION_LAN;
83 function-enumerator = <5>;
84 linux,default-trigger = "mt7530-0:03:1Gbps";
85 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
86 };
87
88 led-6 {
89 label = "green:lan1";
90 color = <LED_COLOR_ID_GREEN>;
91 function = LED_FUNCTION_LAN;
92 function-enumerator = <6>;
93 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
94 };
95
96 led-7 {
97 label = "amber:wan";
98 color = <LED_COLOR_ID_AMBER>;
99 function = LED_FUNCTION_WAN;
100 function-enumerator = <0>;
101 linux,default-trigger = "mt7530-0:04:1Gbps";
102 gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
103 };
104
105 led-8 {
106 label = "green:wan";
107 color = <LED_COLOR_ID_GREEN>;
108 function = LED_FUNCTION_WAN;
109 function-enumerator = <1>;
110 gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
111 };
112
113 led-9 {
114 label = "green:lan2";
115 color = <LED_COLOR_ID_GREEN>;
116 function = LED_FUNCTION_LAN;
117 function-enumerator = <7>;
118 gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
119 };
120
121 led-10 {
122 label = "white:wlan2g";
123 color = <LED_COLOR_ID_WHITE>;
124 function = LED_FUNCTION_WLAN;
125 function-enumerator = <0>;
126 linux,default-trigger = "phy1radio";
127 gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
128 };
129
130 led_wps: led-11 {
131 function = LED_FUNCTION_WPS;
132 function-enumerator = <0>;
133 gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
134 panic-indicator;
135 };
136
137 led_status: led-12 {
138 label = "white:status";
139 color = <LED_COLOR_ID_WHITE>;
140 function = LED_FUNCTION_STATUS;
141 function-enumerator = <0>;
142 gpios = <&gpio 30 GPIO_ACTIVE_LOW>;
143 };
144
145 led-13 {
146 label = "white:wlan5g";
147 color = <LED_COLOR_ID_WHITE>;
148 function = LED_FUNCTION_WLAN;
149 function-enumerator = <1>;
150 linux,default-trigger = "phy0radio";
151 gpios = <&gpio 32 GPIO_ACTIVE_LOW>;
152 };
153 };
154 };
155
156 &ethernet {
157 pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
158 };
159
160 &gmac0 {
161 nvmem-cells = <&macaddr_factory_1000>;
162 nvmem-cell-names = "mac-address";
163 };
164
165 &nand {
166 status = "okay";
167
168 partitions: partitions {
169 compatible = "fixed-partitions";
170 #address-cells = <1>;
171 #size-cells = <1>;
172
173 partition@0 {
174 label = "u-boot";
175 reg = <0x0 0x100000>;
176 read-only;
177 };
178
179 factory: partition@100000 {
180 label = "Factory";
181 reg = <0x100000 0x100000>;
182 read-only;
183
184 nvmem-layout {
185 compatible = "fixed-layout";
186 #address-cells = <1>;
187 #size-cells = <1>;
188
189 eeprom_factory_0: eeprom@0 {
190 reg = <0x0 0x200>;
191 };
192
193 eeprom_factory_8000: eeprom@8000 {
194 reg = <0x8000 0x200>;
195 };
196
197 macaddr_factory_1000: macaddr@1000 {
198 reg = <0x1000 0x6>;
199 };
200 };
201 };
202
203 partition@1600000 {
204 label = "boot_flag";
205 reg = <0x1600000 0x100000>;
206 };
207
208 partition@1700000 {
209 label = "kernel";
210 reg = <0x1700000 0x400000>;
211 };
212
213 partition@1b00000 {
214 label = "Kernel_2";
215 reg = <0x1b00000 0x400000>;
216 read-only;
217 };
218 };
219 };
220
221 &pcie {
222 status = "okay";
223
224 reset-gpios = <&gpio 8 GPIO_ACTIVE_LOW>,
225 <&gpio 19 GPIO_ACTIVE_LOW>;
226 };
227
228 &pcie0 {
229 wifi@0,0 {
230 compatible = "mediatek,mt76";
231 reg = <0x0000 0 0 0 0>;
232 ieee80211-freq-limit = <5000000 6000000>;
233
234 nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_1000>;
235 nvmem-cell-names = "eeprom", "mac-address";
236 mac-address-increment = <2>;
237 };
238 };
239
240 &pcie1 {
241 wlan_2g: wifi@0,0 {
242 compatible = "mediatek,mt76";
243 reg = <0x0000 0 0 0 0>;
244 ieee80211-freq-limit = <2400000 2500000>;
245
246 nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_1000>;
247 nvmem-cell-names = "eeprom", "mac-address";
248 };
249 };
250
251 &state_default {
252 gpio {
253 groups = "wdt", "uart3", "jtag", "uart2", "i2c", "rgmii2";
254 function = "gpio";
255 };
256 };
257
258 &switch0 {
259 ports {
260 port@0 {
261 status = "okay";
262 label = "lan4";
263 };
264
265 port@1 {
266 status = "okay";
267 label = "lan3";
268 };
269
270 port@2 {
271 status = "okay";
272 label = "lan2";
273 };
274
275 port@3 {
276 status = "okay";
277 label = "lan1";
278 };
279
280 wan: port@4 {
281 status = "okay";
282 label = "wan";
283
284 nvmem-cells = <&macaddr_factory_1000>;
285 nvmem-cell-names = "mac-address";
286 mac-address-increment = <1>;
287 };
288 };
289 };