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