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