xref: /OK3568_Linux_fs/kernel/arch/arm/boot/dts/rk3288-firefly-reload.dts (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Device tree file for Firefly Rockchip RK3288 Core board
4 * Copyright (c) 2016 Randy Li <ayaka@soulik.info>
5 */
6
7/dts-v1/;
8#include "rk3288-firefly-reload-core.dtsi"
9
10/ {
11	model = "Firefly-RK3288-reload";
12	compatible = "firefly,firefly-rk3288-reload", "rockchip,rk3288";
13
14	adc-keys {
15		compatible = "adc-keys";
16		io-channels = <&saradc 1>;
17		io-channel-names = "buttons";
18		keyup-threshold-microvolt = <1800000>;
19
20		button-recovery {
21			label = "Recovery";
22			linux,code = <KEY_VENDOR>;
23			press-threshold-microvolt = <0>;
24		};
25	};
26
27	gpio-keys {
28		compatible = "gpio-keys";
29
30		power {
31			wakeup-source;
32			gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
33			label = "GPIO Power";
34			linux,code = <KEY_POWER>;
35			pinctrl-names = "default";
36			pinctrl-0 = <&pwr_key>;
37		};
38	};
39
40	ir-receiver {
41		compatible = "gpio-ir-receiver";
42		gpios = <&gpio7 RK_PA0 GPIO_ACTIVE_LOW>;
43	};
44
45	leds {
46		compatible = "gpio-leds";
47
48		power_led: led-0 {
49			gpios = <&gpio8 RK_PA2 GPIO_ACTIVE_LOW>;
50			label = "firefly:blue:power";
51			pinctrl-names = "default";
52			pinctrl-0 = <&power_led_pin>;
53			panic-indicator;
54		};
55
56		work_led: led-1 {
57			gpios = <&gpio8 RK_PA1 GPIO_ACTIVE_LOW>;
58			label = "firefly:blue:user";
59			linux,default-trigger = "rc-feedback";
60			pinctrl-names = "default";
61			pinctrl-0 = <&work_led_pin>;
62		};
63	};
64
65	sdio_pwrseq: sdio-pwrseq {
66		compatible = "mmc-pwrseq-simple";
67		clocks = <&hym8563>;
68		clock-names = "ext_clock";
69		pinctrl-names = "default";
70		pinctrl-0 = <&wifi_enable>;
71		reset-gpios = <&gpio4 RK_PD4 GPIO_ACTIVE_LOW>;
72	};
73
74	sound {
75		compatible = "simple-audio-card";
76		simple-audio-card,name = "SPDIF";
77		simple-audio-card,mclk-fs = <128>;
78		simple-audio-card,dai-link@1 {  /* S/PDIF - S/PDIF */
79			cpu { sound-dai = <&spdif>; };
80			codec { sound-dai = <&spdif_out>; };
81		};
82	};
83
84	spdif_out: spdif-out {
85		compatible = "linux,spdif-dit";
86		#sound-dai-cells = <0>;
87	};
88
89	vcc_host_5v: usb-host-regulator {
90		compatible = "regulator-fixed";
91		enable-active-high;
92		gpio = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
93		pinctrl-names = "default";
94		pinctrl-0 = <&host_vbus_drv>;
95		regulator-name = "vcc_host_5v";
96		regulator-min-microvolt = <5000000>;
97		regulator-max-microvolt = <5000000>;
98		regulator-always-on;
99		vin-supply = <&vcc_5v>;
100	};
101
102	vcc_5v: vcc_sys: vsys-regulator {
103		compatible = "regulator-fixed";
104		regulator-name = "vcc_5v";
105		regulator-min-microvolt = <5000000>;
106		regulator-max-microvolt = <5000000>;
107		regulator-always-on;
108		regulator-boot-on;
109	};
110
111	vcc_sd: sdmmc-regulator {
112		compatible = "regulator-fixed";
113		gpio = <&gpio7 RK_PB3 GPIO_ACTIVE_LOW>;
114		pinctrl-names = "default";
115		pinctrl-0 = <&sdmmc_pwr>;
116		regulator-name = "vcc_sd";
117		regulator-min-microvolt = <3300000>;
118		regulator-max-microvolt = <3300000>;
119		startup-delay-us = <100000>;
120		vin-supply = <&vcc_io>;
121	};
122
123	vcc_otg_5v: usb-otg-regulator {
124		compatible = "regulator-fixed";
125		enable-active-high;
126		gpio = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>;
127		pinctrl-names = "default";
128		pinctrl-0 = <&otg_vbus_drv>;
129		regulator-name = "vcc_otg_5v";
130		regulator-min-microvolt = <5000000>;
131		regulator-max-microvolt = <5000000>;
132		regulator-always-on;
133		vin-supply = <&vcc_5v>;
134	};
135
136	dovdd_1v8: dovdd-1v8-regulator {
137		compatible = "regulator-fixed";
138		enable-active-high;
139		gpio = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
140		pinctrl-names = "default";
141		pinctrl-0 = <&dvp_pwr>;
142		regulator-name = "dovdd_1v8";
143		regulator-min-microvolt = <1800000>;
144		regulator-max-microvolt = <1800000>;
145		vin-supply = <&vcc_io>;
146	};
147
148	vcc28_dvp: vcc28-dvp-regulator {
149		compatible = "regulator-fixed";
150		enable-active-high;
151		gpio = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
152		pinctrl-names = "default";
153		pinctrl-0 = <&dvp_pwr>;
154		regulator-name = "vcc28_dvp";
155		regulator-min-microvolt = <2800000>;
156		regulator-max-microvolt = <2800000>;
157		vin-supply = <&vcc_io>;
158	};
159
160	af_28: af_28-regulator {
161		compatible = "regulator-fixed";
162		enable-active-high;
163		gpio = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
164		pinctrl-names = "default";
165		pinctrl-0 = <&dvp_pwr>;
166		regulator-name = "af_28";
167		regulator-min-microvolt = <2800000>;
168		regulator-max-microvolt = <2800000>;
169		vin-supply = <&vcc_io>;
170	};
171
172	dvdd_1v2: af_28-regulator {
173		compatible = "regulator-fixed";
174		enable-active-high;
175		gpio = <&gpio7 RK_PB4 GPIO_ACTIVE_HIGH>;
176		pinctrl-names = "default";
177		pinctrl-0 = <&cif_pwr>;
178		regulator-name = "dvdd_1v2";
179		regulator-min-microvolt = <1200000>;
180		regulator-max-microvolt = <1200000>;
181		vin-supply = <&vcc_io>;
182	};
183
184	vbat_wl: wifi-regulator {
185		compatible = "regulator-fixed";
186		regulator-name = "vbat_wl";
187		regulator-min-microvolt = <3300000>;
188		regulator-max-microvolt = <3300000>;
189		vin-supply = <&vcc_io>;
190	};
191};
192
193&hdmi {
194	ddc-i2c-bus = <&i2c5>;
195	pinctrl-names = "default";
196	pinctrl-0 = <&hdmi_cec_c0>;
197	status = "okay";
198};
199
200&i2c0 {
201	hym8563: hym8563@51 {
202		compatible = "haoyu,hym8563";
203		reg = <0x51>;
204		#clock-cells = <0>;
205		clock-frequency = <32768>;
206		clock-output-names = "xin32k";
207		interrupt-parent = <&gpio7>;
208		interrupts = <RK_PA4 IRQ_TYPE_EDGE_FALLING>;
209		pinctrl-names = "default";
210		pinctrl-0 = <&rtc_int>;
211	};
212};
213
214&i2c2 {
215	status = "okay";
216
217	codec: es8328@10 {
218		compatible = "everest,es8328";
219		DVDD-supply = <&vcca_33>;
220		AVDD-supply = <&vcca_33>;
221		PVDD-supply = <&vcca_33>;
222		HPVDD-supply = <&vcca_33>;
223		clocks = <&cru HCLK_I2S0>, <&cru SCLK_I2S0>;
224		clock-names = "i2s_hclk", "i2s_clk";
225		reg = <0x10>;
226	};
227};
228
229&i2c5 {
230	status = "okay";
231};
232
233&i2s {
234	status = "okay";
235};
236
237&saradc {
238	vref-supply = <&vcc_18>;
239	status = "okay";
240};
241
242&sdmmc {
243	bus-width = <4>;
244	cap-mmc-highspeed;
245	cap-sd-highspeed;
246	card-detect-delay = <200>;
247	disable-wp;
248	pinctrl-names = "default";
249	pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>;
250	vmmc-supply = <&vcc_sd>;
251	vqmmc-supply = <&vccio_sd>;
252	status = "okay";
253};
254
255&sdio0 {
256	bus-width = <4>;
257	cap-sd-highspeed;
258	cap-sdio-irq;
259	mmc-pwrseq = <&sdio_pwrseq>;
260	non-removable;
261	pinctrl-names = "default";
262	pinctrl-0 = <&sdio0_bus4>, <&sdio0_cmd>, <&sdio0_clk>, <&sdio0_int>;
263	sd-uhs-sdr12;
264	sd-uhs-sdr25;
265	sd-uhs-sdr50;
266	sd-uhs-ddr50;
267	vmmc-supply = <&vbat_wl>;
268	vqmmc-supply = <&vccio_wl>;
269	status = "okay";
270};
271
272&spdif {
273	status = "okay";
274};
275
276&uart0 {
277	pinctrl-names = "default";
278	pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>;
279	status = "okay";
280};
281
282&uart1 {
283	status = "okay";
284};
285
286&uart2 {
287	status = "okay";
288};
289
290&uart3 {
291	status = "okay";
292};
293
294&usbphy {
295	status = "okay";
296};
297
298&usb_host1 {
299	pinctrl-names = "default";
300	pinctrl-0 = <&usbhub_rst>;
301	status = "okay";
302};
303
304&usb_otg {
305	status = "okay";
306};
307
308&pinctrl {
309	ir {
310		ir_int: ir-int {
311			rockchip,pins = <7 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
312		};
313	};
314
315	dvp {
316		dvp_pwr: dvp-pwr {
317			rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
318		};
319
320		cif_pwr: cif-pwr {
321			rockchip,pins = <7 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
322		};
323	};
324
325	hym8563 {
326		rtc_int: rtc-int {
327			rockchip,pins = <7 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
328		};
329	};
330
331	keys {
332		pwr_key: pwr-key {
333			rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
334		};
335	};
336
337	leds {
338		power_led_pin: power-led-pin {
339			rockchip,pins = <8 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
340		};
341
342		work_led_pin: work-led-pin {
343			rockchip,pins = <8 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
344		};
345	};
346
347	sdmmc {
348		/*
349		 * Default drive strength isn't enough to achieve even
350		 * high-speed mode on firefly board so bump up to 12ma.
351		 */
352		sdmmc_bus4: sdmmc-bus4 {
353			rockchip,pins = <6 RK_PC0 1 &pcfg_pull_up_drv_12ma>,
354					<6 RK_PC1 1 &pcfg_pull_up_drv_12ma>,
355					<6 RK_PC2 1 &pcfg_pull_up_drv_12ma>,
356					<6 RK_PC3 1 &pcfg_pull_up_drv_12ma>;
357		};
358
359		sdmmc_clk: sdmmc-clk {
360			rockchip,pins = <6 RK_PC4 1 &pcfg_pull_none_12ma>;
361		};
362
363		sdmmc_cmd: sdmmc-cmd {
364			rockchip,pins = <6 RK_PC5 1 &pcfg_pull_up_drv_12ma>;
365		};
366
367		sdmmc_pwr: sdmmc-pwr {
368			rockchip,pins = <7 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
369		};
370	};
371
372	sdio {
373		wifi_enable: wifi-enable {
374			rockchip,pins = <4 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
375		};
376	};
377
378	usb_host {
379		host_vbus_drv: host-vbus-drv {
380			rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
381		};
382
383		usbhub_rst: usbhub-rst {
384			rockchip,pins = <8 RK_PA3 RK_FUNC_GPIO &pcfg_output_high>;
385		};
386	};
387
388	usb_otg {
389		otg_vbus_drv: otg-vbus-drv {
390			rockchip,pins = <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
391		};
392	};
393};
394