1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2
3/dts-v1/;
4
5#include <dt-bindings/input/input.h>
6#include "rk3229.dtsi"
7
8/ {
9	model = "Mecer Xtreme Mini S6";
10	compatible = "mecer,xms6", "rockchip,rk3229";
11
12	aliases {
13		mmc0 = &sdmmc;
14		mmc1 = &sdio;
15		mmc2 = &emmc;
16	};
17
18	memory@60000000 {
19		device_type = "memory";
20		reg = <0x60000000 0x40000000>;
21	};
22
23	dc_12v: dc-12v-regulator {
24		compatible = "regulator-fixed";
25		regulator-name = "dc_12v";
26		regulator-always-on;
27		regulator-boot-on;
28		regulator-min-microvolt = <12000000>;
29		regulator-max-microvolt = <12000000>;
30	};
31
32	ext_gmac: ext_gmac {
33		compatible = "fixed-clock";
34		clock-frequency = <125000000>;
35		clock-output-names = "ext_gmac";
36		#clock-cells = <0>;
37	};
38
39	power-led {
40		compatible = "gpio-leds";
41
42		blue_led: led-0 {
43			gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
44			default-state = "on";
45		};
46	};
47
48	sdio_pwrseq: sdio-pwrseq {
49		compatible = "mmc-pwrseq-simple";
50		reset-gpios = <&gpio2 26 GPIO_ACTIVE_LOW>,
51		              <&gpio2 29 GPIO_ACTIVE_LOW>;
52	};
53
54	vcc_host: vcc-host-regulator {
55		compatible = "regulator-fixed";
56		enable-active-high;
57		gpio = <&gpio3 RK_PC4 GPIO_ACTIVE_HIGH>;
58		pinctrl-names = "default";
59		pinctrl-0 = <&host_vbus_drv>;
60		regulator-name = "vcc_host";
61		regulator-always-on;
62		regulator-boot-on;
63		vin-supply = <&vcc_sys>;
64	};
65
66	vcc_phy: vcc-phy-regulator {
67		compatible = "regulator-fixed";
68		enable-active-high;
69		regulator-name = "vcc_phy";
70		regulator-min-microvolt = <1800000>;
71		regulator-max-microvolt = <1800000>;
72		regulator-always-on;
73		regulator-boot-on;
74		vin-supply = <&vccio_1v8>;
75	};
76
77	vcc_sys: vcc-sys-regulator {
78		compatible = "regulator-fixed";
79		regulator-name = "vcc_sys";
80		regulator-always-on;
81		regulator-boot-on;
82		regulator-min-microvolt = <5000000>;
83		regulator-max-microvolt = <5000000>;
84		vin-supply = <&dc_12v>;
85	};
86
87	vccio_1v8: vccio-1v8-regulator {
88		compatible = "regulator-fixed";
89		regulator-name = "vccio_1v8";
90		regulator-min-microvolt = <1800000>;
91		regulator-max-microvolt = <1800000>;
92		regulator-always-on;
93		vin-supply = <&vcc_sys>;
94	};
95
96	vccio_3v3: vccio-3v3-regulator {
97		compatible = "regulator-fixed";
98		regulator-name = "vccio_3v3";
99		regulator-min-microvolt = <3300000>;
100		regulator-max-microvolt = <3300000>;
101		regulator-always-on;
102		vin-supply = <&vcc_sys>;
103	};
104
105	vdd_arm: vdd-arm-regulator {
106		compatible = "pwm-regulator";
107		pwms = <&pwm1 0 25000 1>;
108		pwm-supply = <&vcc_sys>;
109		regulator-name = "vdd_arm";
110		regulator-min-microvolt = <950000>;
111		regulator-max-microvolt = <1400000>;
112		regulator-always-on;
113		regulator-boot-on;
114	};
115
116	vdd_log: vdd-log-regulator {
117		compatible = "pwm-regulator";
118		pwms = <&pwm2 0 25000 1>;
119		pwm-supply = <&vcc_sys>;
120		regulator-name = "vdd_log";
121		regulator-min-microvolt = <1000000>;
122		regulator-max-microvolt = <1300000>;
123		regulator-always-on;
124		regulator-boot-on;
125	};
126};
127
128&cpu0 {
129	cpu-supply = <&vdd_arm>;
130};
131
132&cpu1 {
133	cpu-supply = <&vdd_arm>;
134};
135
136&cpu2 {
137	cpu-supply = <&vdd_arm>;
138};
139
140&cpu3 {
141	cpu-supply = <&vdd_arm>;
142};
143
144&emmc {
145	cap-mmc-highspeed;
146	non-removable;
147	status = "okay";
148};
149
150&gmac {
151	assigned-clocks = <&cru SCLK_MAC_SRC>;
152	assigned-clock-rates = <50000000>;
153	clock_in_out = "output";
154	phy-handle = <&phy>;
155	phy-mode = "rmii";
156	phy-supply = <&vcc_phy>;
157	status = "okay";
158
159	mdio {
160		compatible = "snps,dwmac-mdio";
161		#address-cells = <1>;
162		#size-cells = <0>;
163
164		phy: ethernet-phy@0 {
165			compatible = "ethernet-phy-id1234.d400",
166			             "ethernet-phy-ieee802.3-c22";
167			reg = <0>;
168			clocks = <&cru SCLK_MAC_PHY>;
169			phy-is-integrated;
170			resets = <&cru SRST_MACPHY>;
171		};
172	};
173};
174
175&gpu {
176	mali-supply = <&vdd_log>;
177	status = "okay";
178};
179
180&hdmi {
181	status = "okay";
182};
183
184&hdmi_phy {
185	status = "okay";
186};
187
188&iep_mmu {
189	status = "okay";
190};
191
192&io_domains {
193	status = "okay";
194
195	vccio1-supply = <&vccio_3v3>;
196	vccio2-supply = <&vccio_1v8>;
197	vccio4-supply = <&vccio_3v3>;
198};
199
200&pinctrl {
201	usb {
202		host_vbus_drv: host-vbus-drv {
203			rockchip,pins = <3 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>;
204		};
205	};
206};
207
208&pwm1 {
209	status = "okay";
210};
211
212&pwm2 {
213	status = "okay";
214};
215
216&sdio {
217	bus-width = <4>;
218	cap-sd-highspeed;
219	cap-sdio-irq;
220	mmc-pwrseq = <&sdio_pwrseq>;
221	non-removable;
222	vqmmc-supply = <&vccio_1v8>;
223	status = "okay";
224};
225
226&sdmmc {
227	cap-mmc-highspeed;
228	disable-wp;
229	status = "okay";
230};
231
232&tsadc {
233	rockchip,hw-tshut-mode = <0>;
234	status = "okay";
235};
236
237&u2phy0 {
238	status = "okay";
239
240	u2phy0_host: host-port {
241		phy-supply = <&vcc_host>;
242		status = "okay";
243	};
244
245	u2phy0_otg: otg-port {
246		phy-supply = <&vcc_host>;
247		status = "okay";
248	};
249};
250
251&u2phy1 {
252	status = "okay";
253
254	u2phy1_host: host-port {
255		phy-supply = <&vcc_host>;
256		status = "okay";
257	};
258
259	u2phy1_otg: otg-port {
260		phy-supply = <&vcc_host>;
261		status = "okay";
262	};
263};
264
265&uart2 {
266	pinctrl-0 = <&uart21_xfer>;
267	status = "okay";
268};
269
270&usb_host0_ehci {
271	status = "okay";
272};
273
274&usb_host0_ohci {
275	status = "okay";
276};
277
278&usb_host1_ehci {
279	status = "okay";
280};
281
282&usb_host1_ohci {
283	status = "okay";
284};
285
286&usb_host2_ehci {
287	status = "okay";
288};
289
290&usb_host2_ohci {
291	status = "okay";
292};
293
294&usb_otg {
295	status = "okay";
296};
297
298&vop {
299	status = "okay";
300};
301
302&vop_mmu {
303	status = "okay";
304};
305