xref: /freebsd/sys/contrib/device-tree/src/arm64/rockchip/rk3588-coolpi-cm5-evb.dts (revision 9978553d0199e7ec0bdd1c44fc7f6c7b0c11e43b)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2023 Rockchip Electronics Co., Ltd.
4 *
5 */
6
7/dts-v1/;
8
9#include <dt-bindings/leds/common.h>
10#include <dt-bindings/soc/rockchip,vop2.h>
11#include "rk3588-coolpi-cm5.dtsi"
12
13/ {
14	model = "RK3588 CoolPi CM5 EVB";
15	compatible = "coolpi,pi-cm5-evb", "coolpi,pi-cm5", "rockchip,rk3588";
16
17	backlight: backlight {
18		compatible = "pwm-backlight";
19		enable-gpios = <&gpio4 RK_PA3 GPIO_ACTIVE_HIGH>;
20		pinctrl-names = "default";
21		pinctrl-0 = <&bl_en>;
22		power-supply = <&vcc12v_dcin>;
23		pwms = <&pwm2 0 25000 0>;
24	};
25
26	hdmi0-con {
27		compatible = "hdmi-connector";
28		type = "a";
29
30		port {
31			hdmi0_con_in: endpoint {
32				remote-endpoint = <&hdmi0_out_con>;
33			};
34		};
35	};
36
37	hdmi1-con {
38		compatible = "hdmi-connector";
39		type = "a";
40
41		port {
42			hdmi1_con_in: endpoint {
43				remote-endpoint = <&hdmi1_out_con>;
44			};
45		};
46	};
47
48	leds: leds {
49		compatible = "gpio-leds";
50
51		green_led: led-0 {
52			color = <LED_COLOR_ID_GREEN>;
53			function = LED_FUNCTION_STATUS;
54			gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_HIGH>;
55			linux,default-trigger = "heartbeat";
56		};
57	};
58
59	vcc12v_dcin: regulator-vcc12v-dcin {
60		compatible = "regulator-fixed";
61		regulator-name = "vcc12v_dcin";
62		regulator-always-on;
63		regulator-boot-on;
64		regulator-min-microvolt = <12000000>;
65		regulator-max-microvolt = <12000000>;
66	};
67
68	vcc5v0_sys: regulator-vcc5v0-sys {
69		compatible = "regulator-fixed";
70		regulator-name = "vcc5v0_sys";
71		regulator-always-on;
72		regulator-boot-on;
73		regulator-min-microvolt = <5000000>;
74		regulator-max-microvolt = <5000000>;
75		vin-supply = <&vcc12v_dcin>;
76	};
77
78	vcc3v3_sys: regulator-vcc3v3-sys {
79		compatible = "regulator-fixed";
80		regulator-name = "vcc3v3_sys";
81		regulator-always-on;
82		regulator-boot-on;
83		regulator-min-microvolt = <3300000>;
84		regulator-max-microvolt = <3300000>;
85		vin-supply = <&vcc12v_dcin>;
86	};
87
88	vcc3v3_lcd: regulator-vcc3v3-lcd {
89		compatible = "regulator-fixed";
90		regulator-name = "vcc3v3_lcd";
91		enable-active-high;
92		gpio = <&gpio1 RK_PC4 GPIO_ACTIVE_HIGH>;
93		pinctrl-names = "default";
94		pinctrl-0 = <&lcdpwr_en>;
95		vin-supply = <&vcc3v3_sys>;
96	};
97
98	vcc5v0_usb_host1: vcc5v0_usb_host2: regulator-vcc5v0-usb-host {
99		compatible = "regulator-fixed";
100		regulator-name = "vcc5v0_host";
101		regulator-boot-on;
102		regulator-always-on;
103		enable-active-high;
104		regulator-min-microvolt = <5000000>;
105		regulator-max-microvolt = <5000000>;
106		gpio = <&gpio1 RK_PD5 GPIO_ACTIVE_HIGH>;
107		pinctrl-names = "default";
108		pinctrl-0 = <&usb_host_pwren>;
109		vin-supply = <&vcc5v0_sys>;
110	};
111
112	vcc5v0_usb30_otg: regulator-vcc5v0-usb30-otg {
113		compatible = "regulator-fixed";
114		regulator-name = "vcc5v0_otg";
115		regulator-boot-on;
116		regulator-always-on;
117		enable-active-high;
118		regulator-min-microvolt = <5000000>;
119		regulator-max-microvolt = <5000000>;
120		gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>;
121		pinctrl-names = "default";
122		pinctrl-0 = <&usb_otg_pwren>;
123		vin-supply = <&vcc5v0_sys>;
124	};
125};
126
127&hdmi0 {
128	status = "okay";
129};
130
131&hdmi0_sound {
132	status = "okay";
133};
134
135&hdmi0_in {
136	hdmi0_in_vp0: endpoint {
137		remote-endpoint = <&vp0_out_hdmi0>;
138	};
139};
140
141&hdmi0_out {
142	hdmi0_out_con: endpoint {
143		remote-endpoint = <&hdmi0_con_in>;
144	};
145};
146
147&hdmi1 {
148	pinctrl-names = "default";
149	pinctrl-0 = <&hdmim2_tx1_cec &hdmim0_tx1_hpd &hdmim1_tx1_scl &hdmim1_tx1_sda>;
150	status = "okay";
151};
152
153&hdmi1_in {
154	hdmi1_in_vp1: endpoint {
155		remote-endpoint = <&vp1_out_hdmi1>;
156	};
157};
158
159&hdmi1_out {
160	hdmi1_out_con: endpoint {
161		remote-endpoint = <&hdmi1_con_in>;
162	};
163};
164
165&hdmi1_sound {
166	status = "okay";
167};
168
169&hdptxphy0 {
170	status = "okay";
171};
172
173&hdptxphy1 {
174	status = "okay";
175};
176
177&i2s5_8ch {
178	status = "okay";
179};
180
181&i2s6_8ch {
182	status = "okay";
183};
184
185/* M.2 E-Key */
186&pcie2x1l1 {
187	reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>;
188	vpcie3v3-supply = <&vcc3v3_sys>;
189	pinctrl-names = "default";
190	pinctrl-0 = <&pcie_clkreq &pcie_wake &pcie_rst &wifi_pwron &bt_pwron>;
191	status = "okay";
192};
193
194&pcie30phy {
195	status = "okay";
196};
197
198/* Standard pcie */
199&pcie3x2 {
200	reset-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_HIGH>;
201	vpcie3v3-supply = <&vcc3v3_sys>;
202	status = "okay";
203};
204
205/* M.2 M-Key ssd */
206&pcie3x4 {
207	num-lanes = <2>;
208	reset-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
209	vpcie3v3-supply = <&vcc3v3_sys>;
210	status = "okay";
211};
212
213&pinctrl {
214	lcd {
215		lcdpwr_en: lcdpwr-en {
216			rockchip,pins = <1 RK_PC4 RK_FUNC_GPIO &pcfg_pull_down>;
217		};
218
219		bl_en: bl-en {
220			rockchip,pins = <4 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
221		};
222	};
223
224	usb {
225		usb_host_pwren: usb-host-pwren {
226			rockchip,pins = <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>;
227		};
228
229		usb_otg_pwren: usb-otg-pwren {
230			rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
231		};
232	};
233
234	wifi {
235		bt_pwron: bt-pwron {
236			rockchip,pins = <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
237		};
238
239		pcie_clkreq: pcie-clkreq {
240			rockchip,pins = <4 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
241		};
242
243		pcie_rst: pcie-rst {
244			rockchip,pins = <4 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
245		};
246
247		wifi_pwron: wifi-pwron {
248			rockchip,pins = <3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>;
249		};
250
251		pcie_wake: pcie-wake {
252			rockchip,pins = <4 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
253		};
254	};
255};
256
257&pwm2 {
258	status = "okay";
259};
260
261&sata1 {
262	status = "okay";
263};
264
265&u2phy2 {
266	status = "okay";
267};
268
269&u2phy3 {
270	status = "okay";
271};
272
273&u2phy2_host {
274	phy-supply = <&vcc5v0_usb_host1>;
275	status = "okay";
276};
277
278&u2phy3_host {
279	phy-supply = <&vcc5v0_usb_host2>;
280	status = "okay";
281};
282
283&usb_host0_ehci {
284	status = "okay";
285};
286
287&usb_host0_ohci {
288	status = "okay";
289};
290
291&usb_host1_ehci {
292	status = "okay";
293};
294
295&usb_host1_ohci {
296	status = "okay";
297};
298
299&vop {
300	status = "okay";
301};
302
303&vop_mmu {
304	status = "okay";
305};
306
307&vp0 {
308	vp0_out_hdmi0: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
309		reg = <ROCKCHIP_VOP2_EP_HDMI0>;
310		remote-endpoint = <&hdmi0_in_vp0>;
311	};
312};
313
314&vp1 {
315	vp1_out_hdmi1: endpoint@ROCKCHIP_VOP2_EP_HDMI1 {
316		reg = <ROCKCHIP_VOP2_EP_HDMI1>;
317		remote-endpoint = <&hdmi1_in_vp1>;
318	};
319};
320