ipq40xx: add support for Sony NCP-HG100/Cellular
[openwrt/staging/jow.git] / target / linux / ipq40xx / files / arch / arm / boot / dts / qcom-ipq4019-ncp-hg100-cellular.dts
1 // SPDX-License-Identifier: GPL-2.0-only OR MIT
2
3 #include "qcom-ipq4019.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8 #include <dt-bindings/soc/qcom,tcsr.h>
9
10 / {
11 model = "Sony NCP-HG100/Cellular";
12 compatible = "sony,ncp-hg100-cellular";
13
14 aliases {
15 led-boot = &led_cloud_green;
16 led-failsafe = &led_cloud_red;
17 led-running = &led_cloud_green;
18 led-upgrade = &led_cloud_green;
19 label-mac-device = &gmac0;
20 };
21
22 chosen {
23 bootargs = "console=ttyMSM0,115200n8 root=/dev/mmcblk0p15 rootfstype=squashfs,ext4";
24 };
25
26 memory {
27 device_type = "memory";
28 reg = <0x80000000 0x20000000>;
29 };
30
31 soc {
32 tcsr@1949000 {
33 status = "okay";
34 compatible = "qcom,tcsr";
35 reg = <0x1949000 0x100>;
36 qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
37 };
38
39 tcsr@194b000 {
40 status = "okay";
41 compatible = "qcom,tcsr";
42 reg = <0x194b000 0x100>;
43 qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
44 };
45
46 ess_tcsr@1953000 {
47 status = "okay";
48 compatible = "qcom,tcsr";
49 reg = <0x1953000 0x1000>;
50 qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
51 };
52
53 tcsr@1957000 {
54 status = "okay";
55 compatible = "qcom,tcsr";
56 reg = <0x1957000 0x100>;
57 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
58 };
59
60 ess-psgmii@98000 {
61 status = "okay";
62 };
63
64 dma@7984000 {
65 status = "okay";
66 };
67
68 ess-switch@c000000 {
69 status = "okay";
70 switch_mac_mode = <0x0>; /* mac mode for RGMII RMII */
71 switch_initvlas = <0x0007c 0x54>; /* PORT0_STATUS */
72 };
73
74 edma@c080000 {
75 status = "okay";
76 };
77 };
78
79 keys-repeat {
80 compatible = "gpio-keys";
81 pinctrl-0 = <&keys_pins>;
82 pinctrl-names = "default";
83 autorepeat;
84
85 key-volup {
86 label = "volume up";
87 linux,code = <KEY_VOLUMEUP>;
88 gpios = <&tlmm 39 GPIO_ACTIVE_HIGH>;
89 linux,input-type = <EV_KEY>;
90 };
91
92 key-voldown {
93 label = "volume down";
94 linux,code = <KEY_VOLUMEDOWN>;
95 gpios = <&tlmm 40 GPIO_ACTIVE_HIGH>;
96 linux,input-type = <EV_KEY>;
97 };
98
99 key-alexatrigger {
100 label = "alexa trigger";
101 linux,code = <BTN_0>;
102 gpios = <&tlmm 42 GPIO_ACTIVE_HIGH>;
103 linux,input-type = <EV_KEY>;
104 };
105
106 key-mute {
107 label = "mic mute";
108 linux,code = <BTN_1>;
109 gpios = <&tlmm 47 GPIO_ACTIVE_LOW>;
110 linux,input-type = <EV_SW>;
111 };
112 };
113
114 keys {
115 compatible = "gpio-keys";
116
117 key-reset {
118 label = "reset";
119 gpios = <&tlmm 2 GPIO_ACTIVE_LOW>;
120 linux,code = <KEY_RESTART>;
121 };
122
123 key-wps {
124 label = "setup";
125 gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
126 linux,code = <KEY_WPS_BUTTON>;
127 };
128 };
129 };
130
131 &tlmm {
132 pinctrl-0 = <&bt_pins>, <&aud_pins>, <&mcu_pins>;
133 pinctrl-names = "default";
134
135 /*
136 * uart0 is shared for debug console and Z-Wave,
137 * use only for debug console in OpenWrt.
138 *
139 * 1: debug console
140 * 0: Z-Wave
141 */
142 uart0_ctrl_pins: uart0_ctrl_pinmux {
143 mux {
144 pins = "gpio15";
145 function = "gpio";
146 output-high;
147 };
148 };
149
150 serial_pins: serial_pinmux {
151 mux {
152 pins = "gpio16", "gpio17";
153 function = "blsp_uart0";
154 bias-disable;
155 };
156 };
157
158 /*
159 * reset pin for Z-Wave
160 * active-low, >= 20ns
161 */
162 zwave_pins: zwave_pinmux {
163 mux {
164 pins = "gpio59";
165 function = "gpio";
166 output-high;
167 };
168 };
169
170 serial_1_pins: serial1_pinmux {
171 mux {
172 pins = "gpio8", "gpio9",
173 "gpio10", "gpio11";
174 function = "blsp_uart1";
175 bias-disable;
176 };
177 };
178
179 bt_pins: bt_pinmux {
180 mux_reset {
181 pins = "gpio66";
182 function = "gpio";
183 output-high;
184 };
185
186 mux_pwr {
187 pins = "gpio68";
188 function = "gpio";
189 output-high;
190 };
191 };
192
193 mdio_pins: mdio_pinmux {
194 mux_1 {
195 pins = "gpio6";
196 function = "mdio";
197 bias-pull-up;
198 };
199
200 mux_2 {
201 pins = "gpio7";
202 function = "mdc";
203 bias-pull-up;
204 };
205 };
206
207 i2c_1_pins: i2c_1_pinmux {
208 mux {
209 pins = "gpio12", "gpio13";
210 function = "blsp_i2c1";
211 bias-disable;
212 };
213 };
214
215 keys_pins: keys_pinmux {
216 mux_1 {
217 pins = "gpio39", "gpio40", "gpio42", "gpio47";
218 function = "gpio";
219 bias-disable;
220 };
221
222 mux_2 {
223 pins = "gpio2";
224 function = "gpio";
225 input;
226 };
227 };
228
229 sd_pins: sd_pins {
230 mux {
231 function = "sdio";
232 pins = "gpio23", "gpio24", "gpio25", "gpio26",
233 "gpio28", "gpio29", "gpio30", "gpio31";
234 drive-strength = <4>;
235 };
236
237 mux_sd_clk {
238 function = "sdio";
239 pins = "gpio27";
240 drive-strength = <16>;
241 };
242
243 mux_sd7 {
244 function = "sdio";
245 pins = "gpio32";
246 drive-strength = <4>;
247 bias-disable;
248 };
249 };
250
251 aud_pins: aud_pinmux {
252 mux {
253 pins = "gpio48", "gpio49", "gpio50", "gpio51";
254 function = "aud_pin";
255 };
256 };
257
258 alc1304_pins: alc1304_pinmux {
259 mux_1 {
260 pins = "gpio44";
261 function = "gpio";
262 bias-disable;
263 };
264
265 mux_2 {
266 pins = "gpio45";
267 function = "gpio";
268 bias-disable;
269 };
270 };
271
272 cx2902x_reset: cx2902x_pinmux {
273 mux_1 {
274 pins = "gpio64";
275 function = "gpio";
276 bias-disable;
277 };
278
279 mux_2 {
280 pins = "gpio65";
281 function = "gpio";
282 bias-disable;
283 };
284 };
285
286 lte_pins: lte_pinmux {
287 mux_en {
288 pins = "gpio20";
289 function = "gpio";
290 output-high;
291 };
292
293 mux_reset {
294 pins = "gpio35";
295 function = "gpio";
296 input;
297 };
298 };
299
300 usb3_pins: usb3_pinmux {
301 mux_en {
302 pins = "gpio36";
303 function = "gpio";
304 output-high;
305 };
306
307 mux_flt {
308 pins = "gpio4";
309 function = "gpio";
310 input;
311 };
312 };
313
314 mcu_pins: mcu_pinmux {
315 mux_boot {
316 pins = "gpio38";
317 function = "gpio";
318 output-low;
319 };
320
321 mux_reset {
322 pins = "gpio5";
323 function = "gpio";
324 output-high;
325 };
326 };
327 };
328
329 &blsp_dma {
330 status = "okay";
331 };
332
333 &blsp1_i2c4 {
334 /*
335 * There is no driver for the following devices:
336 * - CY8C4014LQI@14 : Touch-Sensor for buttons on top
337 * - MINI54FDE@15 : MCU for Fan/RGB LED/Thermal control
338 * - ALC5629@18 : I2S/PCM Audio DAC
339 * - CX20924@41 : Voice Input Processor
340 */
341 pinctrl-0 = <&i2c_1_pins>;
342 pinctrl-names = "default";
343 status = "okay";
344
345 led-controller@32 {
346 compatible = "ti,lp55231";
347 reg = <0x32>;
348 clock-mode = /bits/ 8 <0>;
349 enable-gpio = <&tlmm 1 GPIO_ACTIVE_HIGH>;
350 #address-cells = <1>;
351 #size-cells = <0>;
352
353 led@0 {
354 chan-name = "green:wan";
355 led-cur = /bits/ 8 <50>;
356 max-cur = /bits/ 8 <100>;
357 reg = <0x0>;
358 color = <LED_COLOR_ID_GREEN>;
359 function = LED_FUNCTION_WAN;
360 };
361
362 led@1 {
363 chan-name = "blue:wan";
364 led-cur = /bits/ 8 <50>;
365 max-cur = /bits/ 8 <100>;
366 reg = <0x1>;
367 color = <LED_COLOR_ID_BLUE>;
368 function = LED_FUNCTION_WAN;
369 };
370
371 led@2 {
372 chan-name = "green:lan";
373 led-cur = /bits/ 8 <50>;
374 max-cur = /bits/ 8 <100>;
375 reg = <0x2>;
376 color = <LED_COLOR_ID_GREEN>;
377 function = LED_FUNCTION_LAN;
378 };
379
380 led@3 {
381 chan-name = "blue:lan";
382 led-cur = /bits/ 8 <50>;
383 max-cur = /bits/ 8 <100>;
384 reg = <0x3>;
385 color = <LED_COLOR_ID_BLUE>;
386 function = LED_FUNCTION_LAN;
387 };
388
389 led@4 {
390 chan-name = "green:wlan-2";
391 led-cur = /bits/ 8 <50>;
392 max-cur = /bits/ 8 <100>;
393 reg = <0x4>;
394 color = <LED_COLOR_ID_GREEN>;
395 function = LED_FUNCTION_WLAN;
396 function-enumerator = <2>;
397 linux,default-trigger = "phy0tpt";
398 };
399
400 led@5 {
401 chan-name = "blue:wlan-2";
402 led-cur = /bits/ 8 <50>;
403 max-cur = /bits/ 8 <100>;
404 reg = <0x5>;
405 color = <LED_COLOR_ID_BLUE>;
406 function = LED_FUNCTION_WLAN;
407 function-enumerator = <2>;
408 };
409
410 led@6 {
411 chan-name = "red:wan";
412 led-cur = /bits/ 8 <50>;
413 max-cur = /bits/ 8 <100>;
414 reg = <0x6>;
415 color = <LED_COLOR_ID_RED>;
416 function = LED_FUNCTION_WAN;
417 };
418
419 led@7 {
420 chan-name = "red:lan";
421 led-cur = /bits/ 8 <50>;
422 max-cur = /bits/ 8 <100>;
423 reg = <0x7>;
424 color = <LED_COLOR_ID_RED>;
425 function = LED_FUNCTION_LAN;
426 };
427
428 led@8 {
429 chan-name = "red:wlan-2";
430 led-cur = /bits/ 8 <50>;
431 max-cur = /bits/ 8 <100>;
432 reg = <0x8>;
433 color = <LED_COLOR_ID_RED>;
434 function = LED_FUNCTION_WLAN;
435 function-enumerator = <2>;
436 };
437 };
438
439 led-controller@33 {
440 compatible = "ti,lp55231";
441 reg = <0x33>;
442 clock-mode = /bits/ 8 <0>;
443 #address-cells = <1>;
444 #size-cells = <0>;
445
446 led@0 {
447 chan-name = "green:wlan-5";
448 led-cur = /bits/ 8 <50>;
449 max-cur = /bits/ 8 <100>;
450 reg = <0x0>;
451 color = <LED_COLOR_ID_GREEN>;
452 function = LED_FUNCTION_WLAN;
453 linux,default-trigger = "phy1tpt";
454 function-enumerator = <5>;
455 };
456
457 led@1 {
458 chan-name = "blue:wlan-5";
459 led-cur = /bits/ 8 <50>;
460 max-cur = /bits/ 8 <100>;
461 reg = <0x1>;
462 color = <LED_COLOR_ID_BLUE>;
463 function = LED_FUNCTION_WLAN;
464 function-enumerator = <5>;
465 };
466
467 led@2 {
468 chan-name = "green:wan-4";
469 led-cur = /bits/ 8 <50>;
470 max-cur = /bits/ 8 <100>;
471 reg = <0x2>;
472 color = <LED_COLOR_ID_GREEN>;
473 function = LED_FUNCTION_WAN; /* WWAN/LTE/4G */
474 function-enumerator = <4>; /* WWAN/LTE/4G */
475 };
476
477 led@3 {
478 chan-name = "blue:wan-4";
479 led-cur = /bits/ 8 <50>;
480 max-cur = /bits/ 8 <100>;
481 reg = <0x3>;
482 color = <LED_COLOR_ID_BLUE>;
483 function = LED_FUNCTION_WAN; /* WWAN/LTE/4G */
484 function-enumerator = <4>; /* WWAN/LTE/4G */
485 };
486
487 led_cloud_green: led@4 {
488 chan-name = "green:power";
489 led-cur = /bits/ 8 <50>;
490 max-cur = /bits/ 8 <100>;
491 reg = <0x4>;
492 color = <LED_COLOR_ID_GREEN>;
493 function = LED_FUNCTION_POWER;
494 };
495
496 led@5 {
497 chan-name = "blue:power";
498 led-cur = /bits/ 8 <50>;
499 max-cur = /bits/ 8 <100>;
500 reg = <0x5>;
501 color = <LED_COLOR_ID_BLUE>;
502 function = LED_FUNCTION_POWER;
503 };
504
505 led@6 {
506 chan-name = "red:wlan-5";
507 led-cur = /bits/ 8 <50>;
508 max-cur = /bits/ 8 <100>;
509 reg = <0x6>;
510 color = <LED_COLOR_ID_RED>;
511 function = LED_FUNCTION_WLAN;
512 function-enumerator = <5>;
513 };
514
515 led@7 {
516 chan-name = "red:wan-4";
517 led-cur = /bits/ 8 <50>;
518 max-cur = /bits/ 8 <100>;
519 reg = <0x7>;
520 color = <LED_COLOR_ID_RED>;
521 function = LED_FUNCTION_WAN; /* WWAN/LTE/4G */
522 function-enumerator = <4>; /* WWAN/LTE/4G */
523 };
524
525 led_cloud_red: led@8 {
526 chan-name = "red:power";
527 led-cur = /bits/ 8 <50>;
528 max-cur = /bits/ 8 <100>;
529 reg = <0x8>;
530 color = <LED_COLOR_ID_RED>;
531 function = LED_FUNCTION_POWER;
532 };
533 };
534 };
535
536 &blsp1_uart1 {
537 pinctrl-0 = <&serial_pins>, <&uart0_ctrl_pins>;
538 pinctrl-names = "default";
539 status = "okay";
540 };
541
542 &blsp1_uart2 {
543 pinctrl-0 = <&serial_1_pins>;
544 pinctrl-names = "default";
545 status = "okay";
546 };
547
548 &crypto {
549 status = "okay";
550 };
551
552 &cryptobam {
553 status = "okay";
554 };
555
556 &mdio {
557 status = "okay";
558 pinctrl-0 = <&mdio_pins>;
559 pinctrl-names = "default";
560 reset-gpios = <&tlmm 41 GPIO_ACTIVE_LOW>;
561 };
562
563 &prng {
564 status = "okay";
565 };
566
567 &vqmmc {
568 status = "okay";
569 };
570
571 &sdhci {
572 status = "okay";
573 pinctrl-0 = <&sd_pins>;
574 pinctrl-names = "default";
575 vqmmc-supply = <&vqmmc>;
576 non-removable;
577 #address-cells = <1>;
578 #size-cells = <0>;
579
580 emmc@0 {
581 compatible = "mmc-card";
582 reg = <0>;
583 };
584 };
585
586 &usb2 {
587 status = "okay";
588 };
589
590 &usb2_hs_phy {
591 status = "okay";
592 };
593
594 &usb3 {
595 status = "okay";
596
597 pinctrl-0 = <&usb3_pins>, <&lte_pins>;
598 pinctrl-names = "default";
599
600 dwc3@8a00000 {
601 #address-cells = <1>;
602 #size-cells = <0>;
603
604 device@1 {
605 compatible = "usb1bc7,1900";
606 reg = <1>;
607 };
608 };
609 };
610
611 &usb3_hs_phy {
612 status = "okay";
613 };
614
615 &usb3_ss_phy {
616 status = "okay";
617 };
618
619 &wifi0 {
620 status = "okay";
621 qcom,ath10k-calibration-variant = "Sony-NCP-HG100-Cellular";
622 };
623
624 &wifi1 {
625 status = "okay";
626 qcom,ath10k-calibration-variant = "Sony-NCP-HG100-Cellular";
627 };
628
629 &watchdog {
630 status = "okay";
631 };