xref: /openbmc/u-boot/arch/arm/dts/rk3288-tinker.dtsi (revision 51cb23d4)
1/*
2 * This file is dual-licensed: you can use it either under the terms
3 * of the GPL or the X11 license, at your option. Note that this dual
4 * licensing only applies to this file, and not this project as a
5 * whole.
6 *
7 *  a) This file is free software; you can redistribute it and/or
8 *     modify it under the terms of the GNU General Public License as
9 *     published by the Free Software Foundation; either version 2 of the
10 *     License, or (at your option) any later version.
11 *
12 *     This file is distributed in the hope that it will be useful,
13 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
14 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 *     GNU General Public License for more details.
16 *
17 * Or, alternatively,
18 *
19 *  b) Permission is hereby granted, free of charge, to any person
20 *     obtaining a copy of this software and associated documentation
21 *     files (the "Software"), to deal in the Software without
22 *     restriction, including without limitation the rights to use,
23 *     copy, modify, merge, publish, distribute, sublicense, and/or
24 *     sell copies of the Software, and to permit persons to whom the
25 *     Software is furnished to do so, subject to the following
26 *     conditions:
27 *
28 *     The above copyright notice and this permission notice shall be
29 *     included in all copies or substantial portions of the Software.
30 *
31 *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
32 *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
33 *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
34 *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
35 *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
36 *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
37 *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
38 *     OTHER DEALINGS IN THE SOFTWARE.
39 */
40
41#include "rk3288.dtsi"
42
43/ {
44	memory {
45		device_type = "memory";
46		reg = <0x0 0x80000000>;
47	};
48
49	ext_gmac: external-gmac-clock {
50		compatible = "fixed-clock";
51		clock-frequency = <125000000>;
52		clock-output-names = "ext_gmac";
53		#clock-cells = <0>;
54	};
55
56	gpio-keys {
57		compatible = "gpio-keys";
58		#address-cells = <1>;
59		#size-cells = <0>;
60		autorepeat;
61
62		pinctrl-names = "default";
63		pinctrl-0 = <&pwrbtn>;
64
65		button@0 {
66			gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
67			label = "GPIO Key Power";
68			linux,input-type = <1>;
69			gpio-key,wakeup = <1>;
70			debounce-interval = <100>;
71		};
72	};
73
74	gpio-leds {
75		compatible = "gpio-leds";
76
77		pwr-led {
78			gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
79			linux,default-trigger = "default-on";
80		};
81
82		act-led {
83			gpios=<&gpio2 3 GPIO_ACTIVE_LOW>;
84			linux,default-trigger="mmc0";
85		};
86	};
87
88	vcc_sys: vsys-regulator {
89		compatible = "regulator-fixed";
90		regulator-name = "vcc_sys";
91		regulator-min-microvolt = <5000000>;
92		regulator-max-microvolt = <5000000>;
93		regulator-always-on;
94		regulator-boot-on;
95	};
96
97	/*
98	 * NOTE: vcc_sd isn't hooked up on v1.0 boards where power comes from
99	 * vcc_io directly.  Those boards won't be able to power cycle SD cards
100	 * but it shouldn't hurt to toggle this pin there anyway.
101	 */
102	vcc_sd: sdmmc-regulator {
103		compatible = "regulator-fixed";
104		gpio = <&gpio7 11 GPIO_ACTIVE_LOW>;
105		pinctrl-names = "default";
106		pinctrl-0 = <&sdmmc_pwr>;
107		regulator-name = "vcc_sd";
108		regulator-min-microvolt = <3300000>;
109		regulator-max-microvolt = <3300000>;
110		startup-delay-us = <100000>;
111		vin-supply = <&vcc_io>;
112	};
113};
114
115&cpu0 {
116	cpu0-supply = <&vdd_cpu>;
117};
118
119&sdmmc {
120	bus-width = <4>;
121	cap-mmc-highspeed;
122	cap-sd-highspeed;
123	card-detect-delay = <200>;
124	disable-wp;			/* wp not hooked up */
125	num-slots = <1>;
126	pinctrl-names = "default";
127	pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
128	status = "okay";
129	supports-sd;
130	vmmc-supply = <&vcc_sd>;
131	vqmmc-supply = <&vccio_sd>;
132};
133
134&gpu {
135	mali-supply = <&vdd_gpu>;
136	status = "okay";
137};
138
139&gmac {
140	phy-supply = <&vcc33_lan>;
141	phy-mode = "rgmii";
142	clock_in_out = "input";
143	snps,reset-gpio = <&gpio4 7 0>;
144	snps,reset-active-low;
145	snps,reset-delays-us = <0 10000 1000000>;
146	assigned-clocks = <&cru SCLK_MAC>;
147	assigned-clock-parents = <&ext_gmac>;
148	pinctrl-names = "default";
149	pinctrl-0 = <&rgmii_pins>;
150	tx_delay = <0x30>;
151	rx_delay = <0x10>;
152	status = "ok";
153};
154
155&hdmi {
156	ddc-i2c-bus = <&i2c5>;
157	status = "okay";
158};
159
160&i2c0 {
161	status = "okay";
162	clock-frequency = <400000>;
163
164	rk808: pmic@1b {
165		compatible = "rockchip,rk808";
166		reg = <0x1b>;
167		interrupt-parent = <&gpio0>;
168		interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
169		pinctrl-names = "default";
170		pinctrl-0 = <&pmic_int &global_pwroff>;
171		rockchip,system-power-controller;
172		wakeup-source;
173		#clock-cells = <1>;
174		clock-output-names = "xin32k", "rk808-clkout2";
175
176		vcc1-supply = <&vcc_sys>;
177		vcc2-supply = <&vcc_sys>;
178		vcc3-supply = <&vcc_sys>;
179		vcc4-supply = <&vcc_sys>;
180		vcc6-supply = <&vcc_sys>;
181		vcc7-supply = <&vcc_sys>;
182		vcc8-supply = <&vcc_18>;
183		vcc9-supply = <&vcc_io>;
184		vcc10-supply = <&vcc_io>;
185		vcc11-supply = <&vcc_sys>;
186		vcc12-supply = <&vcc_io>;
187		vddio-supply = <&vcc18_ldo1>;
188
189		regulators {
190			vdd_cpu: DCDC_REG1 {
191				regulator-always-on;
192				regulator-boot-on;
193				regulator-min-microvolt = <750000>;
194				regulator-max-microvolt = <1350000>;
195				regulator-name = "vdd_arm";
196				regulator-state-mem {
197					regulator-off-in-suspend;
198				};
199			};
200
201			vdd_gpu: DCDC_REG2 {
202				regulator-always-on;
203				regulator-boot-on;
204				regulator-min-microvolt = <850000>;
205				regulator-max-microvolt = <1250000>;
206				regulator-name = "vdd_gpu";
207				regulator-state-mem {
208					regulator-on-in-suspend;
209					regulator-suspend-microvolt = <1000000>;
210				};
211			};
212
213			vcc_ddr: DCDC_REG3 {
214				regulator-always-on;
215				regulator-boot-on;
216				regulator-name = "vcc_ddr";
217				regulator-state-mem {
218					regulator-on-in-suspend;
219				};
220			};
221
222			vcc_io: DCDC_REG4 {
223				regulator-always-on;
224				regulator-boot-on;
225				regulator-min-microvolt = <3300000>;
226				regulator-max-microvolt = <3300000>;
227				regulator-name = "vcc_io";
228				regulator-state-mem {
229					regulator-on-in-suspend;
230					regulator-suspend-microvolt = <3300000>;
231				};
232			};
233
234			vcc18_ldo1: LDO_REG1 {
235				regulator-always-on;
236				regulator-boot-on;
237				regulator-min-microvolt = <1800000>;
238				regulator-max-microvolt = <1800000>;
239				regulator-name = "vcc18_ldo1";
240				regulator-state-mem {
241					regulator-on-in-suspend;
242					regulator-suspend-microvolt = <1800000>;
243				};
244			};
245
246			vcc33_mipi: LDO_REG2 {
247				regulator-always-on;
248				regulator-boot-on;
249				regulator-min-microvolt = <3300000>;
250				regulator-max-microvolt = <3300000>;
251				regulator-name = "vcc33_mipi";
252				regulator-state-mem {
253					regulator-off-in-suspend;
254				};
255			};
256
257			vdd_10: LDO_REG3 {
258				regulator-always-on;
259				regulator-boot-on;
260				regulator-min-microvolt = <1000000>;
261				regulator-max-microvolt = <1000000>;
262				regulator-name = "vdd_10";
263				regulator-state-mem {
264					regulator-on-in-suspend;
265					regulator-suspend-microvolt = <1000000>;
266				};
267			};
268
269			vcc18_codec: LDO_REG4 {
270				regulator-always-on;
271				regulator-boot-on;
272				regulator-min-microvolt = <1800000>;
273				regulator-max-microvolt = <1800000>;
274				regulator-name = "vcc18_codec";
275				regulator-state-mem {
276					regulator-on-in-suspend;
277					regulator-suspend-microvolt = <1800000>;
278				};
279			};
280
281			vccio_sd: LDO_REG5 {
282				regulator-always-on;
283				regulator-boot-on;
284				regulator-min-microvolt = <1800000>;
285				regulator-max-microvolt = <3300000>;
286				regulator-name = "vccio_sd";
287				regulator-state-mem {
288					regulator-on-in-suspend;
289					regulator-suspend-microvolt = <3300000>;
290				};
291			};
292
293			vdd10_lcd: LDO_REG6 {
294				regulator-always-on;
295				regulator-boot-on;
296				regulator-min-microvolt = <1000000>;
297				regulator-max-microvolt = <1000000>;
298				regulator-name = "vdd10_lcd";
299				regulator-state-mem {
300					regulator-on-in-suspend;
301					regulator-suspend-microvolt = <1000000>;
302				};
303			};
304
305			vcc_18: LDO_REG7 {
306				regulator-always-on;
307				regulator-boot-on;
308				regulator-min-microvolt = <1800000>;
309				regulator-max-microvolt = <1800000>;
310				regulator-name = "vcc_18";
311				regulator-state-mem {
312					regulator-on-in-suspend;
313					regulator-suspend-microvolt = <1800000>;
314				};
315			};
316
317			vcc18_lcd: LDO_REG8 {
318				regulator-always-on;
319				regulator-boot-on;
320				regulator-min-microvolt = <1800000>;
321				regulator-max-microvolt = <1800000>;
322				regulator-name = "vcc18_lcd";
323				regulator-state-mem {
324					regulator-on-in-suspend;
325					regulator-suspend-microvolt = <1800000>;
326				};
327			};
328
329			vcc33_sd: SWITCH_REG1 {
330				regulator-always-on;
331				regulator-boot-on;
332				regulator-name = "vcc33_sd";
333				regulator-state-mem {
334					regulator-on-in-suspend;
335				};
336			};
337
338			vcc33_lan: SWITCH_REG2 {
339				regulator-always-on;
340				regulator-boot-on;
341				regulator-name = "vcc33_lan";
342				regulator-state-mem {
343					regulator-on-in-suspend;
344				};
345			};
346		};
347	};
348};
349
350&i2c2 {
351	status = "okay";
352	headset: nau8825@1a {
353		compatible = "nuvoton,nau8825";
354		#sound-dai-cells = <0>;
355		reg = <0x1a>;
356		interrupt-parent = <&gpio6>;
357		interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
358		nuvoton,jkdet-enable = <1>;
359		nuvoton,jkdet-pull-enable = <1>;
360		nuvoton,jkdet-pull-up = <0>;
361		nuvoton,jkdet-polarity = <1>;
362		nuvoton,vref-impedance = <2>;
363		nuvoton,micbias-voltage = <6>;
364		nuvoton,sar-threshold-num = <4>;
365		nuvoton,sar-threshold = <0xa 0x14 0x26 0x73>;
366		nuvoton,sar-hysteresis = <0>;
367		nuvoton,sar-voltage = <6>;
368		nuvoton,sar-compare-time = <0>;
369		nuvoton,sar-sampling-time = <0>;
370		nuvoton,short-key-debounce = <3>;
371		nuvoton,jack-insert-debounce = <7>;
372		nuvoton,jack-eject-debounce = <7>;
373		clock-names = "mclk";
374		clocks = <&cru SCLK_I2S0_OUT>;
375	};
376};
377
378&i2c5 {
379	status = "okay";
380};
381
382&wdt {
383	status = "okay";
384};
385
386&pwm0 {
387	status = "okay";
388};
389
390&saradc {
391	vref-supply = <&vcc18_ldo1>;
392	status ="okay";
393};
394
395&uart0 {
396	status = "okay";
397};
398
399&uart1 {
400	status = "okay";
401};
402
403&uart2 {
404	status = "okay";
405};
406
407&uart3 {
408	status = "okay";
409};
410
411&uart4 {
412	status = "okay";
413};
414
415&tsadc {
416	rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */
417	rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
418	status = "okay";
419};
420
421&usbphy {
422	status = "okay";
423};
424
425&usb_host0_ehci {
426	status = "okay";
427};
428
429&usb_host1 {
430	status = "okay";
431};
432
433&usb_otg {
434	status= "okay";
435};
436
437&vopb {
438	status = "okay";
439};
440
441&vopb_mmu {
442	status = "okay";
443};
444
445&vopl {
446	status = "okay";
447};
448
449&vopl_mmu {
450	status = "okay";
451};
452
453&pinctrl {
454	pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma {
455		drive-strength = <8>;
456	};
457
458	pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma {
459		bias-pull-up;
460		drive-strength = <8>;
461	};
462
463	backlight {
464		bl_en: bl-en {
465			rockchip,pins = <7 2 RK_FUNC_GPIO &pcfg_pull_none>;
466		};
467	};
468
469	buttons {
470		pwrbtn: pwrbtn {
471			rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
472		};
473	};
474
475	eth_phy {
476		eth_phy_pwr: eth-phy-pwr {
477			rockchip,pins = <0 6 RK_FUNC_GPIO &pcfg_pull_none>;
478		};
479	};
480
481	pmic {
482		pmic_int: pmic-int {
483			rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO &pcfg_pull_up>;
484		};
485	};
486
487	sdmmc {
488		/*
489		 * Default drive strength isn't enough to achieve even
490		 * high-speed mode on EVB board so bump up to 8ma.
491		 */
492		sdmmc_bus4: sdmmc-bus4 {
493			rockchip,pins = <6 16 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
494					<6 17 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
495					<6 18 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
496					<6 19 RK_FUNC_1 &pcfg_pull_up_drv_8ma>;
497		};
498
499		sdmmc_clk: sdmmc-clk {
500			rockchip,pins = <6 20 RK_FUNC_1 &pcfg_pull_none_drv_8ma>;
501		};
502
503		sdmmc_cmd: sdmmc-cmd {
504			rockchip,pins = <6 21 RK_FUNC_1 &pcfg_pull_up_drv_8ma>;
505		};
506
507		sdmmc_pwr: sdmmc-pwr {
508			rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>;
509		};
510	};
511
512	usb {
513		host_vbus_drv: host-vbus-drv {
514			rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
515		};
516
517		pwr_3g: pwr-3g {
518			rockchip,pins = <7 8 RK_FUNC_GPIO &pcfg_pull_none>;
519		};
520	};
521};
522