Debian Codegraph @

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

raw
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 /*
3 * Copyright (c) 2017 Theobroma Systems Design und Consulting GmbH
4 */
5
6 #include <dt-bindings/pwm/pwm.h>
7 #include "rk3399.dtsi"
8
9 / {
10 aliases {
11 ethernet0 = &gmac;
12 i2c10 = &i2c10;
13 mmc0 = &sdhci;
14 };
15
16 leds {
17 compatible = "gpio-leds";
18 pinctrl-names = "default";
19 pinctrl-0 = <&module_led_pin>;
20
21 module_led: led-0 {
22 label = "module_led";
23 gpios = <&gpio2 RK_PD1 GPIO_ACTIVE_HIGH>;
24 linux,default-trigger = "heartbeat";
25 panic-indicator;
26 };
27 };
28
29 extcon_usb3: extcon-usb3 {
30 compatible = "linux,extcon-usb-gpio";
31 id-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_HIGH>;
32 pinctrl-names = "default";
33 pinctrl-0 = <&usb3_id>;
34 };
35
36 clkin_gmac: external-gmac-clock {
37 compatible = "fixed-clock";
38 clock-frequency = <125000000>;
39 clock-output-names = "clkin_gmac";
40 #clock-cells = <0>;
41 };
42
43 vcc1v2_phy: regulator-vcc1v2-phy {
44 compatible = "regulator-fixed";
45 regulator-name = "vcc1v2_phy";
46 regulator-always-on;
47 regulator-boot-on;
48 regulator-min-microvolt = <1200000>;
49 regulator-max-microvolt = <1200000>;
50 vin-supply = <&vcc5v0_sys>;
51 };
52
53 vcc3v3_sys: regulator-vcc3v3-sys {
54 compatible = "regulator-fixed";
55 regulator-name = "vcc3v3_sys";
56 regulator-always-on;
57 regulator-boot-on;
58 regulator-min-microvolt = <3300000>;
59 regulator-max-microvolt = <3300000>;
60 vin-supply = <&vcc5v0_sys>;
61 };
62
63 vcc5v0_sys: regulator-vcc5v0-sys {
64 compatible = "regulator-fixed";
65 regulator-name = "vcc5v0_sys";
66 regulator-always-on;
67 regulator-boot-on;
68 regulator-min-microvolt = <5000000>;
69 regulator-max-microvolt = <5000000>;
70 };
71
72 vcca_0v9: regulator-vcca-0v9 {
73 compatible = "regulator-fixed";
74 regulator-name = "vcca_0v9";
75 regulator-always-on;
76 regulator-boot-on;
77 regulator-min-microvolt = <900000>;
78 regulator-max-microvolt = <900000>;
79 vin-supply = <&vcc_1v8>;
80 };
81
82 vcca_1v8: regulator-vcca-1v8 {
83 compatible = "regulator-fixed";
84 regulator-name = "vcca_1v8";
85 regulator-always-on;
86 regulator-boot-on;
87 regulator-min-microvolt = <1800000>;
88 regulator-max-microvolt = <1800000>;
89 vin-supply = <&vcc3v3_sys>;
90 };
91
92 vdd_log: regulator-vdd-log {
93 compatible = "pwm-regulator";
94 pwms = <&pwm2 0 25000 1>;
95 pwm-supply = <&vcc5v0_sys>;
96 regulator-name = "vdd_log";
97 regulator-min-microvolt = <800000>;
98 regulator-max-microvolt = <1400000>;
99 regulator-always-on;
100 regulator-boot-on;
101 };
102 };
103
104 &cpu_b0 {
105 cpu-supply = <&vdd_cpu_b>;
106 };
107
108 &cpu_b1 {
109 cpu-supply = <&vdd_cpu_b>;
110 };
111
112 &cpu_l0 {
113 cpu-supply = <&vdd_cpu_l>;
114 };
115
116 &cpu_l1 {
117 cpu-supply = <&vdd_cpu_l>;
118 };
119
120 &cpu_l2 {
121 cpu-supply = <&vdd_cpu_l>;
122 };
123
124 &cpu_l3 {
125 cpu-supply = <&vdd_cpu_l>;
126 };
127
128 &emmc_phy {
129 status = "okay";
130 drive-impedance-ohm = <33>;
131 };
132
133 &gpio0 {
134 /*
135 * The BIOS_DISABLE hog is a feedback pin for the actual status of the
136 * signal. This usually represents the state of a switch on the baseboard.
137 * The pin has a 10k pull-up resistor connected, so no pull-up setting is needed.
138 */
139 bios-disable-hog {
140 gpios = <RK_PB0 GPIO_ACTIVE_HIGH>;
141 gpio-hog;
142 input;
143 line-name = "bios_disable";
144 };
145 };
146
147 &gpio3 {
148 /*
149 * The Qseven BIOS_DISABLE signal on the RK3399-Q7 keeps the on-module
150 * eMMC and SPI flash powered-down initially (in fact it keeps the
151 * reset signal asserted). BIOS_DISABLE_OVERRIDE pin allows to override
152 * that signal so that eMMC and SPI can be used regardless of the state
153 * of the signal.
154 */
155 bios-disable-override-hog {
156 gpios = <RK_PD5 GPIO_ACTIVE_LOW>;
157 gpio-hog;
158 line-name = "bios_disable_override";
159 output-high;
160 };
161 };
162
163 &gmac {
164 assigned-clocks = <&cru SCLK_RMII_SRC>;
165 assigned-clock-parents = <&clkin_gmac>;
166 clock_in_out = "input";
167 phy-supply = <&vcc1v2_phy>;
168 phy-mode = "rgmii";
169 pinctrl-names = "default";
170 pinctrl-0 = <&rgmii_pins>;
171 snps,reset-gpio = <&gpio3 RK_PC0 GPIO_ACTIVE_LOW>;
172 snps,reset-active-low;
173 snps,reset-delays-us = <0 10000 50000>;
174 tx_delay = <0x10>;
175 rx_delay = <0x23>;
176 };
177
178 &gpu {
179 mali-supply = <&vdd_gpu>;
180 status = "okay";
181 };
182
183 &i2c0 {
184 status = "okay";
185 i2c-scl-rising-time-ns = <168>;
186 i2c-scl-falling-time-ns = <4>;
187 clock-frequency = <400000>;
188
189 rk808: pmic@1b {
190 compatible = "rockchip,rk808";
191 reg = <0x1b>;
192 interrupt-parent = <&gpio1>;
193 interrupts = <22 IRQ_TYPE_LEVEL_LOW>;
194 #clock-cells = <1>;
195 clock-output-names = "xin32k", "rk808-clkout2";
196 pinctrl-names = "default";
197 pinctrl-0 = <&pmic_int_l>;
198 system-power-controller;
199 wakeup-source;
200
201 vcc1-supply = <&vcc5v0_sys>;
202 vcc2-supply = <&vcc5v0_sys>;
203 vcc3-supply = <&vcc5v0_sys>;
204 vcc4-supply = <&vcc5v0_sys>;
205 vcc6-supply = <&vcc5v0_sys>;
206 vcc7-supply = <&vcc5v0_sys>;
207 vcc8-supply = <&vcc3v3_sys>;
208 vcc9-supply = <&vcc5v0_sys>;
209 vcc10-supply = <&vcc5v0_sys>;
210 vcc11-supply = <&vcc5v0_sys>;
211 vcc12-supply = <&vcc3v3_sys>;
212 vddio-supply = <&vcc1v8_pmu>;
213
214 regulators {
215 vdd_center: DCDC_REG1 {
216 regulator-name = "vdd_center";
217 regulator-min-microvolt = <750000>;
218 regulator-max-microvolt = <1350000>;
219 regulator-ramp-delay = <6001>;
220 regulator-always-on;
221 regulator-boot-on;
222 regulator-state-mem {
223 regulator-off-in-suspend;
224 };
225 };
226
227 vdd_cpu_l: DCDC_REG2 {
228 regulator-name = "vdd_cpu_l";
229 regulator-min-microvolt = <750000>;
230 regulator-max-microvolt = <1350000>;
231 regulator-ramp-delay = <6001>;
232 regulator-always-on;
233 regulator-boot-on;
234 regulator-state-mem {
235 regulator-off-in-suspend;
236 };
237 };
238
239 vcc_ddr: DCDC_REG3 {
240 regulator-name = "vcc_ddr";
241 regulator-always-on;
242 regulator-boot-on;
243 regulator-state-mem {
244 regulator-on-in-suspend;
245 };
246 };
247
248 vcc_1v8: DCDC_REG4 {
249 regulator-name = "vcc_1v8";
250 regulator-min-microvolt = <1800000>;
251 regulator-max-microvolt = <1800000>;
252 regulator-always-on;
253 regulator-boot-on;
254 regulator-state-mem {
255 regulator-on-in-suspend;
256 regulator-suspend-microvolt = <1800000>;
257 };
258 };
259
260 vcc_ldo1: LDO_REG1 {
261 regulator-name = "vcc_ldo1";
262 regulator-min-microvolt = <1800000>;
263 regulator-max-microvolt = <1800000>;
264 regulator-boot-on;
265 regulator-state-mem {
266 regulator-off-in-suspend;
267 };
268 };
269
270 vcc1v8_hdmi: LDO_REG2 {
271 regulator-name = "vcc1v8_hdmi";
272 regulator-min-microvolt = <1800000>;
273 regulator-max-microvolt = <1800000>;
274 regulator-always-on;
275 regulator-boot-on;
276 regulator-state-mem {
277 regulator-off-in-suspend;
278 };
279 };
280
281 vcc1v8_pmu: LDO_REG3 {
282 regulator-name = "vcc1v8_pmu";
283 regulator-min-microvolt = <1800000>;
284 regulator-max-microvolt = <1800000>;
285 regulator-always-on;
286 regulator-boot-on;
287 regulator-state-mem {
288 regulator-on-in-suspend;
289 regulator-suspend-microvolt = <1800000>;
290 };
291 };
292
293 vcc_sd: LDO_REG4 {
294 regulator-name = "vcc_sd";
295 regulator-min-microvolt = <1800000>;
296 regulator-max-microvolt = <3000000>;
297 regulator-always-on;
298 regulator-boot-on;
299 regulator-state-mem {
300 regulator-on-in-suspend;
301 regulator-suspend-microvolt = <3000000>;
302 };
303 };
304
305 vcc_ldo5: LDO_REG5 {
306 regulator-name = "vcc_ldo5";
307 regulator-min-microvolt = <3000000>;
308 regulator-max-microvolt = <3000000>;
309 regulator-boot-on;
310 regulator-state-mem {
311 regulator-off-in-suspend;
312 };
313 };
314
315 vcc_ldo6: LDO_REG6 {
316 regulator-name = "vcc_ldo6";
317 regulator-min-microvolt = <1500000>;
318 regulator-max-microvolt = <1500000>;
319 regulator-boot-on;
320 regulator-state-mem {
321 regulator-off-in-suspend;
322 };
323 };
324
325 vcc0v9_hdmi: LDO_REG7 {
326 regulator-name = "vcc0v9_hdmi";
327 regulator-min-microvolt = <900000>;
328 regulator-max-microvolt = <900000>;
329 regulator-always-on;
330 regulator-boot-on;
331 regulator-state-mem {
332 regulator-off-in-suspend;
333 };
334 };
335
336 vcc_efuse: LDO_REG8 {
337 regulator-name = "vcc_efuse";
338 regulator-min-microvolt = <1800000>;
339 regulator-max-microvolt = <1800000>;
340 regulator-always-on;
341 regulator-boot-on;
342 regulator-state-mem {
343 regulator-off-in-suspend;
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-off-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-off-in-suspend;
362 };
363 };
364 };
365 };
366
367 vdd_gpu: regulator@60 {
368 compatible = "fcs,fan53555";
369 reg = <0x60>;
370 fcs,suspend-voltage-selector = <1>;
371 regulator-name = "vdd_gpu";
372 regulator-min-microvolt = <600000>;
373 regulator-max-microvolt = <1230000>;
374 regulator-ramp-delay = <1000>;
375 regulator-always-on;
376 regulator-boot-on;
377 vin-supply = <&vcc5v0_sys>;
378 };
379 };
380
381 &hdmi {
382 ddc-i2c-bus = <&i2c3>;
383 };
384
385 &i2c6 {
386 clock-frequency = <400000>;
387 };
388
389 &i2c7 {
390 status = "okay";
391 clock-frequency = <400000>;
392
393 fan: fan@18 {
394 compatible = "tsd,mule", "ti,amc6821";
395 reg = <0x18>;
396
397 i2c-mux {
398 compatible = "tsd,mule-i2c-mux";
399 #address-cells = <1>;
400 #size-cells = <0>;
401
402 i2c10: i2c@0 {
403 reg = <0x0>;
404 #address-cells = <1>;
405 #size-cells = <0>;
406
407 rtc_twi: rtc@6f {
408 compatible = "isil,isl1208";
409 reg = <0x6f>;
410 };
411 };
412 };
413 };
414 };
415
416 &i2c8 {
417 status = "okay";
418 clock-frequency = <400000>;
419
420 vdd_cpu_b: regulator@60 {
421 compatible = "fcs,fan53555";
422 reg = <0x60>;
423 vin-supply = <&vcc5v0_sys>;
424 regulator-name = "vdd_cpu_b";
425 regulator-min-microvolt = <600000>;
426 regulator-max-microvolt = <1230000>;
427 regulator-ramp-delay = <1000>;
428 fcs,suspend-voltage-selector = <1>;
429 regulator-always-on;
430 regulator-boot-on;
431 };
432 };
433
434 &i2s0 {
435 pinctrl-0 = <&i2s0_2ch_bus>;
436 pinctrl-1 = <&i2s0_2ch_bus_bclk_off>;
437 rockchip,playback-channels = <2>;
438 rockchip,capture-channels = <2>;
439 };
440
441 /*
442 * As Q7 does not specify neither a global nor a RX clock for I2S these
443 * signals are not used. Furthermore I2S0_LRCK_RX is used as GPIO.
444 * Therefore we have to redefine the i2s0_2ch_bus and i2s0_2ch_bus_bclk_off
445 * definitions to prevent conflicts.
446 */
447 &i2s0_2ch_bus {
448 rockchip,pins =
449 <3 RK_PD0 1 &pcfg_pull_none>,
450 <3 RK_PD2 1 &pcfg_pull_none>,
451 <3 RK_PD3 1 &pcfg_pull_none>,
452 <3 RK_PD7 1 &pcfg_pull_none>;
453 };
454
455 &i2s0_2ch_bus_bclk_off {
456 rockchip,pins =
457 <3 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>,
458 <3 RK_PD2 1 &pcfg_pull_none>,
459 <3 RK_PD3 1 &pcfg_pull_none>,
460 <3 RK_PD7 1 &pcfg_pull_none>;
461 };
462
463 &io_domains {
464 status = "okay";
465 bt656-supply = <&vcc_1v8>;
466 audio-supply = <&vcc_1v8>;
467 sdmmc-supply = <&vcc_sd>;
468 gpio1830-supply = <&vcc_1v8>;
469 };
470
471 &pcie0 {
472 /* PCIe PHY supplies */
473 vpcie0v9-supply = <&vcca_0v9>;
474 vpcie1v8-supply = <&vcca_1v8>;
475 };
476
477 &pcie_clkreqn_cpm {
478 rockchip,pins =
479 <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_up>;
480 };
481
482 &pinctrl {
483 pinctrl-names = "default";
484 pinctrl-0 = <&q7_thermal_pin &bios_disable_override_hog_pin>;
485
486 gpio-pins {
487 bios_disable_override_hog_pin: bios-disable-override-hog-pin {
488 rockchip,pins =
489 <3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_down>;
490 };
491
492 q7_thermal_pin: q7-thermal-pin {
493 rockchip,pins =
494 <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
495 };
496 };
497
498 i2c8 {
499 i2c8_xfer_a: i2c8-xfer {
500 rockchip,pins =
501 <1 RK_PC4 1 &pcfg_pull_up>,
502 <1 RK_PC5 1 &pcfg_pull_up>;
503 };
504 };
505
506 leds {
507 module_led_pin: module-led-pin {
508 rockchip,pins =
509 <2 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
510 };
511 };
512
513 pmic {
514 pmic_int_l: pmic-int-l {
515 rockchip,pins =
516 <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>;
517 };
518 };
519
520 usb {
521 cy3304_reset: cy3304-reset {
522 rockchip,pins =
523 <4 RK_PA3 RK_FUNC_GPIO &pcfg_output_high>;
524 };
525 };
526
527 usb3 {
528 usb3_id: usb3-id {
529 rockchip,pins =
530 <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>;
531 };
532 };
533 };
534
535 &pmu_io_domains {
536 status = "okay";
537 pmu1830-supply = <&vcc_1v8>;
538 };
539
540 &pwm2 {
541 status = "okay";
542 };
543
544 &sdhci {
545 /*
546 * Signal integrity isn't great at 200MHz but 100MHz has proven stable
547 * enough.
548 */
549 max-frequency = <100000000>;
550
551 bus-width = <8>;
552 mmc-hs400-1_8v;
553 mmc-hs400-enhanced-strobe;
554 non-removable;
555 status = "okay";
556 };
557
558 &sdmmc {
559 vqmmc-supply = <&vcc_sd>;
560 };
561
562 &spi1 {
563 status = "okay";
564
565 norflash: flash@0 {
566 compatible = "jedec,spi-nor";
567 reg = <0>;
568 spi-max-frequency = <50000000>;
569 };
570 };
571
572 &tcphy1 {
573 status = "okay";
574 };
575
576 &tsadc {
577 rockchip,hw-tshut-mode = <1>;
578 rockchip,hw-tshut-polarity = <1>;
579 status = "okay";
580 };
581
582 &u2phy1 {
583 status = "okay";
584
585 u2phy1_otg: otg-port {
586 status = "okay";
587 };
588 };
589
590 &usbdrd3_1 {
591 status = "okay";
592 };
593
594 &usbdrd_dwc3_1 {
595 status = "okay";
596 dr_mode = "host";
597 pinctrl-names = "default";
598 pinctrl-0 = <&cy3304_reset>;
599 #address-cells = <1>;
600 #size-cells = <0>;
601
602 hub_2_0: hub@1 {
603 compatible = "usb4b4,6502", "usb4b4,6506";
604 reg = <1>;
605 peer-hub = <&hub_3_0>;
606 reset-gpios = <&gpio4 RK_PA3 GPIO_ACTIVE_HIGH>;
607 vdd-supply = <&vcc1v2_phy>;
608 vdd2-supply = <&vcc3v3_sys>;
609
610 };
611
612 hub_3_0: hub@2 {
613 compatible = "usb4b4,6500", "usb4b4,6504";
614 reg = <2>;
615 peer-hub = <&hub_2_0>;
616 reset-gpios = <&gpio4 RK_PA3 GPIO_ACTIVE_HIGH>;
617 vdd-supply = <&vcc1v2_phy>;
618 vdd2-supply = <&vcc3v3_sys>;
619 };
620 };