xref: /OK3568_Linux_fs/kernel/arch/arm/boot/dts/rk3288-popmetal-android-vga.dts (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1/*
2 * Copyright (c) 2016, 2017 Jerry Xu <Jerry.xu@rock-chips.com>
3 *
4 * This file is dual-licensed: you can use it either under the terms
5 * of the GPL or the X11 license, at your option. Note that this dual
6 * licensing only applies to this file, and not this project as a
7 * whole.
8 *
9 *  a) This file is free software; you can redistribute it and/or
10 *     modify it under the terms of the GNU General Public License as
11 *     published by the Free Software Foundation; either version 2 of the
12 *     License, or (at your option) any later version.
13 *
14 *     This file is distributed in the hope that it will be useful,
15 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
16 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 *     GNU General Public License for more details.
18 *
19 *  Or, alternatively,
20 *
21 *  b) Permission is hereby granted, free of charge, to any person
22 *     obtaining a copy of this software and associated documentation
23 *     files (the "Software"), to deal in the Software without
24 *     restriction, including without limitation the rights to use,
25 *     copy, modify, merge, publish, distribute, sublicense, and/or
26 *     sell copies of the Software, and to permit persons to whom the
27 *     Software is furnished to do so, subject to the following
28 *     conditions:
29 *
30 *     The above copyright notice and this permission notice shall be
31 *     included in all copies or substantial portions of the Software.
32 *
33 *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
34 *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
35 *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
36 *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
37 *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
38 *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39 *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
40 *     OTHER DEALINGS IN THE SOFTWARE.
41 */
42
43/dts-v1/;
44
45#include "rk3288-evb.dtsi"
46#include "rk3288-android.dtsi"
47
48/ {
49	model = "PopMetal-RK3288";
50	compatible = "chipspark,popmetal-rk3288", "rockchip,rk3288";
51
52	sdio_pwrseq: sdio-pwrseq {
53		compatible = "mmc-pwrseq-simple";
54		clocks = <&rk808 1>;
55		clock-names = "ext_clock";
56
57		/*
58		 * On the module itself this is one of these (depending
59		 * on the actual card populated):
60		 * - SDIO_RESET_L_WL_REG_ON
61		 * - PDN (power down when low)
62		 */
63		reset-gpios = <&gpio4 28 GPIO_ACTIVE_LOW>;
64	};
65
66	wireless-bluetooth {
67		clocks = <&rk808 1>;
68		clock-names = "ext_clock";
69	};
70
71	memory@0 {
72		device_type = "memory";
73		reg = <0x0 0x0 0x0 0x80000000>;
74	};
75
76	vga_bridge: vga-bridge {
77		compatible = "adi,adv7125";
78		psave-gpios = <&gpio7 21 GPIO_ACTIVE_HIGH>;
79		vdd-supply = <&vcc_lcd>;
80		#address-cells = <1>;
81		#size-cells = <0>;
82
83		ports {
84			#address-cells = <1>;
85			#size-cells = <0>;
86
87			port@0 {
88				reg = <0>;
89
90				adv7125_in_rgb: endpoint {
91					remote-endpoint = <&rgb_out_adv7125>;
92				};
93			};
94
95			port@1 {
96				reg = <1>;
97
98				adv7125_out_vga: endpoint {
99					remote-endpoint = <&vga_in_adv7125>;
100				};
101			};
102		};
103	};
104
105	vga {
106		compatible = "vga-connector";
107		ddc-i2c-bus = <&i2c2>;
108
109		port {
110			vga_in_adv7125: endpoint {
111				remote-endpoint = <&adv7125_out_vga>;
112			};
113		};
114	};
115
116	ext_gmac: external-gmac-clock {
117		compatible = "fixed-clock";
118		clock-frequency = <125000000>;
119		clock-output-names = "ext_gmac";
120		#clock-cells = <0>;
121	};
122
123	gpio-keys {
124		compatible = "gpio-keys";
125		#address-cells = <1>;
126		#size-cells = <0>;
127		autorepeat;
128
129		pinctrl-names = "default";
130		pinctrl-0 = <&pwrbtn>;
131
132		button@0 {
133			gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
134			linux,code = <116>;
135			label = "GPIO Key Power";
136			linux,input-type = <1>;
137			gpio-key,wakeup = <1>;
138			debounce-interval = <100>;
139		};
140	};
141
142	ir: ir-receiver {
143		compatible = "gpio-ir-receiver";
144		gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
145		pinctrl-names = "default";
146		pinctrl-0 = <&ir_int>;
147	};
148
149	vcc_flash: flash-regulator {
150		compatible = "regulator-fixed";
151		regulator-name = "vcc_flash";
152		regulator-min-microvolt = <1800000>;
153		regulator-max-microvolt = <1800000>;
154		vin-supply = <&vcc_io>;
155	};
156
157	vcc_sd: sdmmc-regulator {
158		compatible = "regulator-fixed";
159		gpio = <&gpio7 11 GPIO_ACTIVE_LOW>;
160		pinctrl-names = "default";
161		pinctrl-0 = <&sdmmc_pwr>;
162		regulator-name = "vcc_sd";
163		regulator-min-microvolt = <3300000>;
164		regulator-max-microvolt = <3300000>;
165		startup-delay-us = <100000>;
166		vin-supply = <&vcc_io>;
167	};
168
169	vcc_sys: vsys-regulator {
170		compatible = "regulator-fixed";
171		regulator-name = "vcc_sys";
172		regulator-min-microvolt = <5000000>;
173		regulator-max-microvolt = <5000000>;
174		regulator-always-on;
175		regulator-boot-on;
176	};
177
178	/*
179	 * A PT5128 creates both dovdd_1v8 and vcc28_dvp, controlled
180	 * by the dvp_pwr pin.
181	 */
182	vcc18_dvp: vcc18-dvp-regulator {
183		compatible = "regulator-fixed";
184		regulator-name = "vcc18-dvp";
185		regulator-min-microvolt = <1800000>;
186		regulator-max-microvolt = <1800000>;
187		vin-supply = <&vcc28_dvp>;
188	};
189
190	vcc28_dvp: vcc28-dvp-regulator {
191		compatible = "regulator-fixed";
192		enable-active-high;
193		gpio = <&gpio0 17 GPIO_ACTIVE_HIGH>;
194		pinctrl-names = "default";
195		pinctrl-0 = <&dvp_pwr>;
196		regulator-name = "vcc28_dvp";
197		regulator-min-microvolt = <2800000>;
198		regulator-max-microvolt = <2800000>;
199		regulator-always-on;
200		vin-supply = <&vcc_io>;
201	};
202
203	xin32k: xin32k {
204		compatible = "fixed-clock";
205		clock-frequency = <32768>;
206		clock-output-names = "xin32k";
207		#clock-cells = <0>;
208	};
209};
210
211&cpu0 {
212	cpu0-supply = <&vdd_cpu>;
213};
214
215&emmc {
216	bus-width = <8>;
217	cap-mmc-highspeed;
218	disable-wp;
219	non-removable;
220	num-slots = <1>;
221	pinctrl-names = "default";
222	pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>;
223	vmmc-supply = <&vcc_io>;
224	vqmmc-supply = <&vcc_flash>;
225	status = "okay";
226};
227
228&sdmmc {
229	bus-width = <4>;
230	cap-mmc-highspeed;
231	cap-sd-highspeed;
232	card-detect-delay = <200>;
233	disable-wp;                     /* wp not hooked up */
234	num-slots = <1>;
235	pinctrl-names = "default";
236	pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
237	vmmc-supply = <&vcc_sd>;
238	vqmmc-supply = <&vccio_sd>;
239	status = "okay";
240	no-sdio;
241	no-mmc;
242};
243
244&gmac {
245	phy-supply = <&vcc_lan>;
246	phy-mode = "rgmii";
247	clock_in_out = "input";
248	snps,reset-gpio = <&gpio4 7 0>;
249	snps,reset-active-low;
250	snps,reset-delays-us = <0 10000 1000000>;
251	assigned-clocks = <&cru SCLK_MAC>;
252	assigned-clock-parents = <&ext_gmac>;
253	pinctrl-names = "default";
254	pinctrl-0 = <&rgmii_pins>;
255	tx_delay = <0x30>;
256	rx_delay = <0x10>;
257	status = "ok";
258};
259
260&gpu {
261	mali-supply = <&vdd_gpu>;
262	status = "okay";
263};
264
265&hdmi {
266	status = "okay";
267};
268
269&rgb {
270	status = "okay";
271
272	ports {
273		port@1 {
274			reg = <1>;
275
276			rgb_out_adv7125: endpoint {
277				remote-endpoint = <&adv7125_in_rgb>;
278			};
279		};
280	};
281};
282
283&rgb_in_vopl {
284	status = "okay";
285};
286
287&rgb_in_vopb {
288	status = "disabled";
289};
290
291&route_rgb {
292	connect = <&vopl_out_rgb>;
293	status = "disabled";
294};
295
296&hevc_service {
297	status = "okay";
298};
299
300&i2c0 {
301	status = "okay";
302	clock-frequency = <400000>;
303
304	rk808: pmic@1b {
305		compatible = "rockchip,rk808";
306		reg = <0x1b>;
307		interrupt-parent = <&gpio0>;
308		interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
309		pinctrl-names = "default";
310		pinctrl-0 = <&pmic_int &global_pwroff>;
311		rockchip,system-power-controller;
312		wakeup-source;
313		#clock-cells = <1>;
314		clock-output-names = "rk808-clkout1", "rk808-clkout2";
315
316		vcc1-supply = <&vcc_sys>;
317		vcc2-supply = <&vcc_sys>;
318		vcc3-supply = <&vcc_sys>;
319		vcc4-supply = <&vcc_sys>;
320		vcc6-supply = <&vcc_sys>;
321		vcc7-supply = <&vcc_sys>;
322		vcc8-supply = <&vcc_18>;
323		vcc9-supply = <&vcc_io>;
324		vcc10-supply = <&vcc_io>;
325		vcc11-supply = <&vcc_sys>;
326		vcc12-supply = <&vcc_io>;
327		vddio-supply = <&vcc_io>;
328
329		regulators {
330			vdd_cpu: DCDC_REG1 {
331				regulator-always-on;
332				regulator-boot-on;
333				regulator-min-microvolt = <750000>;
334				regulator-max-microvolt = <1350000>;
335				regulator-name = "vdd_arm";
336				regulator-state-mem {
337					regulator-off-in-suspend;
338				};
339			};
340
341			vdd_gpu: DCDC_REG2 {
342				regulator-always-on;
343				regulator-boot-on;
344				regulator-min-microvolt = <850000>;
345				regulator-max-microvolt = <1250000>;
346				regulator-name = "vdd_gpu";
347				regulator-ramp-delay = <6000>;
348				regulator-state-mem {
349					regulator-on-in-suspend;
350					regulator-suspend-microvolt = <1000000>;
351				};
352			};
353
354			vcc_ddr: DCDC_REG3 {
355				regulator-always-on;
356				regulator-boot-on;
357				regulator-name = "vcc_ddr";
358				regulator-state-mem {
359					regulator-on-in-suspend;
360				};
361			};
362
363			vcc_io: DCDC_REG4 {
364				regulator-always-on;
365				regulator-boot-on;
366				regulator-min-microvolt = <3300000>;
367				regulator-max-microvolt = <3300000>;
368				regulator-name = "vcc_io";
369				regulator-state-mem {
370					regulator-on-in-suspend;
371					regulator-suspend-microvolt = <3300000>;
372				};
373			};
374
375			vcc_lan: LDO_REG1 {
376				regulator-always-on;
377				regulator-boot-on;
378				regulator-min-microvolt = <3300000>;
379				regulator-max-microvolt = <3300000>;
380				regulator-name = "vcc_lan";
381				regulator-state-mem {
382					regulator-on-in-suspend;
383					regulator-suspend-microvolt = <3300000>;
384				};
385			};
386
387			vccio_sd: LDO_REG2 {
388				regulator-always-on;
389				regulator-boot-on;
390				regulator-min-microvolt = <3300000>;
391				regulator-max-microvolt = <3300000>;
392				regulator-name = "vccio_sd";
393				regulator-state-mem {
394					regulator-off-in-suspend;
395				};
396			};
397
398			vdd_10: LDO_REG3 {
399				regulator-always-on;
400				regulator-boot-on;
401				regulator-min-microvolt = <1000000>;
402				regulator-max-microvolt = <1000000>;
403				regulator-name = "vdd_10";
404				regulator-state-mem {
405					regulator-on-in-suspend;
406					regulator-suspend-microvolt = <1000000>;
407				};
408			};
409
410			vcc18_lcd: LDO_REG4 {
411				regulator-always-on;
412				regulator-boot-on;
413				regulator-min-microvolt = <1800000>;
414				regulator-max-microvolt = <1800000>;
415				regulator-name = "vcc18_lcd";
416				regulator-state-mem {
417					regulator-on-in-suspend;
418					regulator-suspend-microvolt = <1800000>;
419				};
420			};
421
422			ldo5: LDO_REG5 {
423				regulator-always-on;
424				regulator-min-microvolt = <1800000>;
425				regulator-max-microvolt = <3300000>;
426				regulator-name = "ldo5";
427			};
428
429			vdd10_lcd: LDO_REG6 {
430				regulator-always-on;
431				regulator-boot-on;
432				regulator-min-microvolt = <1000000>;
433				regulator-max-microvolt = <1000000>;
434				regulator-name = "vdd10_lcd";
435				regulator-state-mem {
436					regulator-on-in-suspend;
437					regulator-suspend-microvolt = <1000000>;
438				};
439			};
440
441			vcc_18: LDO_REG7 {
442				regulator-always-on;
443				regulator-boot-on;
444				regulator-min-microvolt = <1800000>;
445				regulator-max-microvolt = <1800000>;
446				regulator-name = "vcc_18";
447				regulator-state-mem {
448					regulator-on-in-suspend;
449					regulator-suspend-microvolt = <1800000>;
450				};
451			};
452
453			vcca_33: LDO_REG8 {
454				regulator-always-on;
455				regulator-boot-on;
456				regulator-min-microvolt = <3300000>;
457				regulator-max-microvolt = <3300000>;
458				regulator-name = "vcca_33";
459				regulator-state-mem {
460					regulator-on-in-suspend;
461					regulator-suspend-microvolt = <3300000>;
462				};
463			};
464
465			vccio_wl: SWITCH_REG1 {
466				regulator-always-on;
467				regulator-boot-on;
468				regulator-name = "vccio_wl";
469				regulator-state-mem {
470					regulator-on-in-suspend;
471				};
472			};
473
474			vcc_lcd: SWITCH_REG2 {
475				regulator-always-on;
476				regulator-boot-on;
477				regulator-name = "vcc_lcd";
478				regulator-state-mem {
479					regulator-on-in-suspend;
480				};
481			};
482		};
483	};
484};
485
486&i2c1 {
487	status = "okay";
488	clock-frequency = <400000>;
489
490	ak8963: ak8963@0d {
491		compatible = "asahi-kasei,ak8975";
492		reg = <0x0d>;
493		interrupt-parent = <&gpio8>;
494		interrupts = <1 IRQ_TYPE_EDGE_RISING>;
495		pinctrl-names = "default";
496		pinctrl-0 = <&comp_int>;
497	};
498
499	l3g4200d: l3g4200d@68 {
500		compatible = "st,l3g4200d-gyro";
501		st,drdy-int-pin = <2>;
502		reg = <0x6b>;
503	};
504
505	mma8452: mma8452@1d {
506		compatible = "fsl,mma8452";
507		reg = <0x1d>;
508		interrupt-parent = <&gpio8>;
509		interrupts = <0 IRQ_TYPE_EDGE_RISING>;
510		pinctrl-names = "default";
511		pinctrl-0 = <&gsensor_int>;
512	};
513};
514
515&i2c2 {
516	status = "okay";
517};
518
519&i2c3 {
520	status = "okay";
521};
522
523&i2c4 {
524	status = "okay";
525};
526
527&io_domains {
528	status = "okay";
529
530	audio-supply = <&vcca_33>;
531	bb-supply = <&vcc_io>;
532	dvp-supply = <&vcc18_dvp>;
533	flash0-supply = <&vcc_flash>;
534	flash1-supply = <&vcc_lan>;
535	gpio30-supply = <&vcc_io>;
536	gpio1830-supply = <&vcc_io>;
537	lcdc-supply = <&vcc_io>;
538	sdcard-supply = <&vccio_sd>;
539	wifi-supply = <&vccio_wl>;
540};
541
542&rga {
543	status = "okay";
544};
545
546&pinctrl {
547	ak8963 {
548		comp_int: comp-int {
549			rockchip,pins = <8 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
550		};
551	};
552
553	buttons {
554		pwrbtn: pwrbtn {
555			rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
556		};
557	};
558
559	dvp {
560		dvp_pwr: dvp-pwr {
561			rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
562		};
563	};
564
565	ir {
566		ir_int: ir-int {
567			rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
568		};
569	};
570
571	mma8452 {
572		gsensor_int: gsensor-int {
573			rockchip,pins = <8 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
574		};
575	};
576
577	pmic {
578		pmic_int: pmic-int {
579			rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
580		};
581	};
582
583	sdmmc {
584		sdmmc_pwr: sdmmc-pwr {
585			rockchip,pins = <7 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
586		};
587	};
588};
589
590&tsadc {
591	rockchip,hw-tshut-polarity = <0>;
592	status = "okay";
593};
594
595&vopb {
596	status = "okay";
597};
598
599&vopb_mmu {
600	status = "okay";
601};
602
603&vopl {
604	status = "okay";
605};
606
607&vopl_mmu {
608	status = "okay";
609};
610
611&vpu_service {
612	status = "okay";
613};
614
615&uart0 {
616	status = "okay";
617};
618
619&uart1 {
620	status = "okay";
621};
622
623&uart2 {
624	status = "okay";
625};
626
627&uart3 {
628	status = "okay";
629};
630
631&uart4 {
632	status = "okay";
633};
634
635&usbphy {
636	status = "okay";
637};
638
639&usb_host0_ehci {
640	no-relinquish-port;
641	status = "okay";
642};
643
644&usb_host1 {
645	status = "okay";
646};
647
648&usb_otg {
649	status= "okay";
650};
651