OpenWrt – Blame information for rev 3
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | /* |
2 | * BSD LICENSE |
||
3 | * |
||
4 | * Copyright (C) 2017 Christian Mehlis <christian@m3hlis.de> |
||
5 | * Copyright (C) 2018 Mathias Kresin <dev@kresin.me> |
||
6 | * All rights reserved. |
||
7 | * |
||
8 | * Redistribution and use in source and binary forms, with or without |
||
9 | * modification, are permitted provided that the following conditions |
||
10 | * are met: |
||
11 | * |
||
12 | * 1. Redistributions of source code must retain the above copyright |
||
13 | * notice, this list of conditions and the following disclaimer. |
||
14 | * 2. Redistributions in binary form must reproduce the above copyright |
||
15 | * notice, this list of conditions and the following disclaimer in the |
||
16 | * documentation and/or other materials provided with the distribution. |
||
17 | * 3. Neither the names of the copyright holders nor the names of any |
||
18 | * contributors may be used to endorse or promote products derived |
||
19 | * from this software without specific prior written permission. |
||
20 | * |
||
21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
||
22 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
||
23 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
||
24 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
||
25 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
||
26 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
||
27 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
||
28 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
||
29 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
||
30 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
||
31 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||
32 | */ |
||
33 | |||
34 | #include "qcom-ipq8064-v1.0.dtsi" |
||
35 | |||
36 | #include <dt-bindings/input/input.h> |
||
37 | #include <dt-bindings/soc/qcom,tcsr.h> |
||
38 | |||
39 | / { |
||
40 | compatible = "compex,wpq864", "qcom,ipq8064"; |
||
41 | model = "Compex WPQ864"; |
||
42 | |||
43 | aliases { |
||
44 | mdio-gpio0 = &mdio0; |
||
45 | serial0 = &gsbi4_serial; |
||
46 | ethernet0 = &gmac1; |
||
47 | ethernet1 = &gmac0; |
||
48 | |||
49 | led-boot = &led_pass; |
||
50 | led-failsafe = &led_fail; |
||
51 | led-running = &led_pass; |
||
52 | led-upgrade = &led_pass; |
||
53 | }; |
||
54 | |||
55 | chosen { |
||
3 | office | 56 | linux,stdout-path = "serial0:115200n8"; |
1 | office | 57 | }; |
58 | |||
59 | soc { |
||
3 | office | 60 | rpm@108000 { |
1 | office | 61 | pinctrl-0 = <&rpm_pins>; |
62 | pinctrl-names = "default"; |
||
63 | }; |
||
64 | |||
65 | nand@1ac00000 { |
||
66 | status = "okay"; |
||
67 | |||
68 | pinctrl-0 = <&nand_pins>; |
||
69 | pinctrl-names = "default"; |
||
70 | |||
71 | mt29f2g08abbeah4@0 { |
||
72 | compatible = "qcom,nandcs"; |
||
73 | |||
74 | reg = <0>; |
||
75 | |||
76 | nand-ecc-strength = <4>; |
||
77 | nand-bus-width = <8>; |
||
78 | nand-ecc-step-size = <512>; |
||
79 | |||
80 | partitions { |
||
81 | compatible = "fixed-partitions"; |
||
82 | #address-cells = <1>; |
||
83 | #size-cells = <1>; |
||
84 | |||
85 | SBL1@0 { |
||
86 | label = "SBL1"; |
||
87 | reg = <0x0000000 0x0040000>; |
||
88 | read-only; |
||
89 | }; |
||
90 | |||
91 | MIBIB@40000 { |
||
92 | label = "MIBIB"; |
||
93 | reg = <0x0040000 0x0140000>; |
||
94 | read-only; |
||
95 | }; |
||
96 | |||
97 | SBL2@180000 { |
||
98 | label = "SBL2"; |
||
99 | reg = <0x0180000 0x0140000>; |
||
100 | read-only; |
||
101 | }; |
||
102 | |||
103 | SBL3@2c0000 { |
||
104 | label = "SBL3"; |
||
105 | reg = <0x02c0000 0x0280000>; |
||
106 | read-only; |
||
107 | }; |
||
108 | |||
109 | DDRCONFIG@540000 { |
||
110 | label = "DDRCONFIG"; |
||
111 | reg = <0x0540000 0x0120000>; |
||
112 | read-only; |
||
113 | }; |
||
114 | |||
115 | SSD@660000 { |
||
116 | label = "SSD"; |
||
117 | reg = <0x0660000 0x0120000>; |
||
118 | read-only; |
||
119 | }; |
||
120 | |||
121 | TZ@780000 { |
||
122 | label = "TZ"; |
||
123 | reg = <0x0780000 0x0280000>; |
||
124 | read-only; |
||
125 | }; |
||
126 | |||
127 | RPM@a00000 { |
||
128 | label = "RPM"; |
||
129 | reg = <0x0a00000 0x0280000>; |
||
130 | read-only; |
||
131 | }; |
||
132 | |||
133 | APPSBL@c80000 { |
||
134 | label = "APPSBL"; |
||
135 | reg = <0x0c80000 0x0500000>; |
||
136 | read-only; |
||
137 | }; |
||
138 | |||
139 | APPSBLENV@1180000 { |
||
140 | label = "APPSBLENV"; |
||
141 | reg = <0x1180000 0x0080000>; |
||
142 | }; |
||
143 | |||
144 | ART@1200000 { |
||
145 | label = "ART"; |
||
146 | reg = <0x1200000 0x0140000>; |
||
147 | }; |
||
148 | |||
149 | ubi@1340000 { |
||
150 | label = "ubi"; |
||
151 | reg = <0x1340000 0x4000000>; |
||
152 | }; |
||
153 | |||
154 | BOOTCONFIG@1340000 { |
||
155 | label = "BOOTCONFIG"; |
||
156 | reg = <0x5340000 0x0060000>; |
||
157 | }; |
||
158 | |||
159 | SBL2-1@53a0000- { |
||
160 | label = "SBL2_1"; |
||
161 | reg = <0x53a0000 0x0140000>; |
||
162 | read-only; |
||
163 | }; |
||
164 | |||
165 | SBL3-1@54e0000 { |
||
166 | label = "SBL3_1"; |
||
167 | reg = <0x54e0000 0x0280000>; |
||
168 | read-only; |
||
169 | }; |
||
170 | |||
171 | DDRCONFIG-1@5760000 { |
||
172 | label = "DDRCONFIG_1"; |
||
173 | reg = <0x5760000 0x0120000>; |
||
174 | read-only; |
||
175 | }; |
||
176 | |||
177 | SSD-1@5880000 { |
||
178 | label = "SSD_1"; |
||
179 | reg = <0x5880000 0x0120000>; |
||
180 | read-only; |
||
181 | }; |
||
182 | |||
183 | TZ-1@59a0000 { |
||
184 | label = "TZ_1"; |
||
185 | reg = <0x59a0000 0x0280000>; |
||
186 | read-only; |
||
187 | }; |
||
188 | |||
189 | RPM-1@5c20000 { |
||
190 | label = "RPM_1"; |
||
191 | reg = <0x5c20000 0x0280000>; |
||
192 | read-only; |
||
193 | }; |
||
194 | |||
195 | BOOTCONFIG1@5ea0000 { |
||
196 | label = "BOOTCONFIG1"; |
||
197 | reg = <0x5ea0000 0x0060000>; |
||
198 | }; |
||
199 | |||
200 | APPSBL-1@5f00000 { |
||
201 | label = "APPSBL_1"; |
||
202 | reg = <0x5f00000 0x0500000>; |
||
203 | read-only; |
||
204 | }; |
||
205 | |||
206 | ubi-1@6400000 { |
||
207 | label = "ubi_1"; |
||
208 | reg = <0x6400000 0x4000000>; |
||
209 | }; |
||
210 | |||
211 | unused@a400000 { |
||
212 | label = "unused"; |
||
213 | reg = <0xa400000 0x5c00000>; |
||
214 | }; |
||
215 | }; |
||
216 | }; |
||
217 | }; |
||
218 | }; |
||
219 | |||
220 | mdio0: mdio { |
||
221 | #address-cells = <1>; |
||
222 | #size-cells = <0>; |
||
223 | |||
224 | compatible = "virtual,mdio-gpio"; |
||
225 | |||
226 | pinctrl-0 = <&mdio0_pins>; |
||
227 | pinctrl-names = "default"; |
||
228 | |||
229 | gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH &qcom_pinmux 0 GPIO_ACTIVE_HIGH>; |
||
230 | |||
231 | ethernet-phy@0 { |
||
3 | office | 232 | device_type = "ethernet-phy"; |
1 | office | 233 | reg = <0>; |
234 | qca,ar8327-initvals = < |
||
235 | 0x00004 0x7600000 /* PAD0_MODE */ |
||
236 | 0x00008 0x1000000 /* PAD5_MODE */ |
||
237 | 0x0000c 0x80 /* PAD6_MODE */ |
||
238 | 0x000e4 0x6a545 /* MAC_POWER_SEL */ |
||
239 | 0x000e0 0xc74164de /* SGMII_CTRL */ |
||
240 | 0x0007c 0x4e /* PORT0_STATUS */ |
||
241 | 0x00094 0x4e /* PORT6_STATUS */ |
||
242 | >; |
||
243 | }; |
||
244 | |||
245 | ethernet-phy@4 { |
||
3 | office | 246 | device_type = "ethernet-phy"; |
1 | office | 247 | reg = <4>; |
248 | }; |
||
249 | }; |
||
250 | |||
3 | office | 251 | gpio-leds { |
1 | office | 252 | compatible = "gpio-leds"; |
253 | |||
254 | pinctrl-0 = <&led_pins>; |
||
255 | pinctrl-names = "default"; |
||
256 | |||
257 | rss4 { |
||
258 | label = "wpq864:green:rss4"; |
||
259 | gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>; |
||
260 | }; |
||
261 | |||
262 | rss3 { |
||
263 | label = "wpq864:green:rss3"; |
||
264 | gpios = <&qcom_pinmux 24 GPIO_ACTIVE_HIGH>; |
||
265 | default-state = "keep"; |
||
266 | }; |
||
267 | |||
268 | rss2 { |
||
269 | label = "wpq864:orange:rss2"; |
||
270 | gpios = <&qcom_pinmux 25 GPIO_ACTIVE_HIGH>; |
||
271 | }; |
||
272 | |||
273 | rss1 { |
||
274 | label = "wpq864:red:rss1"; |
||
275 | gpios = <&qcom_pinmux 22 GPIO_ACTIVE_HIGH>; |
||
276 | }; |
||
277 | |||
278 | led_pass: pass { |
||
279 | label = "wpq864:green:pass"; |
||
280 | gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>; |
||
281 | }; |
||
282 | |||
283 | led_fail: fail { |
||
284 | label = "wpq864:green:fail"; |
||
285 | gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>; |
||
286 | }; |
||
287 | |||
288 | usb { |
||
289 | label = "wpq864:green:usb"; |
||
290 | gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>; |
||
291 | }; |
||
292 | |||
293 | usb-pcie { |
||
294 | label = "wpq864:green:usb-pcie"; |
||
295 | gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>; |
||
296 | }; |
||
297 | }; |
||
298 | |||
3 | office | 299 | gpio-keys { |
1 | office | 300 | compatible = "gpio-keys"; |
301 | |||
302 | pinctrl-0 = <&button_pins>; |
||
303 | pinctrl-names = "default"; |
||
304 | |||
305 | reset { |
||
306 | label = "reset"; |
||
307 | gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>; |
||
308 | linux,code = <KEY_RESTART>; |
||
309 | }; |
||
310 | }; |
||
311 | |||
312 | beeper { |
||
313 | compatible = "gpio-beeper"; |
||
314 | |||
315 | pinctrl-0 = <&beeper_pins>; |
||
316 | pinctrl-names = "default"; |
||
317 | |||
318 | gpios = <&qcom_pinmux 55 GPIO_ACTIVE_HIGH>; |
||
319 | }; |
||
320 | }; |
||
321 | |||
322 | &adm_dma { |
||
323 | status = "okay"; |
||
324 | }; |
||
325 | |||
326 | &gmac1 { |
||
327 | status = "okay"; |
||
328 | |||
329 | pinctrl-0 = <&rgmii2_pins>; |
||
330 | pinctrl-names = "default"; |
||
331 | |||
332 | phy-mode = "rgmii"; |
||
333 | qcom,id = <1>; |
||
334 | |||
335 | fixed-link { |
||
336 | speed = <1000>; |
||
337 | full-duplex; |
||
338 | }; |
||
339 | }; |
||
340 | |||
341 | &gmac2 { |
||
342 | status = "okay"; |
||
343 | |||
344 | phy-mode = "sgmii"; |
||
345 | qcom,id = <2>; |
||
346 | |||
347 | fixed-link { |
||
348 | speed = <1000>; |
||
349 | full-duplex; |
||
350 | }; |
||
351 | }; |
||
352 | |||
353 | &gsbi4 { |
||
354 | status = "okay"; |
||
355 | qcom,mode = <GSBI_PROT_I2C_UART>; |
||
356 | }; |
||
357 | |||
358 | &gsbi4_serial { |
||
359 | status = "okay"; |
||
360 | |||
361 | pinctrl-0 = <&uart0_pins>; |
||
362 | pinctrl-names = "default"; |
||
363 | }; |
||
364 | |||
365 | &gsbi5 { |
||
366 | status = "okay"; |
||
367 | |||
368 | qcom,mode = <GSBI_PROT_SPI>; |
||
369 | |||
370 | spi@1a280000 { |
||
371 | status = "okay"; |
||
372 | |||
373 | pinctrl-0 = <&spi_pins>; |
||
374 | pinctrl-names = "default"; |
||
375 | |||
376 | cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>; |
||
377 | |||
378 | s25fl256s1@0 { |
||
379 | compatible = "jedec,spi-nor"; |
||
380 | #address-cells = <1>; |
||
381 | #size-cells = <1>; |
||
382 | reg = <0>; |
||
383 | spi-max-frequency = <50000000>; |
||
384 | }; |
||
385 | }; |
||
386 | }; |
||
387 | |||
388 | &hs_phy_0 { /* USB3 port 0 HS phy */ |
||
389 | status = "okay"; |
||
390 | }; |
||
391 | |||
392 | &hs_phy_1 { /* USB3 port 1 HS phy */ |
||
393 | status = "okay"; |
||
394 | }; |
||
395 | |||
396 | &ss_phy_0 { /* USB3 port 0 SS phy */ |
||
397 | status = "okay"; |
||
398 | |||
399 | rx_eq = <2>; |
||
400 | tx_deamp_3_5db = <32>; |
||
401 | mpll = <160>; |
||
402 | }; |
||
403 | |||
404 | &ss_phy_1 { /* USB3 port 1 SS phy */ |
||
405 | status = "okay"; |
||
406 | |||
407 | rx_eq = <2>; |
||
408 | tx_deamp_3_5db = <32>; |
||
409 | mpll = <160>; |
||
410 | }; |
||
411 | |||
412 | &pcie0 { |
||
413 | status = "okay"; |
||
414 | |||
415 | /delete-property/ pinctrl-0; |
||
416 | /delete-property/ pinctrl-names; |
||
417 | /delete-property/ perst-gpios; |
||
418 | }; |
||
419 | |||
420 | &pcie1 { |
||
421 | status = "okay"; |
||
422 | }; |
||
423 | |||
424 | &pcie2 { |
||
425 | status = "okay"; |
||
426 | |||
427 | /delete-property/ pinctrl-0; |
||
428 | /delete-property/ pinctrl-names; |
||
429 | /delete-property/ perst-gpios; |
||
430 | }; |
||
431 | |||
432 | &qcom_pinmux { |
||
433 | pinctrl-names = "default"; |
||
434 | pinctrl-0 = <&state_default>; |
||
435 | |||
436 | state_default: pinctrl0 { |
||
437 | pcie0_pcie2_perst { |
||
438 | pins = "gpio3"; |
||
439 | function = "gpio"; |
||
440 | drive-strength = <2>; |
||
441 | bias-disable; |
||
442 | output-high; |
||
443 | }; |
||
444 | }; |
||
445 | |||
446 | led_pins: led_pins { |
||
447 | mux { |
||
3 | office | 448 | pins = "gpio7", "gpio8", "gpio9", "gpio22", |
1 | office | 449 | "gpio23", "gpio24", "gpio25", "gpio53"; |
450 | function = "gpio"; |
||
451 | drive-strength = <2>; |
||
452 | bias-pull-up; |
||
453 | }; |
||
454 | }; |
||
455 | |||
456 | button_pins: button_pins { |
||
457 | mux { |
||
458 | pins = "gpio54"; |
||
459 | function = "gpio"; |
||
460 | drive-strength = <2>; |
||
461 | bias-pull-up; |
||
462 | }; |
||
463 | }; |
||
464 | |||
465 | beeper_pins: beeper_pins { |
||
466 | mux { |
||
467 | pins = "gpio55"; |
||
468 | function = "gpio"; |
||
469 | drive-strength = <2>; |
||
470 | bias-pull-up; |
||
471 | }; |
||
472 | }; |
||
473 | |||
474 | rpm_pins: rpm_pins { |
||
475 | mux { |
||
476 | pins = "gpio12", "gpio13"; |
||
477 | function = "gsbi4"; |
||
478 | drive-strength = <10>; |
||
479 | bias-disable; |
||
480 | }; |
||
481 | }; |
||
482 | |||
483 | uart0_pins: uart0_pins { |
||
484 | mux { |
||
485 | pins = "gpio10", "gpio11"; |
||
486 | function = "gsbi4"; |
||
487 | drive-strength = <10>; |
||
488 | bias-disable; |
||
489 | }; |
||
490 | }; |
||
491 | |||
492 | spi_pins: spi_pins { |
||
493 | mux { |
||
494 | pins = "gpio18", "gpio19"; |
||
495 | function = "gsbi5"; |
||
496 | drive-strength = <10>; |
||
497 | bias-pull-down; |
||
498 | }; |
||
499 | |||
500 | clk { |
||
501 | pins = "gpio21"; |
||
502 | function = "gsbi5"; |
||
503 | drive-strength = <12>; |
||
504 | bias-pull-down; |
||
505 | }; |
||
506 | |||
507 | cs { |
||
508 | pins = "gpio20"; |
||
509 | function = "gpio"; |
||
510 | drive-strength = <10>; |
||
511 | bias-pull-up; |
||
512 | }; |
||
513 | }; |
||
514 | |||
515 | nand_pins: nand_pins { |
||
516 | mux { |
||
517 | pins = "gpio34", "gpio35", "gpio36", "gpio37", |
||
518 | "gpio38", "gpio39", "gpio40", "gpio41", |
||
519 | "gpio42", "gpio43", "gpio44", "gpio45", |
||
520 | "gpio46", "gpio47"; |
||
521 | function = "nand"; |
||
522 | drive-strength = <10>; |
||
523 | bias-disable; |
||
524 | }; |
||
525 | |||
526 | pullups { |
||
527 | pins = "gpio39"; |
||
528 | bias-pull-up; |
||
529 | }; |
||
530 | |||
531 | hold { |
||
532 | pins = "gpio40", "gpio41", "gpio42", "gpio43", |
||
533 | "gpio44", "gpio45", "gpio46", "gpio47"; |
||
534 | bias-bus-hold; |
||
535 | }; |
||
536 | }; |
||
537 | |||
538 | mdio0_pins: mdio0_pins { |
||
539 | mux { |
||
540 | pins = "gpio0", "gpio1"; |
||
541 | function = "gpio"; |
||
542 | drive-strength = <8>; |
||
543 | bias-disable; |
||
544 | }; |
||
545 | }; |
||
546 | |||
547 | rgmii2_pins: rgmii2_pins { |
||
548 | mux { |
||
549 | pins = "gpio27", "gpio28", "gpio29", "gpio30", |
||
550 | "gpio31", "gpio32", "gpio51", "gpio52", |
||
551 | "gpio59", "gpio60", "gpio61", "gpio62"; |
||
552 | function = "rgmii2"; |
||
553 | drive-strength = <8>; |
||
554 | bias-disable; |
||
555 | }; |
||
556 | }; |
||
557 | }; |
||
558 | |||
559 | &usb3_0 { |
||
560 | status = "okay"; |
||
561 | }; |
||
562 | |||
563 | |||
564 | &usb3_1 { |
||
565 | status = "okay"; |
||
566 | }; |
||
567 | |||
568 | &tcsr { |
||
569 | qcom,usb-ctrl-select = <TCSR_USB_SELECT_USB3_DUAL>; |
||
570 | }; |