Linux Audio

Check our new training course

Loading...
v4.17
 
  1/*
  2 * Copyright (c) 2014, 2015 FUKAUMI Naoki <naobsd@gmail.com>
  3 *
  4 * This file is dual-licensed: you can use it either under the terms
  5 * of the GPL or the X11 license, at your option. Note that this dual
  6 * licensing only applies to this file, and not this project as a
  7 * whole.
  8 *
  9 *  a) This file is free software; you can redistribute it and/or
 10 *     modify it under the terms of the GNU General Public License as
 11 *     published by the Free Software Foundation; either version 2 of the
 12 *     License, or (at your option) any later version.
 13 *
 14 *     This file is distributed in the hope that it will be useful,
 15 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 16 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 17 *     GNU General Public License for more details.
 18 *
 19 * Or, alternatively,
 20 *
 21 *  b) Permission is hereby granted, free of charge, to any person
 22 *     obtaining a copy of this software and associated documentation
 23 *     files (the "Software"), to deal in the Software without
 24 *     restriction, including without limitation the rights to use,
 25 *     copy, modify, merge, publish, distribute, sublicense, and/or
 26 *     sell copies of the Software, and to permit persons to whom the
 27 *     Software is furnished to do so, subject to the following
 28 *     conditions:
 29 *
 30 *     The above copyright notice and this permission notice shall be
 31 *     included in all copies or substantial portions of the Software.
 32 *
 33 *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 34 *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 35 *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 36 *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 37 *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 38 *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 39 *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 40 *     OTHER DEALINGS IN THE SOFTWARE.
 41 */
 42
 43#include <dt-bindings/input/input.h>
 44#include "rk3288.dtsi"
 45
 46/ {
 47	memory@0 {
 48		device_type = "memory";
 49		reg = <0x0 0x0 0x0 0x80000000>;
 50	};
 51
 52	adc-keys {
 53		compatible = "adc-keys";
 54		io-channels = <&saradc 1>;
 55		io-channel-names = "buttons";
 56		keyup-threshold-microvolt = <1800000>;
 57
 58		button-recovery {
 59			label = "Recovery";
 60			linux,code = <KEY_VENDOR>;
 61			press-threshold-microvolt = <0>;
 62		};
 63	};
 64
 65	dovdd_1v8: dovdd-1v8-regulator {
 66		compatible = "regulator-fixed";
 67		regulator-name = "dovdd_1v8";
 68		regulator-min-microvolt = <1800000>;
 69		regulator-max-microvolt = <1800000>;
 70		vin-supply = <&vcc28_dvp>;
 71	};
 72
 73	ext_gmac: external-gmac-clock {
 74		compatible = "fixed-clock";
 75		#clock-cells = <0>;
 76		clock-frequency = <125000000>;
 77		clock-output-names = "ext_gmac";
 78	};
 79
 80	ir: ir-receiver {
 81		compatible = "gpio-ir-receiver";
 82		pinctrl-names = "default";
 83		pinctrl-0 = <&ir_int>;
 84	};
 85
 86	keys: gpio-keys {
 87		compatible = "gpio-keys";
 88
 89		power {
 90			wakeup-source;
 91			gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
 92			label = "GPIO Power";
 93			linux,code = <KEY_POWER>;
 94			pinctrl-names = "default";
 95			pinctrl-0 = <&pwr_key>;
 96		};
 97	};
 98
 99	leds {
100		compatible = "gpio-leds";
101
102		work {
103			gpios = <&gpio8 RK_PA1 GPIO_ACTIVE_LOW>;
104			label = "firefly:blue:user";
105			linux,default-trigger = "rc-feedback";
106			pinctrl-names = "default";
107			pinctrl-0 = <&work_led>;
108		};
109
110		power {
111			gpios = <&gpio8 RK_PA2 GPIO_ACTIVE_LOW>;
112			label = "firefly:green:power";
113			linux,default-trigger = "default-on";
114			pinctrl-names = "default";
115			pinctrl-0 = <&power_led>;
116		};
117	};
118
119	vbat_wl: vcc_sys: vsys-regulator {
120		compatible = "regulator-fixed";
121		regulator-name = "vcc_sys";
122		regulator-min-microvolt = <5000000>;
123		regulator-max-microvolt = <5000000>;
124		regulator-always-on;
125		regulator-boot-on;
126	};
127
128	vcc_sd: sdmmc-regulator {
129		compatible = "regulator-fixed";
130		gpio = <&gpio7 RK_PB3 GPIO_ACTIVE_LOW>;
131		pinctrl-names = "default";
132		pinctrl-0 = <&sdmmc_pwr>;
133		regulator-name = "vcc_sd";
134		regulator-min-microvolt = <3300000>;
135		regulator-max-microvolt = <3300000>;
136		startup-delay-us = <100000>;
137		vin-supply = <&vcc_io>;
138	};
139
140	vcc_flash: flash-regulator {
141		compatible = "regulator-fixed";
142		regulator-name = "vcc_flash";
143		regulator-min-microvolt = <1800000>;
144		regulator-max-microvolt = <1800000>;
145		vin-supply = <&vcc_io>;
146	};
147
148	vcc_5v: usb-regulator {
149		compatible = "regulator-fixed";
150		regulator-name = "vcc_5v";
151		regulator-min-microvolt = <5000000>;
152		regulator-max-microvolt = <5000000>;
153		regulator-always-on;
154		regulator-boot-on;
155		vin-supply = <&vcc_sys>;
156	};
157
158	vcc_host_5v: usb-host-regulator {
159		compatible = "regulator-fixed";
160		enable-active-high;
161		gpio = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
162		pinctrl-names = "default";
163		pinctrl-0 = <&host_vbus_drv>;
164		regulator-name = "vcc_host_5v";
165		regulator-min-microvolt = <5000000>;
166		regulator-max-microvolt = <5000000>;
167		regulator-always-on;
168		vin-supply = <&vcc_5v>;
169	};
170
171	vcc_otg_5v: usb-otg-regulator {
172		compatible = "regulator-fixed";
173		enable-active-high;
174		gpio = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>;
175		pinctrl-names = "default";
176		pinctrl-0 = <&otg_vbus_drv>;
177		regulator-name = "vcc_otg_5v";
178		regulator-min-microvolt = <5000000>;
179		regulator-max-microvolt = <5000000>;
180		regulator-always-on;
181		vin-supply = <&vcc_5v>;
182	};
183
184	/*
185	 * A TT8142 creates both dovdd_1v8 and vcc28_dvp, controlled
186	 * by the dvp_pwr pin.
187	 */
188	vcc28_dvp: vcc28-dvp-regulator {
189		compatible = "regulator-fixed";
190		enable-active-high;
191		gpio = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
192		pinctrl-names = "default";
193		pinctrl-0 = <&dvp_pwr>;
194		regulator-name = "vcc28_dvp";
195		regulator-min-microvolt = <2800000>;
196		regulator-max-microvolt = <2800000>;
197		regulator-always-on;
198		vin-supply = <&vcc_io>;
199	};
200};
201
202&cpu0 {
203	cpu0-supply = <&vdd_cpu>;
204};
205
206&emmc {
207	bus-width = <8>;
208	cap-mmc-highspeed;
209	disable-wp;
210	non-removable;
211	pinctrl-names = "default";
212	pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_pwr>, <&emmc_bus8>;
213	vmmc-supply = <&vcc_io>;
214	vqmmc-supply = <&vcc_flash>;
215	status = "okay";
216};
217
218&gmac {
219	assigned-clocks = <&cru SCLK_MAC>;
220	assigned-clock-parents = <&ext_gmac>;
221	clock_in_out = "input";
222	pinctrl-names = "default";
223	pinctrl-0 = <&rgmii_pins>, <&phy_rst>, <&phy_pmeb>, <&phy_int>;
224	phy-supply = <&vcc_lan>;
225	phy-mode = "rgmii";
226	snps,reset-active-low;
227	snps,reset-delays-us = <0 10000 1000000>;
228	snps,reset-gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_LOW>;
229	tx_delay = <0x30>;
230	rx_delay = <0x10>;
231	status = "ok";
232};
233
234&gpu {
235	mali-supply = <&vdd_gpu>;
236	status = "okay";
237};
238
239&hdmi {
240	ddc-i2c-bus = <&i2c5>;
241	status = "okay";
242};
243
244&i2c0 {
245	clock-frequency = <400000>;
246	status = "okay";
247
248	vdd_cpu: syr827@40 {
249		compatible = "silergy,syr827";
250		fcs,suspend-voltage-selector = <1>;
251		reg = <0x40>;
252		regulator-name = "vdd_cpu";
253		regulator-min-microvolt = <850000>;
254		regulator-max-microvolt = <1350000>;
255		regulator-always-on;
256		regulator-boot-on;
257		regulator-enable-ramp-delay = <300>;
258		regulator-ramp-delay = <8000>;
259		vin-supply = <&vcc_sys>;
260	};
261
262	vdd_gpu: syr828@41 {
263		compatible = "silergy,syr828";
264		fcs,suspend-voltage-selector = <1>;
265		reg = <0x41>;
266		regulator-name = "vdd_gpu";
267		regulator-min-microvolt = <850000>;
268		regulator-max-microvolt = <1350000>;
269		regulator-always-on;
270		vin-supply = <&vcc_sys>;
271	};
272
273	hym8563: hym8563@51 {
274		compatible = "haoyu,hym8563";
275		reg = <0x51>;
276		#clock-cells = <0>;
277		clock-frequency = <32768>;
278		clock-output-names = "xin32k";
279		interrupt-parent = <&gpio7>;
280		interrupts = <RK_PA4 IRQ_TYPE_EDGE_FALLING>;
281		pinctrl-names = "default";
282		pinctrl-0 = <&rtc_int>;
283	};
284
285	act8846: act8846@5a {
286		compatible = "active-semi,act8846";
287		reg = <0x5a>;
288		pinctrl-names = "default";
289		pinctrl-0 = <&pmic_vsel>, <&pwr_hold>;
290		system-power-controller;
291
292		vp1-supply = <&vcc_sys>;
293		vp2-supply = <&vcc_sys>;
294		vp3-supply = <&vcc_sys>;
295		vp4-supply = <&vcc_sys>;
296		inl1-supply = <&vcc_sys>;
297		inl2-supply = <&vcc_sys>;
298		inl3-supply = <&vcc_20>;
299
300		regulators {
301			vcc_ddr: REG1 {
302				regulator-name = "vcc_ddr";
303				regulator-min-microvolt = <1200000>;
304				regulator-max-microvolt = <1200000>;
305				regulator-always-on;
306			};
307
308			vcc_io: REG2 {
309				regulator-name = "vcc_io";
310				regulator-min-microvolt = <3300000>;
311				regulator-max-microvolt = <3300000>;
312				regulator-always-on;
313			};
314
315			vdd_log: REG3 {
316				regulator-name = "vdd_log";
317				regulator-min-microvolt = <1100000>;
318				regulator-max-microvolt = <1100000>;
319				regulator-always-on;
320			};
321
322			vcc_20: REG4 {
323				regulator-name = "vcc_20";
324				regulator-min-microvolt = <2000000>;
325				regulator-max-microvolt = <2000000>;
326				regulator-always-on;
327			};
328
329			vccio_sd: REG5 {
330				regulator-name = "vccio_sd";
331				regulator-min-microvolt = <3300000>;
332				regulator-max-microvolt = <3300000>;
333				regulator-always-on;
334			};
335
336			vdd10_lcd: REG6 {
337				regulator-name = "vdd10_lcd";
338				regulator-min-microvolt = <1000000>;
339				regulator-max-microvolt = <1000000>;
340				regulator-always-on;
341			};
342
343			vcca_18: REG7 {
344				regulator-name = "vcca_18";
345				regulator-min-microvolt = <1800000>;
346				regulator-max-microvolt = <1800000>;
347			};
348
349			vcca_33: REG8 {
350				regulator-name = "vcca_33";
351				regulator-min-microvolt = <3300000>;
352				regulator-max-microvolt = <3300000>;
353			};
354
355			vcc_lan: REG9 {
356				regulator-name = "vcc_lan";
357				regulator-min-microvolt = <3300000>;
358				regulator-max-microvolt = <3300000>;
359			};
360
361			vdd_10: REG10 {
362				regulator-name = "vdd_10";
363				regulator-min-microvolt = <1000000>;
364				regulator-max-microvolt = <1000000>;
365				regulator-always-on;
366			};
367
368			vccio_wl: vcc_18: REG11 {
369				regulator-name = "vcc_18";
370				regulator-min-microvolt = <1800000>;
371				regulator-max-microvolt = <1800000>;
372				regulator-always-on;
373			};
374
375			vcc18_lcd: REG12 {
376				regulator-name = "vcc18_lcd";
377				regulator-min-microvolt = <1800000>;
378				regulator-max-microvolt = <1800000>;
379				regulator-always-on;
380			};
381		};
382	};
383};
384
385&i2c1 {
386	status = "okay";
387};
388
389&i2c2 {
390	status = "okay";
391};
392
393&i2c4 {
394	status = "okay";
395};
396
397&i2c5 {
398	status = "okay";
399};
400
401&io_domains {
402	status = "okay";
403
404	audio-supply = <&vcca_33>;
405	bb-supply = <&vcc_io>;
406	dvp-supply = <&dovdd_1v8>;
407	flash0-supply = <&vcc_flash>;
408	flash1-supply = <&vcc_lan>;
409	gpio30-supply = <&vcc_io>;
410	gpio1830-supply = <&vcc_io>;
411	lcdc-supply = <&vcc_io>;
412	sdcard-supply = <&vccio_sd>;
413	wifi-supply = <&vccio_wl>;
414};
415
416&pinctrl {
417	pcfg_output_high: pcfg-output-high {
418		output-high;
419	};
420
421	pcfg_output_low: pcfg-output-low {
422		output-low;
423	};
424
425	pcfg_pull_up_drv_12ma: pcfg-pull-up-drv-12ma {
426		bias-pull-up;
427		drive-strength = <12>;
428	};
429
430	act8846 {
431		pwr_hold: pwr-hold {
432			rockchip,pins = <0 1 RK_FUNC_GPIO &pcfg_output_high>;
433		};
434	};
435
436	dvp {
437		dvp_pwr: dvp-pwr {
438			rockchip,pins = <0 11 RK_FUNC_GPIO &pcfg_pull_none>;
439		};
440	};
441
442	gmac {
443		phy_int: phy-int {
444			rockchip,pins = <0 9 RK_FUNC_GPIO &pcfg_pull_up>;
445		};
446
447		phy_pmeb: phy-pmeb {
448			rockchip,pins = <0 8 RK_FUNC_GPIO &pcfg_pull_up>;
449		};
450
451		phy_rst: phy-rst {
452			rockchip,pins = <4 8 RK_FUNC_GPIO &pcfg_output_high>;
453		};
454	};
455
456	hym8563 {
457		rtc_int: rtc-int {
458			rockchip,pins = <7 4 RK_FUNC_GPIO &pcfg_pull_up>;
459		};
460	};
461
462	keys {
463		pwr_key: pwr-key {
464			rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
465		};
466	};
467
468	leds {
469		power_led: power-led {
470			rockchip,pins = <8 2 RK_FUNC_GPIO &pcfg_pull_none>;
471		};
472
473		work_led: work-led {
474			rockchip,pins = <8 1 RK_FUNC_GPIO &pcfg_pull_none>;
475		};
476	};
477
478	sdmmc {
479		/*
480		 * Default drive strength isn't enough to achieve even
481		 * high-speed mode on firefly board so bump up to 12ma.
482		 */
483		sdmmc_bus4: sdmmc-bus4 {
484			rockchip,pins = <6 16 RK_FUNC_1 &pcfg_pull_up_drv_12ma>,
485					<6 17 RK_FUNC_1 &pcfg_pull_up_drv_12ma>,
486					<6 18 RK_FUNC_1 &pcfg_pull_up_drv_12ma>,
487					<6 19 RK_FUNC_1 &pcfg_pull_up_drv_12ma>;
488		};
489
490		sdmmc_clk: sdmmc-clk {
491			rockchip,pins = <6 20 RK_FUNC_1 &pcfg_pull_none_12ma>;
492		};
493
494		sdmmc_cmd: sdmmc-cmd {
495			rockchip,pins = <6 21 RK_FUNC_1 &pcfg_pull_up_drv_12ma>;
496		};
497
498		sdmmc_pwr: sdmmc-pwr {
499			rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>;
500		};
501	};
502
503	usb_host {
504		host_vbus_drv: host-vbus-drv {
505			rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
506		};
507
508		usbhub_rst: usbhub-rst {
509			rockchip,pins = <8 3 RK_FUNC_GPIO &pcfg_output_high>;
510		};
511	};
512
513	usb_otg {
514		otg_vbus_drv: otg-vbus-drv {
515			rockchip,pins = <0 12 RK_FUNC_GPIO &pcfg_pull_none>;
516		};
517	};
518};
519
520&saradc {
521	vref-supply = <&vcc_18>;
522	status = "okay";
523};
524
525&sdio0 {
526	bus-width = <4>;
527	disable-wp;
528	non-removable;
529	pinctrl-names = "default";
530	pinctrl-0 = <&sdio0_bus4>, <&sdio0_cmd>, <&sdio0_clk>;
531	vmmc-supply = <&vbat_wl>;
532	vqmmc-supply = <&vccio_wl>;
533	status = "okay";
534};
535
536&sdmmc {
537	bus-width = <4>;
538	cap-mmc-highspeed;
539	cap-sd-highspeed;
540	card-detect-delay = <200>;
541	disable-wp;
542	pinctrl-names = "default";
543	pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>;
544	vmmc-supply = <&vcc_sd>;
545	vqmmc-supply = <&vccio_sd>;
546	status = "okay";
547};
548
549&spi0 {
550	pinctrl-names = "default";
551	pinctrl-0 = <&spi0_clk>, <&spi0_cs0>, <&spi0_tx>, <&spi0_rx>, <&spi0_cs1>;
552	status = "okay";
553};
554
555&tsadc {
556	rockchip,hw-tshut-mode = <0>;
557	rockchip,hw-tshut-polarity = <0>;
558	status = "okay";
559};
560
561&uart0 {
562	pinctrl-names = "default";
563	pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>;
564	status = "okay";
565};
566
567&uart1 {
568	status = "okay";
569};
570
571&uart2 {
572	status = "okay";
573};
574
575&uart3 {
576	status = "okay";
577};
578
579&usbphy {
580	status = "okay";
581};
582
583&usb_host1 {
584	pinctrl-names = "default";
585	pinctrl-0 = <&usbhub_rst>;
586	status = "okay";
587};
588
589&usb_otg {
590	status = "okay";
591};
592
593&vopb {
594	status = "okay";
595};
596
597&vopb_mmu {
598	status = "okay";
599};
600
601&vopl {
602	status = "okay";
603};
604
605&vopl_mmu {
606	status = "okay";
607};
608
609&wdt {
610	status = "okay";
611};
v5.14.15
  1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2/*
  3 * Copyright (c) 2014, 2015 FUKAUMI Naoki <naobsd@gmail.com>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  4 */
  5
  6#include <dt-bindings/input/input.h>
  7#include "rk3288.dtsi"
  8
  9/ {
 10	memory@0 {
 11		device_type = "memory";
 12		reg = <0x0 0x0 0x0 0x80000000>;
 13	};
 14
 15	adc-keys {
 16		compatible = "adc-keys";
 17		io-channels = <&saradc 1>;
 18		io-channel-names = "buttons";
 19		keyup-threshold-microvolt = <1800000>;
 20
 21		button-recovery {
 22			label = "Recovery";
 23			linux,code = <KEY_VENDOR>;
 24			press-threshold-microvolt = <0>;
 25		};
 26	};
 27
 28	dovdd_1v8: dovdd-1v8-regulator {
 29		compatible = "regulator-fixed";
 30		regulator-name = "dovdd_1v8";
 31		regulator-min-microvolt = <1800000>;
 32		regulator-max-microvolt = <1800000>;
 33		vin-supply = <&vcc28_dvp>;
 34	};
 35
 36	ext_gmac: external-gmac-clock {
 37		compatible = "fixed-clock";
 38		#clock-cells = <0>;
 39		clock-frequency = <125000000>;
 40		clock-output-names = "ext_gmac";
 41	};
 42
 43	ir: ir-receiver {
 44		compatible = "gpio-ir-receiver";
 45		pinctrl-names = "default";
 46		pinctrl-0 = <&ir_int>;
 47	};
 48
 49	keys: gpio-keys {
 50		compatible = "gpio-keys";
 51
 52		power {
 53			wakeup-source;
 54			gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
 55			label = "GPIO Power";
 56			linux,code = <KEY_POWER>;
 57			pinctrl-names = "default";
 58			pinctrl-0 = <&pwr_key>;
 59		};
 60	};
 61
 62	leds {
 63		compatible = "gpio-leds";
 64
 65		work_led: led-0 {
 66			gpios = <&gpio8 RK_PA1 GPIO_ACTIVE_LOW>;
 67			label = "firefly:blue:user";
 68			linux,default-trigger = "rc-feedback";
 69			pinctrl-names = "default";
 70			pinctrl-0 = <&work_led_pin>;
 71		};
 72
 73		power_led: led-1 {
 74			gpios = <&gpio8 RK_PA2 GPIO_ACTIVE_LOW>;
 75			label = "firefly:green:power";
 76			linux,default-trigger = "default-on";
 77			pinctrl-names = "default";
 78			pinctrl-0 = <&power_led_pin>;
 79		};
 80	};
 81
 82	vbat_wl: vcc_sys: vsys-regulator {
 83		compatible = "regulator-fixed";
 84		regulator-name = "vcc_sys";
 85		regulator-min-microvolt = <5000000>;
 86		regulator-max-microvolt = <5000000>;
 87		regulator-always-on;
 88		regulator-boot-on;
 89	};
 90
 91	vcc_sd: sdmmc-regulator {
 92		compatible = "regulator-fixed";
 93		gpio = <&gpio7 RK_PB3 GPIO_ACTIVE_LOW>;
 94		pinctrl-names = "default";
 95		pinctrl-0 = <&sdmmc_pwr>;
 96		regulator-name = "vcc_sd";
 97		regulator-min-microvolt = <3300000>;
 98		regulator-max-microvolt = <3300000>;
 99		startup-delay-us = <100000>;
100		vin-supply = <&vcc_io>;
101	};
102
103	vcc_flash: flash-regulator {
104		compatible = "regulator-fixed";
105		regulator-name = "vcc_flash";
106		regulator-min-microvolt = <1800000>;
107		regulator-max-microvolt = <1800000>;
108		vin-supply = <&vcc_io>;
109	};
110
111	vcc_5v: usb-regulator {
112		compatible = "regulator-fixed";
113		regulator-name = "vcc_5v";
114		regulator-min-microvolt = <5000000>;
115		regulator-max-microvolt = <5000000>;
116		regulator-always-on;
117		regulator-boot-on;
118		vin-supply = <&vcc_sys>;
119	};
120
121	vcc_host_5v: usb-host-regulator {
122		compatible = "regulator-fixed";
123		enable-active-high;
124		gpio = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
125		pinctrl-names = "default";
126		pinctrl-0 = <&host_vbus_drv>;
127		regulator-name = "vcc_host_5v";
128		regulator-min-microvolt = <5000000>;
129		regulator-max-microvolt = <5000000>;
130		regulator-always-on;
131		vin-supply = <&vcc_5v>;
132	};
133
134	vcc_otg_5v: usb-otg-regulator {
135		compatible = "regulator-fixed";
136		enable-active-high;
137		gpio = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>;
138		pinctrl-names = "default";
139		pinctrl-0 = <&otg_vbus_drv>;
140		regulator-name = "vcc_otg_5v";
141		regulator-min-microvolt = <5000000>;
142		regulator-max-microvolt = <5000000>;
143		regulator-always-on;
144		vin-supply = <&vcc_5v>;
145	};
146
147	/*
148	 * A TT8142 creates both dovdd_1v8 and vcc28_dvp, controlled
149	 * by the dvp_pwr pin.
150	 */
151	vcc28_dvp: vcc28-dvp-regulator {
152		compatible = "regulator-fixed";
153		enable-active-high;
154		gpio = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
155		pinctrl-names = "default";
156		pinctrl-0 = <&dvp_pwr>;
157		regulator-name = "vcc28_dvp";
158		regulator-min-microvolt = <2800000>;
159		regulator-max-microvolt = <2800000>;
160		regulator-always-on;
161		vin-supply = <&vcc_io>;
162	};
163};
164
165&cpu0 {
166	cpu0-supply = <&vdd_cpu>;
167};
168
169&emmc {
170	bus-width = <8>;
171	cap-mmc-highspeed;
172	disable-wp;
173	non-removable;
174	pinctrl-names = "default";
175	pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_pwr>, <&emmc_bus8>;
176	vmmc-supply = <&vcc_io>;
177	vqmmc-supply = <&vcc_flash>;
178	status = "okay";
179};
180
181&gmac {
182	assigned-clocks = <&cru SCLK_MAC>;
183	assigned-clock-parents = <&ext_gmac>;
184	clock_in_out = "input";
185	pinctrl-names = "default";
186	pinctrl-0 = <&rgmii_pins>, <&phy_rst>, <&phy_pmeb>, <&phy_int>;
187	phy-supply = <&vcc_lan>;
188	phy-mode = "rgmii";
189	snps,reset-active-low;
190	snps,reset-delays-us = <0 10000 1000000>;
191	snps,reset-gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_LOW>;
192	tx_delay = <0x30>;
193	rx_delay = <0x10>;
194	status = "okay";
195};
196
197&gpu {
198	mali-supply = <&vdd_gpu>;
199	status = "okay";
200};
201
202&hdmi {
203	ddc-i2c-bus = <&i2c5>;
204	status = "okay";
205};
206
207&i2c0 {
208	clock-frequency = <400000>;
209	status = "okay";
210
211	vdd_cpu: syr827@40 {
212		compatible = "silergy,syr827";
213		fcs,suspend-voltage-selector = <1>;
214		reg = <0x40>;
215		regulator-name = "vdd_cpu";
216		regulator-min-microvolt = <850000>;
217		regulator-max-microvolt = <1350000>;
218		regulator-always-on;
219		regulator-boot-on;
220		regulator-enable-ramp-delay = <300>;
221		regulator-ramp-delay = <8000>;
222		vin-supply = <&vcc_sys>;
223	};
224
225	vdd_gpu: syr828@41 {
226		compatible = "silergy,syr828";
227		fcs,suspend-voltage-selector = <1>;
228		reg = <0x41>;
229		regulator-name = "vdd_gpu";
230		regulator-min-microvolt = <850000>;
231		regulator-max-microvolt = <1350000>;
232		regulator-always-on;
233		vin-supply = <&vcc_sys>;
234	};
235
236	hym8563: hym8563@51 {
237		compatible = "haoyu,hym8563";
238		reg = <0x51>;
239		#clock-cells = <0>;
240		clock-frequency = <32768>;
241		clock-output-names = "xin32k";
242		interrupt-parent = <&gpio7>;
243		interrupts = <RK_PA4 IRQ_TYPE_EDGE_FALLING>;
244		pinctrl-names = "default";
245		pinctrl-0 = <&rtc_int>;
246	};
247
248	act8846: act8846@5a {
249		compatible = "active-semi,act8846";
250		reg = <0x5a>;
251		pinctrl-names = "default";
252		pinctrl-0 = <&pmic_vsel>, <&pwr_hold>;
253		system-power-controller;
254
255		vp1-supply = <&vcc_sys>;
256		vp2-supply = <&vcc_sys>;
257		vp3-supply = <&vcc_sys>;
258		vp4-supply = <&vcc_sys>;
259		inl1-supply = <&vcc_sys>;
260		inl2-supply = <&vcc_sys>;
261		inl3-supply = <&vcc_20>;
262
263		regulators {
264			vcc_ddr: REG1 {
265				regulator-name = "vcc_ddr";
266				regulator-min-microvolt = <1200000>;
267				regulator-max-microvolt = <1200000>;
268				regulator-always-on;
269			};
270
271			vcc_io: REG2 {
272				regulator-name = "vcc_io";
273				regulator-min-microvolt = <3300000>;
274				regulator-max-microvolt = <3300000>;
275				regulator-always-on;
276			};
277
278			vdd_log: REG3 {
279				regulator-name = "vdd_log";
280				regulator-min-microvolt = <1100000>;
281				regulator-max-microvolt = <1100000>;
282				regulator-always-on;
283			};
284
285			vcc_20: REG4 {
286				regulator-name = "vcc_20";
287				regulator-min-microvolt = <2000000>;
288				regulator-max-microvolt = <2000000>;
289				regulator-always-on;
290			};
291
292			vccio_sd: REG5 {
293				regulator-name = "vccio_sd";
294				regulator-min-microvolt = <3300000>;
295				regulator-max-microvolt = <3300000>;
296				regulator-always-on;
297			};
298
299			vdd10_lcd: REG6 {
300				regulator-name = "vdd10_lcd";
301				regulator-min-microvolt = <1000000>;
302				regulator-max-microvolt = <1000000>;
303				regulator-always-on;
304			};
305
306			vcca_18: REG7 {
307				regulator-name = "vcca_18";
308				regulator-min-microvolt = <1800000>;
309				regulator-max-microvolt = <1800000>;
310			};
311
312			vcca_33: REG8 {
313				regulator-name = "vcca_33";
314				regulator-min-microvolt = <3300000>;
315				regulator-max-microvolt = <3300000>;
316			};
317
318			vcc_lan: REG9 {
319				regulator-name = "vcc_lan";
320				regulator-min-microvolt = <3300000>;
321				regulator-max-microvolt = <3300000>;
322			};
323
324			vdd_10: REG10 {
325				regulator-name = "vdd_10";
326				regulator-min-microvolt = <1000000>;
327				regulator-max-microvolt = <1000000>;
328				regulator-always-on;
329			};
330
331			vccio_wl: vcc_18: REG11 {
332				regulator-name = "vcc_18";
333				regulator-min-microvolt = <1800000>;
334				regulator-max-microvolt = <1800000>;
335				regulator-always-on;
336			};
337
338			vcc18_lcd: REG12 {
339				regulator-name = "vcc18_lcd";
340				regulator-min-microvolt = <1800000>;
341				regulator-max-microvolt = <1800000>;
342				regulator-always-on;
343			};
344		};
345	};
346};
347
348&i2c1 {
349	status = "okay";
350};
351
352&i2c2 {
353	status = "okay";
354};
355
356&i2c4 {
357	status = "okay";
358};
359
360&i2c5 {
361	status = "okay";
362};
363
364&io_domains {
365	status = "okay";
366
367	audio-supply = <&vcca_33>;
368	bb-supply = <&vcc_io>;
369	dvp-supply = <&dovdd_1v8>;
370	flash0-supply = <&vcc_flash>;
371	flash1-supply = <&vcc_lan>;
372	gpio30-supply = <&vcc_io>;
373	gpio1830-supply = <&vcc_io>;
374	lcdc-supply = <&vcc_io>;
375	sdcard-supply = <&vccio_sd>;
376	wifi-supply = <&vccio_wl>;
377};
378
379&pinctrl {
380	pcfg_output_high: pcfg-output-high {
381		output-high;
382	};
383
384	pcfg_output_low: pcfg-output-low {
385		output-low;
386	};
387
388	pcfg_pull_up_drv_12ma: pcfg-pull-up-drv-12ma {
389		bias-pull-up;
390		drive-strength = <12>;
391	};
392
393	act8846 {
394		pwr_hold: pwr-hold {
395			rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_output_high>;
396		};
397	};
398
399	dvp {
400		dvp_pwr: dvp-pwr {
401			rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
402		};
403	};
404
405	gmac {
406		phy_int: phy-int {
407			rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>;
408		};
409
410		phy_pmeb: phy-pmeb {
411			rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
412		};
413
414		phy_rst: phy-rst {
415			rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_output_high>;
416		};
417	};
418
419	hym8563 {
420		rtc_int: rtc-int {
421			rockchip,pins = <7 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
422		};
423	};
424
425	keys {
426		pwr_key: pwr-key {
427			rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
428		};
429	};
430
431	leds {
432		power_led_pin: power-led-pin {
433			rockchip,pins = <8 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
434		};
435
436		work_led_pin: work-led-pin {
437			rockchip,pins = <8 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
438		};
439	};
440
441	sdmmc {
442		/*
443		 * Default drive strength isn't enough to achieve even
444		 * high-speed mode on firefly board so bump up to 12ma.
445		 */
446		sdmmc_bus4: sdmmc-bus4 {
447			rockchip,pins = <6 RK_PC0 1 &pcfg_pull_up_drv_12ma>,
448					<6 RK_PC1 1 &pcfg_pull_up_drv_12ma>,
449					<6 RK_PC2 1 &pcfg_pull_up_drv_12ma>,
450					<6 RK_PC3 1 &pcfg_pull_up_drv_12ma>;
451		};
452
453		sdmmc_clk: sdmmc-clk {
454			rockchip,pins = <6 RK_PC4 1 &pcfg_pull_none_12ma>;
455		};
456
457		sdmmc_cmd: sdmmc-cmd {
458			rockchip,pins = <6 RK_PC5 1 &pcfg_pull_up_drv_12ma>;
459		};
460
461		sdmmc_pwr: sdmmc-pwr {
462			rockchip,pins = <7 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
463		};
464	};
465
466	usb_host {
467		host_vbus_drv: host-vbus-drv {
468			rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
469		};
470
471		usbhub_rst: usbhub-rst {
472			rockchip,pins = <8 RK_PA3 RK_FUNC_GPIO &pcfg_output_high>;
473		};
474	};
475
476	usb_otg {
477		otg_vbus_drv: otg-vbus-drv {
478			rockchip,pins = <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
479		};
480	};
481};
482
483&saradc {
484	vref-supply = <&vcc_18>;
485	status = "okay";
486};
487
488&sdio0 {
489	bus-width = <4>;
490	disable-wp;
491	non-removable;
492	pinctrl-names = "default";
493	pinctrl-0 = <&sdio0_bus4>, <&sdio0_cmd>, <&sdio0_clk>;
494	vmmc-supply = <&vbat_wl>;
495	vqmmc-supply = <&vccio_wl>;
496	status = "okay";
497};
498
499&sdmmc {
500	bus-width = <4>;
501	cap-mmc-highspeed;
502	cap-sd-highspeed;
503	card-detect-delay = <200>;
504	disable-wp;
505	pinctrl-names = "default";
506	pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>;
507	vmmc-supply = <&vcc_sd>;
508	vqmmc-supply = <&vccio_sd>;
509	status = "okay";
510};
511
512&spi0 {
513	pinctrl-names = "default";
514	pinctrl-0 = <&spi0_clk>, <&spi0_cs0>, <&spi0_tx>, <&spi0_rx>, <&spi0_cs1>;
515	status = "okay";
516};
517
518&tsadc {
519	rockchip,hw-tshut-mode = <0>;
520	rockchip,hw-tshut-polarity = <0>;
521	status = "okay";
522};
523
524&uart0 {
525	pinctrl-names = "default";
526	pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>;
527	status = "okay";
528};
529
530&uart1 {
531	status = "okay";
532};
533
534&uart2 {
535	status = "okay";
536};
537
538&uart3 {
539	status = "okay";
540};
541
542&usbphy {
543	status = "okay";
544};
545
546&usb_host1 {
547	pinctrl-names = "default";
548	pinctrl-0 = <&usbhub_rst>;
549	status = "okay";
550};
551
552&usb_otg {
553	status = "okay";
554};
555
556&vopb {
557	status = "okay";
558};
559
560&vopb_mmu {
561	status = "okay";
562};
563
564&vopl {
565	status = "okay";
566};
567
568&vopl_mmu {
569	status = "okay";
570};
571
572&wdt {
573	status = "okay";
574};