1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2/dts-v1/; 3 4#include "rk3128.dtsi" 5#include <dt-bindings/display/drm_mipi_dsi.h> 6#include <dt-bindings/input/input.h> 7 8/ { 9 model = "Rockchip PX3SE Evaluation Board"; 10 compatible = "rockchip,px3se-evb", "rockchip,rk3128"; 11 12 chosen { 13 bootargs = "loglevel=7 root=PARTUUID=614e0000-0000-4b53-8000-1d28000054a9 rootwait"; 14 }; 15 16 adc-keys { 17 compatible = "adc-keys"; 18 io-channels = <&saradc 1>; 19 io-channel-names = "buttons"; 20 poll-interval = <100>; 21 keyup-threshold-microvolt = <1800000>; 22 23 reserved-key { 24 linux,code = <KEY_RESERVED>; 25 label = "reserved"; 26 press-threshold-microvolt = <1549000>; 27 }; 28 29 home-key { 30 linux,code = <KEY_HOME>; 31 label = "home"; 32 press-threshold-microvolt = <1314000>; 33 }; 34 35 esc-key { 36 linux,code = <KEY_ESC>; 37 label = "esc"; 38 press-threshold-microvolt = <985000>; 39 }; 40 41 menu-key { 42 linux,code = <KEY_MENU>; 43 label = "menu"; 44 press-threshold-microvolt = <623000>; 45 }; 46 47 vol-down-key { 48 linux,code = <KEY_VOLUMEDOWN>; 49 label = "volume down"; 50 press-threshold-microvolt = <300000>; 51 }; 52 53 vol-up-key { 54 linux,code = <KEY_VOLUMEUP>; 55 label = "volume up"; 56 press-threshold-microvolt = <18000>; 57 }; 58 }; 59 60 backlight: backlight { 61 compatible = "pwm-backlight"; 62 63 brightness-levels = <0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 64 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 65 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 66 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 67 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 68 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 69 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 70 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 71 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 72 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 73 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 74 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 75 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 76 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 77 245 246 247 248 249 250 251 252 253 254 255>; 78 79 default-brightness-level = <128>; 80 pwms = <&pwm0 0 25000 0>; 81 82 status = "okay"; 83 }; 84 85 fiq-debugger { 86 compatible = "rockchip,fiq-debugger"; 87 88 pinctrl-names = "default"; 89 pinctrl-0 = <&uart1_xfer>; 90 91 rockchip,serial-id = <1>; 92 rockchip,wake-irq = <0>; 93 /* If enable uart uses irq instead of fiq */ 94 rockchip,irq-mode-enable = <0>; 95 rockchip,baudrate = <115200>; /* Only 115200 and 1500000 */ 96 /* Choose a reserved/no-in-use irq */ 97 interrupts = <GIC_SPI 127 IRQ_TYPE_LEVEL_LOW>; 98 status = "okay"; 99 }; 100 101 sdio_pwrseq: sdio-pwrseq { 102 compatible = "mmc-pwrseq-simple"; 103 /* Use external clock power by VCC_RTC */ 104 pinctrl-names = "default"; 105 pinctrl-0 = <&wifi_pwr>; 106 107 /* 108 * On the module itself this is one of these (depending 109 * on the actual card populated): 110 * - SDIO_RESET_L_WL_REG_ON 111 * - PDN (power down when low) 112 */ 113 reset-gpios = <&gpio1 3 GPIO_ACTIVE_LOW>; 114 }; 115 116 sound-rk312x { 117 compatible = "simple-audio-card"; 118 status = "disabled"; 119 120 simple-audio-card,format = "i2s"; 121 simple-audio-card,mclk-fs = <256>; 122 simple-audio-card,name = "rockchip,rk312x-codec"; 123 simple-audio-card,cpu { 124 sound-dai = <&i2s_8ch>; 125 }; 126 simple-audio-card,codec { 127 sound-dai = <&codec>; 128 }; 129 }; 130 131 sound-es8396 { 132 compatible = "simple-audio-card"; 133 status = "okay"; 134 135 simple-audio-card,format = "i2s"; 136 simple-audio-card,name = "rockchip,es8396-codec"; 137 simple-audio-card,mclk-fs = <256>; 138 simple-audio-card,widgets = 139 "Microphone", "Microphone Jack", 140 "Line", "Microphone Headset", 141 "Headphone", "Headphone Jack"; 142 simple-audio-card,routing = 143 "MIC", "Microphone Jack", 144 "DMIC", "Microphone Headset", 145 "Headphone Jack", "LOUTP", 146 "Headphone Jack", "ROUTN"; 147 simple-audio-card,cpu { 148 sound-dai = <&i2s_2ch>; 149 }; 150 simple-audio-card,codec { 151 sound-dai = <&es8396>; 152 }; 153 }; 154 155 usb_control { 156 compatible = "rockchip,rk3126-usb-control"; 157 158 otg_drv_gpio = <&gpio2 12 GPIO_ACTIVE_LOW>; 159 rockchip,remote_wakeup; 160 rockchip,usb_irq_wakeup; 161 }; 162 163 vcc_18: vcc-18 { 164 compatible = "regulator-fixed"; 165 regulator-name = "vcc_18"; 166 regulator-min-microvolt = <1800000>; 167 regulator-max-microvolt = <1800000>; 168 regulator-always-on; 169 vin-supply = <&pmic_vcc_18>; 170 }; 171 172 /* vcc33_lcd and vcc18_lcd share the same enable pin */ 173 vcc33_lcd: vcc33-lcd { 174 compatible = "regulator-fixed"; 175 pinctrl-names = "default"; 176 pinctrl-0 = <&lcdc_pwr_en>; 177 178 gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>; 179 enable-active-high; 180 181 regulator-name = "vcc33_lcd"; 182 regulator-min-microvolt = <3300000>; 183 regulator-max-microvolt = <3300000>; 184 vin-supply = <&vcc_io>; 185 }; 186 187 vcc_cvbs_33: vcc-cvbs-33 { 188 compatible = "regulator-fixed"; 189 regulator-name= "vcc-cvbs-33"; 190 regulator-min-microvolt = <3300000>; 191 regulator-max-microvolt = <3300000>; 192 vin-supply = <&pmic_vcc_cvbs_33>; 193 }; 194 195 vcc_sys: vcc-sys { 196 compatible = "regulator-fixed"; 197 regulator-name = "vcc_sys"; 198 regulator-min-microvolt = <4000000>; 199 regulator-max-microvolt = <4000000>; 200 regulator-always-on; 201 }; 202 203 vcc_io: vcc-io { 204 compatible = "regulator-fixed"; 205 regulator-name = "vcc_io"; 206 regulator-min-microvolt = <3300000>; 207 regulator-max-microvolt = <3300000>; 208 regulator-always-on; 209 vin-supply = <&pmic_vcc_io>; 210 }; 211 212 vcc_sd: vcc-sd { 213 compatible = "regulator-fixed"; 214 gpio = <&gpio1 14 GPIO_ACTIVE_LOW>; 215 pinctrl-names = "default"; 216 pinctrl-0 = <&sdmmc_pwr>; 217 regulator-name = "vcc_sd"; 218 regulator-min-microvolt = <3300000>; 219 regulator-max-microvolt = <3300000>; 220 vin-supply = <&vcc_io>; 221 }; 222 223 dvdd_1v8: dvdd-1v8 { 224 compatible = "regulator-fixed"; 225 regulator-name = "dvdd-1v8"; 226 regulator-min-microvolt = <1800000>; 227 regulator-max-microvolt = <1800000>; 228 vin-supply = <&vcc_18>; 229 }; 230 231 dvdd_3v3: dvdd-3v3 { 232 compatible = "regulator-fixed"; 233 regulator-name = "dvdd-3v3"; 234 regulator-min-microvolt = <3300000>; 235 regulator-max-microvolt = <3300000>; 236 vin-supply = <&vcc_cvbs_33>; 237 }; 238 239 wireless-bluetooth { 240 compatible = "bluetooth-platdata"; 241 242 keep_bt_power_on; 243 244 BT,power_gpio = <&gpio3 21 GPIO_ACTIVE_HIGH>; 245 BT,wake_gpio = <&gpio3 26 GPIO_ACTIVE_HIGH>; 246 BT,wake_host_irq = <&gpio3 22 GPIO_ACTIVE_HIGH>; 247 /* TODO: disabled because it doesn't work */ 248 status = "disabled"; 249 }; 250 251 wireless-wlan { 252 compatible = "wlan-platdata"; 253 254 pinctrl-names = "default"; 255 pinctrl-0 = <&wifi_en>; 256 257 wifi_chip_type = "rtl8723ds"; 258 sdio_vref = <1800>; /*1800mv or 3300mv*/ 259 WIFI,host_wake_irq = <&gpio3 23 GPIO_ACTIVE_HIGH>; 260 /* WIFI power controller by sdio pwrseq */ 261 262 status = "okay"; 263 }; 264 265 panel { 266 compatible = "samsung,lsl070nl01", "simple-panel"; 267 power-supply = <&vcc33_lcd>; 268 backlight = <&backlight>; 269 /* 270 * MEDIA_BUS_FMT_RGB666_1X7X3_SPWG - "jeida-18" 271 * MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA - "jeida-24" 272 * MEDIA_BUS_FMT_RGB888_1X7X4_SPWG - "vesa-24" 273 */ 274 bus-format = <MEDIA_BUS_FMT_RGB888_1X7X4_SPWG>; 275 276 display-timings { 277 native-mode = <&timing0>; 278 279 timing0: timing0 { 280 clock-frequency = <48000000>; 281 hactive = <1024>; 282 vactive = <600>; 283 hback-porch = <90>; 284 hfront-porch = <90>; 285 vback-porch = <10>; 286 vfront-porch = <10>; 287 hsync-len = <90>; 288 vsync-len = <10>; 289 hsync-active = <0>; 290 vsync-active = <0>; 291 de-active = <0>; 292 pixelclk-active = <0>; 293 }; 294 }; 295 296 port { 297 panel_in_lvds: endpoint { 298 remote-endpoint = <&lvds_out_panel>; 299 }; 300 }; 301 }; 302}; 303 304&cif_new { 305 status = "okay"; 306 307 port { 308 cif_in: endpoint { 309 remote-endpoint = <&adv7181_out>; 310 vsync-active = <0>; 311 hsync-active = <1>; 312 }; 313 }; 314}; 315 316&codec { 317 #sound-dai-cells = <0>; 318 hp-ctl-gpios = <&gpio3 20 GPIO_ACTIVE_HIGH>; 319 spk-ctl-gpios = <&gpio0 30 GPIO_ACTIVE_HIGH>; 320 spk-mute-delay = <200>; 321 hp-mute-delay = <100>; 322 spk_volume = <25>; 323 hp_volume = <25>; 324 capture_volume = <26>; 325 gpio_debug = <1>; 326 codec_hp_det = <1>; 327 status = "disabled"; 328}; 329 330&cpu0 { 331 cpu-supply = <&vdd_arm>; 332}; 333 334&dfi { 335 status = "okay"; 336}; 337 338&dmc { 339 center-supply = <&vdd_log>; 340 status = "okay"; 341}; 342 343&emmc { 344 clock-frequency = <50000000>; 345 clock-freq-min-max = <400000 50000000>; 346 supports-highspeed; 347 no-sdio; 348 no-sd; 349 bootpart-no-access; 350 supports-DDR_MODE; 351 ignore-pm-notify; 352 keep-power-in-suspend; 353 //poll-hw-reset 354 355 bus-width = <8>; 356 num-slots = <1>; 357 pinctrl-names = "default"; 358 pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>; 359 status = "okay"; 360}; 361 362&display_subsystem { 363 status = "okay"; 364}; 365 366&lvds { 367 status = "okay"; 368 369 ports { 370 port@1 { 371 reg = <1>; 372 373 lvds_out_panel: endpoint { 374 remote-endpoint = <&panel_in_lvds>; 375 }; 376 }; 377 }; 378}; 379 380&gpu { 381 status = "okay"; 382 mali-supply = <&vdd_log>; 383}; 384 385&hevc { 386 status = "okay"; 387}; 388 389&hevc_mmu { 390 status = "okay"; 391}; 392 393&hdmi { 394 status = "okay"; 395}; 396 397&i2c0 { 398 status = "okay"; 399 clock-frequency = <400000>; 400 401 rk816: pmic@1a { 402 compatible = "rockchip,rk816"; 403 status = "okay"; 404 reg = <0x1a>; 405 clock-output-names = "xin32k", "rk816-clkout2"; 406 interrupt-parent = <&gpio1>; 407 interrupts = <11 IRQ_TYPE_LEVEL_LOW>; 408 pinctrl-names = "default"; 409 pinctrl-0 = <&pmic_int_l>; 410 rockchip,system-power-controller; 411 wakeup-source; 412 #clock-cells = <1>; 413 gpio-controller; 414 #gpio-cells = <2>; 415 extcon = <&u2phy>; 416 417 vcc1-supply = <&vcc_sys>; 418 vcc2-supply = <&vcc_sys>; 419 vcc3-supply = <&vcc_sys>; 420 vcc4-supply = <&vcc_sys>; 421 vcc5-supply = <&vcc_io>; 422 vcc6-supply = <&vcc_sys>; 423 424 gpio { 425 status = "okay"; 426 }; 427 428 pwrkey { 429 status = "okay"; 430 }; 431 432 rtc { 433 status = "okay"; 434 }; 435 436 regulators { 437 vdd_arm: DCDC_REG1{ 438 regulator-name= "vdd-arm"; 439 regulator-min-microvolt = <750000>; 440 regulator-max-microvolt = <1500000>; 441 regulator-ramp-delay = <6001>; 442 regulator-always-on; 443 regulator-boot-on; 444 regulator-state-mem { 445 regulator-on-in-suspend; 446 regulator-suspend-microvolt = <900000>; 447 }; 448 }; 449 450 vdd_log: DCDC_REG2 { 451 regulator-name= "vdd-logic"; 452 regulator-min-microvolt = <750000>; 453 regulator-max-microvolt = <1500000>; 454 regulator-ramp-delay = <6001>; 455 regulator-always-on; 456 regulator-boot-on; 457 regulator-state-mem { 458 regulator-on-in-suspend; 459 regulator-suspend-microvolt = <1000000>; 460 }; 461 }; 462 463 vcc_ddr: DCDC_REG3 { 464 regulator-name = "vcc-ddr"; 465 regulator-always-on; 466 regulator-boot-on; 467 }; 468 469 pmic_vcc_io: DCDC_REG4 { 470 regulator-name = "pmic-vcc-io"; 471 regulator-min-microvolt = <3300000>; 472 regulator-max-microvolt = <3300000>; 473 regulator-always-on; 474 regulator-boot-on; 475 regulator-state-mem { 476 regulator-on-in-suspend; 477 regulator-suspend-microvolt = <3000000>; 478 }; 479 }; 480 481 pmic_vcc18_codec: LDO_REG1 { 482 regulator-name = "pmic-vcc18-codec"; 483 regulator-min-microvolt = <1800000>; 484 regulator-max-microvolt = <1800000>; 485 regulator-always-on; 486 regulator-boot-on; 487 regulator-state-mem { 488 regulator-off-in-suspend; 489 }; 490 }; 491 492 pmic_vcc_18: LDO_REG2 { 493 regulator-name = "pmic-vcc_18"; 494 regulator-min-microvolt = <1800000>; 495 regulator-max-microvolt = <1800000>; 496 regulator-always-on; 497 regulator-boot-on; 498 regulator-state-mem { 499 regulator-off-in-suspend; 500 }; 501 }; 502 503 pmic_vdd_11: LDO_REG3 { 504 regulator-name = "pmic-vdd-11"; 505 regulator-min-microvolt = <1100000>; 506 regulator-max-microvolt = <1100000>; 507 regulator-always-on; 508 regulator-boot-on; 509 regulator-state-mem { 510 regulator-on-in-suspend; 511 regulator-suspend-microvolt = <1100000>; 512 }; 513 }; 514 515 pmic_vcc_cvbs_33: LDO_REG4 { 516 regulator-name= "pmic-vcc-cvbs-33"; 517 regulator-min-microvolt = <3300000>; 518 regulator-max-microvolt = <3300000>; 519 regulator-state-mem { 520 regulator-off-in-suspend; 521 }; 522 }; 523 524 pmic_vcca_33: LDO_REG5 { 525 regulator-name= "pmic-vcca-33"; 526 regulator-min-microvolt = <3300000>; 527 regulator-max-microvolt = <3300000>; 528 regulator-always-on; 529 regulator-boot-on; 530 regulator-state-mem { 531 regulator-off-in-suspend; 532 }; 533 }; 534 535 pmic_vcc_tp_33: LDO_REG6 { 536 regulator-name= "pmic-vcc-tp-33"; 537 regulator-min-microvolt = <3300000>; 538 regulator-max-microvolt = <3300000>; 539 regulator-state-mem { 540 regulator-on-in-suspend; 541 regulator-suspend-microvolt = <3300000>; 542 }; 543 }; 544 }; 545 }; 546}; 547 548&i2c2 { 549 status = "okay"; 550 clock-frequency = <400000>; 551 552 touchscreen: ts@14 { 553 compatible = "goodix,gt9xx"; 554 reg = <0x14>; 555 touch-gpio = <&gpio1 8 IRQ_TYPE_LEVEL_LOW>; 556 reset-gpio = <&gpio0 25 GPIO_ACTIVE_LOW>; 557 //power-gpio = <&gpio0 GPIO_C5 GPIO_ACTIVE_LOW>; 558 max-x = <1024>; 559 max-y = <600>; 560 tp-size = <910>; 561 tp-supply = <&pmic_vcc_tp_33>; 562 status = "okay"; 563 }; 564 565 camera: adv7181@21 { 566 compatible = "adi,adv7181"; 567 reg = <0x21>; 568 569 pinctrl-names = "default"; 570 pinctrl-0 = <&cif_rst>; 571 572 dvdd-supply = <&dvdd_1v8>; 573 dvddio-supply = <&dvdd_3v3>; 574 reset-gpios = <&gpio3 11 GPIO_ACTIVE_LOW>; 575 576 status = "okay"; 577 578 port { 579 adv7181_out: endpoint { 580 remote-endpoint = <&cif_in>; 581 }; 582 }; 583 }; 584 585 es8396: es8396@11 { 586 status = "okay"; 587 #sound-dai-cells = <0>; 588 compatible = "es8396"; 589 reg = <0x11>; 590 clock-names = "mclk"; 591 clocks = <&cru SCLK_I2S_OUT>; 592 spk-con-gpio = <&gpio0 30 GPIO_ACTIVE_HIGH>; 593 lineout-con-gpio = <&gpio3 20 GPIO_ACTIVE_HIGH>; 594 }; 595}; 596 597&i2s_2ch { 598 pinctrl-names = "default"; 599 pinctrl-0 = <&i2s_bus>; 600 #sound-dai-cells = <0>; 601 status = "okay"; 602}; 603 604&i2s_8ch { 605 #sound-dai-cells = <0>; 606 status = "disabled"; 607}; 608 609&pwm0 { 610 status = "okay"; 611}; 612 613&saradc { 614 status = "okay"; 615 vref-supply = <&vcc_io>; 616}; 617 618&sdio { 619 cap-mmc-highspeed; 620 cap-sd-highspeed; 621 cap-sdio-irq; 622 clock-frequency = <37500000>; 623 clock-freq-min-max = <200000 37500000>; 624 ignore-pm-notify; 625 keep-power-in-suspend; 626 mmc-pwrseq = <&sdio_pwrseq>; 627 non-removable; 628 no-sd; 629 no-mmc; 630 631 status = "okay"; 632}; 633 634&sdmmc { 635 clock-frequency = <37500000>; 636 clock-freq-min-max = <400000 37500000>; 637 supports-highspeed; 638 no-sdio; 639 no-mmc; 640 broken-cd; 641 card-detect-delay = <200>; 642 ignore-pm-notify; 643 keep-power-in-suspend; 644 vmmc-supply = <&vcc_sd>; 645 cd-gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>; 646 status = "okay"; 647}; 648 649&u2phy { 650 status = "okay"; 651 652 u2phy_otg: otg-port { 653 status = "okay"; 654 }; 655 656 u2phy_host: host-port { 657 status = "okay"; 658 }; 659}; 660 661&uart0 { 662 status = "okay"; 663}; 664 665&uart1 { 666 /* disable uart1 explicitly since fiq-debugger is on uart1 */ 667 status = "disabled"; 668}; 669 670&usb_host_ehci { 671 status = "okay"; 672}; 673 674&usb_host_ohci { 675 status = "okay"; 676}; 677 678&usb_otg { 679 status = "okay"; 680}; 681 682&vop { 683 status = "okay"; 684}; 685 686&vop_mmu { 687 status = "okay"; 688}; 689 690&vpu { 691 status = "okay"; 692}; 693 694&vpu_combo { 695 status = "okay"; 696}; 697 698&vpu_mmu { 699 status = "okay"; 700}; 701 702&pinctrl { 703 camera { 704 cif_rst: cif-rst { 705 rockchip,pins = <3 RK_PB3 RK_FUNC_GPIO &pcfg_pull_default>; 706 }; 707 }; 708 709 pmic { 710 pmic_int_l: pmic-int-l { 711 rockchip,pins = <1 RK_PB3 RK_FUNC_GPIO &pcfg_pull_default>; 712 }; 713 }; 714 715 sdmmc { 716 sdmmc_pwr: sdmmc-pwr { 717 rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_default>; 718 }; 719 }; 720 721 lcdc { 722 lcdc_pwr_en: lcdc-pwr-en { 723 rockchip,pins = <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_default>; 724 }; 725 }; 726 727 wifi { 728 wifi_en: wifi-en { 729 rockchip,pins = <3 RK_PD3 RK_FUNC_GPIO &pcfg_output_high>; 730 }; 731 wifi_pwr: wifi-pwr { 732 rockchip,pins = <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_default>; 733 }; 734 }; 735}; 736