xref: /rk3399_rockchip-uboot/arch/arm/dts/rk3288-firefly.dtsi (revision e7b5bb3cc9527752c2c01acb4325fc0721fb75aa)
1/*
2 * Copyright (c) 2014, 2015 FUKAUMI Naoki <naobsd@gmail.com>
3 *
4 * SPDX-License-Identifier:     GPL-2.0+ X11
5 */
6
7#include "rk3288.dtsi"
8#include <dt-bindings/input/input.h>
9
10/ {
11	memory {
12		reg = <0 0x80000000>;
13	};
14
15	adc-keys {
16		compatible = "adc-keys";
17		io-channels = <&saradc 1>;
18
19		volup-key {
20			linux,code = <KEY_VOLUMEUP>;
21			label = "volume up";
22			press-threshold-microvolt = <18000>;
23		};
24	};
25
26	ext_gmac: external-gmac-clock {
27		compatible = "fixed-clock";
28		#clock-cells = <0>;
29		clock-frequency = <125000000>;
30		clock-output-names = "ext_gmac";
31	};
32
33	ir: ir-receiver {
34		compatible = "gpio-ir-receiver";
35		pinctrl-names = "default";
36		pinctrl-0 = <&ir_int>;
37	};
38
39	keys: gpio-keys {
40		compatible = "gpio-keys";
41		#address-cells = <1>;
42		#size-cells = <0>;
43
44		button@0 {
45			gpio-key,wakeup = <1>;
46			gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
47			label = "GPIO Power";
48			linux,code = <116>;
49			pinctrl-names = "default";
50			pinctrl-0 = <&pwr_key>;
51		};
52	};
53
54	leds {
55		u-boot,dm-pre-reloc;
56		compatible = "gpio-leds";
57
58		work {
59			u-boot,dm-pre-reloc;
60			gpios = <&gpio8 1 GPIO_ACTIVE_LOW>;
61			label = "firefly:blue:user";
62			linux,default-trigger = "rc-feedback";
63			pinctrl-names = "default";
64			pinctrl-0 = <&work_led>;
65		};
66
67		power {
68			u-boot,dm-pre-reloc;
69			gpios = <&gpio8 2 GPIO_ACTIVE_LOW>;
70			label = "firefly:green:power";
71			linux,default-trigger = "default-on";
72			pinctrl-names = "default";
73			pinctrl-0 = <&power_led>;
74		};
75	};
76
77	vcc_sys: vsys-regulator {
78		compatible = "regulator-fixed";
79		regulator-name = "vcc_sys";
80		regulator-min-microvolt = <5000000>;
81		regulator-max-microvolt = <5000000>;
82		regulator-always-on;
83		regulator-boot-on;
84	};
85
86	vcc_sd: sdmmc-regulator {
87		compatible = "regulator-fixed";
88		gpio = <&gpio7 11 GPIO_ACTIVE_LOW>;
89		pinctrl-names = "default";
90		pinctrl-0 = <&sdmmc_pwr>;
91		regulator-name = "vcc_sd";
92		regulator-min-microvolt = <3300000>;
93		regulator-max-microvolt = <3300000>;
94		startup-delay-us = <100000>;
95		vin-supply = <&vcc_io>;
96	};
97
98	vcc_flash: flash-regulator {
99		compatible = "regulator-fixed";
100		regulator-name = "vcc_flash";
101		regulator-min-microvolt = <1800000>;
102		regulator-max-microvolt = <1800000>;
103		vin-supply = <&vcc_io>;
104	};
105
106	vcc_5v: usb-regulator {
107		compatible = "regulator-fixed";
108		regulator-name = "vcc_5v";
109		regulator-min-microvolt = <5000000>;
110		regulator-max-microvolt = <5000000>;
111		regulator-always-on;
112		regulator-boot-on;
113		vin-supply = <&vcc_sys>;
114	};
115
116	vcc_host_5v: usb-host-regulator {
117		compatible = "regulator-fixed";
118		enable-active-high;
119		gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>;
120		pinctrl-names = "default";
121		pinctrl-0 = <&host_vbus_drv>;
122		regulator-name = "vcc_host_5v";
123		regulator-min-microvolt = <5000000>;
124		regulator-max-microvolt = <5000000>;
125		regulator-always-on;
126		vin-supply = <&vcc_5v>;
127	};
128
129	vcc_otg_5v: usb-otg-regulator {
130		compatible = "regulator-fixed";
131		enable-active-high;
132		gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
133		pinctrl-names = "default";
134		pinctrl-0 = <&otg_vbus_drv>;
135		regulator-name = "vcc_otg_5v";
136		regulator-min-microvolt = <5000000>;
137		regulator-max-microvolt = <5000000>;
138		regulator-always-on;
139		vin-supply = <&vcc_5v>;
140	};
141};
142
143&cpu0 {
144	cpu0-supply = <&vdd_cpu>;
145};
146
147&emmc {
148	broken-cd;
149	bus-width = <8>;
150	cap-mmc-highspeed;
151	disable-wp;
152	non-removable;
153	num-slots = <1>;
154	pinctrl-names = "default";
155	pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_pwr>, <&emmc_bus8>;
156	vmmc-supply = <&vcc_io>;
157	vqmmc-supply = <&vcc_flash>;
158	status = "okay";
159};
160
161&gmac {
162	assigned-clocks = <&cru SCLK_MAC>;
163	assigned-clock-parents = <&ext_gmac>;
164	clock_in_out = "input";
165	pinctrl-names = "default";
166	pinctrl-0 = <&rgmii_pins>, <&phy_rst>, <&phy_pmeb>, <&phy_int>;
167	phy-supply = <&vcc_lan>;
168	phy-mode = "rgmii";
169	snps,reset-active-low;
170	snps,reset-delays-us = <0 10000 1000000>;
171	snps,reset-gpio = <&gpio4 8 GPIO_ACTIVE_LOW>;
172	tx_delay = <0x30>;
173	rx_delay = <0x10>;
174	status = "okay";
175};
176
177&hdmi {
178	ddc-i2c-bus = <&i2c5>;
179	status = "okay";
180};
181
182&i2c0 {
183	clock-frequency = <400000>;
184	status = "okay";
185
186	vdd_cpu: syr827@40 {
187		compatible = "silergy,syr827";
188		fcs,suspend-voltage-selector = <1>;
189		reg = <0x40>;
190		regulator-name = "vdd_cpu";
191		regulator-min-microvolt = <850000>;
192		regulator-max-microvolt = <1350000>;
193		regulator-always-on;
194		regulator-boot-on;
195		vin-supply = <&vcc_sys>;
196	};
197
198	vdd_gpu: syr828@41 {
199		compatible = "silergy,syr828";
200		fcs,suspend-voltage-selector = <1>;
201		reg = <0x41>;
202		regulator-name = "vdd_gpu";
203		regulator-min-microvolt = <850000>;
204		regulator-max-microvolt = <1350000>;
205		regulator-always-on;
206		vin-supply = <&vcc_sys>;
207	};
208
209	hym8563: hym8563@51 {
210		compatible = "haoyu,hym8563";
211		reg = <0x51>;
212		#clock-cells = <0>;
213		clock-frequency = <32768>;
214		clock-output-names = "xin32k";
215		interrupt-parent = <&gpio7>;
216		interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
217		pinctrl-names = "default";
218		pinctrl-0 = <&rtc_int>;
219	};
220
221	act8846: act8846@5a {
222		compatible = "active-semi,act8846";
223		reg = <0x5a>;
224		pinctrl-names = "default";
225		pinctrl-0 = <&pmic_vsel>, <&pwr_hold>;
226		system-power-controller;
227
228		regulators {
229			vcc_ddr: REG1 {
230				regulator-name = "vcc_ddr";
231				regulator-min-microvolt = <1200000>;
232				regulator-max-microvolt = <1200000>;
233				regulator-always-on;
234			};
235
236			vcc_io: REG2 {
237				regulator-name = "vcc_io";
238				regulator-min-microvolt = <3300000>;
239				regulator-max-microvolt = <3300000>;
240				regulator-always-on;
241			};
242
243			vdd_log: REG3 {
244				regulator-name = "vdd_log";
245				regulator-min-microvolt = <1100000>;
246				regulator-max-microvolt = <1100000>;
247				regulator-always-on;
248			};
249
250			vcc_20: REG4 {
251				regulator-name = "vcc_20";
252				regulator-min-microvolt = <2000000>;
253				regulator-max-microvolt = <2000000>;
254				regulator-always-on;
255			};
256
257			vccio_sd: REG5 {
258				regulator-name = "vccio_sd";
259				regulator-min-microvolt = <3300000>;
260				regulator-max-microvolt = <3300000>;
261				regulator-always-on;
262			};
263
264			vdd10_lcd: REG6 {
265				regulator-name = "vdd10_lcd";
266				regulator-min-microvolt = <1000000>;
267				regulator-max-microvolt = <1000000>;
268				regulator-always-on;
269			};
270
271			vcca_18: REG7 {
272				regulator-name = "vcca_18";
273				regulator-min-microvolt = <1800000>;
274				regulator-max-microvolt = <1800000>;
275			};
276
277			vcca_33: REG8 {
278				regulator-name = "vcca_33";
279				regulator-min-microvolt = <3300000>;
280				regulator-max-microvolt = <3300000>;
281			};
282
283			vcc_lan: REG9 {
284				regulator-name = "vcc_lan";
285				regulator-min-microvolt = <3300000>;
286				regulator-max-microvolt = <3300000>;
287			};
288
289			vdd_10: REG10 {
290				regulator-name = "vdd_10";
291				regulator-min-microvolt = <1000000>;
292				regulator-max-microvolt = <1000000>;
293				regulator-always-on;
294			};
295
296			vcc_18: REG11 {
297				regulator-name = "vcc_18";
298				regulator-min-microvolt = <1800000>;
299				regulator-max-microvolt = <1800000>;
300				regulator-always-on;
301			};
302
303			vcc18_lcd: REG12 {
304				regulator-name = "vcc18_lcd";
305				regulator-min-microvolt = <1800000>;
306				regulator-max-microvolt = <1800000>;
307				regulator-always-on;
308			};
309		};
310	};
311};
312
313&i2c1 {
314	status = "okay";
315};
316
317&i2c2 {
318	status = "okay";
319};
320
321&i2c4 {
322	status = "okay";
323};
324
325&i2c5 {
326	status = "okay";
327};
328
329&pinctrl {
330	pcfg_output_high: pcfg-output-high {
331		output-high;
332	};
333
334	pcfg_output_low: pcfg-output-low {
335		output-low;
336	};
337
338	act8846 {
339		pwr_hold: pwr-hold {
340			rockchip,pins = <0 1 RK_FUNC_GPIO &pcfg_output_high>;
341		};
342	};
343
344	gmac {
345		phy_int: phy-int {
346			rockchip,pins = <0 9 RK_FUNC_GPIO &pcfg_pull_up>;
347		};
348
349		phy_pmeb: phy-pmeb {
350			rockchip,pins = <0 8 RK_FUNC_GPIO &pcfg_pull_up>;
351		};
352
353		phy_rst: phy-rst {
354			rockchip,pins = <4 8 RK_FUNC_GPIO &pcfg_output_high>;
355		};
356	};
357
358	hym8563 {
359		rtc_int: rtc-int {
360			rockchip,pins = <7 4 RK_FUNC_GPIO &pcfg_pull_up>;
361		};
362	};
363
364	keys {
365		pwr_key: pwr-key {
366			rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
367		};
368	};
369
370	leds {
371		power_led: power-led {
372			rockchip,pins = <8 2 RK_FUNC_GPIO &pcfg_pull_none>;
373		};
374
375		work_led: work-led {
376			rockchip,pins = <8 1 RK_FUNC_GPIO &pcfg_pull_none>;
377		};
378	};
379
380	sdmmc {
381		sdmmc_pwr: sdmmc-pwr {
382			rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>;
383		};
384	};
385
386	usb_host {
387		host_vbus_drv: host-vbus-drv {
388			rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
389		};
390
391		usbhub_rst: usbhub-rst {
392			rockchip,pins = <8 3 RK_FUNC_GPIO &pcfg_output_high>;
393		};
394	};
395
396	usb_otg {
397		otg_vbus_drv: otg-vbus-drv {
398			rockchip,pins = <0 12 RK_FUNC_GPIO &pcfg_pull_none>;
399		};
400	};
401};
402
403&saradc {
404	vref-supply = <&vcc_18>;
405	status = "okay";
406};
407
408&sdio0 {
409	broken-cd;
410	bus-width = <4>;
411	disable-wp;
412	non-removable;
413	num-slots = <1>;
414	pinctrl-names = "default";
415	pinctrl-0 = <&sdio0_bus4>, <&sdio0_cmd>, <&sdio0_clk>;
416	vmmc-supply = <&vcc_18>;
417	status = "disabled";
418};
419
420&sdmmc {
421	bus-width = <4>;
422	cap-mmc-highspeed;
423	cap-sd-highspeed;
424	card-detect-delay = <200>;
425	disable-wp;
426	num-slots = <1>;
427	pinctrl-names = "default";
428	pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>;
429	vmmc-supply = <&vcc_sd>;
430	status = "okay";
431};
432
433&spi0 {
434	pinctrl-names = "default";
435	pinctrl-0 = <&spi0_clk>, <&spi0_cs0>, <&spi0_tx>, <&spi0_rx>, <&spi0_cs1>;
436	status = "okay";
437};
438
439&uart0 {
440	pinctrl-names = "default";
441	pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>;
442	status = "okay";
443};
444
445&uart1 {
446	status = "okay";
447};
448
449&uart2 {
450	status = "okay";
451};
452
453&uart3 {
454	status = "okay";
455};
456
457&usb_host1 {
458	pinctrl-names = "default";
459	pinctrl-0 = <&usbhub_rst>;
460	status = "okay";
461};
462
463&usb_otg {
464	status = "okay";
465};
466
467&vopb {
468	status = "okay";
469};
470
471&vopb_mmu {
472	status = "okay";
473};
474
475&vopl {
476	status = "okay";
477};
478
479&vopl_mmu {
480	status = "okay";
481};
482
483&wdt {
484	status = "okay";
485};
486