d234b94a465ebb09bd5cf3e0f2de5ba4850b59a4
[openwrt/openwrt.git] / target / linux / ipq806x / files / arch / arm / boot / dts / qcom-ipq8062-wg2600hp3.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qcom-ipq8062.dtsi"
4 #include <dt-bindings/input/input.h>
5
6 /delete-node/ &nand_pins;
7
8 / {
9 model = "NEC Platforms Aterm WG2600HP3";
10 compatible = "nec,wg2600hp3", "qcom,ipq8062", "qcom,ipq8064";
11
12 memory {
13 device_type = "memory";
14 reg = <0x42000000 0x1e000000>;
15 };
16
17 aliases {
18 label-mac-device = &gmac2;
19
20 led-boot = &led_power_green;
21 led-failsafe = &led_power_red;
22 led-running = &led_power_green;
23 led-upgrade = &led_power_red;
24 };
25
26 keys {
27 compatible = "gpio-keys";
28
29 pinctrl-0 = <&buttons_pins>;
30 pinctrl-names = "default";
31
32 reset {
33 label = "reset";
34 gpios = <&qcom_pinmux 24 GPIO_ACTIVE_LOW>;
35 linux,code = <KEY_RESTART>;
36 };
37
38 wps {
39 label = "wps";
40 gpios = <&qcom_pinmux 22 GPIO_ACTIVE_LOW>;
41 linux,code = <KEY_WPS_BUTTON>;
42 };
43
44 mode0 {
45 label = "mode0";
46 gpios = <&qcom_pinmux 40 GPIO_ACTIVE_LOW>;
47 linux,code = <BTN_0>;
48 linux,input-type = <EV_SW>;
49 };
50
51 mode1 {
52 label = "mode1";
53 gpios = <&qcom_pinmux 41 GPIO_ACTIVE_LOW>;
54 linux,code = <BTN_1>;
55 linux,input-type = <EV_SW>;
56 };
57 };
58
59 leds {
60 compatible = "gpio-leds";
61
62 pinctrl-0 = <&leds_pins>;
63 pinctrl-names = "default";
64
65 led_power_green: power_green {
66 label = "green:power";
67 gpios = <&qcom_pinmux 14 GPIO_ACTIVE_HIGH>;
68 };
69
70 led_power_red: power_red {
71 label = "red:power";
72 gpios = <&qcom_pinmux 35 GPIO_ACTIVE_HIGH>;
73 };
74
75 active_green {
76 label = "green:active";
77 gpios = <&qcom_pinmux 42 GPIO_ACTIVE_HIGH>;
78 };
79
80 active_red {
81 label = "red:active";
82 gpios = <&qcom_pinmux 38 GPIO_ACTIVE_HIGH>;
83 };
84
85 wlan2g_green {
86 label = "green:wlan2g";
87 gpios = <&qcom_pinmux 55 GPIO_ACTIVE_HIGH>;
88 linux,default-trigger = "phy1tpt";
89 };
90
91 wlan2g_red {
92 label = "red:wlan2g";
93 gpios = <&qcom_pinmux 56 GPIO_ACTIVE_HIGH>;
94 };
95
96 wlan5g_green {
97 label = "green:wlan5g";
98 gpios = <&qcom_pinmux 57 GPIO_ACTIVE_HIGH>;
99 linux,default-trigger = "phy0tpt";
100 };
101
102 wlan5g_red {
103 label = "red:wlan5g";
104 gpios = <&qcom_pinmux 58 GPIO_ACTIVE_HIGH>;
105 };
106
107 tv_green {
108 label = "green:tv";
109 gpios = <&qcom_pinmux 46 GPIO_ACTIVE_HIGH>;
110 };
111
112 tv_red {
113 label = "red:tv";
114 gpios = <&qcom_pinmux 36 GPIO_ACTIVE_HIGH>;
115 };
116
117 converter_green {
118 label = "green:converter";
119 gpios = <&qcom_pinmux 43 GPIO_ACTIVE_HIGH>;
120 };
121
122 converter_red {
123 label = "red:converter";
124 gpios = <&qcom_pinmux 15 GPIO_ACTIVE_HIGH>;
125 };
126 };
127 };
128
129 &qcom_pinmux {
130 pinctrl-0 = <&akro_pins>;
131 pinctrl-names = "default";
132
133 spi_pins: spi_pins {
134 mux {
135 pins = "gpio18", "gpio19", "gpio21";
136 function = "gsbi5";
137 bias-pull-down;
138 };
139
140 data {
141 pins = "gpio18", "gpio19";
142 drive-strength = <10>;
143 };
144
145 cs {
146 pins = "gpio20";
147 drive-strength = <10>;
148 };
149
150 clk {
151 pins = "gpio21";
152 drive-strength = <12>;
153 };
154 };
155
156 buttons_pins: buttons_pins {
157 mux {
158 pins = "gpio22", "gpio24", "gpio40",
159 "gpio41";
160 function = "gpio";
161 drive-strength = <2>;
162 bias-pull-up;
163 };
164 };
165
166 leds_pins: leds_pins {
167 mux {
168 pins = "gpio14", "gpio15", "gpio35",
169 "gpio36", "gpio38", "gpio42",
170 "gpio43", "gpio46", "gpio55",
171 "gpio56", "gpio57", "gpio58";
172 function = "gpio";
173 bias-pull-down;
174 };
175
176 akro2 {
177 pins = "gpio15", "gpio35", "gpio38",
178 "gpio42", "gpio43", "gpio46",
179 "gpio55", "gpio56", "gpio57",
180 "gpio58";
181 drive-strength = <2>;
182 };
183
184 akro4 {
185 pins = "gpio14", "gpio36";
186 drive-strength = <4>;
187 };
188 };
189
190 /*
191 * Stock firmware has the following settings, so let's do the same.
192 * I don't sure why these are required.
193 */
194 akro_pins: akro_pinmux {
195 akro {
196 pins = "gpio17", "gpio26", "gpio47";
197 function = "gpio";
198 drive-strength = <2>;
199 bias-pull-down;
200 };
201
202 reset {
203 pins = "gpio45";
204 function = "gpio";
205 drive-strength = <2>;
206 bias-disable;
207 output-low;
208 };
209
210 gmac0_rgmii {
211 pins = "gpio25";
212 function = "gpio";
213 drive-strength = <8>;
214 bias-disable;
215 };
216 };
217 };
218
219 &gsbi5 {
220 status = "okay";
221 qcom,mode = <GSBI_PROT_SPI>;
222
223 spi@1a280000 {
224 status = "okay";
225
226 pinctrl-0 = <&spi_pins>;
227 pinctrl-names = "default";
228
229 cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
230
231 flash@0 {
232 compatible = "jedec,spi-nor";
233 reg = <0>;
234 spi-max-frequency = <50000000>;
235 m25p,fast-read;
236
237 partitions {
238 compatible = "fixed-partitions";
239 #address-cells = <1>;
240 #size-cells = <1>;
241
242 partition@0 {
243 label = "SBL1";
244 reg = <0x0000000 0x0020000>;
245 read-only;
246 };
247
248 partition@20000 {
249 label = "MIBIB";
250 reg = <0x0020000 0x0020000>;
251 read-only;
252 };
253
254 partition@40000 {
255 label = "SBL2";
256 reg = <0x0040000 0x0040000>;
257 read-only;
258 };
259
260 partition@80000 {
261 label = "SBL3";
262 reg = <0x0080000 0x0080000>;
263 read-only;
264 };
265
266 partition@100000 {
267 label = "DDRCONFIG";
268 reg = <0x0100000 0x0010000>;
269 read-only;
270 };
271
272 partition@110000 {
273 label = "SSD";
274 reg = <0x0110000 0x0010000>;
275 read-only;
276 };
277
278 partition@120000 {
279 label = "TZ";
280 reg = <0x0120000 0x0080000>;
281 read-only;
282 };
283
284 partition@1a0000 {
285 label = "RPM";
286 reg = <0x01a0000 0x0080000>;
287 read-only;
288 };
289
290 partition@220000 {
291 label = "APPSBL";
292 reg = <0x0220000 0x0080000>;
293 read-only;
294 };
295
296 partition@2a0000 {
297 label = "APPSBLENV";
298 reg = <0x02a0000 0x0010000>;
299 read-only;
300 };
301
302 factory: partition@2b0000 {
303 label = "PRODUCTDATA";
304 reg = <0x02b0000 0x0030000>;
305 read-only;
306 };
307
308 partition@2e0000 {
309 label = "ART";
310 reg = <0x02e0000 0x0040000>;
311 read-only;
312 };
313
314 partition@320000 {
315 label = "TP";
316 reg = <0x0320000 0x0040000>;
317 read-only;
318 };
319
320 partition@360000 {
321 label = "TINY";
322 reg = <0x0360000 0x0500000>;
323 read-only;
324 };
325
326 partition@860000 {
327 compatible = "denx,uimage";
328 label = "firmware";
329 reg = <0x0860000 0x17a0000>;
330 };
331 };
332 };
333 };
334 };
335
336 &adm_dma {
337 status = "okay";
338 };
339
340 &pcie0 {
341 status = "okay";
342
343 bridge@0,0 {
344 reg = <0x00000000 0 0 0 0>;
345 #address-cells = <3>;
346 #size-cells = <2>;
347 ranges;
348
349 wifi@1,0 {
350 compatible = "qcom,ath10k";
351 reg = <0x00010000 0 0 0 0>;
352
353 qcom,ath10k-calibration-variant = "NEC-Platforms-WG2600HP3";
354 };
355 };
356 };
357
358 &pcie1 {
359 status = "okay";
360 force_gen1 = <1>;
361
362 bridge@0,0 {
363 reg = <0x00000000 0 0 0 0>;
364 #address-cells = <3>;
365 #size-cells = <2>;
366 ranges;
367
368 wifi@1,0 {
369 compatible = "qcom,ath10k";
370 reg = <0x00010000 0 0 0 0>;
371
372 ieee80211-freq-limit = <2400000 2483000>;
373 qcom,ath10k-calibration-variant = "NEC-Platforms-WG2600HP3";
374 };
375 };
376 };
377
378 &mdio0 {
379 status = "okay";
380
381 pinctrl-0 = <&mdio0_pins>;
382 pinctrl-names = "default";
383
384 phy0: ethernet-phy@0 {
385 reg = <0>;
386 qca,ar8327-initvals = <
387 0x04 0x80080080 /* PAD0_MODE */
388 0x0c 0x06000000 /* PAD6_MODE */
389 0x10 0x002613a0 /* PWS_REG */
390 0x50 0xcc36cc36 /* LED_CTRL0 */
391 0x54 0xca36ca36 /* LED_CTRL1 */
392 0x58 0xc936c936 /* LED_CTRL2 */
393 0x5c 0x03ffff00 /* LED_CTRL3 */
394 0x7c 0x0000004e /* PORT0_STATUS */
395 0x94 0x0000004e /* PORT6_STATUS */
396 0xe0 0xc74164de /* SGMII_CTRL */
397 0xe4 0x0006a545 /* MAC_PWR_SEL */
398 >;
399 };
400 };
401
402 &gmac1 {
403 status = "okay";
404
405 pinctrl-0 = <&rgmii2_pins>;
406 pinctrl-names = "default";
407
408 phy-mode = "rgmii";
409 qcom,id = <1>;
410 mdiobus = <&mdio0>;
411 mtd-mac-address = <&factory 0x0>;
412
413 fixed-link {
414 speed = <1000>;
415 full-duplex;
416 };
417 };
418
419 &gmac2 {
420 status = "okay";
421 phy-mode = "sgmii";
422 qcom,id = <2>;
423 mdiobus = <&mdio0>;
424 mtd-mac-address = <&factory 0x6>;
425
426 fixed-link {
427 speed = <1000>;
428 full-duplex;
429 };
430 };