xref: /freebsd/sys/contrib/device-tree/src/arm64/rockchip/rk3566-powkiddy-x55.dts (revision 8d13bc63c0e1d50bc9e47ac1f26329c999bfecf0)
1*8d13bc63SEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2*8d13bc63SEmmanuel Vadot
3*8d13bc63SEmmanuel Vadot/dts-v1/;
4*8d13bc63SEmmanuel Vadot
5*8d13bc63SEmmanuel Vadot#include <dt-bindings/gpio/gpio.h>
6*8d13bc63SEmmanuel Vadot#include <dt-bindings/input/linux-event-codes.h>
7*8d13bc63SEmmanuel Vadot#include <dt-bindings/leds/common.h>
8*8d13bc63SEmmanuel Vadot#include <dt-bindings/pinctrl/rockchip.h>
9*8d13bc63SEmmanuel Vadot#include <dt-bindings/soc/rockchip,vop2.h>
10*8d13bc63SEmmanuel Vadot#include "rk3566.dtsi"
11*8d13bc63SEmmanuel Vadot
12*8d13bc63SEmmanuel Vadot/ {
13*8d13bc63SEmmanuel Vadot	model = "Powkiddy x55";
14*8d13bc63SEmmanuel Vadot	compatible = "powkiddy,x55", "rockchip,rk3566";
15*8d13bc63SEmmanuel Vadot
16*8d13bc63SEmmanuel Vadot	aliases {
17*8d13bc63SEmmanuel Vadot		mmc0 = &sdhci;
18*8d13bc63SEmmanuel Vadot		mmc1 = &sdmmc0;
19*8d13bc63SEmmanuel Vadot		mmc2 = &sdmmc2;
20*8d13bc63SEmmanuel Vadot		mmc3 = &sdmmc1;
21*8d13bc63SEmmanuel Vadot	};
22*8d13bc63SEmmanuel Vadot
23*8d13bc63SEmmanuel Vadot	chosen: chosen {
24*8d13bc63SEmmanuel Vadot		stdout-path = "serial2:1500000n8";
25*8d13bc63SEmmanuel Vadot	};
26*8d13bc63SEmmanuel Vadot
27*8d13bc63SEmmanuel Vadot	adc_joystick: adc-joystick {
28*8d13bc63SEmmanuel Vadot		compatible = "adc-joystick";
29*8d13bc63SEmmanuel Vadot		io-channels = <&saradc 0>, <&saradc 1>,
30*8d13bc63SEmmanuel Vadot			      <&saradc 2>, <&saradc 3>;
31*8d13bc63SEmmanuel Vadot		poll-interval = <60>;
32*8d13bc63SEmmanuel Vadot		#address-cells = <1>;
33*8d13bc63SEmmanuel Vadot		#size-cells = <0>;
34*8d13bc63SEmmanuel Vadot
35*8d13bc63SEmmanuel Vadot		axis@0 {
36*8d13bc63SEmmanuel Vadot			reg = <0>;
37*8d13bc63SEmmanuel Vadot			abs-flat = <30>;
38*8d13bc63SEmmanuel Vadot			abs-fuzz = <20>;
39*8d13bc63SEmmanuel Vadot			abs-range = <15 1023>;
40*8d13bc63SEmmanuel Vadot			linux,code = <ABS_X>;
41*8d13bc63SEmmanuel Vadot		};
42*8d13bc63SEmmanuel Vadot
43*8d13bc63SEmmanuel Vadot		axis@1 {
44*8d13bc63SEmmanuel Vadot			reg = <1>;
45*8d13bc63SEmmanuel Vadot			abs-flat = <30>;
46*8d13bc63SEmmanuel Vadot			abs-fuzz = <20>;
47*8d13bc63SEmmanuel Vadot			abs-range = <1023 15>;
48*8d13bc63SEmmanuel Vadot			linux,code = <ABS_Y>;
49*8d13bc63SEmmanuel Vadot		};
50*8d13bc63SEmmanuel Vadot
51*8d13bc63SEmmanuel Vadot		axis@2 {
52*8d13bc63SEmmanuel Vadot			reg = <2>;
53*8d13bc63SEmmanuel Vadot			abs-flat = <30>;
54*8d13bc63SEmmanuel Vadot			abs-fuzz = <20>;
55*8d13bc63SEmmanuel Vadot			abs-range = <15 1023>;
56*8d13bc63SEmmanuel Vadot			linux,code = <ABS_RX>;
57*8d13bc63SEmmanuel Vadot		};
58*8d13bc63SEmmanuel Vadot
59*8d13bc63SEmmanuel Vadot		axis@3 {
60*8d13bc63SEmmanuel Vadot			reg = <3>;
61*8d13bc63SEmmanuel Vadot			abs-flat = <30>;
62*8d13bc63SEmmanuel Vadot			abs-fuzz = <20>;
63*8d13bc63SEmmanuel Vadot			abs-range = <1023 15>;
64*8d13bc63SEmmanuel Vadot			linux,code = <ABS_RY>;
65*8d13bc63SEmmanuel Vadot		};
66*8d13bc63SEmmanuel Vadot	};
67*8d13bc63SEmmanuel Vadot
68*8d13bc63SEmmanuel Vadot	backlight: backlight {
69*8d13bc63SEmmanuel Vadot		compatible = "pwm-backlight";
70*8d13bc63SEmmanuel Vadot		power-supply = <&vcc_sys>;
71*8d13bc63SEmmanuel Vadot		pwms = <&pwm4 0 25000 0>;
72*8d13bc63SEmmanuel Vadot	};
73*8d13bc63SEmmanuel Vadot
74*8d13bc63SEmmanuel Vadot	battery: battery {
75*8d13bc63SEmmanuel Vadot		compatible = "simple-battery";
76*8d13bc63SEmmanuel Vadot		charge-full-design-microamp-hours = <4000000>;
77*8d13bc63SEmmanuel Vadot		charge-term-current-microamp = <300000>;
78*8d13bc63SEmmanuel Vadot		constant-charge-current-max-microamp = <2000000>;
79*8d13bc63SEmmanuel Vadot		constant-charge-voltage-max-microvolt = <4300000>;
80*8d13bc63SEmmanuel Vadot		factory-internal-resistance-micro-ohms = <91000>;
81*8d13bc63SEmmanuel Vadot		voltage-max-design-microvolt = <4138000>;
82*8d13bc63SEmmanuel Vadot		voltage-min-design-microvolt = <3400000>;
83*8d13bc63SEmmanuel Vadot
84*8d13bc63SEmmanuel Vadot		ocv-capacity-celsius = <20>;
85*8d13bc63SEmmanuel Vadot		ocv-capacity-table-0 =  <4138000 100>, <4083000 95>, <4059000 90>, <4044000 85>,
86*8d13bc63SEmmanuel Vadot					<4030000 80>, <4020000 75>, <4006000 70>, <3972000 65>,
87*8d13bc63SEmmanuel Vadot					<3934000 60>, <3904000 55>, <3878000 50>, <3857000 45>,
88*8d13bc63SEmmanuel Vadot					<3843000 40>, <3826000 35>, <3801000 30>, <3768000 25>,
89*8d13bc63SEmmanuel Vadot					<3735000 20>, <3688000 15>, <3621000 10>, <3553000 5>,
90*8d13bc63SEmmanuel Vadot					<3400000 0>;
91*8d13bc63SEmmanuel Vadot	};
92*8d13bc63SEmmanuel Vadot
93*8d13bc63SEmmanuel Vadot	gpio_keys_control: gpio-keys-control {
94*8d13bc63SEmmanuel Vadot		compatible = "gpio-keys";
95*8d13bc63SEmmanuel Vadot		pinctrl-0 = <&btn_pins_ctrl>;
96*8d13bc63SEmmanuel Vadot		pinctrl-names = "default";
97*8d13bc63SEmmanuel Vadot
98*8d13bc63SEmmanuel Vadot		button-a {
99*8d13bc63SEmmanuel Vadot			gpios = <&gpio3 RK_PD3 GPIO_ACTIVE_LOW>;
100*8d13bc63SEmmanuel Vadot			label = "EAST";
101*8d13bc63SEmmanuel Vadot			linux,code = <BTN_EAST>;
102*8d13bc63SEmmanuel Vadot		};
103*8d13bc63SEmmanuel Vadot
104*8d13bc63SEmmanuel Vadot		button-b {
105*8d13bc63SEmmanuel Vadot			gpios = <&gpio3 RK_PD2 GPIO_ACTIVE_LOW>;
106*8d13bc63SEmmanuel Vadot			label = "SOUTH";
107*8d13bc63SEmmanuel Vadot			linux,code = <BTN_SOUTH>;
108*8d13bc63SEmmanuel Vadot		};
109*8d13bc63SEmmanuel Vadot
110*8d13bc63SEmmanuel Vadot		button-down {
111*8d13bc63SEmmanuel Vadot			gpios = <&gpio4 RK_PA1 GPIO_ACTIVE_LOW>;
112*8d13bc63SEmmanuel Vadot			label = "DPAD-DOWN";
113*8d13bc63SEmmanuel Vadot			linux,code = <BTN_DPAD_DOWN>;
114*8d13bc63SEmmanuel Vadot		};
115*8d13bc63SEmmanuel Vadot
116*8d13bc63SEmmanuel Vadot		button-l1 {
117*8d13bc63SEmmanuel Vadot			gpios = <&gpio3 RK_PD0 GPIO_ACTIVE_LOW>;
118*8d13bc63SEmmanuel Vadot			label = "TL";
119*8d13bc63SEmmanuel Vadot			linux,code = <BTN_TL>;
120*8d13bc63SEmmanuel Vadot		};
121*8d13bc63SEmmanuel Vadot
122*8d13bc63SEmmanuel Vadot		button-l2 {
123*8d13bc63SEmmanuel Vadot			gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_LOW>;
124*8d13bc63SEmmanuel Vadot			label = "TL2";
125*8d13bc63SEmmanuel Vadot			linux,code = <BTN_TL2>;
126*8d13bc63SEmmanuel Vadot		};
127*8d13bc63SEmmanuel Vadot
128*8d13bc63SEmmanuel Vadot		button-left {
129*8d13bc63SEmmanuel Vadot			gpios = <&gpio3 RK_PD6 GPIO_ACTIVE_LOW>;
130*8d13bc63SEmmanuel Vadot			label = "DPAD-LEFT";
131*8d13bc63SEmmanuel Vadot			linux,code = <BTN_DPAD_LEFT>;
132*8d13bc63SEmmanuel Vadot		};
133*8d13bc63SEmmanuel Vadot
134*8d13bc63SEmmanuel Vadot		button-right {
135*8d13bc63SEmmanuel Vadot			gpios = <&gpio3 RK_PD7 GPIO_ACTIVE_LOW>;
136*8d13bc63SEmmanuel Vadot			label = "DPAD-RIGHT";
137*8d13bc63SEmmanuel Vadot			linux,code = <BTN_DPAD_RIGHT>;
138*8d13bc63SEmmanuel Vadot		};
139*8d13bc63SEmmanuel Vadot
140*8d13bc63SEmmanuel Vadot		button-select {
141*8d13bc63SEmmanuel Vadot			gpios = <&gpio4 RK_PA4 GPIO_ACTIVE_LOW>;
142*8d13bc63SEmmanuel Vadot			label = "SELECT";
143*8d13bc63SEmmanuel Vadot			linux,code = <BTN_SELECT>;
144*8d13bc63SEmmanuel Vadot		};
145*8d13bc63SEmmanuel Vadot
146*8d13bc63SEmmanuel Vadot		button-start {
147*8d13bc63SEmmanuel Vadot			gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_LOW>;
148*8d13bc63SEmmanuel Vadot			label = "START";
149*8d13bc63SEmmanuel Vadot			linux,code = <BTN_START>;
150*8d13bc63SEmmanuel Vadot		};
151*8d13bc63SEmmanuel Vadot
152*8d13bc63SEmmanuel Vadot		button-thumbl {
153*8d13bc63SEmmanuel Vadot			gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_LOW>;
154*8d13bc63SEmmanuel Vadot			label = "THUMBL";
155*8d13bc63SEmmanuel Vadot			linux,code = <BTN_THUMBL>;
156*8d13bc63SEmmanuel Vadot		};
157*8d13bc63SEmmanuel Vadot
158*8d13bc63SEmmanuel Vadot		button-thumbr {
159*8d13bc63SEmmanuel Vadot			gpios = <&gpio4 RK_PB0 GPIO_ACTIVE_LOW>;
160*8d13bc63SEmmanuel Vadot			label = "THUMBR";
161*8d13bc63SEmmanuel Vadot			linux,code = <BTN_THUMBR>;
162*8d13bc63SEmmanuel Vadot		};
163*8d13bc63SEmmanuel Vadot
164*8d13bc63SEmmanuel Vadot		button-r1 {
165*8d13bc63SEmmanuel Vadot			gpios = <&gpio3 RK_PC6 GPIO_ACTIVE_LOW>;
166*8d13bc63SEmmanuel Vadot			label = "TR";
167*8d13bc63SEmmanuel Vadot			linux,code = <BTN_TR>;
168*8d13bc63SEmmanuel Vadot		};
169*8d13bc63SEmmanuel Vadot
170*8d13bc63SEmmanuel Vadot		button-r2 {
171*8d13bc63SEmmanuel Vadot			gpios = <&gpio3 RK_PC7 GPIO_ACTIVE_LOW>;
172*8d13bc63SEmmanuel Vadot			label = "TR2";
173*8d13bc63SEmmanuel Vadot			linux,code = <BTN_TR2>;
174*8d13bc63SEmmanuel Vadot		};
175*8d13bc63SEmmanuel Vadot
176*8d13bc63SEmmanuel Vadot		button-up {
177*8d13bc63SEmmanuel Vadot			gpios = <&gpio4 RK_PA0 GPIO_ACTIVE_LOW>;
178*8d13bc63SEmmanuel Vadot			label = "DPAD-UP";
179*8d13bc63SEmmanuel Vadot			linux,code = <BTN_DPAD_UP>;
180*8d13bc63SEmmanuel Vadot		};
181*8d13bc63SEmmanuel Vadot
182*8d13bc63SEmmanuel Vadot		button-x {
183*8d13bc63SEmmanuel Vadot			gpios = <&gpio3 RK_PD5 GPIO_ACTIVE_LOW>;
184*8d13bc63SEmmanuel Vadot			label = "NORTH";
185*8d13bc63SEmmanuel Vadot			linux,code = <BTN_NORTH>;
186*8d13bc63SEmmanuel Vadot		};
187*8d13bc63SEmmanuel Vadot
188*8d13bc63SEmmanuel Vadot		button-y {
189*8d13bc63SEmmanuel Vadot			gpios = <&gpio3 RK_PD4 GPIO_ACTIVE_LOW>;
190*8d13bc63SEmmanuel Vadot			label = "WEST";
191*8d13bc63SEmmanuel Vadot			linux,code = <BTN_WEST>;
192*8d13bc63SEmmanuel Vadot		};
193*8d13bc63SEmmanuel Vadot	};
194*8d13bc63SEmmanuel Vadot
195*8d13bc63SEmmanuel Vadot	gpio_keys_vol: gpio-keys-vol {
196*8d13bc63SEmmanuel Vadot		compatible = "gpio-keys";
197*8d13bc63SEmmanuel Vadot		autorepeat;
198*8d13bc63SEmmanuel Vadot		pinctrl-0 = <&btn_pins_vol>;
199*8d13bc63SEmmanuel Vadot		pinctrl-names = "default";
200*8d13bc63SEmmanuel Vadot
201*8d13bc63SEmmanuel Vadot		button-voldown {
202*8d13bc63SEmmanuel Vadot			gpios = <&gpio4 RK_PA3 GPIO_ACTIVE_LOW>;
203*8d13bc63SEmmanuel Vadot			label = "VOLUMEDOWN";
204*8d13bc63SEmmanuel Vadot			linux,code = <KEY_VOLUMEDOWN>;
205*8d13bc63SEmmanuel Vadot		};
206*8d13bc63SEmmanuel Vadot
207*8d13bc63SEmmanuel Vadot		button-volup {
208*8d13bc63SEmmanuel Vadot			gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_LOW>;
209*8d13bc63SEmmanuel Vadot			label = "VOLUMEUP";
210*8d13bc63SEmmanuel Vadot			linux,code = <KEY_VOLUMEUP>;
211*8d13bc63SEmmanuel Vadot		};
212*8d13bc63SEmmanuel Vadot	};
213*8d13bc63SEmmanuel Vadot
214*8d13bc63SEmmanuel Vadot	gpio_leds: gpio-leds {
215*8d13bc63SEmmanuel Vadot		compatible = "gpio-leds";
216*8d13bc63SEmmanuel Vadot		pinctrl-names = "default";
217*8d13bc63SEmmanuel Vadot		pinctrl-0 = <&led_pins>;
218*8d13bc63SEmmanuel Vadot
219*8d13bc63SEmmanuel Vadot		red_led: led-0 {
220*8d13bc63SEmmanuel Vadot			color = <LED_COLOR_ID_RED>;
221*8d13bc63SEmmanuel Vadot			default-state = "off";
222*8d13bc63SEmmanuel Vadot			gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>;
223*8d13bc63SEmmanuel Vadot			function = LED_FUNCTION_STATUS;
224*8d13bc63SEmmanuel Vadot		};
225*8d13bc63SEmmanuel Vadot
226*8d13bc63SEmmanuel Vadot		green_led: led-1 {
227*8d13bc63SEmmanuel Vadot			color = <LED_COLOR_ID_GREEN>;
228*8d13bc63SEmmanuel Vadot			default-state = "on";
229*8d13bc63SEmmanuel Vadot			gpios = <&gpio4 RK_PB5 GPIO_ACTIVE_HIGH>;
230*8d13bc63SEmmanuel Vadot			function = LED_FUNCTION_POWER;
231*8d13bc63SEmmanuel Vadot		};
232*8d13bc63SEmmanuel Vadot
233*8d13bc63SEmmanuel Vadot		amber_led: led-2 {
234*8d13bc63SEmmanuel Vadot			color = <LED_COLOR_ID_AMBER>;
235*8d13bc63SEmmanuel Vadot			gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
236*8d13bc63SEmmanuel Vadot			function = LED_FUNCTION_CHARGING;
237*8d13bc63SEmmanuel Vadot		};
238*8d13bc63SEmmanuel Vadot
239*8d13bc63SEmmanuel Vadot	};
240*8d13bc63SEmmanuel Vadot
241*8d13bc63SEmmanuel Vadot	hdmi-con {
242*8d13bc63SEmmanuel Vadot		compatible = "hdmi-connector";
243*8d13bc63SEmmanuel Vadot		ddc-i2c-bus = <&i2c5>;
244*8d13bc63SEmmanuel Vadot		type = "c";
245*8d13bc63SEmmanuel Vadot
246*8d13bc63SEmmanuel Vadot		port {
247*8d13bc63SEmmanuel Vadot			hdmi_con_in: endpoint {
248*8d13bc63SEmmanuel Vadot				remote-endpoint = <&hdmi_out_con>;
249*8d13bc63SEmmanuel Vadot			};
250*8d13bc63SEmmanuel Vadot		};
251*8d13bc63SEmmanuel Vadot	};
252*8d13bc63SEmmanuel Vadot
253*8d13bc63SEmmanuel Vadot	sdio_pwrseq: sdio-pwrseq {
254*8d13bc63SEmmanuel Vadot		compatible = "mmc-pwrseq-simple";
255*8d13bc63SEmmanuel Vadot		clocks = <&rk817 1>;
256*8d13bc63SEmmanuel Vadot		clock-names = "ext_clock";
257*8d13bc63SEmmanuel Vadot		pinctrl-0 = <&wifi_enable_h>;
258*8d13bc63SEmmanuel Vadot		pinctrl-names = "default";
259*8d13bc63SEmmanuel Vadot		post-power-on-delay-ms = <200>;
260*8d13bc63SEmmanuel Vadot		reset-gpios = <&gpio0 RK_PC0 GPIO_ACTIVE_LOW>;
261*8d13bc63SEmmanuel Vadot	};
262*8d13bc63SEmmanuel Vadot
263*8d13bc63SEmmanuel Vadot	/* Channels reversed for both headphones and speakers. */
264*8d13bc63SEmmanuel Vadot	sound {
265*8d13bc63SEmmanuel Vadot		compatible = "simple-audio-card";
266*8d13bc63SEmmanuel Vadot		pinctrl-0 = <&hp_det>;
267*8d13bc63SEmmanuel Vadot		pinctrl-names = "default";
268*8d13bc63SEmmanuel Vadot		simple-audio-card,name = "rk817_ext";
269*8d13bc63SEmmanuel Vadot		simple-audio-card,aux-devs = <&spk_amp>;
270*8d13bc63SEmmanuel Vadot		simple-audio-card,format = "i2s";
271*8d13bc63SEmmanuel Vadot		simple-audio-card,hp-det-gpio = <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>;
272*8d13bc63SEmmanuel Vadot		simple-audio-card,mclk-fs = <256>;
273*8d13bc63SEmmanuel Vadot		simple-audio-card,widgets =
274*8d13bc63SEmmanuel Vadot			"Microphone", "Mic Jack",
275*8d13bc63SEmmanuel Vadot			"Headphone", "Headphones",
276*8d13bc63SEmmanuel Vadot			"Speaker", "Internal Speakers";
277*8d13bc63SEmmanuel Vadot		simple-audio-card,routing =
278*8d13bc63SEmmanuel Vadot			"MICL", "Mic Jack",
279*8d13bc63SEmmanuel Vadot			"Headphones", "HPOL",
280*8d13bc63SEmmanuel Vadot			"Headphones", "HPOR",
281*8d13bc63SEmmanuel Vadot			"Internal Speakers", "Speaker Amp OUTL",
282*8d13bc63SEmmanuel Vadot			"Internal Speakers", "Speaker Amp OUTR",
283*8d13bc63SEmmanuel Vadot			"Speaker Amp INL", "HPOL",
284*8d13bc63SEmmanuel Vadot			"Speaker Amp INR", "HPOR";
285*8d13bc63SEmmanuel Vadot		simple-audio-card,pin-switches = "Internal Speakers";
286*8d13bc63SEmmanuel Vadot
287*8d13bc63SEmmanuel Vadot		simple-audio-card,codec {
288*8d13bc63SEmmanuel Vadot			sound-dai = <&rk817>;
289*8d13bc63SEmmanuel Vadot		};
290*8d13bc63SEmmanuel Vadot
291*8d13bc63SEmmanuel Vadot		simple-audio-card,cpu {
292*8d13bc63SEmmanuel Vadot			sound-dai = <&i2s1_8ch>;
293*8d13bc63SEmmanuel Vadot		};
294*8d13bc63SEmmanuel Vadot	};
295*8d13bc63SEmmanuel Vadot
296*8d13bc63SEmmanuel Vadot	spk_amp: audio-amplifier {
297*8d13bc63SEmmanuel Vadot		compatible = "simple-audio-amplifier";
298*8d13bc63SEmmanuel Vadot		enable-gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;
299*8d13bc63SEmmanuel Vadot		pinctrl-0 = <&spk_amp_enable_h>;
300*8d13bc63SEmmanuel Vadot		pinctrl-names = "default";
301*8d13bc63SEmmanuel Vadot		sound-name-prefix = "Speaker Amp";
302*8d13bc63SEmmanuel Vadot	};
303*8d13bc63SEmmanuel Vadot
304*8d13bc63SEmmanuel Vadot	vcc5v0_host: regulator-vcc5v0-host {
305*8d13bc63SEmmanuel Vadot		compatible = "regulator-fixed";
306*8d13bc63SEmmanuel Vadot		enable-active-high;
307*8d13bc63SEmmanuel Vadot		gpio = <&gpio4 RK_PC4 GPIO_ACTIVE_HIGH>;
308*8d13bc63SEmmanuel Vadot		pinctrl-0 = <&vcc5v0_host_en>;
309*8d13bc63SEmmanuel Vadot		pinctrl-names = "default";
310*8d13bc63SEmmanuel Vadot		regulator-name = "vcc5v0_host";
311*8d13bc63SEmmanuel Vadot		vin-supply = <&dcdc_boost>;
312*8d13bc63SEmmanuel Vadot	};
313*8d13bc63SEmmanuel Vadot
314*8d13bc63SEmmanuel Vadot	vcc_lcd: regulator-vcc-lcd {
315*8d13bc63SEmmanuel Vadot		compatible = "regulator-fixed";
316*8d13bc63SEmmanuel Vadot		enable-active-high;
317*8d13bc63SEmmanuel Vadot		gpio = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>;
318*8d13bc63SEmmanuel Vadot		pinctrl-0 = <&vcc_lcd_en>;
319*8d13bc63SEmmanuel Vadot		pinctrl-names = "default";
320*8d13bc63SEmmanuel Vadot		regulator-min-microvolt = <3300000>;
321*8d13bc63SEmmanuel Vadot		regulator-max-microvolt = <3300000>;
322*8d13bc63SEmmanuel Vadot		regulator-name = "vcc_lcd";
323*8d13bc63SEmmanuel Vadot	};
324*8d13bc63SEmmanuel Vadot
325*8d13bc63SEmmanuel Vadot	vcc_sys: regulator-vcc-sys {
326*8d13bc63SEmmanuel Vadot		compatible = "regulator-fixed";
327*8d13bc63SEmmanuel Vadot		regulator-always-on;
328*8d13bc63SEmmanuel Vadot		regulator-boot-on;
329*8d13bc63SEmmanuel Vadot		regulator-min-microvolt = <3800000>;
330*8d13bc63SEmmanuel Vadot		regulator-max-microvolt = <3800000>;
331*8d13bc63SEmmanuel Vadot		regulator-name = "vcc_sys";
332*8d13bc63SEmmanuel Vadot	};
333*8d13bc63SEmmanuel Vadot
334*8d13bc63SEmmanuel Vadot	vcc_wifi: regulator-vcc-wifi {
335*8d13bc63SEmmanuel Vadot		compatible = "regulator-fixed";
336*8d13bc63SEmmanuel Vadot		gpio = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>;
337*8d13bc63SEmmanuel Vadot		pinctrl-0 = <&vcc_wifi_h>;
338*8d13bc63SEmmanuel Vadot		pinctrl-names = "default";
339*8d13bc63SEmmanuel Vadot		regulator-min-microvolt = <3300000>;
340*8d13bc63SEmmanuel Vadot		regulator-max-microvolt = <3300000>;
341*8d13bc63SEmmanuel Vadot		regulator-name = "vcc_wifi";
342*8d13bc63SEmmanuel Vadot	};
343*8d13bc63SEmmanuel Vadot};
344*8d13bc63SEmmanuel Vadot
345*8d13bc63SEmmanuel Vadot&combphy1 {
346*8d13bc63SEmmanuel Vadot	status = "okay";
347*8d13bc63SEmmanuel Vadot};
348*8d13bc63SEmmanuel Vadot
349*8d13bc63SEmmanuel Vadot&cru {
350*8d13bc63SEmmanuel Vadot	assigned-clocks = <&pmucru CLK_RTC_32K>, <&cru PLL_GPLL>,
351*8d13bc63SEmmanuel Vadot			  <&pmucru PLL_PPLL>, <&cru PLL_VPLL>;
352*8d13bc63SEmmanuel Vadot	assigned-clock-rates = <32768>, <1200000000>,
353*8d13bc63SEmmanuel Vadot			       <200000000>, <126400000>;
354*8d13bc63SEmmanuel Vadot};
355*8d13bc63SEmmanuel Vadot
356*8d13bc63SEmmanuel Vadot&cpu0 {
357*8d13bc63SEmmanuel Vadot	cpu-supply = <&vdd_cpu>;
358*8d13bc63SEmmanuel Vadot};
359*8d13bc63SEmmanuel Vadot
360*8d13bc63SEmmanuel Vadot&cpu1 {
361*8d13bc63SEmmanuel Vadot	cpu-supply = <&vdd_cpu>;
362*8d13bc63SEmmanuel Vadot};
363*8d13bc63SEmmanuel Vadot
364*8d13bc63SEmmanuel Vadot&cpu2 {
365*8d13bc63SEmmanuel Vadot	cpu-supply = <&vdd_cpu>;
366*8d13bc63SEmmanuel Vadot};
367*8d13bc63SEmmanuel Vadot
368*8d13bc63SEmmanuel Vadot&cpu3 {
369*8d13bc63SEmmanuel Vadot	cpu-supply = <&vdd_cpu>;
370*8d13bc63SEmmanuel Vadot};
371*8d13bc63SEmmanuel Vadot
372*8d13bc63SEmmanuel Vadot&dsi_dphy0 {
373*8d13bc63SEmmanuel Vadot	status = "okay";
374*8d13bc63SEmmanuel Vadot};
375*8d13bc63SEmmanuel Vadot
376*8d13bc63SEmmanuel Vadot&dsi0 {
377*8d13bc63SEmmanuel Vadot	status = "okay";
378*8d13bc63SEmmanuel Vadot	#address-cells = <1>;
379*8d13bc63SEmmanuel Vadot	#size-cells = <0>;
380*8d13bc63SEmmanuel Vadot
381*8d13bc63SEmmanuel Vadot	ports {
382*8d13bc63SEmmanuel Vadot		dsi0_in: port@0 {
383*8d13bc63SEmmanuel Vadot			reg = <0>;
384*8d13bc63SEmmanuel Vadot			dsi0_in_vp1: endpoint {
385*8d13bc63SEmmanuel Vadot				remote-endpoint = <&vp1_out_dsi0>;
386*8d13bc63SEmmanuel Vadot			};
387*8d13bc63SEmmanuel Vadot		};
388*8d13bc63SEmmanuel Vadot
389*8d13bc63SEmmanuel Vadot		dsi0_out: port@1 {
390*8d13bc63SEmmanuel Vadot			reg = <1>;
391*8d13bc63SEmmanuel Vadot			mipi_out_panel: endpoint {
392*8d13bc63SEmmanuel Vadot				remote-endpoint = <&mipi_in_panel>;
393*8d13bc63SEmmanuel Vadot			};
394*8d13bc63SEmmanuel Vadot		};
395*8d13bc63SEmmanuel Vadot	};
396*8d13bc63SEmmanuel Vadot
397*8d13bc63SEmmanuel Vadot	panel: panel@0 {
398*8d13bc63SEmmanuel Vadot		compatible = "powkiddy,x55-panel", "himax,hx8394";
399*8d13bc63SEmmanuel Vadot		reg = <0>;
400*8d13bc63SEmmanuel Vadot		backlight = <&backlight>;
401*8d13bc63SEmmanuel Vadot		iovcc-supply = <&vcc_lcd>;
402*8d13bc63SEmmanuel Vadot		pinctrl-names = "default";
403*8d13bc63SEmmanuel Vadot		pinctrl-0 = <&lcd_rst>;
404*8d13bc63SEmmanuel Vadot		reset-gpios = <&gpio0 RK_PD5 GPIO_ACTIVE_LOW>;
405*8d13bc63SEmmanuel Vadot		rotation = <270>;
406*8d13bc63SEmmanuel Vadot		vcc-supply = <&vcc_lcd>;
407*8d13bc63SEmmanuel Vadot
408*8d13bc63SEmmanuel Vadot		port {
409*8d13bc63SEmmanuel Vadot			mipi_in_panel: endpoint {
410*8d13bc63SEmmanuel Vadot				remote-endpoint = <&mipi_out_panel>;
411*8d13bc63SEmmanuel Vadot			};
412*8d13bc63SEmmanuel Vadot		};
413*8d13bc63SEmmanuel Vadot	};
414*8d13bc63SEmmanuel Vadot};
415*8d13bc63SEmmanuel Vadot
416*8d13bc63SEmmanuel Vadot&gpu {
417*8d13bc63SEmmanuel Vadot	mali-supply = <&vdd_gpu>;
418*8d13bc63SEmmanuel Vadot	status = "okay";
419*8d13bc63SEmmanuel Vadot};
420*8d13bc63SEmmanuel Vadot
421*8d13bc63SEmmanuel Vadot&hdmi {
422*8d13bc63SEmmanuel Vadot	ddc-i2c-bus = <&i2c5>;
423*8d13bc63SEmmanuel Vadot	pinctrl-0 = <&hdmitxm0_cec>;
424*8d13bc63SEmmanuel Vadot	pinctrl-names = "default";
425*8d13bc63SEmmanuel Vadot	status = "okay";
426*8d13bc63SEmmanuel Vadot};
427*8d13bc63SEmmanuel Vadot
428*8d13bc63SEmmanuel Vadot&hdmi_in {
429*8d13bc63SEmmanuel Vadot	hdmi_in_vp0: endpoint {
430*8d13bc63SEmmanuel Vadot		remote-endpoint = <&vp0_out_hdmi>;
431*8d13bc63SEmmanuel Vadot	};
432*8d13bc63SEmmanuel Vadot};
433*8d13bc63SEmmanuel Vadot
434*8d13bc63SEmmanuel Vadot&hdmi_out {
435*8d13bc63SEmmanuel Vadot	hdmi_out_con: endpoint {
436*8d13bc63SEmmanuel Vadot		remote-endpoint = <&hdmi_con_in>;
437*8d13bc63SEmmanuel Vadot	};
438*8d13bc63SEmmanuel Vadot};
439*8d13bc63SEmmanuel Vadot
440*8d13bc63SEmmanuel Vadot&hdmi_sound {
441*8d13bc63SEmmanuel Vadot	status = "okay";
442*8d13bc63SEmmanuel Vadot};
443*8d13bc63SEmmanuel Vadot
444*8d13bc63SEmmanuel Vadot&i2c0 {
445*8d13bc63SEmmanuel Vadot	status = "okay";
446*8d13bc63SEmmanuel Vadot
447*8d13bc63SEmmanuel Vadot	rk817: pmic@20 {
448*8d13bc63SEmmanuel Vadot		compatible = "rockchip,rk817";
449*8d13bc63SEmmanuel Vadot		reg = <0x20>;
450*8d13bc63SEmmanuel Vadot		assigned-clocks = <&cru I2S1_MCLKOUT_TX>;
451*8d13bc63SEmmanuel Vadot		assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>;
452*8d13bc63SEmmanuel Vadot		clock-names = "mclk";
453*8d13bc63SEmmanuel Vadot		clock-output-names = "rk808-clkout1", "rk808-clkout2";
454*8d13bc63SEmmanuel Vadot		clocks = <&cru I2S1_MCLKOUT_TX>;
455*8d13bc63SEmmanuel Vadot		interrupt-parent = <&gpio0>;
456*8d13bc63SEmmanuel Vadot		interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
457*8d13bc63SEmmanuel Vadot		pinctrl-names = "default";
458*8d13bc63SEmmanuel Vadot		pinctrl-0 = <&i2s1m0_mclk>, <&pmic_int_l>;
459*8d13bc63SEmmanuel Vadot		wakeup-source;
460*8d13bc63SEmmanuel Vadot		#clock-cells = <1>;
461*8d13bc63SEmmanuel Vadot		#sound-dai-cells = <0>;
462*8d13bc63SEmmanuel Vadot
463*8d13bc63SEmmanuel Vadot		vcc1-supply = <&vcc_sys>;
464*8d13bc63SEmmanuel Vadot		vcc2-supply = <&vcc_sys>;
465*8d13bc63SEmmanuel Vadot		vcc3-supply = <&vcc_sys>;
466*8d13bc63SEmmanuel Vadot		vcc4-supply = <&vcc_sys>;
467*8d13bc63SEmmanuel Vadot		vcc5-supply = <&vcc_sys>;
468*8d13bc63SEmmanuel Vadot		vcc6-supply = <&vcc_sys>;
469*8d13bc63SEmmanuel Vadot		vcc7-supply = <&vcc_sys>;
470*8d13bc63SEmmanuel Vadot		vcc8-supply = <&vcc_sys>;
471*8d13bc63SEmmanuel Vadot		vcc9-supply = <&dcdc_boost>;
472*8d13bc63SEmmanuel Vadot
473*8d13bc63SEmmanuel Vadot		regulators {
474*8d13bc63SEmmanuel Vadot			vdd_logic: DCDC_REG1 {
475*8d13bc63SEmmanuel Vadot				regulator-always-on;
476*8d13bc63SEmmanuel Vadot				regulator-boot-on;
477*8d13bc63SEmmanuel Vadot				regulator-min-microvolt = <500000>;
478*8d13bc63SEmmanuel Vadot				regulator-max-microvolt = <1350000>;
479*8d13bc63SEmmanuel Vadot				regulator-ramp-delay = <6001>;
480*8d13bc63SEmmanuel Vadot				regulator-initial-mode = <0x2>;
481*8d13bc63SEmmanuel Vadot				regulator-name = "vdd_logic";
482*8d13bc63SEmmanuel Vadot				regulator-state-mem {
483*8d13bc63SEmmanuel Vadot					regulator-off-in-suspend;
484*8d13bc63SEmmanuel Vadot					regulator-suspend-microvolt = <900000>;
485*8d13bc63SEmmanuel Vadot				};
486*8d13bc63SEmmanuel Vadot			};
487*8d13bc63SEmmanuel Vadot
488*8d13bc63SEmmanuel Vadot			vdd_gpu: DCDC_REG2 {
489*8d13bc63SEmmanuel Vadot				regulator-always-on;
490*8d13bc63SEmmanuel Vadot				regulator-boot-on;
491*8d13bc63SEmmanuel Vadot				regulator-min-microvolt = <500000>;
492*8d13bc63SEmmanuel Vadot				regulator-max-microvolt = <1350000>;
493*8d13bc63SEmmanuel Vadot				regulator-ramp-delay = <6001>;
494*8d13bc63SEmmanuel Vadot				regulator-initial-mode = <0x2>;
495*8d13bc63SEmmanuel Vadot				regulator-name = "vdd_gpu";
496*8d13bc63SEmmanuel Vadot				regulator-state-mem {
497*8d13bc63SEmmanuel Vadot					regulator-off-in-suspend;
498*8d13bc63SEmmanuel Vadot				};
499*8d13bc63SEmmanuel Vadot			};
500*8d13bc63SEmmanuel Vadot
501*8d13bc63SEmmanuel Vadot			vcc_ddr: DCDC_REG3 {
502*8d13bc63SEmmanuel Vadot				regulator-always-on;
503*8d13bc63SEmmanuel Vadot				regulator-boot-on;
504*8d13bc63SEmmanuel Vadot				regulator-initial-mode = <0x2>;
505*8d13bc63SEmmanuel Vadot				regulator-name = "vcc_ddr";
506*8d13bc63SEmmanuel Vadot				regulator-state-mem {
507*8d13bc63SEmmanuel Vadot					regulator-on-in-suspend;
508*8d13bc63SEmmanuel Vadot				};
509*8d13bc63SEmmanuel Vadot			};
510*8d13bc63SEmmanuel Vadot
511*8d13bc63SEmmanuel Vadot			vcc_3v3: DCDC_REG4 {
512*8d13bc63SEmmanuel Vadot				regulator-always-on;
513*8d13bc63SEmmanuel Vadot				regulator-boot-on;
514*8d13bc63SEmmanuel Vadot				regulator-min-microvolt = <3300000>;
515*8d13bc63SEmmanuel Vadot				regulator-max-microvolt = <3300000>;
516*8d13bc63SEmmanuel Vadot				regulator-initial-mode = <0x2>;
517*8d13bc63SEmmanuel Vadot				regulator-name = "vcc_3v3";
518*8d13bc63SEmmanuel Vadot				regulator-state-mem {
519*8d13bc63SEmmanuel Vadot					regulator-on-in-suspend;
520*8d13bc63SEmmanuel Vadot					regulator-suspend-microvolt = <3300000>;
521*8d13bc63SEmmanuel Vadot				};
522*8d13bc63SEmmanuel Vadot			};
523*8d13bc63SEmmanuel Vadot
524*8d13bc63SEmmanuel Vadot			vcca1v8_pmu: LDO_REG1 {
525*8d13bc63SEmmanuel Vadot				regulator-always-on;
526*8d13bc63SEmmanuel Vadot				regulator-boot-on;
527*8d13bc63SEmmanuel Vadot				regulator-min-microvolt = <1800000>;
528*8d13bc63SEmmanuel Vadot				regulator-max-microvolt = <1800000>;
529*8d13bc63SEmmanuel Vadot				regulator-name = "vcca1v8_pmu";
530*8d13bc63SEmmanuel Vadot				regulator-state-mem {
531*8d13bc63SEmmanuel Vadot					regulator-on-in-suspend;
532*8d13bc63SEmmanuel Vadot					regulator-suspend-microvolt = <1800000>;
533*8d13bc63SEmmanuel Vadot				};
534*8d13bc63SEmmanuel Vadot			};
535*8d13bc63SEmmanuel Vadot
536*8d13bc63SEmmanuel Vadot			vdda_0v9: LDO_REG2 {
537*8d13bc63SEmmanuel Vadot				regulator-always-on;
538*8d13bc63SEmmanuel Vadot				regulator-boot-on;
539*8d13bc63SEmmanuel Vadot				regulator-min-microvolt = <900000>;
540*8d13bc63SEmmanuel Vadot				regulator-max-microvolt = <900000>;
541*8d13bc63SEmmanuel Vadot				regulator-name = "vdda_0v9";
542*8d13bc63SEmmanuel Vadot				regulator-state-mem {
543*8d13bc63SEmmanuel Vadot					regulator-off-in-suspend;
544*8d13bc63SEmmanuel Vadot				};
545*8d13bc63SEmmanuel Vadot			};
546*8d13bc63SEmmanuel Vadot
547*8d13bc63SEmmanuel Vadot			vdda0v9_pmu: LDO_REG3 {
548*8d13bc63SEmmanuel Vadot				regulator-always-on;
549*8d13bc63SEmmanuel Vadot				regulator-boot-on;
550*8d13bc63SEmmanuel Vadot				regulator-min-microvolt = <900000>;
551*8d13bc63SEmmanuel Vadot				regulator-max-microvolt = <900000>;
552*8d13bc63SEmmanuel Vadot				regulator-name = "vdda0v9_pmu";
553*8d13bc63SEmmanuel Vadot				regulator-state-mem {
554*8d13bc63SEmmanuel Vadot					regulator-on-in-suspend;
555*8d13bc63SEmmanuel Vadot					regulator-suspend-microvolt = <900000>;
556*8d13bc63SEmmanuel Vadot				};
557*8d13bc63SEmmanuel Vadot			};
558*8d13bc63SEmmanuel Vadot
559*8d13bc63SEmmanuel Vadot			vccio_acodec: LDO_REG4 {
560*8d13bc63SEmmanuel Vadot				regulator-always-on;
561*8d13bc63SEmmanuel Vadot				regulator-boot-on;
562*8d13bc63SEmmanuel Vadot				regulator-min-microvolt = <3300000>;
563*8d13bc63SEmmanuel Vadot				regulator-max-microvolt = <3300000>;
564*8d13bc63SEmmanuel Vadot				regulator-name = "vccio_acodec";
565*8d13bc63SEmmanuel Vadot				regulator-state-mem {
566*8d13bc63SEmmanuel Vadot					regulator-off-in-suspend;
567*8d13bc63SEmmanuel Vadot				};
568*8d13bc63SEmmanuel Vadot			};
569*8d13bc63SEmmanuel Vadot
570*8d13bc63SEmmanuel Vadot			vccio_sd: LDO_REG5 {
571*8d13bc63SEmmanuel Vadot				regulator-always-on;
572*8d13bc63SEmmanuel Vadot				regulator-boot-on;
573*8d13bc63SEmmanuel Vadot				regulator-min-microvolt = <1800000>;
574*8d13bc63SEmmanuel Vadot				regulator-max-microvolt = <3300000>;
575*8d13bc63SEmmanuel Vadot				regulator-name = "vccio_sd";
576*8d13bc63SEmmanuel Vadot				regulator-state-mem {
577*8d13bc63SEmmanuel Vadot					regulator-off-in-suspend;
578*8d13bc63SEmmanuel Vadot				};
579*8d13bc63SEmmanuel Vadot			};
580*8d13bc63SEmmanuel Vadot
581*8d13bc63SEmmanuel Vadot			vcc3v3_pmu: LDO_REG6 {
582*8d13bc63SEmmanuel Vadot				regulator-always-on;
583*8d13bc63SEmmanuel Vadot				regulator-boot-on;
584*8d13bc63SEmmanuel Vadot				regulator-min-microvolt = <3300000>;
585*8d13bc63SEmmanuel Vadot				regulator-max-microvolt = <3300000>;
586*8d13bc63SEmmanuel Vadot				regulator-name = "vcc3v3_pmu";
587*8d13bc63SEmmanuel Vadot				regulator-state-mem {
588*8d13bc63SEmmanuel Vadot					regulator-on-in-suspend;
589*8d13bc63SEmmanuel Vadot					regulator-suspend-microvolt = <3300000>;
590*8d13bc63SEmmanuel Vadot				};
591*8d13bc63SEmmanuel Vadot			};
592*8d13bc63SEmmanuel Vadot
593*8d13bc63SEmmanuel Vadot			vcc_1v8: LDO_REG7 {
594*8d13bc63SEmmanuel Vadot				regulator-always-on;
595*8d13bc63SEmmanuel Vadot				regulator-boot-on;
596*8d13bc63SEmmanuel Vadot				regulator-min-microvolt = <1800000>;
597*8d13bc63SEmmanuel Vadot				regulator-max-microvolt = <1800000>;
598*8d13bc63SEmmanuel Vadot				regulator-name = "vcc_1v8";
599*8d13bc63SEmmanuel Vadot				regulator-state-mem {
600*8d13bc63SEmmanuel Vadot					regulator-off-in-suspend;
601*8d13bc63SEmmanuel Vadot				};
602*8d13bc63SEmmanuel Vadot			};
603*8d13bc63SEmmanuel Vadot
604*8d13bc63SEmmanuel Vadot			vcc1v8_dvp: LDO_REG8 {
605*8d13bc63SEmmanuel Vadot				regulator-always-on;
606*8d13bc63SEmmanuel Vadot				regulator-boot-on;
607*8d13bc63SEmmanuel Vadot				regulator-min-microvolt = <1800000>;
608*8d13bc63SEmmanuel Vadot				regulator-max-microvolt = <1800000>;
609*8d13bc63SEmmanuel Vadot				regulator-name = "vcc1v8_dvp";
610*8d13bc63SEmmanuel Vadot				regulator-state-mem {
611*8d13bc63SEmmanuel Vadot					regulator-on-in-suspend;
612*8d13bc63SEmmanuel Vadot				};
613*8d13bc63SEmmanuel Vadot			};
614*8d13bc63SEmmanuel Vadot
615*8d13bc63SEmmanuel Vadot			vcc2v8_dvp: LDO_REG9 {
616*8d13bc63SEmmanuel Vadot				regulator-always-on;
617*8d13bc63SEmmanuel Vadot				regulator-boot-on;
618*8d13bc63SEmmanuel Vadot				regulator-min-microvolt = <1800000>;
619*8d13bc63SEmmanuel Vadot				regulator-max-microvolt = <3300000>;
620*8d13bc63SEmmanuel Vadot				regulator-name = "vcc2v8_dvp";
621*8d13bc63SEmmanuel Vadot				regulator-state-mem {
622*8d13bc63SEmmanuel Vadot					regulator-off-in-suspend;
623*8d13bc63SEmmanuel Vadot				};
624*8d13bc63SEmmanuel Vadot			};
625*8d13bc63SEmmanuel Vadot
626*8d13bc63SEmmanuel Vadot			dcdc_boost: BOOST {
627*8d13bc63SEmmanuel Vadot				regulator-min-microvolt = <4700000>;
628*8d13bc63SEmmanuel Vadot				regulator-max-microvolt = <5400000>;
629*8d13bc63SEmmanuel Vadot				regulator-name = "boost";
630*8d13bc63SEmmanuel Vadot				regulator-state-mem {
631*8d13bc63SEmmanuel Vadot					regulator-off-in-suspend;
632*8d13bc63SEmmanuel Vadot				};
633*8d13bc63SEmmanuel Vadot			};
634*8d13bc63SEmmanuel Vadot
635*8d13bc63SEmmanuel Vadot			otg_switch: OTG_SWITCH {
636*8d13bc63SEmmanuel Vadot				regulator-name = "otg_switch";
637*8d13bc63SEmmanuel Vadot				regulator-state-mem {
638*8d13bc63SEmmanuel Vadot					regulator-off-in-suspend;
639*8d13bc63SEmmanuel Vadot				};
640*8d13bc63SEmmanuel Vadot			};
641*8d13bc63SEmmanuel Vadot		};
642*8d13bc63SEmmanuel Vadot
643*8d13bc63SEmmanuel Vadot		rk817_charger: charger {
644*8d13bc63SEmmanuel Vadot			monitored-battery = <&battery>;
645*8d13bc63SEmmanuel Vadot			rockchip,resistor-sense-micro-ohms = <10000>;
646*8d13bc63SEmmanuel Vadot			rockchip,sleep-enter-current-microamp = <150000>;
647*8d13bc63SEmmanuel Vadot			rockchip,sleep-filter-current-microamp = <100000>;
648*8d13bc63SEmmanuel Vadot		};
649*8d13bc63SEmmanuel Vadot
650*8d13bc63SEmmanuel Vadot	};
651*8d13bc63SEmmanuel Vadot
652*8d13bc63SEmmanuel Vadot	vdd_cpu: regulator@1c {
653*8d13bc63SEmmanuel Vadot		compatible = "tcs,tcs4525";
654*8d13bc63SEmmanuel Vadot		reg = <0x1c>;
655*8d13bc63SEmmanuel Vadot		fcs,suspend-voltage-selector = <1>;
656*8d13bc63SEmmanuel Vadot		regulator-always-on;
657*8d13bc63SEmmanuel Vadot		regulator-boot-on;
658*8d13bc63SEmmanuel Vadot		regulator-min-microvolt = <712500>;
659*8d13bc63SEmmanuel Vadot		regulator-max-microvolt = <1390000>;
660*8d13bc63SEmmanuel Vadot		regulator-name = "vdd_cpu";
661*8d13bc63SEmmanuel Vadot		regulator-ramp-delay = <2300>;
662*8d13bc63SEmmanuel Vadot		vin-supply = <&vcc_sys>;
663*8d13bc63SEmmanuel Vadot		regulator-state-mem {
664*8d13bc63SEmmanuel Vadot			regulator-off-in-suspend;
665*8d13bc63SEmmanuel Vadot		};
666*8d13bc63SEmmanuel Vadot	};
667*8d13bc63SEmmanuel Vadot};
668*8d13bc63SEmmanuel Vadot
669*8d13bc63SEmmanuel Vadot&i2c5 {
670*8d13bc63SEmmanuel Vadot	pinctrl-0 = <&i2c5m1_xfer>;
671*8d13bc63SEmmanuel Vadot	pinctrl-names = "default";
672*8d13bc63SEmmanuel Vadot	status = "okay";
673*8d13bc63SEmmanuel Vadot};
674*8d13bc63SEmmanuel Vadot
675*8d13bc63SEmmanuel Vadot&i2s0_8ch {
676*8d13bc63SEmmanuel Vadot	status = "okay";
677*8d13bc63SEmmanuel Vadot};
678*8d13bc63SEmmanuel Vadot
679*8d13bc63SEmmanuel Vadot&i2s1_8ch {
680*8d13bc63SEmmanuel Vadot	pinctrl-0 = <&i2s1m0_sclktx>, <&i2s1m0_lrcktx>, <&i2s1m0_sdi0>,
681*8d13bc63SEmmanuel Vadot		    <&i2s1m0_sdo0>;
682*8d13bc63SEmmanuel Vadot	pinctrl-names = "default";
683*8d13bc63SEmmanuel Vadot	rockchip,trcm-sync-tx-only;
684*8d13bc63SEmmanuel Vadot	status = "okay";
685*8d13bc63SEmmanuel Vadot};
686*8d13bc63SEmmanuel Vadot
687*8d13bc63SEmmanuel Vadot&pinctrl {
688*8d13bc63SEmmanuel Vadot	audio-amplifier {
689*8d13bc63SEmmanuel Vadot		spk_amp_enable_h: spk-amp-enable-h {
690*8d13bc63SEmmanuel Vadot			rockchip,pins =
691*8d13bc63SEmmanuel Vadot				<4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
692*8d13bc63SEmmanuel Vadot		};
693*8d13bc63SEmmanuel Vadot	};
694*8d13bc63SEmmanuel Vadot
695*8d13bc63SEmmanuel Vadot	gpio-control {
696*8d13bc63SEmmanuel Vadot		btn_pins_ctrl: btn-pins-ctrl {
697*8d13bc63SEmmanuel Vadot			rockchip,pins =
698*8d13bc63SEmmanuel Vadot				<3 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>,
699*8d13bc63SEmmanuel Vadot				<3 RK_PC7 RK_FUNC_GPIO &pcfg_pull_up>,
700*8d13bc63SEmmanuel Vadot				<3 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>,
701*8d13bc63SEmmanuel Vadot				<3 RK_PD1 RK_FUNC_GPIO &pcfg_pull_up>,
702*8d13bc63SEmmanuel Vadot				<3 RK_PD2 RK_FUNC_GPIO &pcfg_pull_up>,
703*8d13bc63SEmmanuel Vadot				<3 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>,
704*8d13bc63SEmmanuel Vadot				<3 RK_PD4 RK_FUNC_GPIO &pcfg_pull_up>,
705*8d13bc63SEmmanuel Vadot				<3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>,
706*8d13bc63SEmmanuel Vadot				<3 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>,
707*8d13bc63SEmmanuel Vadot				<3 RK_PD7 RK_FUNC_GPIO &pcfg_pull_up>,
708*8d13bc63SEmmanuel Vadot				<4 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>,
709*8d13bc63SEmmanuel Vadot				<4 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>,
710*8d13bc63SEmmanuel Vadot				<4 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>,
711*8d13bc63SEmmanuel Vadot				<4 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>,
712*8d13bc63SEmmanuel Vadot				<4 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>,
713*8d13bc63SEmmanuel Vadot				<4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
714*8d13bc63SEmmanuel Vadot		};
715*8d13bc63SEmmanuel Vadot
716*8d13bc63SEmmanuel Vadot		btn_pins_vol: btn-pins-vol {
717*8d13bc63SEmmanuel Vadot			rockchip,pins =
718*8d13bc63SEmmanuel Vadot				<4 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>,
719*8d13bc63SEmmanuel Vadot				<4 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
720*8d13bc63SEmmanuel Vadot		};
721*8d13bc63SEmmanuel Vadot	};
722*8d13bc63SEmmanuel Vadot
723*8d13bc63SEmmanuel Vadot	gpio-lcd {
724*8d13bc63SEmmanuel Vadot		lcd_rst: lcd-rst {
725*8d13bc63SEmmanuel Vadot			rockchip,pins =
726*8d13bc63SEmmanuel Vadot				<0 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
727*8d13bc63SEmmanuel Vadot		};
728*8d13bc63SEmmanuel Vadot	};
729*8d13bc63SEmmanuel Vadot
730*8d13bc63SEmmanuel Vadot	gpio-leds {
731*8d13bc63SEmmanuel Vadot		led_pins: led-pins {
732*8d13bc63SEmmanuel Vadot			rockchip,pins =
733*8d13bc63SEmmanuel Vadot				<4 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>,
734*8d13bc63SEmmanuel Vadot				<4 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>,
735*8d13bc63SEmmanuel Vadot				<4 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
736*8d13bc63SEmmanuel Vadot		};
737*8d13bc63SEmmanuel Vadot	};
738*8d13bc63SEmmanuel Vadot
739*8d13bc63SEmmanuel Vadot	hp-detect {
740*8d13bc63SEmmanuel Vadot		hp_det: hp-det {
741*8d13bc63SEmmanuel Vadot			rockchip,pins =
742*8d13bc63SEmmanuel Vadot				<4 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>;
743*8d13bc63SEmmanuel Vadot		};
744*8d13bc63SEmmanuel Vadot	};
745*8d13bc63SEmmanuel Vadot
746*8d13bc63SEmmanuel Vadot	pmic {
747*8d13bc63SEmmanuel Vadot		pmic_int_l: pmic-int-l {
748*8d13bc63SEmmanuel Vadot			rockchip,pins =
749*8d13bc63SEmmanuel Vadot				<0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
750*8d13bc63SEmmanuel Vadot		};
751*8d13bc63SEmmanuel Vadot	};
752*8d13bc63SEmmanuel Vadot
753*8d13bc63SEmmanuel Vadot	sdio-pwrseq {
754*8d13bc63SEmmanuel Vadot		wifi_enable_h: wifi-enable-h {
755*8d13bc63SEmmanuel Vadot			rockchip,pins =
756*8d13bc63SEmmanuel Vadot				<0 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
757*8d13bc63SEmmanuel Vadot		};
758*8d13bc63SEmmanuel Vadot	};
759*8d13bc63SEmmanuel Vadot
760*8d13bc63SEmmanuel Vadot	usb {
761*8d13bc63SEmmanuel Vadot		vcc5v0_host_en: vcc5v0-host-en {
762*8d13bc63SEmmanuel Vadot			rockchip,pins =
763*8d13bc63SEmmanuel Vadot				<4 RK_PC4 RK_FUNC_GPIO &pcfg_pull_up>;
764*8d13bc63SEmmanuel Vadot		};
765*8d13bc63SEmmanuel Vadot
766*8d13bc63SEmmanuel Vadot		vcc5v0_otg_en: vcc5v0-otg-en {
767*8d13bc63SEmmanuel Vadot			rockchip,pins =
768*8d13bc63SEmmanuel Vadot				<4 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
769*8d13bc63SEmmanuel Vadot		};
770*8d13bc63SEmmanuel Vadot	};
771*8d13bc63SEmmanuel Vadot
772*8d13bc63SEmmanuel Vadot	vcc-lcd {
773*8d13bc63SEmmanuel Vadot		vcc_lcd_en: vcc-lcd-en {
774*8d13bc63SEmmanuel Vadot			rockchip,pins =
775*8d13bc63SEmmanuel Vadot				<0 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
776*8d13bc63SEmmanuel Vadot		};
777*8d13bc63SEmmanuel Vadot	};
778*8d13bc63SEmmanuel Vadot
779*8d13bc63SEmmanuel Vadot	vcc-wifi {
780*8d13bc63SEmmanuel Vadot		vcc_wifi_h: vcc-wifi-h {
781*8d13bc63SEmmanuel Vadot			rockchip,pins =
782*8d13bc63SEmmanuel Vadot				<0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
783*8d13bc63SEmmanuel Vadot		};
784*8d13bc63SEmmanuel Vadot	};
785*8d13bc63SEmmanuel Vadot};
786*8d13bc63SEmmanuel Vadot
787*8d13bc63SEmmanuel Vadot&pmu_io_domains {
788*8d13bc63SEmmanuel Vadot	status = "okay";
789*8d13bc63SEmmanuel Vadot	pmuio1-supply = <&vcc3v3_pmu>;
790*8d13bc63SEmmanuel Vadot	pmuio2-supply = <&vcca1v8_pmu>;
791*8d13bc63SEmmanuel Vadot	vccio1-supply = <&vccio_acodec>;
792*8d13bc63SEmmanuel Vadot	vccio3-supply = <&vccio_sd>;
793*8d13bc63SEmmanuel Vadot	vccio4-supply = <&vcca1v8_pmu>;
794*8d13bc63SEmmanuel Vadot	vccio5-supply = <&vcc2v8_dvp>;
795*8d13bc63SEmmanuel Vadot	vccio6-supply = <&vcc1v8_dvp>;
796*8d13bc63SEmmanuel Vadot	vccio7-supply = <&vcc_3v3>;
797*8d13bc63SEmmanuel Vadot};
798*8d13bc63SEmmanuel Vadot
799*8d13bc63SEmmanuel Vadot&pwm4 {
800*8d13bc63SEmmanuel Vadot	status = "okay";
801*8d13bc63SEmmanuel Vadot};
802*8d13bc63SEmmanuel Vadot
803*8d13bc63SEmmanuel Vadot&saradc {
804*8d13bc63SEmmanuel Vadot	vref-supply = <&vcc_1v8>;
805*8d13bc63SEmmanuel Vadot	status = "okay";
806*8d13bc63SEmmanuel Vadot};
807*8d13bc63SEmmanuel Vadot
808*8d13bc63SEmmanuel Vadot&sdhci {
809*8d13bc63SEmmanuel Vadot	bus-width = <8>;
810*8d13bc63SEmmanuel Vadot	mmc-hs200-1_8v;
811*8d13bc63SEmmanuel Vadot	non-removable;
812*8d13bc63SEmmanuel Vadot	pinctrl-0 = <&emmc_bus8>, <&emmc_clk>, <&emmc_cmd>,
813*8d13bc63SEmmanuel Vadot		    <&emmc_datastrobe>, <&emmc_rstnout>;
814*8d13bc63SEmmanuel Vadot	pinctrl-names = "default";
815*8d13bc63SEmmanuel Vadot	status = "okay";
816*8d13bc63SEmmanuel Vadot};
817*8d13bc63SEmmanuel Vadot
818*8d13bc63SEmmanuel Vadot&sdmmc0 {
819*8d13bc63SEmmanuel Vadot	bus-width = <4>;
820*8d13bc63SEmmanuel Vadot	cap-mmc-highspeed;
821*8d13bc63SEmmanuel Vadot	cap-sd-highspeed;
822*8d13bc63SEmmanuel Vadot	disable-wp;
823*8d13bc63SEmmanuel Vadot	pinctrl-0 = <&sdmmc0_bus4>, <&sdmmc0_clk>, <&sdmmc0_cmd>,
824*8d13bc63SEmmanuel Vadot		    <&sdmmc0_det>;
825*8d13bc63SEmmanuel Vadot	pinctrl-names = "default";
826*8d13bc63SEmmanuel Vadot	sd-uhs-sdr104;
827*8d13bc63SEmmanuel Vadot	vqmmc-supply = <&vccio_sd>;
828*8d13bc63SEmmanuel Vadot	status = "okay";
829*8d13bc63SEmmanuel Vadot};
830*8d13bc63SEmmanuel Vadot
831*8d13bc63SEmmanuel Vadot&sdmmc1 {
832*8d13bc63SEmmanuel Vadot	bus-width = <4>;
833*8d13bc63SEmmanuel Vadot	cap-sd-highspeed;
834*8d13bc63SEmmanuel Vadot	cap-sdio-irq;
835*8d13bc63SEmmanuel Vadot	keep-power-in-suspend;
836*8d13bc63SEmmanuel Vadot	mmc-pwrseq = <&sdio_pwrseq>;
837*8d13bc63SEmmanuel Vadot	non-removable;
838*8d13bc63SEmmanuel Vadot	pinctrl-0 = <&sdmmc1_bus4>, <&sdmmc1_cmd>, <&sdmmc1_clk>;
839*8d13bc63SEmmanuel Vadot	pinctrl-names = "default";
840*8d13bc63SEmmanuel Vadot	vmmc-supply = <&vcc_wifi>;
841*8d13bc63SEmmanuel Vadot	status = "okay";
842*8d13bc63SEmmanuel Vadot};
843*8d13bc63SEmmanuel Vadot
844*8d13bc63SEmmanuel Vadot&sdmmc2 {
845*8d13bc63SEmmanuel Vadot	bus-width = <4>;
846*8d13bc63SEmmanuel Vadot	cap-mmc-highspeed;
847*8d13bc63SEmmanuel Vadot	cap-sd-highspeed;
848*8d13bc63SEmmanuel Vadot	disable-wp;
849*8d13bc63SEmmanuel Vadot	pinctrl-0 = <&sdmmc2m1_bus4>, <&sdmmc2m1_cmd>, <&sdmmc2m1_clk>,
850*8d13bc63SEmmanuel Vadot		    <&sdmmc2m1_det>;
851*8d13bc63SEmmanuel Vadot	pinctrl-names = "default";
852*8d13bc63SEmmanuel Vadot	sd-uhs-sdr104;
853*8d13bc63SEmmanuel Vadot	vqmmc-supply = <&vcc2v8_dvp>;
854*8d13bc63SEmmanuel Vadot	status = "okay";
855*8d13bc63SEmmanuel Vadot};
856*8d13bc63SEmmanuel Vadot
857*8d13bc63SEmmanuel Vadot&tsadc {
858*8d13bc63SEmmanuel Vadot	rockchip,hw-tshut-mode = <1>;
859*8d13bc63SEmmanuel Vadot	rockchip,hw-tshut-polarity = <0>;
860*8d13bc63SEmmanuel Vadot	status = "okay";
861*8d13bc63SEmmanuel Vadot};
862*8d13bc63SEmmanuel Vadot
863*8d13bc63SEmmanuel Vadot&uart1 {
864*8d13bc63SEmmanuel Vadot	pinctrl-0 = <&uart1m0_xfer>, <&uart1m0_ctsn>, <&uart1m0_rtsn>;
865*8d13bc63SEmmanuel Vadot	pinctrl-names = "default";
866*8d13bc63SEmmanuel Vadot	uart-has-rtscts;
867*8d13bc63SEmmanuel Vadot	status = "okay";
868*8d13bc63SEmmanuel Vadot
869*8d13bc63SEmmanuel Vadot	bluetooth {
870*8d13bc63SEmmanuel Vadot		compatible = "realtek,rtl8821cs-bt", "realtek,rtl8723bs-bt";
871*8d13bc63SEmmanuel Vadot		device-wake-gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
872*8d13bc63SEmmanuel Vadot		enable-gpios = <&gpio0 RK_PC1 GPIO_ACTIVE_HIGH>;
873*8d13bc63SEmmanuel Vadot		host-wake-gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
874*8d13bc63SEmmanuel Vadot	};
875*8d13bc63SEmmanuel Vadot};
876*8d13bc63SEmmanuel Vadot
877*8d13bc63SEmmanuel Vadot&uart2 {
878*8d13bc63SEmmanuel Vadot	status = "okay";
879*8d13bc63SEmmanuel Vadot};
880*8d13bc63SEmmanuel Vadot
881*8d13bc63SEmmanuel Vadot&usb_host0_xhci {
882*8d13bc63SEmmanuel Vadot	phys = <&usb2phy0_otg>;
883*8d13bc63SEmmanuel Vadot	phy-names = "usb2-phy";
884*8d13bc63SEmmanuel Vadot	status = "okay";
885*8d13bc63SEmmanuel Vadot};
886*8d13bc63SEmmanuel Vadot
887*8d13bc63SEmmanuel Vadot&usb_host1_xhci {
888*8d13bc63SEmmanuel Vadot	status = "okay";
889*8d13bc63SEmmanuel Vadot};
890*8d13bc63SEmmanuel Vadot
891*8d13bc63SEmmanuel Vadot&usb2phy0 {
892*8d13bc63SEmmanuel Vadot	status = "okay";
893*8d13bc63SEmmanuel Vadot};
894*8d13bc63SEmmanuel Vadot
895*8d13bc63SEmmanuel Vadot&usb2phy0_otg {
896*8d13bc63SEmmanuel Vadot	status = "okay";
897*8d13bc63SEmmanuel Vadot};
898*8d13bc63SEmmanuel Vadot
899*8d13bc63SEmmanuel Vadot&usb2phy0_host {
900*8d13bc63SEmmanuel Vadot	phy-supply = <&vcc5v0_host>;
901*8d13bc63SEmmanuel Vadot	status = "okay";
902*8d13bc63SEmmanuel Vadot};
903*8d13bc63SEmmanuel Vadot
904*8d13bc63SEmmanuel Vadot&vop {
905*8d13bc63SEmmanuel Vadot	assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
906*8d13bc63SEmmanuel Vadot	assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
907*8d13bc63SEmmanuel Vadot	status = "okay";
908*8d13bc63SEmmanuel Vadot};
909*8d13bc63SEmmanuel Vadot
910*8d13bc63SEmmanuel Vadot&vop_mmu {
911*8d13bc63SEmmanuel Vadot	status = "okay";
912*8d13bc63SEmmanuel Vadot};
913*8d13bc63SEmmanuel Vadot
914*8d13bc63SEmmanuel Vadot&vp0 {
915*8d13bc63SEmmanuel Vadot	vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
916*8d13bc63SEmmanuel Vadot		reg = <ROCKCHIP_VOP2_EP_HDMI0>;
917*8d13bc63SEmmanuel Vadot		remote-endpoint = <&hdmi_in_vp0>;
918*8d13bc63SEmmanuel Vadot	};
919*8d13bc63SEmmanuel Vadot};
920*8d13bc63SEmmanuel Vadot
921*8d13bc63SEmmanuel Vadot&vp1 {
922*8d13bc63SEmmanuel Vadot	vp1_out_dsi0: endpoint@ROCKCHIP_VOP2_EP_MIPI0 {
923*8d13bc63SEmmanuel Vadot		reg = <ROCKCHIP_VOP2_EP_MIPI0>;
924*8d13bc63SEmmanuel Vadot		remote-endpoint = <&dsi0_in_vp1>;
925*8d13bc63SEmmanuel Vadot	};
926*8d13bc63SEmmanuel Vadot};
927