xref: /linux/scripts/dtc/include-prefixes/arm/rockchip/rk3288-firefly-reload.dts (revision c34e9ab9a612ee8b18273398ef75c207b01f516d)
1724ba675SRob Herring// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2724ba675SRob Herring/*
3724ba675SRob Herring * Device tree file for Firefly Rockchip RK3288 Core board
4724ba675SRob Herring * Copyright (c) 2016 Randy Li <ayaka@soulik.info>
5724ba675SRob Herring */
6724ba675SRob Herring
7724ba675SRob Herring/dts-v1/;
8724ba675SRob Herring#include "rk3288-firefly-reload-core.dtsi"
9724ba675SRob Herring
10724ba675SRob Herring/ {
11724ba675SRob Herring	model = "Firefly-RK3288-reload";
12724ba675SRob Herring	compatible = "firefly,firefly-rk3288-reload", "rockchip,rk3288";
13724ba675SRob Herring
14724ba675SRob Herring	adc-keys {
15724ba675SRob Herring		compatible = "adc-keys";
16724ba675SRob Herring		io-channels = <&saradc 1>;
17724ba675SRob Herring		io-channel-names = "buttons";
18724ba675SRob Herring		keyup-threshold-microvolt = <1800000>;
19724ba675SRob Herring
20724ba675SRob Herring		button-recovery {
21724ba675SRob Herring			label = "Recovery";
22724ba675SRob Herring			linux,code = <KEY_VENDOR>;
23724ba675SRob Herring			press-threshold-microvolt = <0>;
24724ba675SRob Herring		};
25724ba675SRob Herring	};
26724ba675SRob Herring
27724ba675SRob Herring	gpio-keys {
28724ba675SRob Herring		compatible = "gpio-keys";
29724ba675SRob Herring
30724ba675SRob Herring		key-power {
31724ba675SRob Herring			wakeup-source;
32724ba675SRob Herring			gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
33724ba675SRob Herring			label = "GPIO Power";
34724ba675SRob Herring			linux,code = <KEY_POWER>;
35724ba675SRob Herring			pinctrl-names = "default";
36724ba675SRob Herring			pinctrl-0 = <&pwr_key>;
37724ba675SRob Herring		};
38724ba675SRob Herring	};
39724ba675SRob Herring
40724ba675SRob Herring	ir-receiver {
41724ba675SRob Herring		compatible = "gpio-ir-receiver";
42724ba675SRob Herring		gpios = <&gpio7 RK_PA0 GPIO_ACTIVE_LOW>;
43724ba675SRob Herring	};
44724ba675SRob Herring
45724ba675SRob Herring	leds {
46724ba675SRob Herring		compatible = "gpio-leds";
47724ba675SRob Herring
48724ba675SRob Herring		power_led: led-0 {
49724ba675SRob Herring			gpios = <&gpio8 RK_PA2 GPIO_ACTIVE_LOW>;
50724ba675SRob Herring			label = "firefly:blue:power";
51724ba675SRob Herring			pinctrl-names = "default";
52724ba675SRob Herring			pinctrl-0 = <&power_led_pin>;
53724ba675SRob Herring			panic-indicator;
54724ba675SRob Herring		};
55724ba675SRob Herring
56724ba675SRob Herring		work_led: led-1 {
57724ba675SRob Herring			gpios = <&gpio8 RK_PA1 GPIO_ACTIVE_LOW>;
58724ba675SRob Herring			label = "firefly:blue:user";
59724ba675SRob Herring			linux,default-trigger = "rc-feedback";
60724ba675SRob Herring			pinctrl-names = "default";
61724ba675SRob Herring			pinctrl-0 = <&work_led_pin>;
62724ba675SRob Herring		};
63724ba675SRob Herring	};
64724ba675SRob Herring
65724ba675SRob Herring	sdio_pwrseq: sdio-pwrseq {
66724ba675SRob Herring		compatible = "mmc-pwrseq-simple";
67724ba675SRob Herring		clocks = <&hym8563>;
68724ba675SRob Herring		clock-names = "ext_clock";
69724ba675SRob Herring		pinctrl-names = "default";
70724ba675SRob Herring		pinctrl-0 = <&wifi_enable>;
71724ba675SRob Herring		reset-gpios = <&gpio4 RK_PD4 GPIO_ACTIVE_LOW>;
72724ba675SRob Herring	};
73724ba675SRob Herring
74724ba675SRob Herring	sound {
75724ba675SRob Herring		compatible = "simple-audio-card";
76724ba675SRob Herring		simple-audio-card,name = "SPDIF";
77724ba675SRob Herring		simple-audio-card,dai-link@1 {  /* S/PDIF - S/PDIF */
78724ba675SRob Herring			cpu { sound-dai = <&spdif>; };
79724ba675SRob Herring			codec { sound-dai = <&spdif_out>; };
80724ba675SRob Herring		};
81724ba675SRob Herring	};
82724ba675SRob Herring
83724ba675SRob Herring	spdif_out: spdif-out {
84724ba675SRob Herring		compatible = "linux,spdif-dit";
85724ba675SRob Herring		#sound-dai-cells = <0>;
86724ba675SRob Herring	};
87724ba675SRob Herring
88*2c3944d9SJohan Jonker	vcc_host_5v: regulator-usb-host {
89724ba675SRob Herring		compatible = "regulator-fixed";
90724ba675SRob Herring		enable-active-high;
91724ba675SRob Herring		gpio = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
92724ba675SRob Herring		pinctrl-names = "default";
93724ba675SRob Herring		pinctrl-0 = <&host_vbus_drv>;
94724ba675SRob Herring		regulator-name = "vcc_host_5v";
95724ba675SRob Herring		regulator-min-microvolt = <5000000>;
96724ba675SRob Herring		regulator-max-microvolt = <5000000>;
97724ba675SRob Herring		regulator-always-on;
98724ba675SRob Herring		vin-supply = <&vcc_5v>;
99724ba675SRob Herring	};
100724ba675SRob Herring
101*2c3944d9SJohan Jonker	vcc_5v: vcc_sys: regulator-vsys {
102724ba675SRob Herring		compatible = "regulator-fixed";
103724ba675SRob Herring		regulator-name = "vcc_5v";
104724ba675SRob Herring		regulator-min-microvolt = <5000000>;
105724ba675SRob Herring		regulator-max-microvolt = <5000000>;
106724ba675SRob Herring		regulator-always-on;
107724ba675SRob Herring		regulator-boot-on;
108724ba675SRob Herring	};
109724ba675SRob Herring
110*2c3944d9SJohan Jonker	vcc_sd: regulator-sdmmc {
111724ba675SRob Herring		compatible = "regulator-fixed";
112724ba675SRob Herring		gpio = <&gpio7 RK_PB3 GPIO_ACTIVE_LOW>;
113724ba675SRob Herring		pinctrl-names = "default";
114724ba675SRob Herring		pinctrl-0 = <&sdmmc_pwr>;
115724ba675SRob Herring		regulator-name = "vcc_sd";
116724ba675SRob Herring		regulator-min-microvolt = <3300000>;
117724ba675SRob Herring		regulator-max-microvolt = <3300000>;
118724ba675SRob Herring		startup-delay-us = <100000>;
119724ba675SRob Herring		vin-supply = <&vcc_io>;
120724ba675SRob Herring	};
121724ba675SRob Herring
122*2c3944d9SJohan Jonker	vcc_otg_5v: regulator-usb-otg {
123724ba675SRob Herring		compatible = "regulator-fixed";
124724ba675SRob Herring		enable-active-high;
125724ba675SRob Herring		gpio = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>;
126724ba675SRob Herring		pinctrl-names = "default";
127724ba675SRob Herring		pinctrl-0 = <&otg_vbus_drv>;
128724ba675SRob Herring		regulator-name = "vcc_otg_5v";
129724ba675SRob Herring		regulator-min-microvolt = <5000000>;
130724ba675SRob Herring		regulator-max-microvolt = <5000000>;
131724ba675SRob Herring		regulator-always-on;
132724ba675SRob Herring		vin-supply = <&vcc_5v>;
133724ba675SRob Herring	};
134724ba675SRob Herring
135*2c3944d9SJohan Jonker	dovdd_1v8: regulator-dovdd-1v8 {
136724ba675SRob Herring		compatible = "regulator-fixed";
137724ba675SRob Herring		enable-active-high;
138724ba675SRob Herring		gpio = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
139724ba675SRob Herring		pinctrl-names = "default";
140724ba675SRob Herring		pinctrl-0 = <&dvp_pwr>;
141724ba675SRob Herring		regulator-name = "dovdd_1v8";
142724ba675SRob Herring		regulator-min-microvolt = <1800000>;
143724ba675SRob Herring		regulator-max-microvolt = <1800000>;
144724ba675SRob Herring		vin-supply = <&vcc_io>;
145724ba675SRob Herring	};
146724ba675SRob Herring
147*2c3944d9SJohan Jonker	vcc28_dvp: regulator-vcc28-dvp {
148724ba675SRob Herring		compatible = "regulator-fixed";
149724ba675SRob Herring		enable-active-high;
150724ba675SRob Herring		gpio = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
151724ba675SRob Herring		pinctrl-names = "default";
152724ba675SRob Herring		pinctrl-0 = <&dvp_pwr>;
153724ba675SRob Herring		regulator-name = "vcc28_dvp";
154724ba675SRob Herring		regulator-min-microvolt = <2800000>;
155724ba675SRob Herring		regulator-max-microvolt = <2800000>;
156724ba675SRob Herring		vin-supply = <&vcc_io>;
157724ba675SRob Herring	};
158724ba675SRob Herring
159*2c3944d9SJohan Jonker	af_28: regulator-af-28 {
160724ba675SRob Herring		compatible = "regulator-fixed";
161724ba675SRob Herring		enable-active-high;
162724ba675SRob Herring		gpio = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
163724ba675SRob Herring		pinctrl-names = "default";
164724ba675SRob Herring		pinctrl-0 = <&dvp_pwr>;
165724ba675SRob Herring		regulator-name = "af_28";
166724ba675SRob Herring		regulator-min-microvolt = <2800000>;
167724ba675SRob Herring		regulator-max-microvolt = <2800000>;
168724ba675SRob Herring		vin-supply = <&vcc_io>;
169724ba675SRob Herring	};
170724ba675SRob Herring
171*2c3944d9SJohan Jonker	dvdd_1v2: regulator-dvdd-1v2 {
172724ba675SRob Herring		compatible = "regulator-fixed";
173724ba675SRob Herring		enable-active-high;
174724ba675SRob Herring		gpio = <&gpio7 RK_PB4 GPIO_ACTIVE_HIGH>;
175724ba675SRob Herring		pinctrl-names = "default";
176724ba675SRob Herring		pinctrl-0 = <&cif_pwr>;
177724ba675SRob Herring		regulator-name = "dvdd_1v2";
178724ba675SRob Herring		regulator-min-microvolt = <1200000>;
179724ba675SRob Herring		regulator-max-microvolt = <1200000>;
180724ba675SRob Herring		vin-supply = <&vcc_io>;
181724ba675SRob Herring	};
182724ba675SRob Herring
183*2c3944d9SJohan Jonker	vbat_wl: regulator-wifi {
184724ba675SRob Herring		compatible = "regulator-fixed";
185724ba675SRob Herring		regulator-name = "vbat_wl";
186724ba675SRob Herring		regulator-min-microvolt = <3300000>;
187724ba675SRob Herring		regulator-max-microvolt = <3300000>;
188724ba675SRob Herring		vin-supply = <&vcc_io>;
189724ba675SRob Herring	};
190724ba675SRob Herring};
191724ba675SRob Herring
192724ba675SRob Herring&hdmi {
193724ba675SRob Herring	ddc-i2c-bus = <&i2c5>;
194724ba675SRob Herring	pinctrl-names = "default";
195724ba675SRob Herring	pinctrl-0 = <&hdmi_cec_c0>;
196724ba675SRob Herring	status = "okay";
197724ba675SRob Herring};
198724ba675SRob Herring
199724ba675SRob Herring&i2c0 {
200724ba675SRob Herring	hym8563: hym8563@51 {
201724ba675SRob Herring		compatible = "haoyu,hym8563";
202724ba675SRob Herring		reg = <0x51>;
203724ba675SRob Herring		#clock-cells = <0>;
204724ba675SRob Herring		clock-frequency = <32768>;
205724ba675SRob Herring		clock-output-names = "xin32k";
206724ba675SRob Herring		interrupt-parent = <&gpio7>;
207724ba675SRob Herring		interrupts = <RK_PA4 IRQ_TYPE_EDGE_FALLING>;
208724ba675SRob Herring		pinctrl-names = "default";
209724ba675SRob Herring		pinctrl-0 = <&rtc_int>;
210724ba675SRob Herring	};
211724ba675SRob Herring};
212724ba675SRob Herring
213724ba675SRob Herring&i2c2 {
214724ba675SRob Herring	status = "okay";
215724ba675SRob Herring
216724ba675SRob Herring	codec: es8328@10 {
217724ba675SRob Herring		compatible = "everest,es8328";
218724ba675SRob Herring		DVDD-supply = <&vcca_33>;
219724ba675SRob Herring		AVDD-supply = <&vcca_33>;
220724ba675SRob Herring		PVDD-supply = <&vcca_33>;
221724ba675SRob Herring		HPVDD-supply = <&vcca_33>;
222724ba675SRob Herring		clocks = <&cru HCLK_I2S0>, <&cru SCLK_I2S0>;
223724ba675SRob Herring		clock-names = "i2s_hclk", "i2s_clk";
224724ba675SRob Herring		reg = <0x10>;
225724ba675SRob Herring	};
226724ba675SRob Herring};
227724ba675SRob Herring
228724ba675SRob Herring&i2c5 {
229724ba675SRob Herring	status = "okay";
230724ba675SRob Herring};
231724ba675SRob Herring
232724ba675SRob Herring&i2s {
233724ba675SRob Herring	status = "okay";
234724ba675SRob Herring};
235724ba675SRob Herring
236724ba675SRob Herring&saradc {
237724ba675SRob Herring	vref-supply = <&vcc_18>;
238724ba675SRob Herring	status = "okay";
239724ba675SRob Herring};
240724ba675SRob Herring
241724ba675SRob Herring&sdmmc {
242724ba675SRob Herring	bus-width = <4>;
243724ba675SRob Herring	cap-mmc-highspeed;
244724ba675SRob Herring	cap-sd-highspeed;
245724ba675SRob Herring	card-detect-delay = <200>;
246724ba675SRob Herring	disable-wp;
247724ba675SRob Herring	pinctrl-names = "default";
248724ba675SRob Herring	pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>;
249724ba675SRob Herring	vmmc-supply = <&vcc_sd>;
250724ba675SRob Herring	vqmmc-supply = <&vccio_sd>;
251724ba675SRob Herring	status = "okay";
252724ba675SRob Herring};
253724ba675SRob Herring
254724ba675SRob Herring&sdio0 {
255724ba675SRob Herring	bus-width = <4>;
256724ba675SRob Herring	cap-sd-highspeed;
257724ba675SRob Herring	cap-sdio-irq;
258724ba675SRob Herring	mmc-pwrseq = <&sdio_pwrseq>;
259724ba675SRob Herring	non-removable;
260724ba675SRob Herring	pinctrl-names = "default";
261724ba675SRob Herring	pinctrl-0 = <&sdio0_bus4>, <&sdio0_cmd>, <&sdio0_clk>, <&sdio0_int>;
262724ba675SRob Herring	sd-uhs-sdr12;
263724ba675SRob Herring	sd-uhs-sdr25;
264724ba675SRob Herring	sd-uhs-sdr50;
265724ba675SRob Herring	sd-uhs-ddr50;
266724ba675SRob Herring	vmmc-supply = <&vbat_wl>;
267724ba675SRob Herring	vqmmc-supply = <&vccio_wl>;
268724ba675SRob Herring	status = "okay";
269724ba675SRob Herring};
270724ba675SRob Herring
271724ba675SRob Herring&spdif {
272724ba675SRob Herring	status = "okay";
273724ba675SRob Herring};
274724ba675SRob Herring
275724ba675SRob Herring&uart0 {
276724ba675SRob Herring	pinctrl-names = "default";
277724ba675SRob Herring	pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>;
278724ba675SRob Herring	status = "okay";
279724ba675SRob Herring};
280724ba675SRob Herring
281724ba675SRob Herring&uart1 {
282724ba675SRob Herring	status = "okay";
283724ba675SRob Herring};
284724ba675SRob Herring
285724ba675SRob Herring&uart2 {
286724ba675SRob Herring	status = "okay";
287724ba675SRob Herring};
288724ba675SRob Herring
289724ba675SRob Herring&uart3 {
290724ba675SRob Herring	status = "okay";
291724ba675SRob Herring};
292724ba675SRob Herring
293724ba675SRob Herring&usbphy {
294724ba675SRob Herring	status = "okay";
295724ba675SRob Herring};
296724ba675SRob Herring
297724ba675SRob Herring&usb_host1 {
298724ba675SRob Herring	pinctrl-names = "default";
299724ba675SRob Herring	pinctrl-0 = <&usbhub_rst>;
300724ba675SRob Herring	status = "okay";
301724ba675SRob Herring};
302724ba675SRob Herring
303724ba675SRob Herring&usb_otg {
304724ba675SRob Herring	status = "okay";
305724ba675SRob Herring};
306724ba675SRob Herring
307724ba675SRob Herring&pinctrl {
308724ba675SRob Herring	ir {
309724ba675SRob Herring		ir_int: ir-int {
310724ba675SRob Herring			rockchip,pins = <7 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
311724ba675SRob Herring		};
312724ba675SRob Herring	};
313724ba675SRob Herring
314724ba675SRob Herring	dvp {
315724ba675SRob Herring		dvp_pwr: dvp-pwr {
316724ba675SRob Herring			rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
317724ba675SRob Herring		};
318724ba675SRob Herring
319724ba675SRob Herring		cif_pwr: cif-pwr {
320724ba675SRob Herring			rockchip,pins = <7 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
321724ba675SRob Herring		};
322724ba675SRob Herring	};
323724ba675SRob Herring
324724ba675SRob Herring	hym8563 {
325724ba675SRob Herring		rtc_int: rtc-int {
326724ba675SRob Herring			rockchip,pins = <7 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
327724ba675SRob Herring		};
328724ba675SRob Herring	};
329724ba675SRob Herring
330724ba675SRob Herring	keys {
331724ba675SRob Herring		pwr_key: pwr-key {
332724ba675SRob Herring			rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
333724ba675SRob Herring		};
334724ba675SRob Herring	};
335724ba675SRob Herring
336724ba675SRob Herring	leds {
337724ba675SRob Herring		power_led_pin: power-led-pin {
338724ba675SRob Herring			rockchip,pins = <8 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
339724ba675SRob Herring		};
340724ba675SRob Herring
341724ba675SRob Herring		work_led_pin: work-led-pin {
342724ba675SRob Herring			rockchip,pins = <8 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
343724ba675SRob Herring		};
344724ba675SRob Herring	};
345724ba675SRob Herring
346724ba675SRob Herring	sdmmc {
347724ba675SRob Herring		/*
348724ba675SRob Herring		 * Default drive strength isn't enough to achieve even
349724ba675SRob Herring		 * high-speed mode on firefly board so bump up to 12ma.
350724ba675SRob Herring		 */
351724ba675SRob Herring		sdmmc_bus4: sdmmc-bus4 {
352724ba675SRob Herring			rockchip,pins = <6 RK_PC0 1 &pcfg_pull_up_drv_12ma>,
353724ba675SRob Herring					<6 RK_PC1 1 &pcfg_pull_up_drv_12ma>,
354724ba675SRob Herring					<6 RK_PC2 1 &pcfg_pull_up_drv_12ma>,
355724ba675SRob Herring					<6 RK_PC3 1 &pcfg_pull_up_drv_12ma>;
356724ba675SRob Herring		};
357724ba675SRob Herring
358724ba675SRob Herring		sdmmc_clk: sdmmc-clk {
359724ba675SRob Herring			rockchip,pins = <6 RK_PC4 1 &pcfg_pull_none_12ma>;
360724ba675SRob Herring		};
361724ba675SRob Herring
362724ba675SRob Herring		sdmmc_cmd: sdmmc-cmd {
363724ba675SRob Herring			rockchip,pins = <6 RK_PC5 1 &pcfg_pull_up_drv_12ma>;
364724ba675SRob Herring		};
365724ba675SRob Herring
366724ba675SRob Herring		sdmmc_pwr: sdmmc-pwr {
367724ba675SRob Herring			rockchip,pins = <7 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
368724ba675SRob Herring		};
369724ba675SRob Herring	};
370724ba675SRob Herring
371724ba675SRob Herring	sdio {
372724ba675SRob Herring		wifi_enable: wifi-enable {
373724ba675SRob Herring			rockchip,pins = <4 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
374724ba675SRob Herring		};
375724ba675SRob Herring	};
376724ba675SRob Herring
377724ba675SRob Herring	usb_host {
378724ba675SRob Herring		host_vbus_drv: host-vbus-drv {
379724ba675SRob Herring			rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
380724ba675SRob Herring		};
381724ba675SRob Herring
382724ba675SRob Herring		usbhub_rst: usbhub-rst {
383724ba675SRob Herring			rockchip,pins = <8 RK_PA3 RK_FUNC_GPIO &pcfg_output_high>;
384724ba675SRob Herring		};
385724ba675SRob Herring	};
386724ba675SRob Herring
387724ba675SRob Herring	usb_otg {
388724ba675SRob Herring		otg_vbus_drv: otg-vbus-drv {
389724ba675SRob Herring			rockchip,pins = <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
390724ba675SRob Herring		};
391724ba675SRob Herring	};
392724ba675SRob Herring};
393