1523adb55SChris Morgan// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2523adb55SChris Morgan
3523adb55SChris Morgan/dts-v1/;
4523adb55SChris Morgan
5523adb55SChris Morgan#include <dt-bindings/gpio/gpio.h>
6523adb55SChris Morgan#include <dt-bindings/input/linux-event-codes.h>
7523adb55SChris Morgan#include <dt-bindings/leds/common.h>
8523adb55SChris Morgan#include <dt-bindings/pinctrl/rockchip.h>
9523adb55SChris Morgan#include <dt-bindings/soc/rockchip,vop2.h>
10523adb55SChris Morgan#include "rk3566.dtsi"
11523adb55SChris Morgan
12523adb55SChris Morgan/ {
13523adb55SChris Morgan	chosen: chosen {
14523adb55SChris Morgan		stdout-path = "serial2:1500000n8";
15523adb55SChris Morgan	};
16523adb55SChris Morgan
17523adb55SChris Morgan	adc-joystick {
18523adb55SChris Morgan		compatible = "adc-joystick";
19523adb55SChris Morgan		io-channels = <&adc_mux 0>,
20523adb55SChris Morgan			      <&adc_mux 1>,
21523adb55SChris Morgan			      <&adc_mux 2>,
22523adb55SChris Morgan			      <&adc_mux 3>;
23523adb55SChris Morgan		pinctrl-0 = <&joy_mux_en>;
24523adb55SChris Morgan		pinctrl-names = "default";
25*60bd5ee7SChris Morgan		poll-interval = <60>;
26523adb55SChris Morgan		#address-cells = <1>;
27523adb55SChris Morgan		#size-cells = <0>;
28523adb55SChris Morgan
29523adb55SChris Morgan		axis@0 {
30523adb55SChris Morgan			reg = <0>;
31523adb55SChris Morgan			abs-flat = <32>;
32523adb55SChris Morgan			abs-fuzz = <32>;
33523adb55SChris Morgan			abs-range = <1023 15>;
34523adb55SChris Morgan			linux,code = <ABS_X>;
35523adb55SChris Morgan		};
36523adb55SChris Morgan
37523adb55SChris Morgan		axis@1 {
38523adb55SChris Morgan			reg = <1>;
39523adb55SChris Morgan			abs-flat = <32>;
40523adb55SChris Morgan			abs-fuzz = <32>;
41523adb55SChris Morgan			abs-range = <15 1023>;
42523adb55SChris Morgan			linux,code = <ABS_RX>;
43523adb55SChris Morgan		};
44523adb55SChris Morgan
45523adb55SChris Morgan		axis@2 {
46523adb55SChris Morgan			reg = <2>;
47523adb55SChris Morgan			abs-flat = <32>;
48523adb55SChris Morgan			abs-fuzz = <32>;
49523adb55SChris Morgan			abs-range = <15 1023>;
50523adb55SChris Morgan			linux,code = <ABS_Y>;
51523adb55SChris Morgan		};
52523adb55SChris Morgan
53523adb55SChris Morgan		axis@3 {
54523adb55SChris Morgan			reg = <3>;
55523adb55SChris Morgan			abs-flat = <32>;
56523adb55SChris Morgan			abs-fuzz = <32>;
57523adb55SChris Morgan			abs-range = <1023 15>;
58523adb55SChris Morgan			linux,code = <ABS_RY>;
59523adb55SChris Morgan		};
60523adb55SChris Morgan	};
61523adb55SChris Morgan
62523adb55SChris Morgan	adc_keys: adc-keys {
63523adb55SChris Morgan		compatible = "adc-keys";
64523adb55SChris Morgan		io-channels = <&saradc 0>;
65523adb55SChris Morgan		io-channel-names = "buttons";
66523adb55SChris Morgan		keyup-threshold-microvolt = <1800000>;
67523adb55SChris Morgan		poll-interval = <60>;
68523adb55SChris Morgan
69523adb55SChris Morgan		/*
70523adb55SChris Morgan		 * Button is mapped to F key in BSP kernel, but
71523adb55SChris Morgan		 * according to input guidelines it should be mode.
72523adb55SChris Morgan		 */
73523adb55SChris Morgan		button-mode {
74523adb55SChris Morgan			label = "MODE";
75523adb55SChris Morgan			linux,code = <BTN_MODE>;
76523adb55SChris Morgan			press-threshold-microvolt = <1750>;
77523adb55SChris Morgan		};
78523adb55SChris Morgan	};
79523adb55SChris Morgan
80523adb55SChris Morgan	adc_mux: adc-mux {
81523adb55SChris Morgan		compatible = "io-channel-mux";
82523adb55SChris Morgan		channels = "left_x", "right_x", "left_y", "right_y";
83523adb55SChris Morgan		#io-channel-cells = <1>;
84523adb55SChris Morgan		io-channels = <&saradc 3>;
85523adb55SChris Morgan		io-channel-names = "parent";
86523adb55SChris Morgan		mux-controls = <&gpio_mux>;
87523adb55SChris Morgan		settle-time-us = <100>;
88523adb55SChris Morgan	};
89523adb55SChris Morgan
90523adb55SChris Morgan	gpio_keys_control: gpio-keys-control {
91523adb55SChris Morgan		compatible = "gpio-keys";
92523adb55SChris Morgan		pinctrl-0 = <&btn_pins_ctrl>;
93523adb55SChris Morgan		pinctrl-names = "default";
94523adb55SChris Morgan
95523adb55SChris Morgan		button-b {
96523adb55SChris Morgan			gpios = <&gpio3 RK_PC3 GPIO_ACTIVE_LOW>;
97523adb55SChris Morgan			label = "SOUTH";
98523adb55SChris Morgan			linux,code = <BTN_SOUTH>;
99523adb55SChris Morgan		};
100523adb55SChris Morgan
101523adb55SChris Morgan		button-down {
102523adb55SChris Morgan			gpios = <&gpio3 RK_PA4 GPIO_ACTIVE_LOW>;
103523adb55SChris Morgan			label = "DPAD-DOWN";
104523adb55SChris Morgan			linux,code = <BTN_DPAD_DOWN>;
105523adb55SChris Morgan		};
106523adb55SChris Morgan
107523adb55SChris Morgan		button-l1 {
108523adb55SChris Morgan			gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_LOW>;
109523adb55SChris Morgan			label = "TL";
110523adb55SChris Morgan			linux,code = <BTN_TL>;
111523adb55SChris Morgan		};
112523adb55SChris Morgan
113523adb55SChris Morgan		button-l2 {
114523adb55SChris Morgan			gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>;
115523adb55SChris Morgan			label = "TL2";
116523adb55SChris Morgan			linux,code = <BTN_TL2>;
117523adb55SChris Morgan		};
118523adb55SChris Morgan
119523adb55SChris Morgan		button-select {
120523adb55SChris Morgan			gpios = <&gpio3 RK_PB6 GPIO_ACTIVE_LOW>;
121523adb55SChris Morgan			label = "SELECT";
122523adb55SChris Morgan			linux,code = <BTN_SELECT>;
123523adb55SChris Morgan		};
124523adb55SChris Morgan
125523adb55SChris Morgan		button-start {
126523adb55SChris Morgan			gpios = <&gpio3 RK_PB5 GPIO_ACTIVE_LOW>;
127523adb55SChris Morgan			label = "START";
128523adb55SChris Morgan			linux,code = <BTN_START>;
129523adb55SChris Morgan		};
130523adb55SChris Morgan
131523adb55SChris Morgan		button-thumbl {
132523adb55SChris Morgan			gpios = <&gpio3 RK_PA1 GPIO_ACTIVE_LOW>;
133523adb55SChris Morgan			label = "THUMBL";
134523adb55SChris Morgan			linux,code = <BTN_THUMBL>;
135523adb55SChris Morgan		};
136523adb55SChris Morgan
137523adb55SChris Morgan		button-thumbr {
138523adb55SChris Morgan			gpios = <&gpio3 RK_PA2 GPIO_ACTIVE_LOW>;
139523adb55SChris Morgan			label = "THUMBR";
140523adb55SChris Morgan			linux,code = <BTN_THUMBR>;
141523adb55SChris Morgan		};
142523adb55SChris Morgan
143523adb55SChris Morgan		button-up {
144523adb55SChris Morgan			gpios = <&gpio3 RK_PA3 GPIO_ACTIVE_LOW>;
145523adb55SChris Morgan			label = "DPAD-UP";
146523adb55SChris Morgan			linux,code = <BTN_DPAD_UP>;
147523adb55SChris Morgan		};
148523adb55SChris Morgan
149523adb55SChris Morgan		button-x {
150523adb55SChris Morgan			gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_LOW>;
151523adb55SChris Morgan			label = "NORTH";
152523adb55SChris Morgan			linux,code = <BTN_NORTH>;
153523adb55SChris Morgan		};
154523adb55SChris Morgan	};
155523adb55SChris Morgan
156523adb55SChris Morgan	gpio_keys_vol: gpio-keys-vol {
157523adb55SChris Morgan		compatible = "gpio-keys";
158523adb55SChris Morgan		autorepeat;
159523adb55SChris Morgan		pinctrl-0 = <&btn_pins_vol>;
160523adb55SChris Morgan		pinctrl-names = "default";
161523adb55SChris Morgan
162523adb55SChris Morgan		button-vol-down {
163523adb55SChris Morgan			gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>;
164523adb55SChris Morgan			label = "VOLUMEDOWN";
165523adb55SChris Morgan			linux,code = <KEY_VOLUMEDOWN>;
166523adb55SChris Morgan		};
167523adb55SChris Morgan
168523adb55SChris Morgan		button-vol-up {
169523adb55SChris Morgan			gpios = <&gpio3 RK_PA7 GPIO_ACTIVE_LOW>;
170523adb55SChris Morgan			label = "VOLUMEUP";
171523adb55SChris Morgan			linux,code = <KEY_VOLUMEUP>;
172523adb55SChris Morgan		};
173523adb55SChris Morgan	};
174523adb55SChris Morgan
175523adb55SChris Morgan	gpio_mux: mux-controller {
176523adb55SChris Morgan		compatible = "gpio-mux";
177523adb55SChris Morgan		mux-gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_LOW>,
178523adb55SChris Morgan			    <&gpio0 RK_PB7 GPIO_ACTIVE_LOW>;
179523adb55SChris Morgan		#mux-control-cells = <0>;
180523adb55SChris Morgan	};
181523adb55SChris Morgan
182523adb55SChris Morgan	hdmi-con {
183523adb55SChris Morgan		compatible = "hdmi-connector";
184523adb55SChris Morgan		ddc-i2c-bus = <&i2c5>;
185523adb55SChris Morgan		type = "c";
186523adb55SChris Morgan
187523adb55SChris Morgan		port {
188523adb55SChris Morgan			hdmi_con_in: endpoint {
189523adb55SChris Morgan				remote-endpoint = <&hdmi_out_con>;
190523adb55SChris Morgan			};
191523adb55SChris Morgan		};
192523adb55SChris Morgan	};
193523adb55SChris Morgan
194523adb55SChris Morgan	leds: gpio-leds {
195523adb55SChris Morgan		compatible = "gpio-leds";
196523adb55SChris Morgan		pinctrl-0 = <&led_pins>;
197523adb55SChris Morgan		pinctrl-names = "default";
198523adb55SChris Morgan
199523adb55SChris Morgan		green_led: led-0 {
200523adb55SChris Morgan			color = <LED_COLOR_ID_GREEN>;
201523adb55SChris Morgan			default-state = "on";
202523adb55SChris Morgan			function = LED_FUNCTION_POWER;
203523adb55SChris Morgan			gpios = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
204523adb55SChris Morgan		};
205523adb55SChris Morgan
206523adb55SChris Morgan		amber_led: led-1 {
207523adb55SChris Morgan			color = <LED_COLOR_ID_AMBER>;
208523adb55SChris Morgan			function = LED_FUNCTION_CHARGING;
209523adb55SChris Morgan			gpios = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>;
210523adb55SChris Morgan			retain-state-suspended;
211523adb55SChris Morgan		};
212523adb55SChris Morgan
213523adb55SChris Morgan		red_led: led-2 {
214523adb55SChris Morgan			color = <LED_COLOR_ID_RED>;
215523adb55SChris Morgan			default-state = "off";
216523adb55SChris Morgan			function = LED_FUNCTION_STATUS;
217523adb55SChris Morgan			gpios = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>;
218523adb55SChris Morgan		};
219523adb55SChris Morgan	};
220523adb55SChris Morgan
221523adb55SChris Morgan	sdio_pwrseq: sdio-pwrseq {
222523adb55SChris Morgan		compatible = "mmc-pwrseq-simple";
223523adb55SChris Morgan		clocks = <&rk817 1>;
224523adb55SChris Morgan		clock-names = "ext_clock";
225523adb55SChris Morgan		pinctrl-0 = <&wifi_enable_h>;
226523adb55SChris Morgan		pinctrl-names = "default";
227523adb55SChris Morgan		post-power-on-delay-ms = <200>;
228523adb55SChris Morgan		reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_LOW>;
229523adb55SChris Morgan	};
230523adb55SChris Morgan
231523adb55SChris Morgan	vcc3v3_lcd0_n: regulator-vcc3v3-lcd0 {
232523adb55SChris Morgan		compatible = "regulator-fixed";
233523adb55SChris Morgan		gpio = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
234523adb55SChris Morgan		enable-active-high;
235523adb55SChris Morgan		pinctrl-0 = <&vcc_lcd_h>;
236523adb55SChris Morgan		pinctrl-names = "default";
237523adb55SChris Morgan		regulator-boot-on;
238523adb55SChris Morgan		regulator-min-microvolt = <3300000>;
239523adb55SChris Morgan		regulator-max-microvolt = <3300000>;
240523adb55SChris Morgan		regulator-name = "vcc3v3_lcd0_n";
241523adb55SChris Morgan		vin-supply = <&vcc_3v3>;
242523adb55SChris Morgan		regulator-state-mem {
243523adb55SChris Morgan			regulator-off-in-suspend;
244523adb55SChris Morgan		};
245523adb55SChris Morgan	};
246523adb55SChris Morgan
247523adb55SChris Morgan	vcc_sys: regulator-vcc-sys {
248523adb55SChris Morgan		compatible = "regulator-fixed";
249523adb55SChris Morgan		regulator-always-on;
250523adb55SChris Morgan		regulator-boot-on;
251523adb55SChris Morgan		regulator-min-microvolt = <3800000>;
252523adb55SChris Morgan		regulator-max-microvolt = <3800000>;
253523adb55SChris Morgan		regulator-name = "vcc_sys";
254523adb55SChris Morgan	};
255523adb55SChris Morgan
256523adb55SChris Morgan	vcc_wifi: regulator-vcc-wifi {
257523adb55SChris Morgan		compatible = "regulator-fixed";
258523adb55SChris Morgan		enable-active-high;
259523adb55SChris Morgan		gpio = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>;
260523adb55SChris Morgan		pinctrl-0 = <&vcc_wifi_h>;
261523adb55SChris Morgan		pinctrl-names = "default";
262523adb55SChris Morgan		regulator-always-on;
263523adb55SChris Morgan		regulator-boot-on;
264523adb55SChris Morgan		regulator-min-microvolt = <3300000>;
265523adb55SChris Morgan		regulator-max-microvolt = <3300000>;
266523adb55SChris Morgan		regulator-name = "vcc_wifi";
267523adb55SChris Morgan	};
268523adb55SChris Morgan
269523adb55SChris Morgan	vibrator: pwm-vibrator {
270523adb55SChris Morgan		compatible = "pwm-vibrator";
271523adb55SChris Morgan		pwm-names = "enable";
272523adb55SChris Morgan		pwms = <&pwm5 0 1000000000 0>;
273523adb55SChris Morgan	};
274523adb55SChris Morgan};
275523adb55SChris Morgan
276523adb55SChris Morgan&combphy1 {
277523adb55SChris Morgan	status = "okay";
278523adb55SChris Morgan};
279523adb55SChris Morgan
280523adb55SChris Morgan&cpu0 {
281523adb55SChris Morgan	cpu-supply = <&vdd_cpu>;
282523adb55SChris Morgan};
283523adb55SChris Morgan
284523adb55SChris Morgan&cpu1 {
285523adb55SChris Morgan	cpu-supply = <&vdd_cpu>;
286523adb55SChris Morgan};
287523adb55SChris Morgan
288523adb55SChris Morgan&cpu2 {
289523adb55SChris Morgan	cpu-supply = <&vdd_cpu>;
290523adb55SChris Morgan};
291523adb55SChris Morgan
292523adb55SChris Morgan&cpu3 {
293523adb55SChris Morgan	cpu-supply = <&vdd_cpu>;
294523adb55SChris Morgan};
295523adb55SChris Morgan
296523adb55SChris Morgan&gpu {
297523adb55SChris Morgan	mali-supply = <&vdd_gpu>;
298523adb55SChris Morgan	status = "okay";
299523adb55SChris Morgan};
300523adb55SChris Morgan
301523adb55SChris Morgan&hdmi {
302523adb55SChris Morgan	ddc-i2c-bus = <&i2c5>;
303523adb55SChris Morgan	pinctrl-0 = <&hdmitxm0_cec>;
304523adb55SChris Morgan	pinctrl-names = "default";
305523adb55SChris Morgan	status = "okay";
306523adb55SChris Morgan};
307523adb55SChris Morgan
308523adb55SChris Morgan&hdmi_in {
309523adb55SChris Morgan	hdmi_in_vp0: endpoint {
310523adb55SChris Morgan		remote-endpoint = <&vp0_out_hdmi>;
311523adb55SChris Morgan	};
312523adb55SChris Morgan};
313523adb55SChris Morgan
314523adb55SChris Morgan&hdmi_out {
315523adb55SChris Morgan	hdmi_out_con: endpoint {
316523adb55SChris Morgan		remote-endpoint = <&hdmi_con_in>;
317523adb55SChris Morgan	};
318523adb55SChris Morgan};
319523adb55SChris Morgan
320523adb55SChris Morgan&hdmi_sound {
321523adb55SChris Morgan	status = "okay";
322523adb55SChris Morgan};
323523adb55SChris Morgan
324523adb55SChris Morgan&i2c0 {
325523adb55SChris Morgan	status = "okay";
326523adb55SChris Morgan
327523adb55SChris Morgan	rk817: pmic@20 {
328523adb55SChris Morgan		compatible = "rockchip,rk817";
329523adb55SChris Morgan		reg = <0x20>;
330523adb55SChris Morgan		interrupt-parent = <&gpio0>;
331523adb55SChris Morgan		interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
332523adb55SChris Morgan		clock-output-names = "rk808-clkout1", "rk808-clkout2";
333523adb55SChris Morgan		clock-names = "mclk";
334523adb55SChris Morgan		clocks = <&cru I2S1_MCLKOUT_TX>;
335523adb55SChris Morgan		assigned-clocks = <&cru I2S1_MCLKOUT_TX>;
336523adb55SChris Morgan		assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>;
337523adb55SChris Morgan		#clock-cells = <1>;
338523adb55SChris Morgan		#sound-dai-cells = <0>;
339523adb55SChris Morgan		pinctrl-names = "default";
340523adb55SChris Morgan		pinctrl-0 = <&i2s1m0_mclk>, <&pmic_int_l>;
341523adb55SChris Morgan		wakeup-source;
342523adb55SChris Morgan
343523adb55SChris Morgan		vcc1-supply = <&vcc_sys>;
344523adb55SChris Morgan		vcc2-supply = <&vcc_sys>;
345523adb55SChris Morgan		vcc3-supply = <&vcc_sys>;
346523adb55SChris Morgan		vcc4-supply = <&vcc_sys>;
347523adb55SChris Morgan		vcc5-supply = <&vcc_sys>;
348523adb55SChris Morgan		vcc6-supply = <&vcc_sys>;
349523adb55SChris Morgan		vcc7-supply = <&vcc_sys>;
350523adb55SChris Morgan		vcc8-supply = <&vcc_sys>;
351523adb55SChris Morgan		vcc9-supply = <&dcdc_boost>;
352523adb55SChris Morgan
353523adb55SChris Morgan		regulators {
354523adb55SChris Morgan			vdd_logic: DCDC_REG1 {
355523adb55SChris Morgan				regulator-always-on;
356523adb55SChris Morgan				regulator-boot-on;
357523adb55SChris Morgan				regulator-min-microvolt = <500000>;
358523adb55SChris Morgan				regulator-max-microvolt = <1350000>;
359523adb55SChris Morgan				regulator-init-microvolt = <900000>;
360523adb55SChris Morgan				regulator-ramp-delay = <6001>;
361523adb55SChris Morgan				regulator-initial-mode = <0x2>;
362523adb55SChris Morgan				regulator-name = "vdd_logic";
363523adb55SChris Morgan				regulator-state-mem {
364523adb55SChris Morgan					regulator-off-in-suspend;
365523adb55SChris Morgan					regulator-suspend-microvolt = <900000>;
366523adb55SChris Morgan				};
367523adb55SChris Morgan			};
368523adb55SChris Morgan
369523adb55SChris Morgan			vdd_gpu: DCDC_REG2 {
370523adb55SChris Morgan				regulator-always-on;
371523adb55SChris Morgan				regulator-boot-on;
372523adb55SChris Morgan				regulator-min-microvolt = <500000>;
373523adb55SChris Morgan				regulator-max-microvolt = <1350000>;
374523adb55SChris Morgan				regulator-init-microvolt = <900000>;
375523adb55SChris Morgan				regulator-ramp-delay = <6001>;
376523adb55SChris Morgan				regulator-initial-mode = <0x2>;
377523adb55SChris Morgan				regulator-name = "vdd_gpu";
378523adb55SChris Morgan				regulator-state-mem {
379523adb55SChris Morgan					regulator-off-in-suspend;
380523adb55SChris Morgan				};
381523adb55SChris Morgan			};
382523adb55SChris Morgan
383523adb55SChris Morgan			vcc_ddr: DCDC_REG3 {
384523adb55SChris Morgan				regulator-always-on;
385523adb55SChris Morgan				regulator-boot-on;
386523adb55SChris Morgan				regulator-initial-mode = <0x2>;
387523adb55SChris Morgan				regulator-name = "vcc_ddr";
388523adb55SChris Morgan				regulator-state-mem {
389523adb55SChris Morgan					regulator-on-in-suspend;
390523adb55SChris Morgan				};
391523adb55SChris Morgan			};
392523adb55SChris Morgan
393523adb55SChris Morgan			vcc_3v3: DCDC_REG4 {
394523adb55SChris Morgan				regulator-always-on;
395523adb55SChris Morgan				regulator-boot-on;
396523adb55SChris Morgan				regulator-min-microvolt = <3300000>;
397523adb55SChris Morgan				regulator-max-microvolt = <3300000>;
398523adb55SChris Morgan				regulator-initial-mode = <0x2>;
399523adb55SChris Morgan				regulator-name = "vcc_3v3";
400523adb55SChris Morgan				regulator-state-mem {
401523adb55SChris Morgan					regulator-on-in-suspend;
402523adb55SChris Morgan					regulator-suspend-microvolt = <3300000>;
403523adb55SChris Morgan				};
404523adb55SChris Morgan			};
405523adb55SChris Morgan
406523adb55SChris Morgan			vcca1v8_pmu: LDO_REG1 {
407523adb55SChris Morgan				regulator-always-on;
408523adb55SChris Morgan				regulator-boot-on;
409523adb55SChris Morgan				regulator-min-microvolt = <1800000>;
410523adb55SChris Morgan				regulator-max-microvolt = <1800000>;
411523adb55SChris Morgan				regulator-name = "vcca1v8_pmu";
412523adb55SChris Morgan				regulator-state-mem {
413523adb55SChris Morgan					regulator-on-in-suspend;
414523adb55SChris Morgan					regulator-suspend-microvolt = <1800000>;
415523adb55SChris Morgan				};
416523adb55SChris Morgan			};
417523adb55SChris Morgan
418523adb55SChris Morgan			vdda_0v9: LDO_REG2 {
419523adb55SChris Morgan				regulator-always-on;
420523adb55SChris Morgan				regulator-boot-on;
421523adb55SChris Morgan				regulator-min-microvolt = <900000>;
422523adb55SChris Morgan				regulator-max-microvolt = <900000>;
423523adb55SChris Morgan				regulator-name = "vdda_0v9";
424523adb55SChris Morgan				regulator-state-mem {
425523adb55SChris Morgan					regulator-off-in-suspend;
426523adb55SChris Morgan				};
427523adb55SChris Morgan			};
428523adb55SChris Morgan
429523adb55SChris Morgan			vdda0v9_pmu: LDO_REG3 {
430523adb55SChris Morgan				regulator-always-on;
431523adb55SChris Morgan				regulator-boot-on;
432523adb55SChris Morgan				regulator-min-microvolt = <900000>;
433523adb55SChris Morgan				regulator-max-microvolt = <900000>;
434523adb55SChris Morgan				regulator-name = "vdda0v9_pmu";
435523adb55SChris Morgan				regulator-state-mem {
436523adb55SChris Morgan					regulator-on-in-suspend;
437523adb55SChris Morgan					regulator-suspend-microvolt = <900000>;
438523adb55SChris Morgan				};
439523adb55SChris Morgan			};
440523adb55SChris Morgan
441523adb55SChris Morgan			vccio_acodec: LDO_REG4 {
442523adb55SChris Morgan				regulator-always-on;
443523adb55SChris Morgan				regulator-boot-on;
444523adb55SChris Morgan				regulator-min-microvolt = <3300000>;
445523adb55SChris Morgan				regulator-max-microvolt = <3300000>;
446523adb55SChris Morgan				regulator-name = "vccio_acodec";
447523adb55SChris Morgan				regulator-state-mem {
448523adb55SChris Morgan					regulator-off-in-suspend;
449523adb55SChris Morgan				};
450523adb55SChris Morgan			};
451523adb55SChris Morgan
452523adb55SChris Morgan			vccio_sd: LDO_REG5 {
453523adb55SChris Morgan				regulator-always-on;
454523adb55SChris Morgan				regulator-boot-on;
455523adb55SChris Morgan				regulator-min-microvolt = <1800000>;
456523adb55SChris Morgan				regulator-max-microvolt = <3300000>;
457523adb55SChris Morgan				regulator-name = "vccio_sd";
458523adb55SChris Morgan				regulator-state-mem {
459523adb55SChris Morgan					regulator-off-in-suspend;
460523adb55SChris Morgan				};
461523adb55SChris Morgan			};
462523adb55SChris Morgan
463523adb55SChris Morgan			vcc3v3_pmu: LDO_REG6 {
464523adb55SChris Morgan				regulator-always-on;
465523adb55SChris Morgan				regulator-boot-on;
466523adb55SChris Morgan				regulator-min-microvolt = <3300000>;
467523adb55SChris Morgan				regulator-max-microvolt = <3300000>;
468523adb55SChris Morgan				regulator-name = "vcc3v3_pmu";
469523adb55SChris Morgan				regulator-state-mem {
470523adb55SChris Morgan					regulator-on-in-suspend;
471523adb55SChris Morgan					regulator-suspend-microvolt = <3300000>;
472523adb55SChris Morgan				};
473523adb55SChris Morgan			};
474523adb55SChris Morgan
475523adb55SChris Morgan			vcc_1v8: LDO_REG7 {
476523adb55SChris Morgan				regulator-always-on;
477523adb55SChris Morgan				regulator-boot-on;
478523adb55SChris Morgan				regulator-min-microvolt = <1800000>;
479523adb55SChris Morgan				regulator-max-microvolt = <1800000>;
480523adb55SChris Morgan				regulator-name = "vcc_1v8";
481523adb55SChris Morgan				regulator-state-mem {
482523adb55SChris Morgan					regulator-off-in-suspend;
483523adb55SChris Morgan				};
484523adb55SChris Morgan			};
485523adb55SChris Morgan
486523adb55SChris Morgan			vcc1v8_dvp: LDO_REG8 {
487523adb55SChris Morgan				regulator-always-on;
488523adb55SChris Morgan				regulator-boot-on;
489523adb55SChris Morgan				regulator-min-microvolt = <1800000>;
490523adb55SChris Morgan				regulator-max-microvolt = <3300000>;
491523adb55SChris Morgan				regulator-name = "vcc1v8_dvp";
492523adb55SChris Morgan				regulator-state-mem {
493523adb55SChris Morgan					regulator-off-in-suspend;
494523adb55SChris Morgan				};
495523adb55SChris Morgan			};
496523adb55SChris Morgan
497523adb55SChris Morgan			vcc2v8_dvp: LDO_REG9 {
498523adb55SChris Morgan				regulator-always-on;
499523adb55SChris Morgan				regulator-boot-on;
500523adb55SChris Morgan				regulator-min-microvolt = <2800000>;
501523adb55SChris Morgan				regulator-max-microvolt = <2800000>;
502523adb55SChris Morgan				regulator-name = "vcc2v8_dvp";
503523adb55SChris Morgan				regulator-state-mem {
504523adb55SChris Morgan					regulator-off-in-suspend;
505523adb55SChris Morgan				};
506523adb55SChris Morgan			};
507523adb55SChris Morgan
508523adb55SChris Morgan			dcdc_boost: BOOST {
509523adb55SChris Morgan				regulator-always-on;
510523adb55SChris Morgan				regulator-boot-on;
511523adb55SChris Morgan				regulator-min-microvolt = <4700000>;
512523adb55SChris Morgan				regulator-max-microvolt = <5400000>;
513523adb55SChris Morgan				regulator-name = "boost";
514523adb55SChris Morgan				regulator-state-mem {
515523adb55SChris Morgan					regulator-off-in-suspend;
516523adb55SChris Morgan				};
517523adb55SChris Morgan			};
518523adb55SChris Morgan
519523adb55SChris Morgan			otg_switch: OTG_SWITCH {
520523adb55SChris Morgan				regulator-name = "otg_switch";
521523adb55SChris Morgan				regulator-state-mem {
522523adb55SChris Morgan					regulator-off-in-suspend;
523523adb55SChris Morgan				};
524523adb55SChris Morgan			};
525523adb55SChris Morgan		};
526523adb55SChris Morgan	};
527523adb55SChris Morgan
528523adb55SChris Morgan	vdd_cpu: regulator@40 {
529523adb55SChris Morgan		compatible = "fcs,fan53555";
530523adb55SChris Morgan		reg = <0x40>;
531523adb55SChris Morgan		fcs,suspend-voltage-selector = <1>;
532523adb55SChris Morgan		regulator-always-on;
533523adb55SChris Morgan		regulator-boot-on;
534523adb55SChris Morgan		regulator-min-microvolt = <712500>;
535523adb55SChris Morgan		regulator-max-microvolt = <1390000>;
536523adb55SChris Morgan		regulator-init-microvolt = <900000>;
537523adb55SChris Morgan		regulator-name = "vdd_cpu";
538523adb55SChris Morgan		regulator-ramp-delay = <2300>;
539523adb55SChris Morgan		vin-supply = <&vcc_sys>;
540523adb55SChris Morgan		regulator-state-mem {
541523adb55SChris Morgan			regulator-off-in-suspend;
542523adb55SChris Morgan		};
543523adb55SChris Morgan	};
544523adb55SChris Morgan};
545523adb55SChris Morgan
546523adb55SChris Morgan&i2c1 {
547523adb55SChris Morgan	/* Unknown/unused device at 0x3c */
548523adb55SChris Morgan	status = "disabled";
549523adb55SChris Morgan};
550523adb55SChris Morgan
551523adb55SChris Morgan&i2c5 {
552523adb55SChris Morgan	pinctrl-0 = <&i2c5m1_xfer>;
553523adb55SChris Morgan	pinctrl-names = "default";
554523adb55SChris Morgan	status = "okay";
555523adb55SChris Morgan};
556523adb55SChris Morgan
557523adb55SChris Morgan&i2s0_8ch {
558523adb55SChris Morgan	status = "okay";
559523adb55SChris Morgan};
560523adb55SChris Morgan
561523adb55SChris Morgan&i2s1_8ch {
562523adb55SChris Morgan	pinctrl-0 = <&i2s1m0_sclktx
563523adb55SChris Morgan		     &i2s1m0_lrcktx
564523adb55SChris Morgan		     &i2s1m0_sdi0
565523adb55SChris Morgan		     &i2s1m0_sdo0>;
566523adb55SChris Morgan	pinctrl-names = "default";
567523adb55SChris Morgan	rockchip,trcm-sync-tx-only;
568523adb55SChris Morgan	status = "okay";
569523adb55SChris Morgan};
570523adb55SChris Morgan
571523adb55SChris Morgan&pinctrl {
572523adb55SChris Morgan	gpio-btns {
573523adb55SChris Morgan		btn_pins_ctrl: btn-pins-ctrl {
574523adb55SChris Morgan			rockchip,pins =
575523adb55SChris Morgan				<3 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>,
576523adb55SChris Morgan				<3 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>,
577523adb55SChris Morgan				<3 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>,
578523adb55SChris Morgan				<3 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>,
579523adb55SChris Morgan				<3 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>,
580523adb55SChris Morgan				<3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>,
581523adb55SChris Morgan				<3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>,
582523adb55SChris Morgan				<3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>,
583523adb55SChris Morgan				<3 RK_PB3 RK_FUNC_GPIO &pcfg_pull_up>,
584523adb55SChris Morgan				<3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>,
585523adb55SChris Morgan				<3 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>,
586523adb55SChris Morgan				<3 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>,
587523adb55SChris Morgan				<3 RK_PC0 RK_FUNC_GPIO &pcfg_pull_up>,
588523adb55SChris Morgan				<3 RK_PC1 RK_FUNC_GPIO &pcfg_pull_up>,
589523adb55SChris Morgan				<3 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>,
590523adb55SChris Morgan				<3 RK_PC3 RK_FUNC_GPIO &pcfg_pull_up>;
591523adb55SChris Morgan		};
592523adb55SChris Morgan
593523adb55SChris Morgan		btn_pins_vol: btn-pins-vol {
594523adb55SChris Morgan			rockchip,pins =
595523adb55SChris Morgan			<3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>,
596523adb55SChris Morgan			<3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
597523adb55SChris Morgan		};
598523adb55SChris Morgan	};
599523adb55SChris Morgan
600523adb55SChris Morgan	gpio-led {
601523adb55SChris Morgan		led_pins: led-pins {
602523adb55SChris Morgan			rockchip,pins =
603523adb55SChris Morgan				<0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>,
604523adb55SChris Morgan				<0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>,
605523adb55SChris Morgan				<0 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
606523adb55SChris Morgan		};
607523adb55SChris Morgan	};
608523adb55SChris Morgan
609523adb55SChris Morgan	joy-mux {
610523adb55SChris Morgan		joy_mux_en: joy-mux-en {
611523adb55SChris Morgan			rockchip,pins =
612523adb55SChris Morgan				<0 RK_PB5 RK_FUNC_GPIO &pcfg_output_low>;
613523adb55SChris Morgan		};
614523adb55SChris Morgan	};
615523adb55SChris Morgan
616523adb55SChris Morgan	pmic {
617523adb55SChris Morgan		pmic_int_l: pmic-int-l {
618523adb55SChris Morgan			rockchip,pins =
619523adb55SChris Morgan				<0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
620523adb55SChris Morgan		};
621523adb55SChris Morgan	};
622523adb55SChris Morgan
623523adb55SChris Morgan	sdio-pwrseq {
624523adb55SChris Morgan		wifi_enable_h: wifi-enable-h {
625523adb55SChris Morgan			rockchip,pins =
626523adb55SChris Morgan				<4 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
627523adb55SChris Morgan		};
628523adb55SChris Morgan	};
629523adb55SChris Morgan
630523adb55SChris Morgan	vcc3v3-lcd {
631523adb55SChris Morgan		vcc_lcd_h: vcc-lcd-h {
632523adb55SChris Morgan			rockchip,pins =
633523adb55SChris Morgan				<0 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
634523adb55SChris Morgan		};
635523adb55SChris Morgan	};
636523adb55SChris Morgan
637523adb55SChris Morgan	vcc-wifi {
638523adb55SChris Morgan		vcc_wifi_h: vcc-wifi-h {
639523adb55SChris Morgan			rockchip,pins =
640523adb55SChris Morgan				<0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
641523adb55SChris Morgan		};
642523adb55SChris Morgan	};
643523adb55SChris Morgan};
644523adb55SChris Morgan
645523adb55SChris Morgan&pmu_io_domains {
646523adb55SChris Morgan	status = "okay";
647523adb55SChris Morgan	pmuio1-supply = <&vcc3v3_pmu>;
648523adb55SChris Morgan	pmuio2-supply = <&vcc3v3_pmu>;
649523adb55SChris Morgan	vccio1-supply = <&vccio_acodec>;
650523adb55SChris Morgan	vccio3-supply = <&vccio_sd>;
651523adb55SChris Morgan	vccio4-supply = <&vcc_1v8>;
652523adb55SChris Morgan	vccio5-supply = <&vcc_3v3>;
653523adb55SChris Morgan	vccio6-supply = <&vcc1v8_dvp>;
654523adb55SChris Morgan	vccio7-supply = <&vcc_3v3>;
655523adb55SChris Morgan};
656523adb55SChris Morgan
657523adb55SChris Morgan&pwm5 {
658523adb55SChris Morgan	status = "okay";
659523adb55SChris Morgan};
660523adb55SChris Morgan
661523adb55SChris Morgan&saradc {
662523adb55SChris Morgan	vref-supply = <&vcc_1v8>;
663523adb55SChris Morgan	status = "okay";
664523adb55SChris Morgan};
665523adb55SChris Morgan
666523adb55SChris Morgan&sdmmc0 {
667523adb55SChris Morgan	bus-width = <4>;
668523adb55SChris Morgan	cap-sd-highspeed;
669523adb55SChris Morgan	cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
670523adb55SChris Morgan	disable-wp;
671523adb55SChris Morgan	pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
672523adb55SChris Morgan	pinctrl-names = "default";
673523adb55SChris Morgan	sd-uhs-sdr104;
674523adb55SChris Morgan	vmmc-supply = <&vcc_3v3>;
675523adb55SChris Morgan	vqmmc-supply = <&vccio_sd>;
676523adb55SChris Morgan	status = "okay";
677523adb55SChris Morgan};
678523adb55SChris Morgan
679523adb55SChris Morgan&sdmmc1 {
680523adb55SChris Morgan	bus-width = <4>;
681523adb55SChris Morgan	cap-sd-highspeed;
682523adb55SChris Morgan	cd-gpios = <&gpio2 RK_PB2 GPIO_ACTIVE_LOW>;
683523adb55SChris Morgan	disable-wp;
684523adb55SChris Morgan	pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk &sdmmc1_det>;
685523adb55SChris Morgan	pinctrl-names = "default";
686523adb55SChris Morgan	sd-uhs-sdr104;
687523adb55SChris Morgan	vmmc-supply = <&vcc_3v3>;
688523adb55SChris Morgan	vqmmc-supply = <&vcc1v8_dvp>;
689523adb55SChris Morgan	status = "okay";
690523adb55SChris Morgan};
691523adb55SChris Morgan
692523adb55SChris Morgan&sdmmc2 {
693523adb55SChris Morgan	bus-width = <4>;
694523adb55SChris Morgan	cap-sd-highspeed;
695523adb55SChris Morgan	cap-sdio-irq;
696523adb55SChris Morgan	keep-power-in-suspend;
697523adb55SChris Morgan	mmc-pwrseq = <&sdio_pwrseq>;
698523adb55SChris Morgan	non-removable;
699523adb55SChris Morgan	pinctrl-0 = <&sdmmc2m0_bus4 &sdmmc2m0_cmd &sdmmc2m0_clk>;
700523adb55SChris Morgan	pinctrl-names = "default";
701523adb55SChris Morgan	vmmc-supply = <&vcc_wifi>;
702523adb55SChris Morgan	vqmmc-supply = <&vcca1v8_pmu>;
703523adb55SChris Morgan	status = "okay";
704523adb55SChris Morgan};
705523adb55SChris Morgan
706523adb55SChris Morgan&tsadc {
707523adb55SChris Morgan	rockchip,hw-tshut-mode = <1>;
708523adb55SChris Morgan	rockchip,hw-tshut-polarity = <0>;
709523adb55SChris Morgan	status = "okay";
710523adb55SChris Morgan};
711523adb55SChris Morgan
712523adb55SChris Morgan&uart1 {
713523adb55SChris Morgan	pinctrl-0 = <&uart1m1_xfer &uart1m1_ctsn &uart1m1_rtsn>;
714523adb55SChris Morgan	pinctrl-names = "default";
715523adb55SChris Morgan	uart-has-rtscts;
716523adb55SChris Morgan	status = "okay";
717523adb55SChris Morgan
718523adb55SChris Morgan	bluetooth {
719523adb55SChris Morgan		compatible = "realtek,rtl8821cs-bt";
720523adb55SChris Morgan		device-wake-gpios = <&gpio4 4 GPIO_ACTIVE_HIGH>;
721523adb55SChris Morgan		enable-gpios = <&gpio4 3 GPIO_ACTIVE_HIGH>;
722523adb55SChris Morgan		host-wake-gpios = <&gpio4 5 GPIO_ACTIVE_HIGH>;
723523adb55SChris Morgan	};
724523adb55SChris Morgan};
725523adb55SChris Morgan
726523adb55SChris Morgan&uart2 {
727523adb55SChris Morgan	status = "okay";
728523adb55SChris Morgan};
729523adb55SChris Morgan
730523adb55SChris Morgan/*
731523adb55SChris Morgan * Lack the schematics to verify, but port works as a peripheral
732523adb55SChris Morgan * (and not a host or OTG port).
733523adb55SChris Morgan */
734523adb55SChris Morgan&usb_host0_xhci {
735523adb55SChris Morgan	dr_mode = "peripheral";
736523adb55SChris Morgan	phys = <&usb2phy0_otg>;
737523adb55SChris Morgan	phy-names = "usb2-phy";
738523adb55SChris Morgan	status = "okay";
739523adb55SChris Morgan};
740523adb55SChris Morgan
741523adb55SChris Morgan&usb_host1_ehci {
742523adb55SChris Morgan	status = "okay";
743523adb55SChris Morgan};
744523adb55SChris Morgan
745523adb55SChris Morgan&usb_host1_ohci {
746523adb55SChris Morgan	status = "okay";
747523adb55SChris Morgan};
748523adb55SChris Morgan
749523adb55SChris Morgan&usb_host1_xhci {
750523adb55SChris Morgan	phy-names = "usb2-phy", "usb3-phy";
751523adb55SChris Morgan	phys = <&usb2phy1_host>, <&combphy1 PHY_TYPE_USB3>;
752523adb55SChris Morgan	status = "okay";
753523adb55SChris Morgan};
754523adb55SChris Morgan
755523adb55SChris Morgan&usb2phy0 {
756523adb55SChris Morgan	status = "okay";
757523adb55SChris Morgan};
758523adb55SChris Morgan
759523adb55SChris Morgan&usb2phy0_otg {
760523adb55SChris Morgan	status = "okay";
761523adb55SChris Morgan};
762523adb55SChris Morgan
763523adb55SChris Morgan&usb2phy1 {
764523adb55SChris Morgan	status = "okay";
765523adb55SChris Morgan};
766523adb55SChris Morgan
767523adb55SChris Morgan&usb2phy1_host {
768523adb55SChris Morgan	status = "okay";
769523adb55SChris Morgan};
770523adb55SChris Morgan
771523adb55SChris Morgan&vop {
772523adb55SChris Morgan	assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
773523adb55SChris Morgan	assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
774523adb55SChris Morgan	status = "okay";
775523adb55SChris Morgan};
776523adb55SChris Morgan
777523adb55SChris Morgan&vop_mmu {
778523adb55SChris Morgan	status = "okay";
779523adb55SChris Morgan};
780523adb55SChris Morgan
781523adb55SChris Morgan&vp0 {
782523adb55SChris Morgan	vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
783523adb55SChris Morgan		reg = <ROCKCHIP_VOP2_EP_HDMI0>;
784523adb55SChris Morgan		remote-endpoint = <&hdmi_in_vp0>;
785523adb55SChris Morgan	};
786523adb55SChris Morgan};
787