1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2016 Paweł Jarosz <paweljarosz3691@gmail.com>
4 */
5
6/dts-v1/;
7#include "rk3066a.dtsi"
8
9/ {
10	model = "Rikomagic MK808";
11	compatible = "rikomagic,mk808", "rockchip,rk3066a";
12
13	aliases {
14		mmc0 = &mmc0;
15		mmc1 = &mmc1;
16	};
17
18	chosen {
19		stdout-path = "serial2:115200n8";
20	};
21
22	memory@60000000 {
23		reg = <0x60000000 0x40000000>;
24		device_type = "memory";
25	};
26
27	gpio-leds {
28		compatible = "gpio-leds";
29
30		blue_led: led-0 {
31			label = "mk808:blue:power";
32			gpios = <&gpio0 RK_PA3 GPIO_ACTIVE_HIGH>;
33			default-state = "off";
34			linux,default-trigger = "default-on";
35		};
36	};
37
38	hdmi_con {
39		compatible = "hdmi-connector";
40		type = "c";
41
42		port {
43			hdmi_con_in: endpoint {
44				remote-endpoint = <&hdmi_out_con>;
45			};
46		};
47	};
48
49	vcc_io: vcc-io {
50		compatible = "regulator-fixed";
51		regulator-name = "vcc_io";
52		regulator-min-microvolt = <3300000>;
53		regulator-max-microvolt = <3300000>;
54	};
55
56	vcc_host: usb-host-regulator {
57		compatible = "regulator-fixed";
58		enable-active-high;
59		gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
60		pinctrl-0 = <&host_drv>;
61		pinctrl-names = "default";
62		regulator-always-on;
63		regulator-name = "host-pwr";
64		regulator-min-microvolt = <5000000>;
65		regulator-max-microvolt = <5000000>;
66		startup-delay-us = <100000>;
67		vin-supply = <&vcc_io>;
68	};
69
70	vcc_otg: usb-otg-regulator {
71		compatible = "regulator-fixed";
72		enable-active-high;
73		gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
74		pinctrl-0 = <&otg_drv>;
75		pinctrl-names = "default";
76		regulator-always-on;
77		regulator-name = "vcc_otg";
78		regulator-min-microvolt = <5000000>;
79		regulator-max-microvolt = <5000000>;
80		startup-delay-us = <100000>;
81		vin-supply = <&vcc_io>;
82	};
83
84	vcc_sd: sdmmc-regulator {
85		compatible = "regulator-fixed";
86		gpio = <&gpio3 RK_PA7 GPIO_ACTIVE_LOW>;
87		pinctrl-0 = <&sdmmc_pwr>;
88		pinctrl-names = "default";
89		regulator-name = "vcc_sd";
90		regulator-min-microvolt = <3300000>;
91		regulator-max-microvolt = <3300000>;
92		startup-delay-us = <100000>;
93		vin-supply = <&vcc_io>;
94	};
95
96	vcc_wifi: sdio-regulator {
97		compatible = "regulator-fixed";
98		enable-active-high;
99		gpio = <&gpio3 RK_PD0 GPIO_ACTIVE_HIGH>;
100		pinctrl-0 = <&wifi_pwr>;
101		pinctrl-names = "default";
102		regulator-name = "vcc_wifi";
103		regulator-min-microvolt = <3300000>;
104		regulator-max-microvolt = <3300000>;
105		startup-delay-us = <100000>;
106		vin-supply = <&vcc_io>;
107	};
108};
109
110&hdmi {
111	status = "okay";
112};
113
114&hdmi_in_vop1 {
115	status = "disabled";
116};
117
118&hdmi_out {
119	hdmi_out_con: endpoint {
120		remote-endpoint = <&hdmi_con_in>;
121	};
122};
123
124&mmc0 {
125	bus-width = <4>;
126	cap-mmc-highspeed;
127	cap-sd-highspeed;
128	vmmc-supply = <&vcc_sd>;
129	status = "okay";
130};
131
132&mmc1 {
133	bus-width = <4>;
134	non-removable;
135	pinctrl-0 = <&sd1_clk &sd1_cmd &sd1_bus4>;
136	pinctrl-names = "default";
137	vmmc-supply = <&vcc_wifi>;
138	status = "okay";
139};
140
141&pinctrl {
142	usb-host {
143		host_drv: host-drv {
144			rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_default>;
145		};
146	};
147
148	usb-otg {
149		otg_drv: otg-drv {
150			rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_default>;
151		};
152	};
153
154	sdmmc {
155		sdmmc_pwr: sdmmc-pwr {
156			rockchip,pins = <3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_default>;
157		};
158	};
159
160	sdio {
161		wifi_pwr: wifi-pwr {
162			rockchip,pins = <3 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
163		};
164	};
165};
166
167&uart2 {
168	status = "okay";
169};
170
171&usb_host {
172	status = "okay";
173};
174
175&usb_otg {
176	status = "okay";
177};
178
179&usbphy {
180	status = "okay";
181};
182
183&vop0 {
184	status = "okay";
185};
186
187&wdt {
188	status = "okay";
189};
190