xref: /OK3568_Linux_fs/kernel/arch/arm64/boot/dts/rockchip/px30-evb-ddr3-v10-robot-no-gpu-linux.dts (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2019 Fuzhou Rockchip Electronics Co., Ltd
4 */
5
6/dts-v1/;
7#include <dt-bindings/gpio/gpio.h>
8#include <dt-bindings/pinctrl/rockchip.h>
9#include <dt-bindings/input/input.h>
10#include "px30-robot-no-gpu.dtsi"
11
12/ {
13	model = "Rockchip linux PX30 evb ddr3 board";
14	compatible = "rockchip,px30-evb-ddr3-v10-linux", "rockchip,px30";
15
16	adc-keys {
17		compatible = "adc-keys";
18		io-channels = <&saradc 2>;
19		io-channel-names = "buttons";
20		poll-interval = <100>;
21		keyup-threshold-microvolt = <1800000>;
22
23		esc-key {
24			linux,code = <KEY_ESC>;
25			label = "esc";
26			press-threshold-microvolt = <1310000>;
27		};
28
29		home-key {
30			linux,code = <KEY_HOME>;
31			label = "home";
32			press-threshold-microvolt = <624000>;
33		};
34
35		menu-key {
36			linux,code = <KEY_MENU>;
37			label = "menu";
38			press-threshold-microvolt = <987000>;
39		};
40
41		vol-down-key {
42			linux,code = <KEY_VOLUMEDOWN>;
43			label = "volume down";
44			press-threshold-microvolt = <300000>;
45		};
46
47		vol-up-key {
48			linux,code = <KEY_VOLUMEUP>;
49			label = "volume up";
50			press-threshold-microvolt = <17000>;
51		};
52	};
53
54	rk809-sound {
55		compatible = "simple-audio-card";
56		simple-audio-card,format = "i2s";
57		simple-audio-card,name = "rockchip,rk809-codec";
58		simple-audio-card,mclk-fs = <256>;
59		simple-audio-card,cpu {
60			sound-dai = <&i2s1_2ch>;
61		};
62		simple-audio-card,codec {
63			sound-dai = <&rk809_codec>;
64		};
65	};
66
67	sdio_pwrseq: sdio-pwrseq {
68		compatible = "mmc-pwrseq-simple";
69		/*clocks = <&rk809 1>;*/
70		/*clock-names = "ext_clock";*/
71		pinctrl-names = "default";
72		pinctrl-0 = <&wifi_enable_h>;
73
74		/*
75		 * On the module itself this is one of these (depending
76		 * on the actual card populated):
77		 * - SDIO_RESET_L_WL_REG_ON
78		 * - PDN (power down when low)
79		 */
80		reset-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>; /* GPIO3_A4 */
81	};
82
83	vcc_phy: vcc-phy-regulator {
84		compatible = "regulator-fixed";
85		regulator-name = "vcc_phy";
86		regulator-always-on;
87		regulator-boot-on;
88	};
89
90	vcc5v0_sys: vccsys {
91		compatible = "regulator-fixed";
92		regulator-name = "vcc5v0_sys";
93		regulator-always-on;
94		regulator-boot-on;
95		regulator-min-microvolt = <5000000>;
96		regulator-max-microvolt = <5000000>;
97	};
98
99	wireless-wlan {
100		compatible = "wlan-platdata";
101		wifi_chip_type = "AP6210";
102		WIFI,host_wake_irq = <&gpio0 RK_PB2 GPIO_ACTIVE_HIGH>;
103		status = "okay";
104	};
105};
106
107&bus_apll {
108	bus-supply = <&vdd_logic>;
109	status = "okay";
110};
111
112&cpu0 {
113	cpu-supply = <&vdd_arm>;
114};
115
116&dfi {
117	status = "okay";
118};
119
120&dmc {
121	center-supply = <&vdd_logic>;
122	status = "okay";
123};
124
125&emmc {
126	bus-width = <8>;
127	cap-mmc-highspeed;
128	mmc-hs200-1_8v;
129	no-sdio;
130	no-sd;
131	disable-wp;
132	non-removable;
133	num-slots = <1>;
134	status = "okay";
135};
136
137&gpu {
138	mali-supply = <&vdd_logic>;
139	status = "disabled";
140};
141
142&i2c0 {
143	status = "okay";
144
145	rk809: pmic@20 {
146		compatible = "rockchip,rk809";
147		reg = <0x20>;
148		interrupt-parent = <&gpio0>;
149		interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
150		pinctrl-names = "default", "pmic-sleep",
151				"pmic-power-off", "pmic-reset";
152		pinctrl-0 = <&pmic_int>;
153		pinctrl-1 = <&soc_slppin_slp>, <&rk817_slppin_slp>;
154		pinctrl-2 = <&soc_slppin_gpio>, <&rk817_slppin_pwrdn>;
155		pinctrl-3 = <&soc_slppin_rst>, <&rk817_slppin_rst>;
156		rockchip,system-power-controller;
157		wakeup-source;
158		#clock-cells = <1>;
159		clock-output-names = "rk808-clkout1", "rk808-clkout2";
160		//fb-inner-reg-idxs = <2>;
161		/* 1: rst regs (default in codes), 0: rst the pmic */
162		pmic-reset-func = <1>;
163
164		vcc1-supply = <&vcc5v0_sys>;
165		vcc2-supply = <&vcc5v0_sys>;
166		vcc3-supply = <&vcc5v0_sys>;
167		vcc4-supply = <&vcc5v0_sys>;
168		vcc5-supply = <&vcc3v3_sys>;
169		vcc6-supply = <&vcc3v3_sys>;
170		vcc7-supply = <&vcc3v3_sys>;
171		vcc8-supply = <&vcc3v3_sys>;
172		vcc9-supply = <&vcc5v0_sys>;
173
174		pwrkey {
175			status = "okay";
176		};
177
178		pinctrl_rk8xx: pinctrl_rk8xx {
179			gpio-controller;
180			#gpio-cells = <2>;
181
182			rk817_slppin_null: rk817_slppin_null {
183				pins = "gpio_slp";
184				function = "pin_fun0";
185			};
186
187			rk817_slppin_slp: rk817_slppin_slp {
188				pins = "gpio_slp";
189				function = "pin_fun1";
190			};
191
192			rk817_slppin_pwrdn: rk817_slppin_pwrdn {
193				pins = "gpio_slp";
194				function = "pin_fun2";
195			};
196
197			rk817_slppin_rst: rk817_slppin_rst {
198				pins = "gpio_slp";
199				function = "pin_fun3";
200			};
201		};
202
203		regulators {
204			vdd_logic: DCDC_REG1 {
205				regulator-always-on;
206				regulator-boot-on;
207				regulator-min-microvolt = <850000>;
208				regulator-max-microvolt = <1350000>;
209				regulator-ramp-delay = <6001>;
210				regulator-initial-mode = <0x2>;
211				regulator-name = "vdd_logic";
212				regulator-state-mem {
213					regulator-on-in-suspend;
214					regulator-suspend-microvolt = <950000>;
215				};
216			};
217
218			vdd_arm: DCDC_REG2 {
219				regulator-always-on;
220				regulator-boot-on;
221				regulator-min-microvolt = <850000>;
222				regulator-max-microvolt = <1350000>;
223				regulator-ramp-delay = <6001>;
224				regulator-initial-mode = <0x2>;
225				regulator-name = "vdd_arm";
226				regulator-state-mem {
227					regulator-off-in-suspend;
228					regulator-suspend-microvolt = <950000>;
229				};
230			};
231
232			vcc_ddr: DCDC_REG3 {
233				regulator-always-on;
234				regulator-boot-on;
235				regulator-name = "vcc_ddr";
236				regulator-initial-mode = <0x2>;
237				regulator-state-mem {
238					regulator-on-in-suspend;
239				};
240			};
241
242			vcc_3v0: DCDC_REG4 {
243				regulator-always-on;
244				regulator-boot-on;
245				regulator-min-microvolt = <3000000>;
246				regulator-max-microvolt = <3000000>;
247				regulator-initial-mode = <0x2>;
248				regulator-name = "vcc_3v0";
249				regulator-state-mem {
250					regulator-on-in-suspend;
251					regulator-suspend-microvolt = <3000000>;
252				};
253			};
254
255			vcc_1v0: LDO_REG1 {
256				regulator-always-on;
257				regulator-boot-on;
258				regulator-min-microvolt = <1000000>;
259				regulator-max-microvolt = <1000000>;
260				regulator-name = "vcc_1v0";
261				regulator-state-mem {
262					regulator-on-in-suspend;
263					regulator-suspend-microvolt = <1000000>;
264				};
265			};
266
267			vcc1v8_soc: LDO_REG2 {
268				regulator-always-on;
269				regulator-boot-on;
270				regulator-min-microvolt = <1800000>;
271				regulator-max-microvolt = <1800000>;
272
273				regulator-name = "vcc1v8_soc";
274				regulator-state-mem {
275					regulator-on-in-suspend;
276					regulator-suspend-microvolt = <1800000>;
277				};
278			};
279
280			vdd1v0_soc: LDO_REG3 {
281				regulator-always-on;
282				regulator-boot-on;
283				regulator-min-microvolt = <1000000>;
284				regulator-max-microvolt = <1000000>;
285
286				regulator-name = "vcc1v0_soc";
287				regulator-state-mem {
288					regulator-on-in-suspend;
289					regulator-suspend-microvolt = <1000000>;
290				};
291			};
292
293			vcc3v0_pmu: LDO_REG4 {
294				regulator-always-on;
295				regulator-boot-on;
296				regulator-min-microvolt = <3000000>;
297				regulator-max-microvolt = <3000000>;
298
299				regulator-name = "vcc3v0_pmu";
300				regulator-state-mem {
301					regulator-on-in-suspend;
302					regulator-suspend-microvolt = <3000000>;
303
304				};
305			};
306
307			vccio_sd: LDO_REG5 {
308				regulator-always-on;
309				regulator-boot-on;
310				regulator-min-microvolt = <1800000>;
311				regulator-max-microvolt = <3300000>;
312
313				regulator-name = "vccio_sd";
314				regulator-state-mem {
315					regulator-on-in-suspend;
316					regulator-suspend-microvolt = <3300000>;
317				};
318			};
319
320			vcc_sd: LDO_REG6 {
321				regulator-min-microvolt = <3300000>;
322				regulator-max-microvolt = <3300000>;
323				regulator-boot-on;
324
325				regulator-name = "vcc_sd";
326				regulator-state-mem {
327					regulator-on-in-suspend;
328					regulator-suspend-microvolt = <3300000>;
329
330				};
331			};
332
333			vcc2v8_dvp: LDO_REG7 {
334				regulator-min-microvolt = <2800000>;
335				regulator-max-microvolt = <2800000>;
336
337				regulator-name = "vcc2v8_dvp";
338				regulator-state-mem {
339					regulator-off-in-suspend;
340					regulator-suspend-microvolt = <2800000>;
341				};
342			};
343
344			vcc1v8_dvp: LDO_REG8 {
345				regulator-min-microvolt = <1800000>;
346				regulator-max-microvolt = <1800000>;
347
348				regulator-name = "vcc1v8_dvp";
349				regulator-state-mem {
350					regulator-on-in-suspend;
351					regulator-suspend-microvolt = <1800000>;
352				};
353			};
354
355			vdd1v5_dvp: LDO_REG9 {
356				regulator-min-microvolt = <1500000>;
357				regulator-max-microvolt = <1500000>;
358
359				regulator-name = "vdd1v5_dvp";
360				regulator-state-mem {
361					regulator-off-in-suspend;
362					regulator-suspend-microvolt = <1500000>;
363				};
364			};
365
366			vcc3v3_sys: DCDC_REG5 {
367				regulator-always-on;
368				regulator-boot-on;
369				regulator-min-microvolt = <3300000>;
370				regulator-max-microvolt = <3300000>;
371				regulator-name = "vcc3v3_sys";
372				regulator-state-mem {
373					regulator-on-in-suspend;
374					regulator-suspend-microvolt = <3300000>;
375				};
376			};
377
378			vcc5v0_host: SWITCH_REG1 {
379				regulator-always-on;
380				regulator-boot-on;
381				regulator-name = "vcc5v0_host";
382			};
383
384			vcc3v3_lcd: SWITCH_REG2 {
385				regulator-boot-on;
386				regulator-name = "vcc3v3_lcd";
387			};
388		};
389
390		rk809_codec: codec {
391			#sound-dai-cells = <0>;
392			compatible = "rockchip,rk809-codec", "rockchip,rk817-codec";
393			clocks = <&cru SCLK_I2S1_OUT>;
394			clock-names = "mclk";
395			pinctrl-names = "default";
396			pinctrl-0 = <&i2s1_2ch_mclk>;
397			hp-volume = <20>;
398			spk-volume = <3>;
399			status = "okay";
400		};
401	};
402};
403
404&i2c2 {
405	status = "okay";
406
407	clock-frequency = <100000>;
408	pinctrl-0 = <&i2c2_xfer>;
409
410	/* These are relatively safe rise/fall times; TODO: measure */
411	i2c-scl-falling-time-ns = <50>;
412	i2c-scl-rising-time-ns = <300>;
413
414	ov5695: ov5695@36 {
415		compatible = "ovti,ov5695";
416		reg = <0x36>;
417		clocks = <&cru SCLK_CIF_OUT>;
418		clock-names = "xvclk";
419		/*reset-gpios = <&gpio2 14 GPIO_ACTIVE_HIGH>;*/
420
421		avdd-supply = <&vcc2v8_dvp>;
422		dovdd-supply = <&vcc1v8_dvp>;
423		dvdd-supply = <&vdd1v5_dvp>;
424
425		pwdn-gpios = <&gpio2 14 GPIO_ACTIVE_HIGH>;
426		pinctrl-names = "default";
427		pinctrl-0 = <&cif_clkout_m0>;
428		port {
429			ucam_out: endpoint {
430				remote-endpoint = <&mipi_in_ucam>;
431				data-lanes = <1 2>;
432			};
433		};
434	};
435};
436
437&i2s1_2ch {
438	status = "okay";
439	#sound-dai-cells = <0>;
440};
441
442&io_domains {
443	status = "okay";
444
445	vccio1-supply = <&vcc_3v0>;
446	vccio2-supply = <&vccio_sd>;
447	vccio3-supply = <&vcc_3v0>;
448	vccio4-supply = <&vcc3v0_pmu>;
449	vccio5-supply = <&vcc_3v0>;
450};
451
452&isp_mmu {
453	status = "okay";
454};
455
456&mipi_dphy_rx0 {
457	status = "okay";
458
459	ports {
460		#address-cells = <1>;
461		#size-cells = <0>;
462
463		port@0 {
464			reg = <0>;
465			#address-cells = <1>;
466			#size-cells = <0>;
467
468			mipi_in_ucam: endpoint@1 {
469				reg = <1>;
470				remote-endpoint = <&ucam_out>;
471				data-lanes = <1 2>;
472			};
473		};
474
475		port@1 {
476			reg = <1>;
477			#address-cells = <1>;
478			#size-cells = <0>;
479
480			dphy_rx0_out: endpoint@0 {
481				reg = <0>;
482				remote-endpoint = <&isp0_mipi_in>;
483			};
484		};
485	};
486};
487
488&nandc0 {
489	status = "okay";
490};
491
492&pmu_io_domains {
493	status = "okay";
494
495	pmuio1-supply = <&vcc3v0_pmu>;
496	pmuio2-supply = <&vcc3v0_pmu>;
497};
498
499&rk_rga {
500	status = "okay";
501};
502
503&rkisp1 {
504	status = "okay";
505
506	port {
507		#address-cells = <1>;
508		#size-cells = <0>;
509
510		isp0_mipi_in: endpoint@0 {
511			reg = <0>;
512			remote-endpoint = <&dphy_rx0_out>;
513		};
514	};
515};
516
517&saradc {
518	status = "okay";
519	vref-supply = <&vcc1v8_soc>;
520};
521
522&sdmmc {
523	bus-width = <4>;
524	cap-mmc-highspeed;
525	cap-sd-highspeed;
526	no-sdio;
527	no-mmc;
528	card-detect-delay = <800>;
529	ignore-pm-notify;
530	/*cd-gpios = <&gpio2 4 GPIO_ACTIVE_HIGH>; [> CD GPIO <]*/
531	sd-uhs-sdr12;
532	sd-uhs-sdr25;
533	sd-uhs-sdr50;
534	sd-uhs-sdr104;
535	vqmmc-supply = <&vccio_sd>;
536	vmmc-supply = <&vcc_sd>;
537	status = "disabled";
538};
539
540&sdio {
541	bus-width = <4>;
542	cap-sd-highspeed;
543	no-sd;
544	no-mmc;
545	ignore-pm-notify;
546	keep-power-in-suspend;
547	non-removable;
548	mmc-pwrseq = <&sdio_pwrseq>;
549	sd-uhs-sdr104;
550	status = "okay";
551};
552
553&mpp_srv {
554	status = "okay";
555};
556
557&vdpu {
558	status = "okay";
559};
560
561&vepu {
562	status = "okay";
563};
564
565&vpu_mmu {
566	status = "okay";
567};
568
569&hevc {
570	status = "okay";
571};
572
573&hevc_mmu {
574	status = "okay";
575};
576
577&uart1 {
578	pinctrl-names = "default";
579	pinctrl-0 = <&uart1_xfer &uart1_cts>;
580	status = "okay";
581};
582
583&u2phy {
584	status = "okay";
585
586	u2phy_otg: otg-port {
587		status = "okay";
588	};
589};
590
591&usb20_otg {
592	status = "okay";
593};
594
595&pinctrl {
596	pmic {
597		pmic_int: pmic_int {
598			rockchip,pins =
599				<0 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>;
600		};
601
602		soc_slppin_gpio: soc_slppin_gpio {
603			rockchip,pins =
604				<0 RK_PA4 RK_FUNC_GPIO &pcfg_output_low>;
605		};
606
607		soc_slppin_slp: soc_slppin_slp {
608			rockchip,pins =
609				<0 RK_PA4 1 &pcfg_pull_none>;
610		};
611
612		soc_slppin_rst: soc_slppin_rst {
613			rockchip,pins =
614				<0 RK_PA4 2 &pcfg_pull_none>;
615		};
616	};
617
618	sdio-pwrseq {
619		wifi_enable_h: wifi-enable-h {
620			rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
621		};
622	};
623};
624
625/* DON'T PUT ANYTHING BELOW HERE.  PUT IT ABOVE PINCTRL */
626/* DON'T PUT ANYTHING BELOW HERE.  PUT IT ABOVE PINCTRL */
627/* DON'T PUT ANYTHING BELOW HERE.  PUT IT ABOVE PINCTRL */
628