1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2/* 3 * Copyright (c) 2025 Cherry Embedded Solutions GmbH 4 */ 5 6/dts-v1/; 7#include <dt-bindings/gpio/gpio.h> 8#include <dt-bindings/input/input.h> 9#include <dt-bindings/pinctrl/rockchip.h> 10#include "px30.dtsi" 11 12/ { 13 aliases { 14 mmc0 = &emmc; 15 }; 16 17 chosen { 18 stdout-path = "serial5:115200n8"; 19 }; 20 21 backlight: backlight { 22 compatible = "pwm-backlight"; 23 power-supply = <&vcc5v0_sys>; 24 pwms = <&pwm0 0 25000 0>; 25 }; 26 27 beeper { 28 compatible = "pwm-beeper"; 29 pwms = <&pwm1 0 1000 0>; 30 }; 31 32 emmc_pwrseq: emmc-pwrseq { 33 compatible = "mmc-pwrseq-emmc"; 34 pinctrl-0 = <&emmc_reset>; 35 pinctrl-names = "default"; 36 reset-gpios = <&gpio1 RK_PB3 GPIO_ACTIVE_HIGH>; 37 }; 38 39 gpio-leds { 40 compatible = "gpio-leds"; 41 pinctrl-names = "default"; 42 pinctrl-0 = <&debug_led_pin>, <&heartbeat_led_pin>; 43 44 /* 45 * LED2 on the PCB, left of the USB-C connector. 46 * Typically NOT populated. 47 */ 48 debug: led-0 { 49 label = "debug"; 50 gpios = <&gpio3 RK_PC3 GPIO_ACTIVE_HIGH>; 51 linux,default-trigger = "none"; 52 }; 53 54 /* 55 * LED14 on the PCB, left of the PX30 SoC. 56 * Typically NOT populated. 57 */ 58 heartbeat: led-1 { 59 label = "heartbeat"; 60 gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>; 61 linux,default-trigger = "heartbeat"; 62 }; 63 }; 64 65 vcc5v0_sys: regulator-vccsys { 66 compatible = "regulator-fixed"; 67 regulator-name = "vcc5v0_sys"; 68 regulator-always-on; 69 regulator-boot-on; 70 regulator-min-microvolt = <5000000>; 71 regulator-max-microvolt = <5000000>; 72 }; 73 74 vcc_cam_avdd: regulator-vcc-cam-avdd { 75 compatible = "regulator-fixed"; 76 regulator-name = "vcc_cam_avdd"; 77 gpio = <&gpio3 RK_PC0 GPIO_ACTIVE_LOW>; 78 pinctrl-names = "default"; 79 pinctrl-0 = <&cam_avdd_en>; 80 regulator-min-microvolt = <2800000>; 81 regulator-max-microvolt = <2800000>; 82 vin-supply = <&vcc_2v8>; 83 }; 84 85 vcc_cam_dovdd: regulator-vcc-cam-dovdd { 86 compatible = "regulator-fixed"; 87 regulator-name = "vcc_cam_dovdd"; 88 gpio = <&gpio3 RK_PC1 GPIO_ACTIVE_LOW>; 89 pinctrl-names = "default"; 90 pinctrl-0 = <&cam_dovdd_en>; 91 regulator-min-microvolt = <1800000>; 92 regulator-max-microvolt = <1800000>; 93 vin-supply = <&vcc_1v8>; 94 }; 95 96 vcc_cam_dvdd: regulator-vcc-cam-dvdd { 97 compatible = "regulator-fixed"; 98 regulator-name = "vcc_cam_dvdd"; 99 gpio = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>; 100 enable-active-high; 101 pinctrl-names = "default"; 102 pinctrl-0 = <&cam_dvdd_en>; 103 regulator-min-microvolt = <1200000>; 104 regulator-max-microvolt = <1200000>; 105 vin-supply = <&vcc_3v3>; 106 }; 107 108 vcc_lens_afvdd: regulator-vcc-lens-afvdd { 109 compatible = "regulator-fixed"; 110 regulator-name = "vcc_lens_afvdd"; 111 gpio = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>; 112 pinctrl-names = "default"; 113 pinctrl-0 = <&cam_afvdd_en>; 114 regulator-min-microvolt = <2800000>; 115 regulator-max-microvolt = <2800000>; 116 vin-supply = <&vcc_2v8>; 117 }; 118}; 119 120&cpu0 { 121 cpu-supply = <&vdd_arm>; 122}; 123 124&cpu1 { 125 cpu-supply = <&vdd_arm>; 126}; 127 128&cpu2 { 129 cpu-supply = <&vdd_arm>; 130}; 131 132&cpu3 { 133 cpu-supply = <&vdd_arm>; 134}; 135 136&csi_dphy { 137 status = "okay"; 138}; 139 140&display_subsystem { 141 status = "okay"; 142}; 143 144&dsi_dphy { 145 status = "okay"; 146}; 147 148&emmc { 149 bus-width = <8>; 150 cap-mmc-highspeed; 151 /* 152 * For hs200 support, U-Boot would have to set the RK809 DCDC4 153 * rail to 1.8V from the default of 3.0V. It doesn't do that on 154 * devices out in the field, so disable hs200. 155 * mmc-hs200-1_8v; 156 */ 157 mmc-pwrseq = <&emmc_pwrseq>; 158 non-removable; 159 vmmc-supply = <&vcc_3v3>; 160 vqmmc-supply = <&vcc_emmc>; 161 status = "okay"; 162}; 163 164&gpu { 165 mali-supply = <&vdd_log>; 166 status = "okay"; 167}; 168 169/* I2C0 = PMIC, Touchscreen */ 170&i2c0 { 171 status = "okay"; 172 173 touchscreen@14 { 174 compatible = "goodix,gt911"; 175 reg = <0x14>; 176 AVDD28-supply = <&vcc_2v8>; 177 interrupt-parent = <&gpio0>; 178 interrupts = <RK_PA1 IRQ_TYPE_LEVEL_LOW>; 179 irq-gpios = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>; 180 pinctrl-names = "default"; 181 pinctrl-0 = <&tch_int &tch_rst>; 182 reset-gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>; 183 VDDIO-supply = <&vcc_3v3>; 184 }; 185 186 rk809: pmic@20 { 187 compatible = "rockchip,rk809"; 188 reg = <0x20>; 189 #clock-cells = <0>; 190 clock-output-names = "xin32k"; 191 interrupt-parent = <&gpio0>; 192 interrupts = <RK_PA7 IRQ_TYPE_LEVEL_LOW>; 193 pinctrl-names = "default"; 194 pinctrl-0 = <&pmic_int>; 195 system-power-controller; 196 wakeup-source; 197 198 vcc1-supply = <&vcc5v0_sys>; 199 vcc2-supply = <&vcc5v0_sys>; 200 vcc3-supply = <&vcc5v0_sys>; 201 vcc4-supply = <&vcc5v0_sys>; 202 vcc5-supply = <&vcc_3v3>; 203 vcc6-supply = <&vcc_3v3>; 204 vcc7-supply = <&vcc_3v3>; 205 vcc9-supply = <&vcc5v0_sys>; 206 207 regulators { 208 vdd_log: DCDC_REG1 { 209 regulator-name = "vdd_log"; 210 regulator-always-on; 211 regulator-boot-on; 212 regulator-min-microvolt = <950000>; 213 regulator-max-microvolt = <1350000>; 214 regulator-ramp-delay = <6001>; 215 216 regulator-state-mem { 217 regulator-on-in-suspend; 218 regulator-suspend-microvolt = <950000>; 219 }; 220 }; 221 222 vdd_arm: DCDC_REG2 { 223 regulator-name = "vdd_arm"; 224 regulator-always-on; 225 regulator-boot-on; 226 regulator-min-microvolt = <950000>; 227 regulator-max-microvolt = <1350000>; 228 regulator-ramp-delay = <6001>; 229 230 regulator-state-mem { 231 regulator-off-in-suspend; 232 regulator-suspend-microvolt = <950000>; 233 }; 234 }; 235 236 vcc_ddr: DCDC_REG3 { 237 regulator-name = "vcc_ddr"; 238 regulator-always-on; 239 regulator-boot-on; 240 241 regulator-state-mem { 242 regulator-on-in-suspend; 243 }; 244 }; 245 246 vcc_3v0_1v8: vcc_emmc: DCDC_REG4 { 247 regulator-name = "vcc_3v0_1v8"; 248 regulator-always-on; 249 regulator-boot-on; 250 regulator-min-microvolt = <3000000>; 251 regulator-max-microvolt = <3000000>; 252 253 regulator-state-mem { 254 regulator-on-in-suspend; 255 regulator-suspend-microvolt = <3000000>; 256 }; 257 }; 258 259 vcc_3v3: DCDC_REG5 { 260 regulator-name = "vcc_3v3"; 261 regulator-always-on; 262 regulator-boot-on; 263 regulator-min-microvolt = <3300000>; 264 regulator-max-microvolt = <3300000>; 265 266 regulator-state-mem { 267 regulator-on-in-suspend; 268 regulator-suspend-microvolt = <3300000>; 269 }; 270 }; 271 272 vcc_1v8: LDO_REG2 { 273 regulator-name = "vcc_1v8"; 274 regulator-always-on; 275 regulator-boot-on; 276 regulator-min-microvolt = <1800000>; 277 regulator-max-microvolt = <1800000>; 278 279 regulator-state-mem { 280 regulator-on-in-suspend; 281 regulator-suspend-microvolt = <1800000>; 282 }; 283 }; 284 285 vcc_1v0: LDO_REG3 { 286 regulator-name = "vcc_1v0"; 287 regulator-always-on; 288 regulator-boot-on; 289 regulator-min-microvolt = <1000000>; 290 regulator-max-microvolt = <1000000>; 291 292 regulator-state-mem { 293 regulator-on-in-suspend; 294 regulator-suspend-microvolt = <1000000>; 295 }; 296 }; 297 298 vcc_2v8: LDO_REG4 { 299 regulator-name = "vcc_2v8"; 300 regulator-always-on; 301 regulator-boot-on; 302 regulator-min-microvolt = <2800000>; 303 regulator-max-microvolt = <2800000>; 304 305 regulator-state-mem { 306 regulator-off-in-suspend; 307 regulator-suspend-microvolt = <2800000>; 308 }; 309 }; 310 311 vccio_sd: LDO_REG5 { 312 regulator-name = "vccio_sd"; 313 regulator-always-on; 314 regulator-boot-on; 315 regulator-min-microvolt = <3000000>; 316 regulator-max-microvolt = <3000000>; 317 318 regulator-state-mem { 319 regulator-on-in-suspend; 320 regulator-suspend-microvolt = <3000000>; 321 }; 322 }; 323 324 vcc_sdio: LDO_REG6 { 325 regulator-name = "vcc_sdio"; 326 regulator-always-on; 327 regulator-boot-on; 328 regulator-min-microvolt = <1800000>; 329 regulator-max-microvolt = <1800000>; 330 331 regulator-state-mem { 332 regulator-on-in-suspend; 333 regulator-suspend-microvolt = <1800000>; 334 }; 335 }; 336 337 vcc_lcd: LDO_REG7 { 338 regulator-name = "vcc_lcd"; 339 regulator-always-on; 340 regulator-boot-on; 341 regulator-min-microvolt = <1000000>; 342 regulator-max-microvolt = <1000000>; 343 344 regulator-state-mem { 345 regulator-off-in-suspend; 346 regulator-suspend-microvolt = <1000000>; 347 }; 348 }; 349 350 vcc_1v8_lcd: LDO_REG8 { 351 regulator-name = "vcc_1v8_lcd"; 352 regulator-always-on; 353 regulator-boot-on; 354 regulator-min-microvolt = <1800000>; 355 regulator-max-microvolt = <1800000>; 356 357 regulator-state-mem { 358 regulator-on-in-suspend; 359 regulator-suspend-microvolt = <1800000>; 360 }; 361 }; 362 363 vcca_1v8: LDO_REG9 { 364 regulator-name = "vcca_1v8"; 365 regulator-always-on; 366 regulator-boot-on; 367 regulator-min-microvolt = <1800000>; 368 regulator-max-microvolt = <1800000>; 369 370 regulator-state-mem { 371 regulator-off-in-suspend; 372 regulator-suspend-microvolt = <1800000>; 373 }; 374 }; 375 }; 376 }; 377}; 378 379&i2c1 { 380 clock-frequency = <100000>; 381 status = "okay"; 382}; 383 384/* I2C2 = Accelerometer + Camera */ 385&i2c2 { 386 /* MEMSIC MXC4005 accelerometer is rated for I2C Fast Mode (<=400KHz) */ 387 /* OmniVision OV5675 camera is rated for I2C Fast Mode (<=400KHz) */ 388 clock-frequency = <400000>; 389 status = "okay"; 390 391 focus: focus@c { 392 compatible = "dongwoon,dw9714"; 393 reg = <0xc>; 394 vcc-supply = <&vcc_lens_afvdd>; 395 }; 396 397 accel@15 { 398 compatible = "memsic,mxc4005"; 399 reg = <0x15>; 400 interrupt-parent = <&gpio2>; 401 interrupts = <RK_PB4 IRQ_TYPE_LEVEL_LOW>; 402 pinctrl-names = "default"; 403 pinctrl-0 = <&accel_int>; 404 }; 405 406 camera@36 { 407 compatible = "ovti,ov5675"; 408 reg = <0x36>; 409 clocks = <&cru SCLK_CIF_OUT>; 410 assigned-clocks = <&cru SCLK_CIF_OUT>; 411 assigned-clock-rates = <19200000>; 412 avdd-supply = <&vcc_cam_avdd>; 413 dvdd-supply = <&vcc_cam_dvdd>; 414 dovdd-supply = <&vcc_cam_dovdd>; 415 lens-focus = <&focus>; 416 orientation = <0>; 417 pinctrl-names = "default"; 418 pinctrl-0 = <&cif_clkout_m0 &cam_pwdn>; 419 reset-gpios = <&gpio2 RK_PB0 GPIO_ACTIVE_LOW>; 420 rotation = <0>; 421 422 port { 423 ucam_out: endpoint { 424 remote-endpoint = <&mipi_in_ucam>; 425 data-lanes = <1 2>; 426 link-frequencies = /bits/ 64 <450000000>; 427 }; 428 }; 429 }; 430}; 431 432&io_domains { 433 vccio1-supply = <&vcc_sdio>; 434 vccio2-supply = <&vccio_sd>; 435 vccio3-supply = <&vcc_1v8>; 436 vccio4-supply = <&vcc_3v3>; 437 vccio5-supply = <&vcc_3v3>; 438 vccio6-supply = <&vcc_emmc>; 439 status = "okay"; 440}; 441 442&isp { 443 status = "okay"; 444 445 ports { 446 port@0 { 447 mipi_in_ucam: endpoint@0 { 448 reg = <0>; 449 data-lanes = <1 2>; 450 remote-endpoint = <&ucam_out>; 451 }; 452 }; 453 }; 454}; 455 456&isp_mmu { 457 status = "okay"; 458}; 459 460&pinctrl { 461 accel { 462 accel_int: accel-int { 463 rockchip,pins = 464 <2 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>; 465 }; 466 }; 467 468 camera { 469 cam_afvdd_en: cam-afvdd-en { 470 rockchip,pins = 471 <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>; 472 }; 473 474 cam_avdd_en: cam-avdd-en { 475 rockchip,pins = 476 <3 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>; 477 }; 478 479 cam_dovdd_en: cam-dovdd-en { 480 rockchip,pins = 481 <3 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>; 482 }; 483 484 cam_dvdd_en: cam-dvdd-en { 485 rockchip,pins = 486 <3 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>; 487 }; 488 489 cam_pwdn: cam-pwdn { 490 rockchip,pins = 491 <2 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>; 492 }; 493 }; 494 495 emmc { 496 emmc_reset: emmc-reset { 497 rockchip,pins = 498 <1 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>; 499 }; 500 }; 501 502 leds { 503 debug_led_pin: debug-led-pin { 504 rockchip,pins = 505 <3 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>; 506 }; 507 508 heartbeat_led_pin: heartbeat-led-pin { 509 rockchip,pins = 510 <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>; 511 }; 512 }; 513 514 panel { 515 dsp_rst: dsp-rst { 516 rockchip,pins = 517 <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_down>; 518 }; 519 520 tch_int: tch-int { 521 rockchip,pins = 522 <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>; 523 }; 524 525 tch_rst: tch-rst { 526 rockchip,pins = 527 <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>; 528 }; 529 }; 530 531 pmic { 532 pmic_int: pmic-int { 533 rockchip,pins = 534 <0 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>; 535 }; 536 }; 537}; 538 539&pmu_io_domains { 540 pmuio1-supply = <&vcc_3v3>; 541 pmuio2-supply = <&vcc_3v3>; 542 status = "okay"; 543}; 544 545&pwm0 { 546 status = "okay"; 547}; 548 549&pwm1 { 550 status = "okay"; 551}; 552 553&saradc { 554 vref-supply = <&vcc_1v8>; 555 status = "okay"; 556}; 557 558&tsadc { 559 status = "okay"; 560}; 561 562&u2phy { 563 status = "okay"; 564}; 565 566&u2phy_host { 567 status = "okay"; 568}; 569 570&u2phy_otg { 571 status = "okay"; 572}; 573 574&uart5 { 575 pinctrl-0 = <&uart5_xfer>; 576 status = "okay"; 577}; 578 579&usb20_otg { 580 dr_mode = "peripheral"; 581 status = "okay"; 582}; 583 584&usb_host0_ehci { 585 status = "okay"; 586}; 587 588&usb_host0_ohci { 589 status = "okay"; 590}; 591 592&vopb { 593 status = "okay"; 594}; 595 596&vopb_mmu { 597 status = "okay"; 598}; 599 600&wdt { 601 status = "okay"; 602}; 603