| 1 |
// SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 |
/* |
| 3 |
* Copyright (c) 2024 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 = "CoolPi CM5 GenBook"; |
| 15 |
compatible = "coolpi,pi-cm5-genbook", "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 = <&pwm6 0 25000 0>; |
| 24 |
}; |
| 25 |
|
| 26 |
battery: battery { |
| 27 |
compatible = "simple-battery"; |
| 28 |
charge-full-design-microamp-hours = <9800000>; |
| 29 |
voltage-max-design-microvolt = <4350000>; |
| 30 |
voltage-min-design-microvolt = <3000000>; |
| 31 |
}; |
| 32 |
|
| 33 |
charger: dc-charger { |
| 34 |
compatible = "gpio-charger"; |
| 35 |
charger-type = "mains"; |
| 36 |
gpios = <&gpio1 RK_PC0 GPIO_ACTIVE_LOW>; |
| 37 |
}; |
| 38 |
|
| 39 |
hdmi-con { |
| 40 |
compatible = "hdmi-connector"; |
| 41 |
type = "a"; |
| 42 |
|
| 43 |
port { |
| 44 |
hdmi_con_in: endpoint { |
| 45 |
remote-endpoint = <&hdmi0_out_con>; |
| 46 |
}; |
| 47 |
}; |
| 48 |
}; |
| 49 |
|
| 50 |
leds: leds { |
| 51 |
compatible = "gpio-leds"; |
| 52 |
|
| 53 |
heartbeat_led: led-0 { |
| 54 |
color = <LED_COLOR_ID_GREEN>; |
| 55 |
function = LED_FUNCTION_STATUS; |
| 56 |
gpios = <&gpio1 RK_PB0 GPIO_ACTIVE_HIGH>; |
| 57 |
linux,default-trigger = "heartbeat"; |
| 58 |
}; |
| 59 |
|
| 60 |
wlan_led: led-1 { |
| 61 |
color = <LED_COLOR_ID_GREEN>; |
| 62 |
function = LED_FUNCTION_WLAN; |
| 63 |
gpios = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>; |
| 64 |
}; |
| 65 |
|
| 66 |
charging_red: led-2 { |
| 67 |
function = LED_FUNCTION_CHARGING; |
| 68 |
color = <LED_COLOR_ID_RED>; |
| 69 |
gpios = <&gpio3 RK_PD2 GPIO_ACTIVE_HIGH>; |
| 70 |
}; |
| 71 |
}; |
| 72 |
|
| 73 |
vcc12v_dcin: regulator-vcc12v-dcin { |
| 74 |
compatible = "regulator-fixed"; |
| 75 |
regulator-name = "vcc12v_dcin"; |
| 76 |
regulator-always-on; |
| 77 |
regulator-boot-on; |
| 78 |
regulator-min-microvolt = <12000000>; |
| 79 |
regulator-max-microvolt = <12000000>; |
| 80 |
}; |
| 81 |
|
| 82 |
vcc_sys: regulator-vcc-sys { |
| 83 |
compatible = "regulator-fixed"; |
| 84 |
regulator-name = "vcc_sys"; |
| 85 |
regulator-always-on; |
| 86 |
regulator-boot-on; |
| 87 |
regulator-min-microvolt = <7000000>; |
| 88 |
regulator-max-microvolt = <7000000>; |
| 89 |
vin-supply = <&vcc12v_dcin>; |
| 90 |
}; |
| 91 |
|
| 92 |
vcc5v0_sys: regulator-vcc5v0-sys { |
| 93 |
compatible = "regulator-fixed"; |
| 94 |
regulator-name = "vcc5v0_sys"; |
| 95 |
regulator-always-on; |
| 96 |
regulator-boot-on; |
| 97 |
regulator-min-microvolt = <7000000>; |
| 98 |
regulator-max-microvolt = <7000000>; |
| 99 |
vin-supply = <&vcc_sys>; |
| 100 |
}; |
| 101 |
|
| 102 |
vcc3v3_sys: regulator-vcc3v3-sys { |
| 103 |
compatible = "regulator-fixed"; |
| 104 |
regulator-name = "vcc3v3_sys"; |
| 105 |
regulator-always-on; |
| 106 |
regulator-boot-on; |
| 107 |
regulator-min-microvolt = <3300000>; |
| 108 |
regulator-max-microvolt = <3300000>; |
| 109 |
vin-supply = <&vcc5v0_sys>; |
| 110 |
}; |
| 111 |
|
| 112 |
vcc3v3_lcd: regulator-vcc3v3-lcd { |
| 113 |
compatible = "regulator-fixed"; |
| 114 |
regulator-name = "vcc3v3_lcd"; |
| 115 |
enable-active-high; |
| 116 |
gpio = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>; |
| 117 |
pinctrl-names = "default"; |
| 118 |
pinctrl-0 = <&lcdpwr_en>; |
| 119 |
vin-supply = <&vcc3v3_sys>; |
| 120 |
}; |
| 121 |
|
| 122 |
vcc5v0_usb: regulator-vcc5v0-usb { |
| 123 |
compatible = "regulator-fixed"; |
| 124 |
regulator-name = "vcc5v0_usb"; |
| 125 |
regulator-boot-on; |
| 126 |
regulator-always-on; |
| 127 |
enable-active-high; |
| 128 |
regulator-min-microvolt = <5000000>; |
| 129 |
regulator-max-microvolt = <5000000>; |
| 130 |
gpio = <&gpio1 RK_PD5 GPIO_ACTIVE_HIGH>; |
| 131 |
pinctrl-names = "default"; |
| 132 |
pinctrl-0 = <&usb_pwren>; |
| 133 |
vin-supply = <&vcc_sys>; |
| 134 |
}; |
| 135 |
|
| 136 |
vcc5v0_usb_host0: vcc5v0_usb30_host: regulator-vcc5v0-usb-host { |
| 137 |
compatible = "regulator-fixed"; |
| 138 |
regulator-name = "vcc5v0_host"; |
| 139 |
regulator-boot-on; |
| 140 |
regulator-always-on; |
| 141 |
enable-active-high; |
| 142 |
regulator-min-microvolt = <5000000>; |
| 143 |
regulator-max-microvolt = <5000000>; |
| 144 |
gpio = <&gpio1 RK_PA7 GPIO_ACTIVE_HIGH>; |
| 145 |
pinctrl-names = "default"; |
| 146 |
pinctrl-0 = <&usb_host_pwren>; |
| 147 |
vin-supply = <&vcc5v0_usb>; |
| 148 |
}; |
| 149 |
}; |
| 150 |
|
| 151 |
&edp1 { |
| 152 |
force-hpd; |
| 153 |
status = "okay"; |
| 154 |
|
| 155 |
aux-bus { |
| 156 |
panel { |
| 157 |
compatible = "edp-panel"; |
| 158 |
hpd-absent-delay-ms = <200>; |
| 159 |
no-hpd; |
| 160 |
backlight = <&backlight>; |
| 161 |
power-supply = <&vcc3v3_lcd>; |
| 162 |
|
| 163 |
port { |
| 164 |
panel_in_edp: endpoint { |
| 165 |
remote-endpoint = <&edp_out_panel>; |
| 166 |
}; |
| 167 |
}; |
| 168 |
}; |
| 169 |
}; |
| 170 |
}; |
| 171 |
|
| 172 |
&edp1_in { |
| 173 |
edp1_in_vp2: endpoint { |
| 174 |
remote-endpoint = <&vp2_out_edp1>; |
| 175 |
}; |
| 176 |
}; |
| 177 |
|
| 178 |
&edp1_out { |
| 179 |
edp_out_panel: endpoint { |
| 180 |
remote-endpoint = <&panel_in_edp>; |
| 181 |
}; |
| 182 |
}; |
| 183 |
|
| 184 |
|
| 185 |
/* HDMI CEC is not used */ |
| 186 |
&hdmi0 { |
| 187 |
pinctrl-0 = <&hdmim0_tx0_hpd &hdmim0_tx0_scl &hdmim0_tx0_sda>; |
| 188 |
status = "okay"; |
| 189 |
}; |
| 190 |
|
| 191 |
&hdmi0_in { |
| 192 |
hdmi0_in_vp0: endpoint { |
| 193 |
remote-endpoint = <&vp0_out_hdmi0>; |
| 194 |
}; |
| 195 |
}; |
| 196 |
|
| 197 |
&hdmi0_out { |
| 198 |
hdmi0_out_con: endpoint { |
| 199 |
remote-endpoint = <&hdmi_con_in>; |
| 200 |
}; |
| 201 |
}; |
| 202 |
|
| 203 |
&hdptxphy0 { |
| 204 |
status = "okay"; |
| 205 |
}; |
| 206 |
|
| 207 |
&hdptxphy1 { |
| 208 |
status = "okay"; |
| 209 |
}; |
| 210 |
|
| 211 |
&i2c4 { |
| 212 |
status = "okay"; |
| 213 |
pinctrl-names = "default"; |
| 214 |
pinctrl-0 = <&i2c4m3_xfer>; |
| 215 |
|
| 216 |
cw2015@62 { |
| 217 |
compatible = "cellwise,cw2015"; |
| 218 |
reg = <0x62>; |
| 219 |
|
| 220 |
cellwise,battery-profile = /bits/ 8 < |
| 221 |
0x17 0x67 0x69 0x63 0x63 0x62 0x62 0x5F |
| 222 |
0x52 0x73 0x4C 0x5A 0x5B 0x4B 0x42 0x3A |
| 223 |
0x33 0x2D 0x29 0x28 0x2E 0x31 0x3C 0x49 |
| 224 |
0x2C 0x2C 0x0C 0xCD 0x30 0x51 0x50 0x66 |
| 225 |
0x74 0x74 0x75 0x78 0x41 0x1B 0x84 0x5F |
| 226 |
0x0B 0x34 0x1C 0x45 0x89 0x92 0xA0 0x13 |
| 227 |
0x2C 0x55 0xAB 0xCB 0x80 0x5E 0x7B 0xCB |
| 228 |
0x2F 0x00 0x64 0xA5 0xB5 0x10 0x18 0x21 |
| 229 |
>; |
| 230 |
|
| 231 |
cellwise,monitor-interval-ms = <3000>; |
| 232 |
monitored-battery = <&battery>; |
| 233 |
power-supplies = <&charger>; |
| 234 |
}; |
| 235 |
}; |
| 236 |
|
| 237 |
&i2c5 { |
| 238 |
status = "okay"; |
| 239 |
pinctrl-names = "default"; |
| 240 |
pinctrl-0 = <&i2c5m3_xfer>; |
| 241 |
|
| 242 |
touchpad: touchpad@2c { |
| 243 |
compatible = "hid-over-i2c"; |
| 244 |
reg = <0x2c>; |
| 245 |
interrupt-parent = <&gpio1>; |
| 246 |
interrupts = <RK_PD6 IRQ_TYPE_LEVEL_LOW>; |
| 247 |
hid-descr-addr = <0x0020>; |
| 248 |
}; |
| 249 |
}; |
| 250 |
|
| 251 |
&gmac0 { |
| 252 |
status = "disabled"; |
| 253 |
}; |
| 254 |
|
| 255 |
/* M.2 E-Key */ |
| 256 |
&pcie2x1l0 { |
| 257 |
reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>; |
| 258 |
vpcie3v3-supply = <&vcc3v3_sys>; |
| 259 |
pinctrl-names = "default"; |
| 260 |
pinctrl-0 = <&pcie_clkreq &pcie_wake &pcie_rst &wifi_pwron &bt_pwron>; |
| 261 |
status = "okay"; |
| 262 |
}; |
| 263 |
|
| 264 |
&pcie2x1l2 { |
| 265 |
status = "disabled"; |
| 266 |
}; |
| 267 |
|
| 268 |
&pcie30phy { |
| 269 |
status = "okay"; |
| 270 |
}; |
| 271 |
|
| 272 |
/* M.2 M-Key ssd */ |
| 273 |
&pcie3x4 { |
| 274 |
reset-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>; |
| 275 |
vpcie3v3-supply = <&vcc3v3_sys>; |
| 276 |
status = "okay"; |
| 277 |
}; |
| 278 |
|
| 279 |
&pinctrl { |
| 280 |
lcd { |
| 281 |
lcdpwr_en: lcdpwr-en { |
| 282 |
rockchip,pins = <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_down>; |
| 283 |
}; |
| 284 |
|
| 285 |
bl_en: bl-en { |
| 286 |
rockchip,pins = <4 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>; |
| 287 |
}; |
| 288 |
}; |
| 289 |
|
| 290 |
usb { |
| 291 |
usb_pwren: usb-pwren { |
| 292 |
rockchip,pins = <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>; |
| 293 |
}; |
| 294 |
|
| 295 |
usb_otg_pwren: usb-otg-pwren { |
| 296 |
rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>; |
| 297 |
}; |
| 298 |
|
| 299 |
usb_host_pwren: usb-host-pwren { |
| 300 |
rockchip,pins = <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>; |
| 301 |
}; |
| 302 |
}; |
| 303 |
|
| 304 |
wifi { |
| 305 |
bt_pwron: bt-pwron { |
| 306 |
rockchip,pins = <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>; |
| 307 |
}; |
| 308 |
|
| 309 |
pcie_clkreq: pcie-clkreq { |
| 310 |
rockchip,pins = <4 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>; |
| 311 |
}; |
| 312 |
|
| 313 |
pcie_rst: pcie-rst { |
| 314 |
rockchip,pins = <4 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>; |
| 315 |
}; |
| 316 |
|
| 317 |
wifi_pwron: wifi-pwron { |
| 318 |
rockchip,pins = <3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>; |
| 319 |
}; |
| 320 |
|
| 321 |
pcie_wake: pcie-wake { |
| 322 |
rockchip,pins = <4 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>; |
| 323 |
}; |
| 324 |
}; |
| 325 |
}; |
| 326 |
|
| 327 |
&pwm6 { |
| 328 |
pinctrl-0 = <&pwm6m1_pins>; |
| 329 |
status = "okay"; |
| 330 |
}; |
| 331 |
|
| 332 |
&sdmmc { |
| 333 |
status = "disabled"; |
| 334 |
}; |
| 335 |
|
| 336 |
&sfc { |
| 337 |
pinctrl-names = "default"; |
| 338 |
pinctrl-0 = <&fspim2_pins>; |
| 339 |
status = "okay"; |
| 340 |
|
| 341 |
flash@0 { |
| 342 |
compatible = "jedec,spi-nor"; |
| 343 |
reg = <0x0>; |
| 344 |
spi-max-frequency = <100000000>; |
| 345 |
spi-rx-bus-width = <4>; |
| 346 |
spi-tx-bus-width = <1>; |
| 347 |
}; |
| 348 |
}; |
| 349 |
|
| 350 |
&u2phy0 { |
| 351 |
status = "okay"; |
| 352 |
}; |
| 353 |
|
| 354 |
&u2phy0_otg { |
| 355 |
status = "okay"; |
| 356 |
}; |
| 357 |
|
| 358 |
&usbdp_phy0 { |
| 359 |
status = "okay"; |
| 360 |
}; |
| 361 |
|
| 362 |
&u2phy1 { |
| 363 |
status = "okay"; |
| 364 |
}; |
| 365 |
|
| 366 |
&u2phy1_otg { |
| 367 |
status = "okay"; |
| 368 |
}; |
| 369 |
|
| 370 |
&u2phy2 { |
| 371 |
status = "okay"; |
| 372 |
}; |
| 373 |
|
| 374 |
&u2phy3 { |
| 375 |
status = "okay"; |
| 376 |
}; |
| 377 |
|
| 378 |
&u2phy2_host { |
| 379 |
phy-supply = <&vcc5v0_usb_host0>; |
| 380 |
status = "okay"; |
| 381 |
}; |
| 382 |
|
| 383 |
&u2phy3_host { |
| 384 |
phy-supply = <&vcc5v0_usb>; |
| 385 |
status = "okay"; |
| 386 |
}; |
| 387 |
|
| 388 |
&usbdp_phy1 { |
| 389 |
status = "okay"; |
| 390 |
}; |
| 391 |
|
| 392 |
/* For Keypad */ |
| 393 |
&usb_host0_ehci { |
| 394 |
status = "okay"; |
| 395 |
}; |
| 396 |
|
| 397 |
&usb_host0_ohci { |
| 398 |
status = "okay"; |
| 399 |
}; |
| 400 |
|
| 401 |
/* Type C port */ |
| 402 |
&usb_host0_xhci { |
| 403 |
dr_mode = "peripheral"; |
| 404 |
maximum-speed = "high-speed"; |
| 405 |
status = "okay"; |
| 406 |
}; |
| 407 |
|
| 408 |
/* connected to a HUB for camera and BT */ |
| 409 |
&usb_host1_ehci { |
| 410 |
status = "okay"; |
| 411 |
}; |
| 412 |
|
| 413 |
&usb_host1_ohci { |
| 414 |
status = "okay"; |
| 415 |
}; |
| 416 |
|
| 417 |
/* USB A out */ |
| 418 |
&usb_host1_xhci { |
| 419 |
dr_mode = "host"; |
| 420 |
status = "okay"; |
| 421 |
}; |
| 422 |
|
| 423 |
&vop { |
| 424 |
assigned-clocks = <&cru DCLK_VOP2_SRC>; |
| 425 |
assigned-clock-parents = <&cru PLL_V0PLL>; |
| 426 |
status = "okay"; |
| 427 |
}; |
| 428 |
|
| 429 |
&vop_mmu { |
| 430 |
status = "okay"; |
| 431 |
}; |
| 432 |
|
| 433 |
&vp0 { |
| 434 |
vp0_out_hdmi0: endpoint@ROCKCHIP_VOP2_EP_HDMI0 { |
| 435 |
reg = <ROCKCHIP_VOP2_EP_HDMI0>; |
| 436 |
remote-endpoint = <&hdmi0_in_vp0>; |
| 437 |
}; |
| 438 |
}; |
| 439 |
|
| 440 |
&vp2 { |
| 441 |
vp2_out_edp1: endpoint@ROCKCHIP_VOP2_EP_EDP1 { |
| 442 |
reg = <ROCKCHIP_VOP2_EP_EDP1>; |
| 443 |
remote-endpoint = <&edp1_in_vp2>; |
| 444 |
}; |
| 445 |
}; |