xref: /OK3568_Linux_fs/kernel/arch/arm64/boot/dts/rockchip/rk3588s-evb3-lp4x.dtsi (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2021 Rockchip Electronics Co., Ltd.
4 *
5 */
6
7#include "dt-bindings/usb/pd.h"
8#include "rk3588s.dtsi"
9#include "rk3588s-evb.dtsi"
10#include "rk3588s-rk806-dual.dtsi"
11
12/ {
13	combophy_avdd0v85: combophy-avdd0v85 {
14		compatible = "regulator-fixed";
15		regulator-name = "combophy_avdd0v85";
16		regulator-boot-on;
17		regulator-always-on;
18		regulator-min-microvolt = <850000>;
19		regulator-max-microvolt = <850000>;
20		vin-supply = <&vdd_0v85_s0>;
21	};
22
23	combophy_avdd1v8: combophy-avdd1v8 {
24		compatible = "regulator-fixed";
25		regulator-name = "combophy_avdd1v8";
26		regulator-boot-on;
27		regulator-always-on;
28		regulator-min-microvolt = <1800000>;
29		regulator-max-microvolt = <1800000>;
30		vin-supply = <&avcc_1v8_s0>;
31	};
32
33	fan: pwm-fan {
34		compatible = "pwm-fan";
35		#cooling-cells = <2>;
36		pwms = <&pwm7 0 50000 0>;
37		cooling-levels = <0 50 100 150 200 255>;
38		rockchip,temp-trips = <
39			50000	1
40			55000	2
41			60000	3
42			65000	4
43			70000	5
44		>;
45	};
46
47	vcc3v3_lcd_n: vcc3v3-lcd0-n {
48		compatible = "regulator-fixed";
49		regulator-name = "vcc3v3_lcd0_n";
50		regulator-boot-on;
51		enable-active-high;
52		gpio = <&gpio1 RK_PA6 GPIO_ACTIVE_HIGH>;
53		vin-supply = <&vcc_1v8_s0>;
54	};
55
56	vcc3v3_pcie20: vcc3v3-pcie20 {
57		compatible = "regulator-fixed";
58		regulator-name = "vcc3v3_pcie20";
59		regulator-min-microvolt = <3300000>;
60		regulator-max-microvolt = <3300000>;
61		enable-active-high;
62		gpios = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>;
63		startup-delay-us = <5000>;
64		vin-supply = <&vcc12v_dcin>;
65	};
66
67	vbus5v0_typec: vbus5v0-typec {
68		compatible = "regulator-fixed";
69		regulator-name = "vbus5v0_typec";
70		regulator-min-microvolt = <5000000>;
71		regulator-max-microvolt = <5000000>;
72		enable-active-high;
73		gpio = <&gpio1 RK_PB3 GPIO_ACTIVE_HIGH>;
74		vin-supply = <&vcc5v0_usb>;
75		pinctrl-names = "default";
76		pinctrl-0 = <&typec5v_pwren>;
77	};
78};
79
80&combphy0_ps {
81	status = "okay";
82};
83
84&dp0 {
85	status = "okay";
86};
87
88&dp0_in_vp2 {
89	status = "okay";
90};
91
92/*
93 * mipi_dcphy0 needs to be enabled
94 * when dsi0 is enabled
95 */
96&dsi0 {
97	status = "disabled";
98};
99
100&dsi0_in_vp2 {
101	status = "disabled";
102};
103
104&dsi0_in_vp3 {
105	status = "okay";
106};
107
108/*
109 * mipi_dcphy1 needs to be enabled
110 * when dsi1 is enabled
111 */
112&dsi1 {
113	status = "disabled";
114};
115
116&dsi1_in_vp2 {
117	status = "disabled";
118};
119
120&dsi1_in_vp3 {
121	status = "disabled";
122};
123
124&i2c2 {
125	status = "okay";
126
127	hym8563: hym8563@51 {
128		compatible = "haoyu,hym8563";
129		reg = <0x51>;
130		#clock-cells = <0>;
131		clock-frequency = <32768>;
132		clock-output-names = "hym8563";
133		pinctrl-names = "default";
134		pinctrl-0 = <&hym8563_int>;
135		interrupt-parent = <&gpio0>;
136		interrupts = <RK_PD4 IRQ_TYPE_LEVEL_LOW>;
137		wakeup-source;
138	};
139};
140
141&i2c4 {
142	status = "okay";
143	pinctrl-names = "default";
144	pinctrl-0 = <&i2c4m3_xfer>;
145
146	gt1x: gt1x@14 {
147		compatible = "goodix,gt1x";
148		reg = <0x14>;
149		pinctrl-names = "default";
150		pinctrl-0 = <&touch_gpio>;
151		goodix,rst-gpio = <&gpio1 RK_PB4 GPIO_ACTIVE_HIGH>;
152		goodix,irq-gpio = <&gpio1 RK_PB5 IRQ_TYPE_LEVEL_LOW>;
153		power-supply = <&vcc3v3_lcd_n>;
154	};
155};
156
157&i2c8 {
158	status = "okay";
159	pinctrl-names = "default";
160	pinctrl-0 = <&i2c8m2_xfer>;
161
162	usbc0: fusb302@22 {
163		compatible = "fcs,fusb302";
164		reg = <0x22>;
165		interrupt-parent = <&gpio0>;
166		interrupts = <RK_PD3 IRQ_TYPE_LEVEL_LOW>;
167		pinctrl-names = "default";
168		pinctrl-0 = <&usbc0_int>;
169		vbus-supply = <&vbus5v0_typec>;
170		status = "okay";
171
172		ports {
173			#address-cells = <1>;
174			#size-cells = <0>;
175
176			port@0 {
177				reg = <0>;
178				usbc0_role_sw: endpoint@0 {
179					remote-endpoint = <&dwc3_0_role_switch>;
180				};
181			};
182		};
183
184		usb_con: connector {
185			compatible = "usb-c-connector";
186			label = "USB-C";
187			data-role = "dual";
188			power-role = "dual";
189			try-power-role = "sink";
190			op-sink-microwatt = <1000000>;
191			sink-pdos =
192				<PDO_FIXED(5000, 1000, PDO_FIXED_USB_COMM)>;
193			source-pdos =
194				<PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
195
196			altmodes {
197				#address-cells = <1>;
198				#size-cells = <0>;
199
200				altmode@0 {
201					reg = <0>;
202					svid = <0xff01>;
203					vdo = <0xffffffff>;
204				};
205			};
206
207			ports {
208				#address-cells = <1>;
209				#size-cells = <0>;
210
211				port@0 {
212					reg = <0>;
213					usbc0_orien_sw: endpoint {
214						remote-endpoint = <&usbdp_phy0_orientation_switch>;
215					};
216				};
217
218				port@1 {
219					reg = <1>;
220					dp_altmode_mux: endpoint {
221						remote-endpoint = <&usbdp_phy0_dp_altmode_mux>;
222					};
223				};
224			};
225		};
226	};
227};
228
229&mipi_dcphy0 {
230	status = "disabled";
231};
232
233&mipi_dcphy1 {
234	status = "disabled";
235};
236
237&pcie2x1l2 {
238	reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>;
239	vpcie3v3-supply = <&vcc3v3_pcie20>;
240	status = "okay";
241};
242
243&pinctrl {
244	hym8563 {
245		hym8563_int: hym8563-int {
246			rockchip,pins = <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_up>;
247		};
248	};
249
250	touch {
251		touch_gpio: touch-gpio {
252			rockchip,pins =
253				<1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>,
254				<1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>;
255		};
256	};
257
258	usb-typec {
259		usbc0_int: usbc0-int {
260			rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>;
261		};
262
263		typec5v_pwren: typec5v-pwren {
264			rockchip,pins = <1 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
265		};
266	};
267};
268
269&pwm11 {
270	status = "okay";
271};
272
273&route_dsi0 {
274	status = "okay";
275	connect = <&vp3_out_dsi0>;
276};
277
278&route_dsi1 {
279	status = "disabled";
280	connect = <&vp3_out_dsi1>;
281};
282
283&sdmmc {
284	status = "okay";
285	vmmc-supply = <&vcc_3v3_sd_s0>;
286};
287
288&sata2 {
289	status = "okay";
290};
291
292&u2phy0_otg {
293	rockchip,typec-vbus-det;
294};
295
296&u2phy2 {
297	status = "disabled";
298};
299
300&u2phy3 {
301	status = "disabled";
302};
303
304&u2phy2_host {
305	status = "disabled";
306};
307
308&u2phy3_host {
309	status = "disabled";
310};
311
312&usb_host0_ehci {
313	status = "disabled";
314};
315
316&usb_host0_ohci {
317	status = "disabled";
318};
319
320&usb_host1_ehci {
321	status = "disabled";
322};
323
324&usb_host1_ohci {
325	status = "disabled";
326};
327
328&usbdp_phy0 {
329	orientation-switch;
330	svid = <0xff01>;
331	sbu1-dc-gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_HIGH>;
332	sbu2-dc-gpios = <&gpio1 RK_PB7 GPIO_ACTIVE_HIGH>;
333
334	port {
335		#address-cells = <1>;
336		#size-cells = <0>;
337		usbdp_phy0_orientation_switch: endpoint@0 {
338			reg = <0>;
339			remote-endpoint = <&usbc0_orien_sw>;
340		};
341
342		usbdp_phy0_dp_altmode_mux: endpoint@1 {
343			reg = <1>;
344			remote-endpoint = <&dp_altmode_mux>;
345		};
346	};
347};
348
349&usbdrd_dwc3_0 {
350	usb-role-switch;
351	port {
352		#address-cells = <1>;
353		#size-cells = <0>;
354		dwc3_0_role_switch: endpoint@0 {
355			reg = <0>;
356			remote-endpoint = <&usbc0_role_sw>;
357		};
358	};
359};
360
361&usbhost3_0 {
362	status = "disabled";
363};
364
365&usbhost_dwc3_0 {
366	status = "disabled";
367};
368