File Index
Files and directories
Sign in
FILE

rk3568-nanopi-r5s.dtsi

File preview with syntax highlighting.

linux-6.19.14/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dtsi DEVICETREE
  1// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  2/*
  3 * Copyright (c) 2022 FriendlyElec Computer Tech. Co., Ltd.
  4 * (http://www.friendlyelec.com)
  5 *
  6 * Copyright (c) 2023 Tianling Shen <cnsztl@gmail.com>
  7 */
  8
  9/dts-v1/;
 10#include <dt-bindings/gpio/gpio.h>
 11#include <dt-bindings/input/input.h>
 12#include <dt-bindings/leds/common.h>
 13#include <dt-bindings/pinctrl/rockchip.h>
 14#include <dt-bindings/soc/rockchip,vop2.h>
 15#include "rk3568.dtsi"
 16
 17/ {
 18	aliases {
 19		mmc0 = &sdmmc0;
 20		mmc1 = &sdhci;
 21		rtc0 = &hym8563;
 22	};
 23
 24	chosen: chosen {
 25		stdout-path = "serial2:1500000n8";
 26	};
 27
 28	adc-keys {
 29		compatible = "adc-keys";
 30		io-channels = <&saradc 0>;
 31		io-channel-names = "buttons";
 32		keyup-threshold-microvolt = <1800000>;
 33		poll-interval = <100>;
 34
 35		button-maskrom {
 36			label = "MASKROM";
 37			linux,code = <KEY_SETUP>;
 38			press-threshold-microvolt = <0>;
 39		};
 40	};
 41
 42	hdmi-con {
 43		compatible = "hdmi-connector";
 44		type = "a";
 45
 46		port {
 47			hdmi_con_in: endpoint {
 48				remote-endpoint = <&hdmi_out_con>;
 49			};
 50		};
 51	};
 52
 53	vdd_usbc: regulator-vdd-usbc {
 54		compatible = "regulator-fixed";
 55		regulator-name = "vdd_usbc";
 56		regulator-always-on;
 57		regulator-boot-on;
 58		regulator-min-microvolt = <5000000>;
 59		regulator-max-microvolt = <5000000>;
 60	};
 61
 62	vcc3v3_sys: regulator-vcc3v3-sys {
 63		compatible = "regulator-fixed";
 64		regulator-name = "vcc3v3_sys";
 65		regulator-always-on;
 66		regulator-boot-on;
 67		regulator-min-microvolt = <3300000>;
 68		regulator-max-microvolt = <3300000>;
 69		vin-supply = <&vdd_usbc>;
 70	};
 71
 72	vcc5v0_sys: regulator-vcc5v0-sys {
 73		compatible = "regulator-fixed";
 74		regulator-name = "vcc5v0_sys";
 75		regulator-always-on;
 76		regulator-boot-on;
 77		regulator-min-microvolt = <5000000>;
 78		regulator-max-microvolt = <5000000>;
 79		vin-supply = <&vdd_usbc>;
 80	};
 81
 82	vcc3v3_pcie: regulator-vcc3v3-pcie {
 83		compatible = "regulator-fixed";
 84		regulator-name = "vcc3v3_pcie";
 85		regulator-min-microvolt = <3300000>;
 86		regulator-max-microvolt = <3300000>;
 87		enable-active-high;
 88		gpios = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;
 89		startup-delay-us = <200000>;
 90		vin-supply = <&vcc5v0_sys>;
 91	};
 92
 93	vcc5v0_usb: regulator-vcc5v0-usb {
 94		compatible = "regulator-fixed";
 95		regulator-name = "vcc5v0_usb";
 96		regulator-always-on;
 97		regulator-boot-on;
 98		regulator-min-microvolt = <5000000>;
 99		regulator-max-microvolt = <5000000>;
100		vin-supply = <&vdd_usbc>;
101	};
102
103	vcc5v0_usb_host: regulator-vcc5v0-usb-host {
104		compatible = "regulator-fixed";
105		enable-active-high;
106		gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
107		pinctrl-names = "default";
108		pinctrl-0 = <&vcc5v0_usb_host_en>;
109		regulator-name = "vcc5v0_usb_host";
110		regulator-always-on;
111		regulator-boot-on;
112		regulator-min-microvolt = <5000000>;
113		regulator-max-microvolt = <5000000>;
114		vin-supply = <&vcc5v0_usb>;
115	};
116
117	vcc5v0_usb_otg: regulator-vcc5v0-usb-otg {
118		compatible = "regulator-fixed";
119		enable-active-high;
120		gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
121		pinctrl-names = "default";
122		pinctrl-0 = <&vcc5v0_usb_otg_en>;
123		regulator-name = "vcc5v0_usb_otg";
124		regulator-min-microvolt = <5000000>;
125		regulator-max-microvolt = <5000000>;
126		vin-supply = <&vcc5v0_usb>;
127	};
128
129	pcie30_avdd0v9: regulator-pcie30-avdd0v9 {
130		compatible = "regulator-fixed";
131		regulator-name = "pcie30_avdd0v9";
132		regulator-always-on;
133		regulator-boot-on;
134		regulator-min-microvolt = <900000>;
135		regulator-max-microvolt = <900000>;
136		vin-supply = <&vcc3v3_sys>;
137	};
138
139	pcie30_avdd1v8: regulator-pcie30-avdd1v8 {
140		compatible = "regulator-fixed";
141		regulator-name = "pcie30_avdd1v8";
142		regulator-always-on;
143		regulator-boot-on;
144		regulator-min-microvolt = <1800000>;
145		regulator-max-microvolt = <1800000>;
146		vin-supply = <&vcc3v3_sys>;
147	};
148};
149
150&combphy0 {
151	status = "okay";
152};
153
154&combphy1 {
155	status = "okay";
156};
157
158&combphy2 {
159	status = "okay";
160};
161
162&cpu0 {
163	cpu-supply = <&vdd_cpu>;
164};
165
166&cpu1 {
167	cpu-supply = <&vdd_cpu>;
168};
169
170&cpu2 {
171	cpu-supply = <&vdd_cpu>;
172};
173
174&cpu3 {
175	cpu-supply = <&vdd_cpu>;
176};
177
178&gpu {
179	mali-supply = <&vdd_gpu>;
180	status = "okay";
181};
182
183&hdmi {
184	avdd-0v9-supply = <&vdda0v9_image>;
185	avdd-1v8-supply = <&vcca1v8_image>;
186	status = "okay";
187};
188
189&hdmi_in {
190	hdmi_in_vp0: endpoint {
191		remote-endpoint = <&vp0_out_hdmi>;
192	};
193};
194
195&hdmi_out {
196	hdmi_out_con: endpoint {
197		remote-endpoint = <&hdmi_con_in>;
198	};
199};
200
201&hdmi_sound {
202	status = "okay";
203};
204
205&i2c0 {
206	status = "okay";
207
208	vdd_cpu: regulator@1c {
209		compatible = "tcs,tcs4525";
210		reg = <0x1c>;
211		fcs,suspend-voltage-selector = <1>;
212		regulator-name = "vdd_cpu";
213		regulator-always-on;
214		regulator-boot-on;
215		regulator-min-microvolt = <800000>;
216		regulator-max-microvolt = <1150000>;
217		regulator-ramp-delay = <2300>;
218		vin-supply = <&vcc5v0_sys>;
219
220		regulator-state-mem {
221			regulator-off-in-suspend;
222		};
223	};
224
225	rk809: pmic@20 {
226		compatible = "rockchip,rk809";
227		reg = <0x20>;
228		interrupt-parent = <&gpio0>;
229		interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
230		#clock-cells = <1>;
231		pinctrl-names = "default";
232		pinctrl-0 = <&pmic_int>;
233		system-power-controller;
234		vcc1-supply = <&vcc3v3_sys>;
235		vcc2-supply = <&vcc3v3_sys>;
236		vcc3-supply = <&vcc3v3_sys>;
237		vcc4-supply = <&vcc3v3_sys>;
238		vcc5-supply = <&vcc3v3_sys>;
239		vcc6-supply = <&vcc3v3_sys>;
240		vcc7-supply = <&vcc3v3_sys>;
241		vcc8-supply = <&vcc3v3_sys>;
242		vcc9-supply = <&vcc3v3_sys>;
243		wakeup-source;
244
245		regulators {
246			vdd_logic: DCDC_REG1 {
247				regulator-name = "vdd_logic";
248				regulator-always-on;
249				regulator-boot-on;
250				regulator-initial-mode = <0x2>;
251				regulator-min-microvolt = <500000>;
252				regulator-max-microvolt = <1350000>;
253				regulator-ramp-delay = <6001>;
254
255				regulator-state-mem {
256					regulator-off-in-suspend;
257				};
258			};
259
260			vdd_gpu: DCDC_REG2 {
261				regulator-name = "vdd_gpu";
262				regulator-always-on;
263				regulator-initial-mode = <0x2>;
264				regulator-min-microvolt = <500000>;
265				regulator-max-microvolt = <1350000>;
266				regulator-ramp-delay = <6001>;
267
268				regulator-state-mem {
269					regulator-off-in-suspend;
270				};
271			};
272
273			vcc_ddr: DCDC_REG3 {
274				regulator-name = "vcc_ddr";
275				regulator-always-on;
276				regulator-boot-on;
277				regulator-initial-mode = <0x2>;
278
279				regulator-state-mem {
280					regulator-on-in-suspend;
281				};
282			};
283
284			vdd_npu: DCDC_REG4 {
285				regulator-name = "vdd_npu";
286				regulator-initial-mode = <0x2>;
287				regulator-min-microvolt = <500000>;
288				regulator-max-microvolt = <1350000>;
289				regulator-ramp-delay = <6001>;
290
291				regulator-state-mem {
292					regulator-off-in-suspend;
293				};
294			};
295
296			vcc_1v8: DCDC_REG5 {
297				regulator-name = "vcc_1v8";
298				regulator-always-on;
299				regulator-boot-on;
300				regulator-min-microvolt = <1800000>;
301				regulator-max-microvolt = <1800000>;
302
303				regulator-state-mem {
304					regulator-off-in-suspend;
305				};
306			};
307
308			vdda0v9_image: LDO_REG1 {
309				regulator-name = "vdda0v9_image";
310				regulator-min-microvolt = <950000>;
311				regulator-max-microvolt = <950000>;
312
313				regulator-state-mem {
314					regulator-off-in-suspend;
315				};
316			};
317
318			vdda_0v9: LDO_REG2 {
319				regulator-name = "vdda_0v9";
320				regulator-always-on;
321				regulator-boot-on;
322				regulator-min-microvolt = <900000>;
323				regulator-max-microvolt = <900000>;
324
325				regulator-state-mem {
326					regulator-off-in-suspend;
327				};
328			};
329
330			vdda0v9_pmu: LDO_REG3 {
331				regulator-name = "vdda0v9_pmu";
332				regulator-always-on;
333				regulator-boot-on;
334				regulator-min-microvolt = <900000>;
335				regulator-max-microvolt = <900000>;
336
337				regulator-state-mem {
338					regulator-on-in-suspend;
339					regulator-suspend-microvolt = <900000>;
340				};
341			};
342
343			vccio_acodec: LDO_REG4 {
344				regulator-name = "vccio_acodec";
345				regulator-min-microvolt = <3300000>;
346				regulator-max-microvolt = <3300000>;
347
348				regulator-state-mem {
349					regulator-off-in-suspend;
350				};
351			};
352
353			vccio_sd: LDO_REG5 {
354				regulator-name = "vccio_sd";
355				regulator-min-microvolt = <1800000>;
356				regulator-max-microvolt = <3300000>;
357
358				regulator-state-mem {
359					regulator-off-in-suspend;
360				};
361			};
362
363			vcc3v3_pmu: LDO_REG6 {
364				regulator-name = "vcc3v3_pmu";
365				regulator-always-on;
366				regulator-boot-on;
367				regulator-min-microvolt = <3300000>;
368				regulator-max-microvolt = <3300000>;
369
370				regulator-state-mem {
371					regulator-on-in-suspend;
372					regulator-suspend-microvolt = <3300000>;
373				};
374			};
375
376			vcca_1v8: LDO_REG7 {
377				regulator-name = "vcca_1v8";
378				regulator-always-on;
379				regulator-boot-on;
380				regulator-min-microvolt = <1800000>;
381				regulator-max-microvolt = <1800000>;
382
383				regulator-state-mem {
384					regulator-off-in-suspend;
385				};
386			};
387
388			vcca1v8_pmu: LDO_REG8 {
389				regulator-name = "vcca1v8_pmu";
390				regulator-always-on;
391				regulator-boot-on;
392				regulator-min-microvolt = <1800000>;
393				regulator-max-microvolt = <1800000>;
394
395				regulator-state-mem {
396					regulator-on-in-suspend;
397					regulator-suspend-microvolt = <1800000>;
398				};
399			};
400
401			vcca1v8_image: LDO_REG9 {
402				regulator-name = "vcca1v8_image";
403				regulator-min-microvolt = <1800000>;
404				regulator-max-microvolt = <1800000>;
405
406				regulator-state-mem {
407					regulator-off-in-suspend;
408				};
409			};
410
411			vcc_3v3: SWITCH_REG1 {
412				regulator-name = "vcc_3v3";
413				regulator-always-on;
414				regulator-boot-on;
415
416				regulator-state-mem {
417					regulator-off-in-suspend;
418				};
419			};
420
421			vcc3v3_sd: SWITCH_REG2 {
422				regulator-name = "vcc3v3_sd";
423				regulator-always-on;
424				regulator-boot-on;
425
426				regulator-state-mem {
427					regulator-off-in-suspend;
428				};
429			};
430		};
431
432	};
433};
434
435&i2c5 {
436	status = "okay";
437
438	hym8563: rtc@51 {
439		compatible = "haoyu,hym8563";
440		reg = <0x51>;
441		interrupt-parent = <&gpio0>;
442		interrupts = <RK_PD3 IRQ_TYPE_LEVEL_LOW>;
443		#clock-cells = <0>;
444		clock-output-names = "rtcic_32kout";
445		pinctrl-names = "default";
446		pinctrl-0 = <&hym8563_int>;
447		wakeup-source;
448	};
449};
450
451&i2s0_8ch {
452	status = "okay";
453};
454
455&pcie30phy {
456	data-lanes = <1 2>;
457	status = "okay";
458};
459
460&pinctrl {
461	hym8563 {
462		hym8563_int: hym8563-int {
463			rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>;
464		};
465	};
466
467	pmic {
468		pmic_int: pmic-int {
469			rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
470		};
471	};
472
473	usb {
474		vcc5v0_usb_host_en: vcc5v0-usb-host-en {
475			rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
476		};
477
478		vcc5v0_usb_otg_en: vcc5v0-usb-otg-en {
479			rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
480		};
481	};
482};
483
484&pmu_io_domains {
485	pmuio1-supply = <&vcc3v3_pmu>;
486	pmuio2-supply = <&vcc3v3_pmu>;
487	vccio1-supply = <&vccio_acodec>;
488	vccio3-supply = <&vccio_sd>;
489	vccio4-supply = <&vcc_1v8>;
490	vccio5-supply = <&vcc_3v3>;
491	vccio6-supply = <&vcc_1v8>;
492	vccio7-supply = <&vcc_3v3>;
493	status = "okay";
494};
495
496&saradc {
497	vref-supply = <&vcca_1v8>;
498	status = "okay";
499};
500
501&sdhci {
502	bus-width = <8>;
503	max-frequency = <200000000>;
504	mmc-hs200-1_8v;
505	non-removable;
506	pinctrl-names = "default";
507	pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
508	vmmc-supply = <&vcc_3v3>;
509	vqmmc-supply = <&vcc_1v8>;
510	status = "okay";
511};
512
513&sdmmc0 {
514	max-frequency = <150000000>;
515	no-sdio;
516	no-mmc;
517	bus-width = <4>;
518	cap-mmc-highspeed;
519	cap-sd-highspeed;
520	disable-wp;
521	vmmc-supply = <&vcc3v3_sd>;
522	vqmmc-supply = <&vccio_sd>;
523	pinctrl-names = "default";
524	pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
525	status = "okay";
526};
527
528&tsadc {
529	rockchip,hw-tshut-mode = <1>;
530	rockchip,hw-tshut-polarity = <0>;
531	status = "okay";
532};
533
534&uart2 {
535	status = "okay";
536};
537
538&usb_host0_ehci {
539	status = "okay";
540};
541
542&usb_host0_ohci {
543	status = "okay";
544};
545
546&usb_host0_xhci {
547	extcon = <&usb2phy0>;
548	dr_mode = "host";
549	status = "okay";
550};
551
552&usb_host1_ehci {
553	status = "okay";
554};
555
556&usb_host1_ohci {
557	status = "okay";
558};
559
560&usb_host1_xhci {
561	status = "okay";
562};
563
564&usb2phy0 {
565	status = "okay";
566};
567
568&usb2phy0_host {
569	phy-supply = <&vcc5v0_usb_host>;
570	status = "okay";
571};
572
573&usb2phy0_otg {
574	status = "okay";
575};
576
577&usb2phy1 {
578	status = "okay";
579};
580
581&usb2phy1_host {
582	phy-supply = <&vcc5v0_usb_otg>;
583	status = "okay";
584};
585
586&usb2phy1_otg {
587	status = "okay";
588};
589
590&vop {
591	assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
592	assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
593	status = "okay";
594};
595
596&vop_mmu {
597	status = "okay";
598};
599
600&vp0 {
601	vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
602		reg = <ROCKCHIP_VOP2_EP_HDMI0>;
603		remote-endpoint = <&hdmi_in_vp0>;
604	};
605};
~/ Read-only file preview.