Debian Codegraph @

scripts/dtc/include-prefixes/arm64/rockchip/rk3588-orangepi-5-plus.dts

raw
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 /*
3 * Copyright (c) 2023 OndÅ™ej Jirman <[email protected]>
4 */
5
6 /dts-v1/;
7
8 #include <dt-bindings/gpio/gpio.h>
9 #include <dt-bindings/pinctrl/rockchip.h>
10 #include <dt-bindings/soc/rockchip,vop2.h>
11 #include <dt-bindings/usb/pd.h>
12 #include "rk3588-orangepi-5.dtsi"
13
14 / {
15 model = "Xunlong Orange Pi 5 Plus";
16 compatible = "xunlong,orangepi-5-plus", "rockchip,rk3588";
17
18 hdmi0-con {
19 compatible = "hdmi-connector";
20 type = "a";
21
22 port {
23 hdmi0_con_in: endpoint {
24 remote-endpoint = <&hdmi0_out_con>;
25 };
26 };
27 };
28
29 hdmi1-con {
30 compatible = "hdmi-connector";
31 type = "a";
32
33 port {
34 hdmi1_con_in: endpoint {
35 remote-endpoint = <&hdmi1_out_con>;
36 };
37 };
38 };
39
40 ir-receiver {
41 compatible = "gpio-ir-receiver";
42 gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_LOW>;
43 pinctrl-names = "default";
44 pinctrl-0 = <&ir_receiver_pin>;
45 };
46
47 rfkill {
48 compatible = "rfkill-gpio";
49 label = "rfkill-pcie-wlan";
50 radio-type = "wlan";
51 shutdown-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>;
52 };
53
54 vbus5v0_typec: regulator-vbus-typec {
55 compatible = "regulator-fixed";
56 enable-active-high;
57 gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>;
58 pinctrl-names = "default";
59 pinctrl-0 = <&typec5v_pwren>;
60 regulator-name = "vbus5v0_typec";
61 regulator-min-microvolt = <5000000>;
62 regulator-max-microvolt = <5000000>;
63 vin-supply = <&vcc5v0_sys>;
64 };
65 };
66
67 &speaker_amp {
68 enable-gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_HIGH>;
69 status = "okay";
70 };
71
72 &headphone_amp {
73 enable-gpios = <&gpio3 RK_PA7 GPIO_ACTIVE_HIGH>;
74 };
75
76 &analog_sound {
77 pinctrl-names = "default";
78 pinctrl-0 = <&hp_detect>;
79 simple-audio-card,aux-devs = <&speaker_amp>, <&headphone_amp>;
80 simple-audio-card,hp-det-gpios = <&gpio1 RK_PD3 GPIO_ACTIVE_HIGH>;
81 simple-audio-card,widgets =
82 "Microphone", "Onboard Microphone",
83 "Microphone", "Microphone Jack",
84 "Speaker", "Speaker",
85 "Headphone", "Headphones";
86
87 simple-audio-card,routing =
88 "Headphones", "LOUT1",
89 "Headphones", "ROUT1",
90 "Speaker", "LOUT2",
91 "Speaker", "ROUT2",
92
93 "Headphones", "Headphones Amp OUTL",
94 "Headphones", "Headphones Amp OUTR",
95 "Headphones Amp INL", "LOUT1",
96 "Headphones Amp INR", "ROUT1",
97
98 "Speaker", "Speaker Amp OUTL",
99 "Speaker", "Speaker Amp OUTR",
100 "Speaker Amp INL", "LOUT2",
101 "Speaker Amp INR", "ROUT2",
102
103 /* single ended signal to LINPUT1 */
104 "LINPUT1", "Microphone Jack",
105 "RINPUT1", "Microphone Jack",
106 /* differential signal */
107 "LINPUT2", "Onboard Microphone",
108 "RINPUT2", "Onboard Microphone";
109 };
110
111 &combphy0_ps {
112 status = "okay";
113 };
114
115 &combphy1_ps {
116 status = "okay";
117 };
118
119 &fan {
120 pwms = <&pwm3 0 50000 0>;
121 };
122
123 &hdmi0 {
124 status = "okay";
125 };
126
127 &hdmi0_sound {
128 status = "okay";
129 };
130
131 &hdmi0_in {
132 hdmi0_in_vp0: endpoint {
133 remote-endpoint = <&vp0_out_hdmi0>;
134 };
135 };
136
137 &hdmi0_out {
138 hdmi0_out_con: endpoint {
139 remote-endpoint = <&hdmi0_con_in>;
140 };
141 };
142
143 &hdmi1 {
144 status = "okay";
145 };
146
147 &hdmi1_in {
148 hdmi1_in_vp1: endpoint {
149 remote-endpoint = <&vp1_out_hdmi1>;
150 };
151 };
152
153 &hdmi1_out {
154 hdmi1_out_con: endpoint {
155 remote-endpoint = <&hdmi1_con_in>;
156 };
157 };
158
159 &hdmi1_sound {
160 status = "okay";
161 };
162
163 &hdmi_receiver_cma {
164 status = "okay";
165 };
166
167 &hdmi_receiver {
168 hpd-gpios = <&gpio1 RK_PC6 GPIO_ACTIVE_LOW>;
169 pinctrl-0 = <&hdmim1_rx_cec &hdmim1_rx_hpdin &hdmim1_rx_scl &hdmim1_rx_sda &hdmirx_hpd>;
170 pinctrl-names = "default";
171 status = "okay";
172 };
173
174 &hdptxphy0 {
175 status = "okay";
176 };
177
178 &hdptxphy1 {
179 status = "okay";
180 };
181
182 &hym8563 {
183 interrupt-parent = <&gpio0>;
184 interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>;
185 pinctrl-names = "default";
186 pinctrl-0 = <&hym8563_int>;
187 };
188
189 &i2c6 {
190 usbc0: usb-typec@22 {
191 compatible = "fcs,fusb302";
192 reg = <0x22>;
193 interrupt-parent = <&gpio0>;
194 interrupts = <RK_PD3 IRQ_TYPE_LEVEL_LOW>;
195 pinctrl-names = "default";
196 pinctrl-0 = <&usbc0_int>;
197 vbus-supply = <&vbus5v0_typec>;
198 status = "okay";
199
200 usb_con: connector {
201 compatible = "usb-c-connector";
202 data-role = "dual";
203 label = "USB-C";
204 power-role = "dual";
205 op-sink-microwatt = <10>;
206 source-pdos = <PDO_FIXED(5000, 1400, PDO_FIXED_USB_COMM)>;
207 sink-pdos = <PDO_FIXED(5000, 10, PDO_FIXED_USB_COMM)>;
208 try-power-role = "source";
209
210 ports {
211 #address-cells = <1>;
212 #size-cells = <0>;
213
214 port@0 {
215 reg = <0>;
216
217 usbc0_hs: endpoint {
218 remote-endpoint = <&usb_host0_xhci_drd_sw>;
219 };
220 };
221
222 port@1 {
223 reg = <1>;
224
225 usbc0_ss: endpoint {
226 remote-endpoint = <&usbdp_phy0_typec_ss>;
227 };
228 };
229
230 port@2 {
231 reg = <2>;
232
233 usbc0_sbu: endpoint {
234 remote-endpoint = <&usbdp_phy0_typec_sbu>;
235 };
236 };
237 };
238 };
239 };
240 };
241
242 &i2s5_8ch {
243 status = "okay";
244 };
245
246 &i2s6_8ch {
247 status = "okay";
248 };
249
250 &led_blue_gpio {
251 gpios = <&gpio3 RK_PA6 GPIO_ACTIVE_HIGH>;
252 status = "okay";
253 };
254
255 &led_green_pwm {
256 pwms = <&pwm2 0 25000 0>;
257 };
258
259 /* phy1 - M.KEY socket */
260 &pcie2x1l0 {
261 reset-gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>;
262 vpcie3v3-supply = <&vcc3v3_wf>;
263 status = "okay";
264 };
265
266 /* phy2 - right ethernet port */
267 &pcie2x1l1 {
268 reset-gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_HIGH>;
269 vpcie3v3-supply = <&vcc3v3_pcie_eth>;
270 status = "okay";
271 };
272
273 /* phy0 - left ethernet port */
274 &pcie2x1l2 {
275 reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>;
276 vpcie3v3-supply = <&vcc3v3_pcie_eth>;
277 status = "okay";
278 };
279
280 &pinctrl {
281 hym8563 {
282 hym8563_int: hym8563-int {
283 rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
284 };
285 };
286
287 leds {
288 blue_led_pin: blue-led {
289 rockchip,pins = <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
290 };
291 };
292
293 hdmirx {
294 hdmirx_hpd: hdmirx-5v-detection {
295 rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
296 };
297 };
298
299 ir-receiver {
300 ir_receiver_pin: ir-receiver-pin {
301 rockchip,pins = <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
302 };
303 };
304
305 sound {
306 hp_detect: hp-detect {
307 rockchip,pins = <1 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
308 };
309 };
310
311 usb {
312 vcc5v0_usb20_en: vcc5v0-usb20-en {
313 rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
314 };
315 };
316
317 usb-typec {
318 usbc0_int: usbc0-int {
319 rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>;
320 };
321
322 typec5v_pwren: typec5v-pwren {
323 rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
324 };
325 };
326 };
327
328 &pwm2 {
329 pinctrl-0 = <&pwm2m1_pins>;
330 pinctrl-names = "default";
331 status = "okay";
332 };
333
334 &pwm3 {
335 pinctrl-0 = <&pwm3m1_pins>;
336 status = "okay";
337 };
338
339 &recovery_button {
340 status = "okay";
341 };
342
343 &sfc {
344 pinctrl-names = "default";
345 pinctrl-0 = <&fspim1_pins>;
346 };
347
348 &u2phy1_otg {
349 phy-supply = <&vcc5v0_sys>;
350 };
351
352 &uart9 {
353 pinctrl-0 = <&uart9m0_xfer>;
354 status = "okay";
355 };
356
357 &usbdp_phy0 {
358 mode-switch;
359 orientation-switch;
360 sbu1-dc-gpios = <&gpio4 RK_PA6 GPIO_ACTIVE_HIGH>;
361 sbu2-dc-gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
362
363 port {
364 #address-cells = <1>;
365 #size-cells = <0>;
366
367 usbdp_phy0_typec_ss: endpoint@0 {
368 reg = <0>;
369 remote-endpoint = <&usbc0_ss>;
370 };
371
372 usbdp_phy0_typec_sbu: endpoint@1 {
373 reg = <1>;
374 remote-endpoint = <&usbc0_sbu>;
375 };
376 };
377 };
378
379 &usb_host0_xhci {
380 usb-role-switch;
381
382 port {
383 usb_host0_xhci_drd_sw: endpoint {
384 remote-endpoint = <&usbc0_hs>;
385 };
386 };
387 };
388
389 &vcc3v3_pcie_eth {
390 gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>;
391 };
392
393 &vcc3v3_wf {
394 status = "okay";
395 };
396
397 &vcc5v0_usb20 {
398 gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_HIGH>;
399 pinctrl-names = "default";
400 pinctrl-0 = <&vcc5v0_usb20_en>;
401 };
402
403 &vp0 {
404 vp0_out_hdmi0: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
405 reg = <ROCKCHIP_VOP2_EP_HDMI0>;
406 remote-endpoint = <&hdmi0_in_vp0>;
407 };
408 };
409
410 &vp1 {
411 vp1_out_hdmi1: endpoint@ROCKCHIP_VOP2_EP_HDMI1 {
412 reg = <ROCKCHIP_VOP2_EP_HDMI1>;
413 remote-endpoint = <&hdmi1_in_vp1>;
414 };
415 };