summaryrefslogtreecommitdiff
path: root/arch/arm64/boot/dts/rockchip/rk3566-soquartz.dtsi
blob: 31aa2b8efe39314087190027c495cb2b4a26c163 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)

/dts-v1/;

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/rockchip.h>
#include <dt-bindings/soc/rockchip,vop2.h>
#include "rk3566.dtsi"

/ {
	model = "Pine64 RK3566 SoQuartz SOM";
	compatible = "pine64,soquartz", "rockchip,rk3566";

	aliases {
		ethernet0 = &gmac1;
		mmc0 = &sdmmc0;
		mmc1 = &sdhci;
		mmc2 = &sdmmc1;
	};

	chosen: chosen {
		stdout-path = "serial2:1500000n8";
	};

	gmac1_clkin: external-gmac1-clock {
		compatible = "fixed-clock";
		clock-frequency = <125000000>;
		clock-output-names = "gmac1_clkin";
		#clock-cells = <0>;
	};

	hdmi-con {
		compatible = "hdmi-connector";
		type = "a";

		port {
			hdmi_con_in: endpoint {
				remote-endpoint = <&hdmi_out_con>;
			};
		};
	};

	leds {
		compatible = "gpio-leds";

		led_diy: led-diy {
			label = "diy-led";
			default-state = "on";
			gpios = <&gpio0 RK_PC1 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "heartbeat";
			pinctrl-names = "default";
			pinctrl-0 = <&diy_led_enable_h>;
			retain-state-suspended;
			status = "disabled";
		};

		led_work: led-work {
			label = "work-led";
			default-state = "off";
			gpios = <&gpio0 RK_PC0 GPIO_ACTIVE_LOW>;
			pinctrl-names = "default";
			pinctrl-0 = <&work_led_enable_h>;
			retain-state-suspended;
			status = "disabled";
		};
	};

	sdio_pwrseq: sdio-pwrseq {
		status = "okay";
		compatible = "mmc-pwrseq-simple";
		clocks = <&rk809 1>;
		clock-names = "ext_clock";
		pinctrl-names = "default";
		pinctrl-0 = <&wifi_enable_h>;
		reset-gpios = <&gpio2 RK_PC2 GPIO_ACTIVE_LOW>;
	};

	vbus: vbus-regulator {
		compatible = "regulator-fixed";
		regulator-name = "vbus";
		regulator-always-on;
		regulator-boot-on;
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
	};

	/* sourced from vbus, vbus is provided by the carrier board */
	vcc5v0_sys: vcc5v0-sys-regulator {
		compatible = "regulator-fixed";
		regulator-name = "vcc5v0_sys";
		regulator-always-on;
		regulator-boot-on;
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		vin-supply = <&vbus>;
	};

	vcc3v3_sys: vcc3v3-sys-regulator {
		compatible = "regulator-fixed";
		regulator-name = "vcc3v3_sys";
		regulator-always-on;
		regulator-boot-on;
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		vin-supply = <&vcc5v0_sys>;
	};
};

&cpu0 {
	cpu-supply = <&vdd_cpu>;
};

&cpu1 {
	cpu-supply = <&vdd_cpu>;
};

&cpu2 {
	cpu-supply = <&vdd_cpu>;
};

&cpu3 {
	cpu-supply = <&vdd_cpu>;
};

&gmac1 {
	assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru SCLK_GMAC1>;
	assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru SCLK_GMAC1>, <&gmac1_clkin>;
	clock_in_out = "input";
	phy-supply = <&vcc_3v3>;
	phy-mode = "rgmii";
	pinctrl-names = "default";
	pinctrl-0 = <&gmac1m0_miim
		     &gmac1m0_tx_bus2
		     &gmac1m0_rx_bus2
		     &gmac1m0_rgmii_clk
		     &gmac1m0_clkinout
		     &gmac1m0_rgmii_bus>;
	snps,reset-gpio = <&gpio0 RK_PC3 GPIO_ACTIVE_LOW>;
	snps,reset-active-low;
	/* Reset time is 20ms, 100ms for rtl8211f, also works well here */
	snps,reset-delays-us = <0 20000 100000>;
	tx_delay = <0x30>;
	rx_delay = <0x10>;
	phy-handle = <&rgmii_phy1>;
	status = "disabled";
};

&gpio0 {
	nextrst-hog {
		gpio-hog;
		/*
		 * GPIO_ACTIVE_LOW + output-low here means that the pin is set
		 * to high, because output-low decides the value pre-inversion.
		 */
		gpios = <RK_PA5 GPIO_ACTIVE_LOW>;
		line-name = "nEXTRST";
		output-low;
	};
};

&gpu {
	mali-supply = <&vdd_gpu>;
	status = "okay";
};

&hdmi {
	avdd-0v9-supply = <&vdda0v9_image>;
	avdd-1v8-supply = <&vcca1v8_image>;
	status = "okay";
};

&hdmi_in {
	hdmi_in_vp0: endpoint {
		remote-endpoint = <&vp0_out_hdmi>;
	};
};

&hdmi_out {
	hdmi_out_con: endpoint {
		remote-endpoint = <&hdmi_con_in>;
	};
};

&hdmi_sound {
	status = "okay";
};

&i2c0 {
	status = "okay";

	vdd_cpu: regulator@1c {
		compatible = "tcs,tcs4525";
		reg = <0x1c>;
		fcs,suspend-voltage-selector = <1>;
		regulator-name = "vdd_cpu";
		regulator-min-microvolt = <800000>;
		regulator-max-microvolt = <1150000>;
		regulator-ramp-delay = <2300>;
		regulator-always-on;
		regulator-boot-on;
		vin-supply = <&vcc5v0_sys>;

		regulator-state-mem {
			regulator-off-in-suspend;
		};
	};

	rk809: pmic@20 {
		compatible = "rockchip,rk809";
		reg = <0x20>;
		interrupt-parent = <&gpio0>;
		interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
		#clock-cells = <1>;
		clock-output-names = "rk808-clkout1", "rk808-clkout2";
		pinctrl-names = "default";
		pinctrl-0 = <&pmic_int_l>;
		rockchip,system-power-controller;
		wakeup-source;

		vcc1-supply = <&vcc3v3_sys>;
		vcc2-supply = <&vcc3v3_sys>;
		vcc3-supply = <&vcc3v3_sys>;
		vcc4-supply = <&vcc3v3_sys>;
		vcc5-supply = <&vcc3v3_sys>;
		vcc6-supply = <&vcc3v3_sys>;
		vcc7-supply = <&vcc3v3_sys>;
		vcc8-supply = <&vcc3v3_sys>;
		vcc9-supply = <&vcc3v3_sys>;

		regulators {
			vdd_logic: DCDC_REG1 {
				regulator-name = "vdd_logic";
				regulator-always-on;
				regulator-boot-on;
				regulator-min-microvolt = <500000>;
				regulator-max-microvolt = <1350000>;
				regulator-init-microvolt = <900000>;
				regulator-ramp-delay = <6001>;
				regulator-initial-mode = <0x2>;
				regulator-state-mem {
					regulator-on-in-suspend;
					regulator-suspend-microvolt = <900000>;
				};
			};

			vdd_gpu: DCDC_REG2 {
				regulator-name = "vdd_gpu";
				regulator-always-on;
				regulator-boot-on;
				regulator-min-microvolt = <500000>;
				regulator-max-microvolt = <1350000>;
				regulator-init-microvolt = <900000>;
				regulator-ramp-delay = <6001>;
				regulator-initial-mode = <0x2>;
					regulator-state-mem {
					regulator-off-in-suspend;
				};
			};

			vcc_ddr: DCDC_REG3 {
				regulator-always-on;
				regulator-boot-on;
				regulator-initial-mode = <0x2>;
				regulator-name = "vcc_ddr";
				regulator-state-mem {
					regulator-on-in-suspend;
				};
			};

			vdd_npu: DCDC_REG4 {
				regulator-always-on;
				regulator-boot-on;
				regulator-min-microvolt = <500000>;
				regulator-max-microvolt = <1350000>;
				regulator-init-microvolt = <900000>;
				regulator-initial-mode = <0x2>;
				regulator-name = "vdd_npu";
				regulator-state-mem {
					regulator-off-in-suspend;
				};
			};

			vcc_1v8: DCDC_REG5 {
				regulator-name = "vcc_1v8";
				regulator-always-on;
				regulator-boot-on;
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <1800000>;
				regulator-state-mem {
					regulator-on-in-suspend;
					regulator-suspend-microvolt = <1800000>;
				};
			};

			vdda0v9_image: LDO_REG1 {
				regulator-always-on;
				regulator-boot-on;
				regulator-min-microvolt = <900000>;
				regulator-max-microvolt = <900000>;
				regulator-name = "vdda0v9_image";
				regulator-state-mem {
					regulator-on-in-suspend;
					regulator-suspend-microvolt = <900000>;
				};
			};

			vdda_0v9: LDO_REG2 {
				regulator-always-on;
				regulator-boot-on;
				regulator-min-microvolt = <900000>;
				regulator-max-microvolt = <900000>;
				regulator-name = "vdda_0v9";
				regulator-state-mem {
					regulator-off-in-suspend;
				};
			};

			vdda0v9_pmu: LDO_REG3 {
				regulator-always-on;
				regulator-boot-on;
				regulator-min-microvolt = <900000>;
				regulator-max-microvolt = <900000>;
				regulator-name = "vdda0v9_pmu";
				regulator-state-mem {
					regulator-on-in-suspend;
					regulator-suspend-microvolt = <900000>;
				};
			};

			vccio_acodec: LDO_REG4 {
				regulator-always-on;
				regulator-boot-on;
				regulator-min-microvolt = <3300000>;
				regulator-max-microvolt = <3300000>;
				regulator-name = "vccio_acodec";
				regulator-state-mem {
					regulator-off-in-suspend;
				};
			};

			vccio_sd: LDO_REG5 {
				regulator-always-on;
				regulator-boot-on;
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <3300000>;
				regulator-name = "vccio_sd";
				regulator-state-mem {
					regulator-off-in-suspend;
				};
			};

			vcc3v3_pmu: LDO_REG6 {
				regulator-always-on;
				regulator-boot-on;
				regulator-min-microvolt = <3300000>;
				regulator-max-microvolt = <3300000>;
				regulator-name = "vcc3v3_pmu";
				regulator-state-mem {
					regulator-on-in-suspend;
					regulator-suspend-microvolt = <3300000>;
				};
			};

			vcca_1v8: LDO_REG7 {
				regulator-always-on;
				regulator-boot-on;
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <1800000>;
				regulator-name = "vcca_1v8";
				regulator-state-mem {
					regulator-off-in-suspend;
				};
			};

			vcca1v8_pmu: LDO_REG8 {
				regulator-always-on;
				regulator-boot-on;
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <1800000>;
				regulator-name = "vcca1v8_pmu";
				regulator-state-mem {
					regulator-off-in-suspend;
				};
			};

			vcca1v8_image: LDO_REG9 {
				regulator-always-on;
				regulator-boot-on;
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <1800000>;
				regulator-name = "vcca1v8_image";
				regulator-state-mem {
					regulator-off-in-suspend;
				};
			};

			vcc_3v3: SWITCH_REG1 {
				regulator-name = "vcc_3v3";
				regulator-state-mem {
					regulator-off-in-suspend;
				};
			};

			vcc3v3_sd: SWITCH_REG2 {
				regulator-name = "vcc3v3_sd";
				status = "disabled";
				regulator-state-mem {
					regulator-on-in-suspend;
				};
			};

		};
	};
};

/*
 * i2c1 is exposed on CM1 / Module1A
 * pin 80 - i2c1_scl_m0, pullup to vcc3v3_pmu
 * pin 82 - i2c1_sda_m0, pullup to vcc3v3_pmu
 */
&i2c1 {
	status = "disabled";
};

/*
 * i2c2 is exposed on CM1 / Module1A
 * pin 56 - i2c2_scl_m1, pullup to vcc_3v3, shared with i2s1_8ch
 * pin 58 - i2c2_sda_m1, pullup to vcc_3v3
 */
&i2c2 {
	pinctrl-names = "default";
	pinctrl-0 = <&i2c2m1_xfer>;
	status = "disabled";
};

/*
 * i2c3 is exposed on CM1 / Module1A
 * pin 35 - i2c3_scl_m0, pullup to vcc_3v3
 * pin 36 - i2c3_sda_m0, pullup to vcc_3v3
 */
&i2c3 {
	status = "disabled";
};

/*
 * i2c4 is exposed on CM2 / Module1B
 * pin 45 - i2c4_scl_m1
 * pin 47 - i2c4_sda_m1
 */
&i2c4 {
	pinctrl-names = "default";
	pinctrl-0 = <&i2c4m1_xfer>;
	status = "disabled";
};

&i2s0_8ch {
	status = "okay";
};

/*
 * i2s1_8ch is exposed on CM1 / Module1A
 * pin 24 - i2s1_sdi1_m1
 * pin 25 - i2s1_sdo0_m1
 * pin 26 - i2s1_lrck_tx_m1
 * pin 27 - i2s1_sdi0_m1
 * pin 29 - i2s1_sdi3_m1
 * pin 30 - i2s1_sdi2_m1
 * pin 40 - i2s1_sdo1_m1, shared with spi3
 * pin 41 - i2s1_sdo2_m1
 * pin 49 - i2s1_sclk_tx_m1
 * pin 50 - i2s1_mclk_m1
 * pin 56 - i2s1_sdo3_m1, shared with i2c2
 */
&i2s1_8ch {
	pinctrl-names = "default";
	pinctrl-0 = <&i2s1m1_sclktx &i2s1m1_sclkrx
		     &i2s1m1_lrcktx &i2s1m1_lrckrx
		     &i2s1m1_sdi0   &i2s1m1_sdi1
		     &i2s1m1_sdi2   &i2s1m1_sdi3
		     &i2s1m1_sdo0   &i2s1m1_sdo1
		     &i2s1m1_sdo2   &i2s1m1_sdo3>;
	status = "disabled";
};

&mdio1 {
	rgmii_phy1: ethernet-phy@0 {
		compatible = "ethernet-phy-ieee802.3-c22";
		reg = <0>;
		status = "disabled";
	};
};

&pcie2x1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pcie_reset_h>;
	reset-gpios = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>;
};

&pinctrl {
	bt {
		bt_enable_h: bt-enable-h {
			rockchip,pins = <2 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
		};

		bt_host_wake_l: bt-host-wake-l {
			rockchip,pins = <2 RK_PC0 RK_FUNC_GPIO &pcfg_pull_down>;
		};

		bt_wake_l: bt-wake-l {
			rockchip,pins = <2 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
		};
	};

	leds {
		work_led_enable_h: work-led-enable-h {
			rockchip,pins = <0 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
		};

		diy_led_enable_h: diy-led-enable-h {
			rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
		};
	};

	pcie {
		pcie_clkreq_h: pcie-clkreq-h {
			rockchip,pins = <1 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
		};
		pcie_reset_h: pcie-reset-h {
			rockchip,pins = <1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
		};
	};

	pmic {
		pmic_int_l: pmic-int-l {
			rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
		};
	};

	sdio-pwrseq {
		wifi_enable_h: wifi-enable-h {
			rockchip,pins = <2 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
		};
	};
};

&pmu_io_domains {
	pmuio1-supply = <&vcc3v3_pmu>;
	pmuio2-supply = <&vcc3v3_pmu>;
	vccio1-supply = <&vcc_3v3>;
	vccio2-supply = <&vcc_1v8>;
	vccio3-supply = <&vccio_sd>;
	vccio4-supply = <&vcc_1v8>;
	vccio5-supply = <&vcc_3v3>;
	vccio6-supply = <&vcc_3v3>;
	vccio7-supply = <&vcc_3v3>;
	status = "okay";
};

/*
 * saradc is exposed on CM1 / Module1A
 * pin 94 - saradc_vin3
 * pin 96 - saradc_vin2
 */
&saradc {
	vref-supply = <&vcca_1v8>;
	status = "disabled";
};

&sdhci {
	bus-width = <8>;
	mmc-hs200-1_8v;
	non-removable;
	vmmc-supply = <&vcc_3v3>;
	vqmmc-supply = <&vcc_1v8>;
	status = "okay";
};

&sdmmc0 {
	broken-cd;
	bus-width = <4>;
	cap-sd-highspeed;
	disable-wp;
	pinctrl-names = "default";
	pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
	vqmmc-supply = <&vccio_sd>;
	status = "disabled";
};

&sdmmc1 {
	bus-width = <4>;
	cap-sd-highspeed;
	cap-sdio-irq;
	keep-power-in-suspend;
	mmc-pwrseq = <&sdio_pwrseq>;
	non-removable;
	pinctrl-names = "default";
	pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk>;
	sd-uhs-sdr50;
	vmmc-supply = <&vcc3v3_sys>;
	vqmmc-supply = <&vcc_1v8>;
	status = "okay";
};

/*
 * spi3 is exposed on CM1 / Module1A
 * pin 37 - spi3_cs1_m0
 * pin 38 - spi3_clk_m0
 * pin 39 - spi3_cs0_m0
 * pin 40 - spi3_miso_m0, shared with i2s1_8ch
 * pin 44 - spi3_mosi_m0
 */
&spi3 {
	status = "disabled";
};

&tsadc {
	status = "okay";
};

&uart1 {
	pinctrl-names = "default";
	pinctrl-0 = <&uart1m0_xfer &uart1m0_ctsn &uart1m0_rtsn>;
	uart-has-rtscts;
	status = "okay";

	bluetooth {
		compatible = "brcm,bcm43438-bt";
		clocks = <&rk809 1>;
		clock-names = "lpo";
		device-wakeup-gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
		host-wakeup-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;
		shutdown-gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
		pinctrl-names = "default";
		pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_enable_h>;
		vbat-supply = <&vcc3v3_sys>;
		vddio-supply = <&vcca1v8_pmu>;
	};
};

/*
 * uart2 is exposed on CM1 / Module1A
 * pin 51 - uart2_rx_m0
 * pin 55 - uart2_tx_m0
 */
&uart2 {
	status = "disabled";
};

/*
 * uart7 is exposed on CM1 / Module1A
 * pin 46 - uart7_tx_m2
 * pin 47 - uart7_rx_m2
 */
&uart7 {
	pinctrl-names = "default";
	pinctrl-0 = <&uart7m2_xfer>;
	status = "disabled";
};

/* dwc3_otg is the only usb port available */
&usb2phy0 {
	status = "disabled";
};

&usb2phy0_otg {
	status = "disabled";
};

&usb_host0_xhci {
	status = "disabled";
};

&vop {
	assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
	assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
	status = "okay";
};

&vop_mmu {
	status = "okay";
};

&vp0 {
	vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
		reg = <ROCKCHIP_VOP2_EP_HDMI0>;
		remote-endpoint = <&hdmi_in_vp0>;
	};
};