87948bb1d6ab2368f896f1af0df92ae069093887
[openwrt/openwrt.git] / target / linux / ipq806x / files / arch / arm / boot / dts / qcom-ipq8065-rt4230w-rev6.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later
2
3 #include "qcom-ipq8065-smb208.dtsi"
4 #include <dt-bindings/input/input.h>
5
6 / {
7 model = "Askey RT4230W REV6";
8 compatible = "askey,rt4230w-rev6", "qcom,ipq8065", "qcom,ipq8064";
9
10 memory@0 {
11 reg = <0x42000000 0x3e000000>;
12 device_type = "memory";
13 };
14
15 aliases {
16 led-boot = &ledctrl3;
17 led-failsafe = &ledctrl1;
18 led-running = &ledctrl2;
19 led-upgrade = &ledctrl3;
20 };
21
22 chosen {
23 bootargs = "rootfstype=squashfs noinitrd";
24 };
25
26 keys {
27 compatible = "gpio-keys";
28 pinctrl-0 = <&button_pins>;
29 pinctrl-names = "default";
30
31 reset {
32 label = "reset";
33 gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
34 linux,code = <KEY_RESTART>;
35 };
36
37 wps {
38 label = "wps";
39 gpios = <&qcom_pinmux 68 GPIO_ACTIVE_LOW>;
40 linux,code = <KEY_WPS_BUTTON>;
41 };
42 };
43
44 leds {
45 compatible = "gpio-leds";
46 pinctrl-0 = <&led_pins>;
47 pinctrl-names = "default";
48
49 ledctrl1: ledctrl1 {
50 label = "ledctrl1";
51 gpios = <&qcom_pinmux 22 GPIO_ACTIVE_HIGH>;
52 };
53
54 ledctrl2: ledctrl2 {
55 label = "ledctrl2";
56 gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>;
57 };
58
59 ledctrl3: ledctrl3 {
60 label = "ledctrl3";
61 gpios = <&qcom_pinmux 24 GPIO_ACTIVE_HIGH>;
62 };
63 };
64 };
65
66 &qcom_pinmux {
67 button_pins: button_pins {
68 mux {
69 pins = "gpio54", "gpio68";
70 function = "gpio";
71 drive-strength = <2>;
72 bias-pull-up;
73 };
74 };
75
76 led_pins: led_pins {
77 mux {
78 pins = "gpio22", "gpio23", "gpio24";
79 function = "gpio";
80 drive-strength = <2>;
81 bias-pull-down;
82 };
83 };
84
85 rgmii2_pins: rgmii2-pins {
86 mux {
87 pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31",
88 "gpio51", "gpio52", "gpio59", "gpio60", "gpio61", "gpio62";
89 function = "rgmii2";
90 drive-strength = <8>;
91 bias-disable;
92 };
93
94 tx {
95 pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32";
96 input-disable;
97 };
98 };
99
100 spi_pins: spi_pins {
101 cs {
102 pins = "gpio20";
103 drive-strength = <12>;
104 };
105 };
106 };
107
108 &gsbi5 {
109 qcom,mode = <GSBI_PROT_SPI>;
110 status = "okay";
111
112 spi@1a280000 {
113 status = "okay";
114
115 pinctrl-0 = <&spi_pins>;
116 pinctrl-names = "default";
117
118 cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
119
120 flash@0 {
121 compatible = "everspin,mr25h256";
122 #address-cells = <1>;
123 #size-cells = <1>;
124 spi-max-frequency = <40000000>;
125 reg = <0>;
126 };
127 };
128 };
129
130 &nand {
131 status = "okay";
132
133 nand@0 {
134 reg = <0>;
135 compatible = "qcom,nandcs";
136
137 nand-ecc-strength = <4>;
138 nand-bus-width = <8>;
139 nand-ecc-step-size = <512>;
140
141 qcom,boot-partitions = <0x0 0x1180000 0x1340000 0x10c0000>;
142
143 partitions {
144 compatible = "fixed-partitions";
145 #address-cells = <1>;
146 #size-cells = <1>;
147
148 partition@0 {
149 label = "0:SBL1";
150 reg = <0x0000000 0x0040000>;
151 read-only;
152 };
153
154 partition@40000 {
155 label = "0:MIBIB";
156 reg = <0x0040000 0x0140000>;
157 read-only;
158 };
159
160 partition@180000 {
161 label = "0:SBL2";
162 reg = <0x0180000 0x0140000>;
163 read-only;
164 };
165
166 partition@2c0000 {
167 label = "0:SBL3";
168 reg = <0x02c0000 0x0280000>;
169 read-only;
170 };
171
172 partition@540000 {
173 label = "0:DDRCONFIG";
174 reg = <0x0540000 0x0120000>;
175 read-only;
176 };
177
178 partition@660000 {
179 label = "0:SSD";
180 reg = <0x0660000 0x0120000>;
181 read-only;
182 };
183
184 partition@780000 {
185 label = "0:TZ";
186 reg = <0x0780000 0x0280000>;
187 read-only;
188 };
189
190 partition@a00000 {
191 label = "0:RPM";
192 reg = <0x0a00000 0x0280000>;
193 read-only;
194 };
195
196 partition@c80000 {
197 label = "0:APPSBL";
198 reg = <0x0c80000 0x0500000>;
199 read-only;
200 };
201
202 partition@1180000 {
203 label = "0:APPSBLENV";
204 reg = <0x1180000 0x0080000>;
205 };
206
207 partition@1200000 {
208 label = "0:ART";
209 reg = <0x1200000 0x0140000>;
210 read-only;
211 compatible = "nvmem-cells";
212 #address-cells = <1>;
213 #size-cells = <1>;
214
215 macaddr_ART_0: macaddr@0 {
216 reg = <0x0 0x6>;
217 };
218
219 macaddr_ART_6: macaddr@6 {
220 reg = <0x6 0x6>;
221 };
222
223 precal_ART_1000: precal@1000 {
224 reg = <0x1000 0x2f20>;
225 };
226
227 precal_ART_5000: precal@5000 {
228 reg = <0x5000 0x2f20>;
229 };
230 };
231
232 partition@1340000 {
233 label = "0:BOOTCONFIG";
234 reg = <0x1340000 0x0060000>;
235 read-only;
236 };
237
238 partition@13a0000 {
239 label = "0:SBL2_1";
240 reg = <0x13a0000 0x0140000>;
241 read-only;
242 };
243
244 partition@14e0000 {
245 label = "0:SBL3_1";
246 reg = <0x14e0000 0x0280000>;
247 read-only;
248 };
249
250 partition@1760000 {
251 label = "0:DDRCONFIG_1";
252 reg = <0x1760000 0x0120000>;
253 read-only;
254 };
255
256 partition@1880000 {
257 label = "0:SSD_1";
258 reg = <0x1880000 0x0120000>;
259 read-only;
260 };
261
262 partition@19a0000 {
263 label = "0:TZ_1";
264 reg = <0x19a0000 0x0280000>;
265 read-only;
266 };
267
268 partition@1c20000 {
269 label = "0:RPM_1";
270 reg = <0x1c20000 0x0280000>;
271 read-only;
272 };
273
274 partition@1ea0000 {
275 label = "0:BOOTCONFIG1";
276 reg = <0x1ea0000 0x0060000>;
277 read-only;
278 };
279
280 partition@1f00000 {
281 label = "0:APPSBL_1";
282 reg = <0x1f00000 0x0500000>;
283 read-only;
284 };
285
286 partition@2400000 {
287 label = "ubi";
288 reg = <0x2400000 0x1a000000>;
289 };
290 };
291 };
292 };
293
294 &mdio0 {
295 status = "okay";
296
297 pinctrl-0 = <&mdio0_pins>;
298 pinctrl-names = "default";
299
300 switch@10 {
301 compatible = "qca,qca8337";
302 #address-cells = <1>;
303 #size-cells = <0>;
304 reg = <0x10>;
305
306 ports {
307 #address-cells = <1>;
308 #size-cells = <0>;
309
310 port@0 {
311 reg = <0>;
312 label = "cpu";
313 ethernet = <&gmac0>;
314 phy-mode = "rgmii";
315 tx-internal-delay-ps = <1000>;
316 rx-internal-delay-ps = <1000>;
317
318 fixed-link {
319 speed = <1000>;
320 full-duplex;
321 };
322 };
323
324 port@1 {
325 reg = <1>;
326 label = "wan";
327 phy-mode = "internal";
328 phy-handle = <&phy_port1>;
329 };
330
331 port@2 {
332 reg = <2>;
333 label = "lan1";
334 phy-mode = "internal";
335 phy-handle = <&phy_port2>;
336 };
337
338 port@3 {
339 reg = <3>;
340 label = "lan2";
341 phy-mode = "internal";
342 phy-handle = <&phy_port3>;
343 };
344
345 port@4 {
346 reg = <4>;
347 label = "lan3";
348 phy-mode = "internal";
349 phy-handle = <&phy_port4>;
350 };
351
352 port@5 {
353 reg = <5>;
354 label = "lan4";
355 phy-mode = "internal";
356 phy-handle = <&phy_port5>;
357 };
358
359 /*
360 port@6 {
361 reg = <0>;
362 label = "cpu";
363 ethernet = <&gmac2>;
364 phy-mode = "rgmii";
365
366 fixed-link {
367 speed = <1000>;
368 full-duplex;
369 pause;
370 asym-pause;
371 };
372 };
373 */
374 };
375
376 mdio {
377 #address-cells = <1>;
378 #size-cells = <0>;
379
380 phy_port1: phy@0 {
381 reg = <0>;
382 };
383
384 phy_port2: phy@1 {
385 reg = <1>;
386 };
387
388 phy_port3: phy@2 {
389 reg = <2>;
390 };
391
392 phy_port4: phy@3 {
393 reg = <3>;
394 };
395
396 phy_port5: phy@4 {
397 reg = <4>;
398 };
399 };
400 };
401 };
402
403 &gmac0 {
404 status = "okay";
405 phy-mode = "rgmii";
406 qcom,id = <0>;
407
408 nvmem-cells = <&macaddr_ART_0>;
409 nvmem-cell-names = "mac-address";
410
411 pinctrl-0 = <&rgmii2_pins>;
412 pinctrl-names = "default";
413
414 fixed-link {
415 speed = <1000>;
416 full-duplex;
417 };
418 };
419
420 &gmac1 {
421 status = "okay";
422 phy-mode = "sgmii";
423 qcom,id = <1>;
424
425 nvmem-cells = <&macaddr_ART_6>;
426 nvmem-cell-names = "mac-address";
427
428 fixed-link {
429 speed = <1000>;
430 full-duplex;
431 };
432 };
433
434 &adm_dma {
435 status = "okay";
436 };
437
438 &hs_phy_0 {
439 status = "okay";
440 };
441
442 &ss_phy_0 {
443 status = "okay";
444 };
445
446 &usb3_0 {
447 status = "okay";
448 };
449
450 &hs_phy_1 {
451 status = "okay";
452 };
453
454 &ss_phy_1 {
455 status = "okay";
456 };
457
458 &usb3_1 {
459 status = "okay";
460 };
461
462 &pcie0 {
463 status = "okay";
464 reset-gpio = <&qcom_pinmux 3 GPIO_ACTIVE_HIGH>;
465 pinctrl-0 = <&pcie0_pins>;
466 pinctrl-names = "default";
467
468 bridge@0,0 {
469 reg = <0x00000000 0 0 0 0>;
470 #address-cells = <3>;
471 #size-cells = <2>;
472 ranges;
473
474 wifi0: wifi@1,0 {
475 compatible = "pci168c,0046";
476 reg = <0x00010000 0 0 0 0>;
477
478 nvmem-cells = <&precal_ART_1000>;
479 nvmem-cell-names = "pre-calibration";
480 };
481 };
482 };
483
484 &pcie1 {
485 status = "okay";
486 reset-gpio = <&qcom_pinmux 48 GPIO_ACTIVE_HIGH>;
487 pinctrl-0 = <&pcie1_pins>;
488 pinctrl-names = "default";
489 max-link-speed = <1>;
490
491 bridge@0,0 {
492 reg = <0x00000000 0 0 0 0>;
493 #address-cells = <3>;
494 #size-cells = <2>;
495 ranges;
496
497 wifi1: wifi@1,0 {
498 compatible = "pci168c,0046";
499 reg = <0x00010000 0 0 0 0>;
500
501 nvmem-cells = <&precal_ART_5000>;
502 nvmem-cell-names = "pre-calibration";
503 };
504 };
505 };