Debian Codegraph @

scripts/dtc/include-prefixes/arm64/rockchip/rk3399-rock960.dtsi

raw
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 /*
3 * Copyright (c) 2018 Collabora Ltd.
4 * Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd.
5 * Copyright (c) 2018 Linaro Ltd.
6 */
7
8 #include <dt-bindings/interrupt-controller/irq.h>
9 #include "rk3399.dtsi"
10
11 / {
12 aliases {
13 mmc0 = &sdio0;
14 mmc1 = &sdmmc;
15 mmc2 = &sdhci;
16 };
17
18 sdio_pwrseq: sdio-pwrseq {
19 compatible = "mmc-pwrseq-simple";
20 clocks = <&rk808 1>;
21 clock-names = "ext_clock";
22 pinctrl-names = "default";
23 pinctrl-0 = <&wifi_enable_h>;
24 reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
25 };
26
27 vcc12v_dcin: regulator-vcc12v-dcin {
28 compatible = "regulator-fixed";
29 regulator-name = "vcc12v_dcin";
30 regulator-min-microvolt = <12000000>;
31 regulator-max-microvolt = <12000000>;
32 regulator-always-on;
33 regulator-boot-on;
34 };
35
36 vcc1v8_s0: regulator-vcc1v8-s0 {
37 compatible = "regulator-fixed";
38 regulator-name = "vcc1v8_s0";
39 regulator-min-microvolt = <1800000>;
40 regulator-max-microvolt = <1800000>;
41 regulator-always-on;
42 };
43
44 vcc5v0_sys: regulator-vcc5v0-sys {
45 compatible = "regulator-fixed";
46 regulator-name = "vcc5v0_sys";
47 regulator-min-microvolt = <5000000>;
48 regulator-max-microvolt = <5000000>;
49 regulator-always-on;
50 vin-supply = <&vcc12v_dcin>;
51 };
52
53 vcc3v3_sys: regulator-vcc3v3-sys {
54 compatible = "regulator-fixed";
55 regulator-name = "vcc3v3_sys";
56 regulator-min-microvolt = <3300000>;
57 regulator-max-microvolt = <3300000>;
58 regulator-always-on;
59 vin-supply = <&vcc5v0_sys>;
60 };
61
62 vcc3v3_pcie: regulator-vcc3v3-pcie {
63 compatible = "regulator-fixed";
64 enable-active-high;
65 pinctrl-names = "default";
66 pinctrl-0 = <&pcie_drv>;
67 regulator-boot-on;
68 regulator-name = "vcc3v3_pcie";
69 regulator-min-microvolt = <3300000>;
70 regulator-max-microvolt = <3300000>;
71 vin-supply = <&vcc3v3_sys>;
72 };
73
74 vcc5v0_host: regulator-vcc5v0-host {
75 compatible = "regulator-fixed";
76 enable-active-high;
77 pinctrl-names = "default";
78 pinctrl-0 = <&host_vbus_drv>;
79 regulator-name = "vcc5v0_host";
80 regulator-min-microvolt = <5000000>;
81 regulator-max-microvolt = <5000000>;
82 regulator-always-on;
83 vin-supply = <&vcc5v0_sys>;
84 };
85
86 vcc_0v9: regulator-vcc-0v9 {
87 compatible = "regulator-fixed";
88 regulator-name = "vcc_0v9";
89 regulator-always-on;
90 regulator-min-microvolt = <900000>;
91 regulator-max-microvolt = <900000>;
92 vin-supply = <&vcc3v3_sys>;
93 };
94 };
95
96 &cpu_l0 {
97 cpu-supply = <&vdd_cpu_l>;
98 };
99
100 &cpu_l1 {
101 cpu-supply = <&vdd_cpu_l>;
102 };
103
104 &cpu_l2 {
105 cpu-supply = <&vdd_cpu_l>;
106 };
107
108 &cpu_l3 {
109 cpu-supply = <&vdd_cpu_l>;
110 };
111
112 &cpu_b0 {
113 cpu-supply = <&vdd_cpu_b>;
114 };
115
116 &cpu_b1 {
117 cpu-supply = <&vdd_cpu_b>;
118 };
119
120 &emmc_phy {
121 status = "okay";
122 };
123
124 &gpu {
125 mali-supply = <&vdd_gpu>;
126 status = "okay";
127 };
128
129 &hdmi {
130 avdd-0v9-supply = <&vcca0v9_hdmi>;
131 avdd-1v8-supply = <&vcca1v8_hdmi>;
132 ddc-i2c-bus = <&i2c3>;
133 pinctrl-names = "default";
134 pinctrl-0 = <&hdmi_cec>;
135 status = "okay";
136 };
137
138 &hdmi_sound {
139 status = "okay";
140 };
141
142 &i2c0 {
143 clock-frequency = <400000>;
144 i2c-scl-rising-time-ns = <168>;
145 i2c-scl-falling-time-ns = <4>;
146 status = "okay";
147
148 vdd_cpu_b: regulator@40 {
149 compatible = "silergy,syr827";
150 reg = <0x40>;
151 fcs,suspend-voltage-selector = <1>;
152 regulator-name = "vdd_cpu_b";
153 regulator-min-microvolt = <712500>;
154 regulator-max-microvolt = <1500000>;
155 regulator-ramp-delay = <1000>;
156 regulator-always-on;
157 regulator-boot-on;
158 vin-supply = <&vcc5v0_sys>;
159 status = "okay";
160
161 regulator-state-mem {
162 regulator-off-in-suspend;
163 };
164 };
165
166 vdd_gpu: regulator@41 {
167 compatible = "silergy,syr828";
168 reg = <0x41>;
169 fcs,suspend-voltage-selector = <1>;
170 regulator-name = "vdd_gpu";
171 regulator-min-microvolt = <712500>;
172 regulator-max-microvolt = <1500000>;
173 regulator-ramp-delay = <1000>;
174 regulator-always-on;
175 regulator-boot-on;
176 vin-supply = <&vcc5v0_sys>;
177 regulator-state-mem {
178 regulator-off-in-suspend;
179 };
180 };
181
182 rk808: pmic@1b {
183 compatible = "rockchip,rk808";
184 reg = <0x1b>;
185 interrupt-parent = <&gpio1>;
186 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
187 pinctrl-names = "default";
188 pinctrl-0 = <&pmic_int_l>;
189 system-power-controller;
190 wakeup-source;
191 #clock-cells = <1>;
192 clock-output-names = "xin32k", "rk808-clkout2";
193
194 vcc1-supply = <&vcc5v0_sys>;
195 vcc2-supply = <&vcc5v0_sys>;
196 vcc3-supply = <&vcc5v0_sys>;
197 vcc4-supply = <&vcc5v0_sys>;
198 vcc6-supply = <&vcc5v0_sys>;
199 vcc7-supply = <&vcc5v0_sys>;
200 vcc8-supply = <&vcc3v3_sys>;
201 vcc9-supply = <&vcc5v0_sys>;
202 vcc10-supply = <&vcc5v0_sys>;
203 vcc11-supply = <&vcc5v0_sys>;
204 vcc12-supply = <&vcc3v3_sys>;
205 vddio-supply = <&vcc_1v8>;
206
207 regulators {
208 vdd_center: DCDC_REG1 {
209 regulator-name = "vdd_center";
210 regulator-min-microvolt = <750000>;
211 regulator-max-microvolt = <1350000>;
212 regulator-always-on;
213 regulator-boot-on;
214 regulator-state-mem {
215 regulator-off-in-suspend;
216 };
217 };
218
219 vdd_cpu_l: DCDC_REG2 {
220 regulator-name = "vdd_cpu_l";
221 regulator-min-microvolt = <750000>;
222 regulator-max-microvolt = <1350000>;
223 regulator-always-on;
224 regulator-boot-on;
225 regulator-state-mem {
226 regulator-off-in-suspend;
227 };
228 };
229
230 vcc_ddr: DCDC_REG3 {
231 regulator-name = "vcc_ddr";
232 regulator-always-on;
233 regulator-boot-on;
234 regulator-state-mem {
235 regulator-on-in-suspend;
236 };
237 };
238
239 vcc_1v8: DCDC_REG4 {
240 regulator-name = "vcc_1v8";
241 regulator-min-microvolt = <1800000>;
242 regulator-max-microvolt = <1800000>;
243 regulator-always-on;
244 regulator-boot-on;
245 regulator-state-mem {
246 regulator-on-in-suspend;
247 regulator-suspend-microvolt = <1800000>;
248 };
249 };
250
251 vcc1v8_dvp: LDO_REG1 {
252 regulator-name = "vcc1v8_dvp";
253 regulator-min-microvolt = <1800000>;
254 regulator-max-microvolt = <1800000>;
255 regulator-always-on;
256 regulator-boot-on;
257 regulator-state-mem {
258 regulator-on-in-suspend;
259 regulator-suspend-microvolt = <1800000>;
260 };
261 };
262
263 vcca1v8_hdmi: LDO_REG2 {
264 regulator-name = "vcca1v8_hdmi";
265 regulator-min-microvolt = <1800000>;
266 regulator-max-microvolt = <1800000>;
267 regulator-always-on;
268 regulator-boot-on;
269 regulator-state-mem {
270 regulator-on-in-suspend;
271 regulator-suspend-microvolt = <1800000>;
272 };
273 };
274
275 vcca_1v8: LDO_REG3 {
276 regulator-name = "vcca_1v8";
277 regulator-min-microvolt = <1800000>;
278 regulator-max-microvolt = <1800000>;
279 regulator-always-on;
280 regulator-boot-on;
281 regulator-state-mem {
282 regulator-on-in-suspend;
283 regulator-suspend-microvolt = <1800000>;
284 };
285 };
286
287 vcc_sd: LDO_REG4 {
288 regulator-name = "vcc_sd";
289 regulator-min-microvolt = <1800000>;
290 regulator-max-microvolt = <3300000>;
291 regulator-always-on;
292 regulator-boot-on;
293 regulator-state-mem {
294 regulator-on-in-suspend;
295 regulator-suspend-microvolt = <3300000>;
296 };
297 };
298
299 vcc3v0_sd: LDO_REG5 {
300 regulator-name = "vcc3v0_sd";
301 regulator-min-microvolt = <3000000>;
302 regulator-max-microvolt = <3000000>;
303 regulator-always-on;
304 regulator-boot-on;
305 regulator-state-mem {
306 regulator-on-in-suspend;
307 regulator-suspend-microvolt = <3000000>;
308 };
309 };
310
311 vcc_1v5: LDO_REG6 {
312 regulator-name = "vcc_1v5";
313 regulator-min-microvolt = <1500000>;
314 regulator-max-microvolt = <1500000>;
315 regulator-always-on;
316 regulator-boot-on;
317 regulator-state-mem {
318 regulator-on-in-suspend;
319 regulator-suspend-microvolt = <1500000>;
320 };
321 };
322
323 vcca0v9_hdmi: LDO_REG7 {
324 regulator-name = "vcca0v9_hdmi";
325 regulator-min-microvolt = <900000>;
326 regulator-max-microvolt = <900000>;
327 regulator-always-on;
328 regulator-boot-on;
329 regulator-state-mem {
330 regulator-on-in-suspend;
331 regulator-suspend-microvolt = <900000>;
332 };
333 };
334
335 vcc_3v0: LDO_REG8 {
336 regulator-name = "vcc_3v0";
337 regulator-min-microvolt = <3000000>;
338 regulator-max-microvolt = <3000000>;
339 regulator-always-on;
340 regulator-boot-on;
341 regulator-state-mem {
342 regulator-on-in-suspend;
343 regulator-suspend-microvolt = <3000000>;
344 };
345 };
346
347 vcc3v3_s3: SWITCH_REG1 {
348 regulator-name = "vcc3v3_s3";
349 regulator-always-on;
350 regulator-boot-on;
351 regulator-state-mem {
352 regulator-on-in-suspend;
353 };
354 };
355
356 vcc3v3_s0: SWITCH_REG2 {
357 regulator-name = "vcc3v3_s0";
358 regulator-always-on;
359 regulator-boot-on;
360 regulator-state-mem {
361 regulator-on-in-suspend;
362 };
363 };
364 };
365 };
366 };
367
368 &i2c1 {
369 status = "okay";
370 };
371
372 &i2c2 {
373 status = "okay";
374 };
375
376 &i2c3 {
377 status = "okay";
378 };
379
380 &i2c4 {
381 status = "okay";
382 };
383
384 &i2s2 {
385 status = "okay";
386 };
387
388 &io_domains {
389 bt656-supply = <&vcc1v8_s0>; /* bt656_gpio2ab_ms */
390 audio-supply = <&vcc1v8_s0>; /* audio_gpio3d4a_ms */
391 sdmmc-supply = <&vcc_sd>; /* sdmmc_gpio4b_ms */
392 gpio1830-supply = <&vcc_3v0>; /* gpio1833_gpio4cd_ms */
393 status = "okay";
394 };
395
396 &pcie_phy {
397 status = "okay";
398 };
399
400 &pcie0 {
401 num-lanes = <4>;
402 pinctrl-names = "default";
403 pinctrl-0 = <&pcie_clkreqn_cpm>;
404 vpcie0v9-supply = <&vcc_0v9>;
405 vpcie1v8-supply = <&vcca_1v8>;
406 vpcie3v3-supply = <&vcc3v3_pcie>;
407 status = "okay";
408 };
409
410 &pmu_io_domains {
411 pmu1830-supply = <&vcc_1v8>;
412 status = "okay";
413 };
414
415 &pinctrl {
416 bt {
417 bt_enable_h: bt-enable-h {
418 rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
419 };
420
421 bt_host_wake_l: bt-host-wake-l {
422 rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
423 };
424
425 bt_wake_l: bt-wake-l {
426 rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
427 };
428 };
429
430 sdmmc {
431 sdmmc_bus1: sdmmc-bus1 {
432 rockchip,pins =
433 <4 RK_PB0 1 &pcfg_pull_up_8ma>;
434 };
435
436 sdmmc_bus4: sdmmc-bus4 {
437 rockchip,pins =
438 <4 RK_PB0 1 &pcfg_pull_up_8ma>,
439 <4 RK_PB1 1 &pcfg_pull_up_8ma>,
440 <4 RK_PB2 1 &pcfg_pull_up_8ma>,
441 <4 RK_PB3 1 &pcfg_pull_up_8ma>;
442 };
443
444 sdmmc_clk: sdmmc-clk {
445 rockchip,pins =
446 <4 RK_PB4 1 &pcfg_pull_none_18ma>;
447 };
448
449 sdmmc_cmd: sdmmc-cmd {
450 rockchip,pins =
451 <4 RK_PB5 1 &pcfg_pull_up_8ma>;
452 };
453 };
454
455 sdio0 {
456 sdio0_bus4: sdio0-bus4 {
457 rockchip,pins =
458 <2 RK_PC4 1 &pcfg_pull_up_20ma>,
459 <2 RK_PC5 1 &pcfg_pull_up_20ma>,
460 <2 RK_PC6 1 &pcfg_pull_up_20ma>,
461 <2 RK_PC7 1 &pcfg_pull_up_20ma>;
462 };
463
464 sdio0_cmd: sdio0-cmd {
465 rockchip,pins =
466 <2 RK_PD0 1 &pcfg_pull_up_20ma>;
467 };
468
469 sdio0_clk: sdio0-clk {
470 rockchip,pins =
471 <2 RK_PD1 1 &pcfg_pull_none_20ma>;
472 };
473 };
474
475 pmic {
476 pmic_int_l: pmic-int-l {
477 rockchip,pins =
478 <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
479 };
480
481 vsel1_pin: vsel1-pin {
482 rockchip,pins =
483 <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
484 };
485
486 vsel2_pin: vsel2-pin {
487 rockchip,pins =
488 <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
489 };
490 };
491
492 sdio-pwrseq {
493 wifi_enable_h: wifi-enable-h {
494 rockchip,pins =
495 <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
496 };
497 };
498
499 wifi {
500 wifi_host_wake_l: wifi-host-wake-l {
501 rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
502 };
503 };
504 };
505
506 &pwm2 {
507 status = "okay";
508 };
509
510 &pwm3 {
511 status = "okay";
512 };
513
514 &sdio0 {
515 bus-width = <4>;
516 clock-frequency = <50000000>;
517 cap-sdio-irq;
518 cap-sd-highspeed;
519 keep-power-in-suspend;
520 mmc-pwrseq = <&sdio_pwrseq>;
521 non-removable;
522 pinctrl-names = "default";
523 pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
524 sd-uhs-sdr104;
525 #address-cells = <1>;
526 #size-cells = <0>;
527 status = "okay";
528
529 brcmf: wifi@1 {
530 compatible = "brcm,bcm4329-fmac";
531 reg = <1>;
532 interrupt-parent = <&gpio0>;
533 interrupts = <RK_PA3 IRQ_TYPE_LEVEL_HIGH>;
534 interrupt-names = "host-wake";
535 pinctrl-names = "default";
536 pinctrl-0 = <&wifi_host_wake_l>;
537 };
538 };
539
540 &sdhci {
541 bus-width = <8>;
542 mmc-hs400-1_8v;
543 mmc-hs400-enhanced-strobe;
544 non-removable;
545 status = "okay";
546 };
547
548 &sdmmc {
549 bus-width = <4>;
550 cap-mmc-highspeed;
551 cap-sd-highspeed;
552 clock-frequency = <100000000>;
553 max-frequency = <100000000>;
554 cd-gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
555 disable-wp;
556 sd-uhs-sdr104;
557 vqmmc-supply = <&vcc_sd>;
558 card-detect-delay = <800>;
559 pinctrl-names = "default";
560 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
561 status = "okay";
562 };
563
564 &tsadc {
565 rockchip,hw-tshut-mode = <1>;
566 rockchip,hw-tshut-polarity = <1>;
567 rockchip,hw-tshut-temp = <110000>;
568 status = "okay";
569 };
570
571 &uart0 {
572 pinctrl-names = "default";
573 pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
574 status = "okay";
575
576 bluetooth {
577 compatible = "brcm,bcm43438-bt";
578 clocks = <&rk808 1>;
579 clock-names = "txco";
580 device-wakeup-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
581 host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
582 shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
583 pinctrl-names = "default";
584 pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_enable_h>;
585 };
586 };
587
588 &uart2 {
589 status = "okay";
590 };
591
592 &tcphy0 {
593 status = "okay";
594 };
595
596 &tcphy1 {
597 status = "okay";
598 };
599
600 &u2phy0 {
601 status = "okay";
602 };
603
604 &u2phy1 {
605 status = "okay";
606 };
607
608 &u2phy0_host {
609 phy-supply = <&vcc5v0_host>;
610 status = "okay";
611 };
612
613 &u2phy1_host {
614 phy-supply = <&vcc5v0_host>;
615 status = "okay";
616 };
617
618 &u2phy0_otg {
619 status = "okay";
620 };
621
622 &u2phy1_otg {
623 status = "okay";
624 };
625
626 &usb_host0_ehci {
627 status = "okay";
628 };
629
630 &usb_host0_ohci {
631 status = "okay";
632 };
633
634 &usb_host1_ehci {
635 status = "okay";
636 };
637
638 &usb_host1_ohci {
639 status = "okay";
640 };
641
642 &usbdrd3_0 {
643 status = "okay";
644 };
645
646 &usbdrd_dwc3_0 {
647 status = "okay";
648 };
649
650 &usbdrd3_1 {
651 status = "okay";
652 };
653
654 &usbdrd_dwc3_1 {
655 status = "okay";
656 };
657
658 &vopb {
659 status = "okay";
660 };
661
662 &vopb_mmu {
663 status = "okay";
664 };
665
666 &vopl {
667 status = "okay";
668 };
669
670 &vopl_mmu {
671 status = "okay";
672 };