Debian Codegraph @

scripts/dtc/include-prefixes/arm64/rockchip/rk3588-tiger-haikou.dts

raw
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 /*
3 * Copyright (c) 2023 Theobroma Systems Design und Consulting GmbH
4 */
5
6 /dts-v1/;
7 #include <dt-bindings/input/input.h>
8 #include <dt-bindings/soc/rockchip,vop2.h>
9 #include "rk3588-tiger.dtsi"
10
11 / {
12 model = "Theobroma Systems RK3588-Q7 SoM on Haikou devkit";
13 compatible = "tsd,rk3588-tiger-haikou", "tsd,rk3588-tiger", "rockchip,rk3588";
14
15 aliases {
16 ethernet0 = &gmac0;
17 mmc1 = &sdmmc;
18 };
19
20 chosen {
21 stdout-path = "serial2:115200n8";
22 };
23
24 dc_12v: regulator-dc-12v {
25 compatible = "regulator-fixed";
26 regulator-name = "dc_12v";
27 regulator-always-on;
28 regulator-boot-on;
29 regulator-min-microvolt = <12000000>;
30 regulator-max-microvolt = <12000000>;
31 };
32
33 gpio-keys {
34 compatible = "gpio-keys";
35 pinctrl-names = "default";
36 pinctrl-0 = <&haikou_keys_pin>;
37
38 button-batlow-n {
39 label = "BATLOW#";
40 linux,code = <KEY_BATTERY>;
41 gpios = <&gpio3 RK_PB5 GPIO_ACTIVE_LOW>;
42 };
43
44 button-slp-btn-n {
45 label = "SLP_BTN#";
46 linux,code = <KEY_SLEEP>;
47 gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_LOW>;
48 };
49
50 button-wake-n {
51 label = "WAKE#";
52 linux,code = <KEY_WAKEUP>;
53 gpios = <&gpio3 RK_PC6 GPIO_ACTIVE_LOW>;
54 wakeup-source;
55 };
56
57 switch-lid-btn-n {
58 label = "LID_BTN#";
59 linux,code = <SW_LID>;
60 linux,input-type = <EV_SW>;
61 gpios = <&gpio3 RK_PD5 GPIO_ACTIVE_LOW>;
62 };
63 };
64
65 hdmi-con {
66 compatible = "hdmi-connector";
67 type = "a";
68
69 port {
70 hdmi_con_in: endpoint {
71 remote-endpoint = <&hdmi0_out_con>;
72 };
73 };
74 };
75
76 i2s3-sound {
77 compatible = "simple-audio-card";
78 simple-audio-card,format = "i2s";
79 simple-audio-card,name = "Haikou,I2S-codec";
80 simple-audio-card,mclk-fs = <512>;
81 simple-audio-card,frame-master = <&sgtl5000_codec>;
82 simple-audio-card,bitclock-master = <&sgtl5000_codec>;
83
84 sgtl5000_codec: simple-audio-card,codec {
85 sound-dai = <&sgtl5000>;
86 };
87
88 simple-audio-card,cpu {
89 sound-dai = <&i2s3_2ch>;
90 };
91 };
92
93 sgtl5000_clk: sgtl5000-oscillator {
94 compatible = "fixed-clock";
95 #clock-cells = <0>;
96 clock-frequency = <24576000>;
97 };
98
99 vcc3v3_baseboard: regulator-vcc3v3-baseboard {
100 compatible = "regulator-fixed";
101 regulator-name = "vcc3v3_baseboard";
102 regulator-always-on;
103 regulator-boot-on;
104 regulator-min-microvolt = <3300000>;
105 regulator-max-microvolt = <3300000>;
106 vin-supply = <&dc_12v>;
107 };
108
109 vcc3v3_low_noise: regulator-vcc3v3-low-noise {
110 compatible = "regulator-fixed";
111 regulator-name = "vcc3v3_low_noise";
112 regulator-boot-on;
113 regulator-min-microvolt = <3300000>;
114 regulator-max-microvolt = <3300000>;
115 vin-supply = <&vcc5v0_usb>;
116 };
117
118 vcc5v0_baseboard: regulator-vcc5v0-baseboard {
119 compatible = "regulator-fixed";
120 regulator-name = "vcc5v0_baseboard";
121 regulator-always-on;
122 regulator-boot-on;
123 regulator-min-microvolt = <5000000>;
124 regulator-max-microvolt = <5000000>;
125 vin-supply = <&dc_12v>;
126 };
127
128 vcc5v0_otg: regulator-vcc5v0-otg {
129 compatible = "regulator-fixed";
130 enable-active-high;
131 gpio = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>;
132 pinctrl-names = "default";
133 pinctrl-0 = <&otg_vbus_drv>;
134 regulator-name = "vcc5v0_otg";
135 regulator-always-on;
136 };
137
138 vcc5v0_usb: regulator-vcc5v0-usb {
139 compatible = "regulator-fixed";
140 regulator-name = "vcc5v0_usb";
141 regulator-always-on;
142 regulator-boot-on;
143 regulator-min-microvolt = <5000000>;
144 regulator-max-microvolt = <5000000>;
145 vin-supply = <&dc_12v>;
146 };
147
148 vddd_audio_1v6: regulator-vddd-audio-1v6 {
149 compatible = "regulator-fixed";
150 regulator-name = "vddd_audio_1v6";
151 regulator-boot-on;
152 regulator-min-microvolt = <1600000>;
153 regulator-max-microvolt = <1600000>;
154 vin-supply = <&vcc5v0_usb>;
155 };
156 };
157
158 &combphy2_psu {
159 status = "okay";
160 };
161
162 &extcon_usb3 {
163 status = "okay";
164 };
165
166 &gmac0 {
167 status = "okay";
168 };
169
170 &hdmi0 {
171 /*
172 * While HDMI-CEC is present on the Q7 connector, it is not
173 * connected on Haikou itself.
174 */
175 pinctrl-names = "default";
176 pinctrl-0 = <&hdmim0_tx0_hpd &hdmim1_tx0_scl &hdmim1_tx0_sda>;
177 status = "okay";
178 };
179
180 &hdmi0_in {
181 hdmi0_in_vp0: endpoint {
182 remote-endpoint = <&vp0_out_hdmi0>;
183 };
184 };
185
186 &hdmi0_out {
187 hdmi0_out_con: endpoint {
188 remote-endpoint = <&hdmi_con_in>;
189 };
190 };
191
192 &hdmi0_sound {
193 status = "okay";
194 };
195
196 &hdptxphy0 {
197 status = "okay";
198 };
199
200 &i2c1 {
201 status = "okay";
202
203 eeprom@50 {
204 reg = <0x50>;
205 compatible = "atmel,24c01";
206 pagesize = <8>;
207 size = <128>;
208 vcc-supply = <&vcc3v3_baseboard>;
209 };
210 };
211
212 &i2c5 {
213 clock-frequency = <400000>;
214 status = "okay";
215
216 sgtl5000: codec@a {
217 compatible = "fsl,sgtl5000";
218 reg = <0x0a>;
219 clocks = <&sgtl5000_clk>;
220 #sound-dai-cells = <0>;
221 VDDA-supply = <&vcc3v3_low_noise>;
222 VDDIO-supply = <&vcc3v3_baseboard>;
223 VDDD-supply = <&vddd_audio_1v6>;
224 };
225 };
226
227 &i2c8 {
228 status = "okay";
229 };
230
231 &i2s3_2ch {
232 status = "okay";
233 };
234
235 &i2s5_8ch {
236 status = "okay";
237 };
238
239 &pcie30phy {
240 status = "okay";
241 };
242
243 &pcie3x4 {
244 vpcie3v3-supply = <&vcc3v3_baseboard>;
245 status = "okay";
246 };
247
248 &pinctrl {
249 haikou {
250 haikou_keys_pin: haikou-keys-pin {
251 rockchip,pins =
252 /* BATLOW# */
253 <3 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>,
254 /* SLP_BTN# */
255 <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_up>,
256 /* WAKE# */
257 <3 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>,
258 /* LID_BTN */
259 <3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>;
260 };
261 };
262
263 usb2 {
264 otg_vbus_drv: otg-vbus-drv {
265 rockchip,pins =
266 <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
267 };
268 };
269 };
270
271 &sdmmc {
272 /* while the same pin, sdmmc_det does not detect card changes */
273 cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
274 disable-wp;
275 pinctrl-0 = <&sdmmc_bus4 &sdmmc_cmd &sdmmc_clk>;
276 sd-uhs-sdr12;
277 sd-uhs-sdr25;
278 sd-uhs-sdr50;
279 sd-uhs-sdr104;
280 vmmc-supply = <&vcc3v3_baseboard>;
281 status = "okay";
282 };
283
284 &u2phy0 {
285 status = "okay";
286 };
287
288 &u2phy0_otg {
289 phy-supply = <&vcc5v0_otg>;
290 status = "okay";
291 };
292
293 &u2phy1 {
294 status = "okay";
295 };
296
297 &u2phy1_otg {
298 status = "okay";
299 };
300
301 &u2phy2 {
302 status = "okay";
303 };
304
305 &u2phy2_host {
306 status = "okay";
307 };
308
309 &u2phy3 {
310 status = "okay";
311 };
312
313 &u2phy3_host {
314 status = "okay";
315 };
316
317 &uart2 {
318 status = "okay";
319 };
320
321 /* DB9 RS232/RS485 when SW2 in "UART1" mode */
322 &uart5 {
323 rts-gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_HIGH>;
324 status = "okay";
325 };
326
327 &usbdp_phy0 {
328 status = "okay";
329 };
330
331 &usbdp_phy1 {
332 status = "okay";
333 };
334
335 /* host0 on Q7_USB_P2, upper usb3 port */
336 &usb_host0_ehci {
337 status = "okay";
338 };
339
340 /* host0 on Q7_USB_P2, upper usb3 port */
341 &usb_host0_ohci {
342 status = "okay";
343 };
344
345 /* host0_xhci on Q7_USB_P1, usb3-otg port */
346 &usb_host0_xhci {
347 dr_mode = "otg";
348 extcon = <&extcon_usb3>;
349 status = "okay";
350 };
351
352 /* host1 on Q7_USB_P3, usb2 port */
353 &usb_host1_ehci {
354 status = "okay";
355 };
356
357 /* host1 on Q7_USB_P3, usb2 port */
358 &usb_host1_ohci {
359 status = "okay";
360 };
361
362 /* host1_xhci on Q7_USB_P0, lower usb3 port */
363 &usb_host1_xhci {
364 dr_mode = "host";
365 status = "okay";
366 };
367
368 /* host2 on Q7_USB_P2, upper usb3 port */
369 &usb_host2_xhci {
370 status = "okay";
371 };
372
373 &vop {
374 status = "okay";
375 };
376
377 &vop_mmu {
378 status = "okay";
379 };
380
381 &vp0 {
382 vp0_out_hdmi0: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
383 reg = <ROCKCHIP_VOP2_EP_HDMI0>;
384 remote-endpoint = <&hdmi0_in_vp0>;
385 };
386 };