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: dc-12v-regulator { 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: vcc3v3-baseboard-regulator { 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: vcc3v3-low-noise-regulator { 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: vcc5v0-baseboard-regulator { 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: vcc5v0-otg-regulator { 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: vcc5v0-usb-regulator { 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: vddd-audio-1v6-regulator { 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&hdptxphy_hdmi0 { 193 status = "okay"; 194}; 195 196&i2c1 { 197 status = "okay"; 198 199 eeprom@50 { 200 reg = <0x50>; 201 compatible = "atmel,24c01"; 202 pagesize = <8>; 203 size = <128>; 204 vcc-supply = <&vcc3v3_baseboard>; 205 }; 206}; 207 208&i2c5 { 209 clock-frequency = <400000>; 210 status = "okay"; 211 212 sgtl5000: codec@a { 213 compatible = "fsl,sgtl5000"; 214 reg = <0x0a>; 215 clocks = <&sgtl5000_clk>; 216 #sound-dai-cells = <0>; 217 VDDA-supply = <&vcc3v3_low_noise>; 218 VDDIO-supply = <&vcc3v3_baseboard>; 219 VDDD-supply = <&vddd_audio_1v6>; 220 }; 221}; 222 223&i2c8 { 224 status = "okay"; 225}; 226 227&i2s3_2ch { 228 status = "okay"; 229}; 230 231&pcie30phy { 232 status = "okay"; 233}; 234 235&pcie3x4 { 236 vpcie3v3-supply = <&vcc3v3_baseboard>; 237 status = "okay"; 238}; 239 240&pinctrl { 241 haikou { 242 haikou_keys_pin: haikou-keys-pin { 243 rockchip,pins = 244 /* BATLOW# */ 245 <3 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>, 246 /* SLP_BTN# */ 247 <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_up>, 248 /* WAKE# */ 249 <3 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>, 250 /* LID_BTN */ 251 <3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>; 252 }; 253 }; 254 255 usb2 { 256 otg_vbus_drv: otg-vbus-drv { 257 rockchip,pins = 258 <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>; 259 }; 260 }; 261}; 262 263&sdmmc { 264 /* while the same pin, sdmmc_det does not detect card changes */ 265 cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>; 266 disable-wp; 267 pinctrl-0 = <&sdmmc_bus4 &sdmmc_cmd &sdmmc_clk>; 268 sd-uhs-sdr12; 269 sd-uhs-sdr25; 270 sd-uhs-sdr50; 271 sd-uhs-sdr104; 272 vmmc-supply = <&vcc3v3_baseboard>; 273 status = "okay"; 274}; 275 276&u2phy0 { 277 status = "okay"; 278}; 279 280&u2phy0_otg { 281 phy-supply = <&vcc5v0_otg>; 282 status = "okay"; 283}; 284 285&u2phy1 { 286 status = "okay"; 287}; 288 289&u2phy1_otg { 290 status = "okay"; 291}; 292 293&u2phy2 { 294 status = "okay"; 295}; 296 297&u2phy2_host { 298 status = "okay"; 299}; 300 301&u2phy3 { 302 status = "okay"; 303}; 304 305&u2phy3_host { 306 status = "okay"; 307}; 308 309&uart2 { 310 status = "okay"; 311}; 312 313&uart5 { 314 rts-gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_HIGH>; 315}; 316 317&usbdp_phy0 { 318 status = "okay"; 319}; 320 321&usbdp_phy1 { 322 status = "okay"; 323}; 324 325/* host0 on Q7_USB_P2, upper usb3 port */ 326&usb_host0_ehci { 327 status = "okay"; 328}; 329 330/* host0 on Q7_USB_P2, upper usb3 port */ 331&usb_host0_ohci { 332 status = "okay"; 333}; 334 335/* host0_xhci on Q7_USB_P1, usb3-otg port */ 336&usb_host0_xhci { 337 dr_mode = "otg"; 338 extcon = <&extcon_usb3>; 339 status = "okay"; 340}; 341 342/* host1 on Q7_USB_P3, usb2 port */ 343&usb_host1_ehci { 344 status = "okay"; 345}; 346 347/* host1 on Q7_USB_P3, usb2 port */ 348&usb_host1_ohci { 349 status = "okay"; 350}; 351 352/* host1_xhci on Q7_USB_P0, lower usb3 port */ 353&usb_host1_xhci { 354 dr_mode = "host"; 355 status = "okay"; 356}; 357 358/* host2 on Q7_USB_P2, upper usb3 port */ 359&usb_host2_xhci { 360 status = "okay"; 361}; 362 363&vop { 364 status = "okay"; 365}; 366 367&vop_mmu { 368 status = "okay"; 369}; 370 371&vp0 { 372 vp0_out_hdmi0: endpoint@ROCKCHIP_VOP2_EP_HDMI0 { 373 reg = <ROCKCHIP_VOP2_EP_HDMI0>; 374 remote-endpoint = <&hdmi0_in_vp0>; 375 }; 376}; 377