1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 3/dts-v1/; 4 5#include <dt-bindings/gpio/gpio.h> 6#include <dt-bindings/input/linux-event-codes.h> 7#include <dt-bindings/leds/common.h> 8#include <dt-bindings/pinctrl/rockchip.h> 9#include <dt-bindings/pwm/pwm.h> 10#include <dt-bindings/soc/rockchip,vop2.h> 11#include <dt-bindings/thermal/thermal.h> 12#include <dt-bindings/usb/pd.h> 13#include "rk3588s.dtsi" 14 15/ { 16 model = "Gameforce Ace"; 17 chassis-type = "handset"; 18 compatible = "gameforce,ace", "rockchip,rk3588s"; 19 20 aliases { 21 mmc0 = &sdhci; 22 mmc1 = &sdmmc; 23 mmc2 = &sdio; 24 }; 25 26 chosen { 27 stdout-path = "serial2:1500000n8"; 28 }; 29 30 adc_keys: adc-keys { 31 compatible = "adc-keys"; 32 io-channels = <&saradc 1>; 33 io-channel-names = "buttons"; 34 keyup-threshold-microvolt = <1800000>; 35 poll-interval = <60>; 36 37 button-vol-up { 38 label = "VOLUMEUP"; 39 linux,code = <KEY_VOLUMEUP>; 40 press-threshold-microvolt = <17000>; 41 }; 42 43 button-vol-down { 44 label = "VOLUMEDOWN"; 45 linux,code = <KEY_VOLUMEDOWN>; 46 press-threshold-microvolt = <417000>; 47 }; 48 }; 49 50 /* Joystick range values based on hardware observation. */ 51 adc_joystick: adc-joystick { 52 compatible = "adc-joystick"; 53 io-channels = <&saradc 2>, <&saradc 3>, 54 <&saradc 4>, <&saradc 5>; 55 poll-interval = <60>; 56 #address-cells = <1>; 57 #size-cells = <0>; 58 59 axis@0 { 60 reg = <0>; 61 abs-flat = <40>; 62 abs-fuzz = <30>; 63 abs-range = <0 4095>; 64 linux,code = <ABS_RX>; 65 }; 66 67 axis@1 { 68 reg = <1>; 69 abs-flat = <40>; 70 abs-fuzz = <30>; 71 abs-range = <0 4095>; 72 linux,code = <ABS_RY>; 73 }; 74 75 axis@2 { 76 reg = <2>; 77 abs-flat = <40>; 78 abs-fuzz = <30>; 79 abs-range = <0 4095>; 80 linux,code = <ABS_Y>; 81 }; 82 83 axis@3 { 84 reg = <3>; 85 abs-flat = <40>; 86 abs-fuzz = <30>; 87 abs-range = <0 4095>; 88 linux,code = <ABS_X>; 89 }; 90 }; 91 92 /* Trigger range values based on hardware observation. */ 93 adc_triggers: adc-trigger { 94 compatible = "adc-joystick"; 95 io-channels = <&ti_adc 6>, 96 <&ti_adc 7>; 97 poll-interval = <60>; 98 #address-cells = <1>; 99 #size-cells = <0>; 100 101 axis@0 { 102 reg = <0>; 103 abs-flat = <15>; 104 abs-fuzz = <15>; 105 abs-range = <890 1530>; 106 linux,code = <ABS_HAT2X>; 107 }; 108 109 axis@1 { 110 reg = <1>; 111 abs-flat = <15>; 112 abs-fuzz = <15>; 113 abs-range = <1010 1550>; 114 linux,code = <ABS_HAT2Y>; 115 }; 116 }; 117 118 analog-sound { 119 compatible = "simple-audio-card"; 120 pinctrl-0 = <&hp_detect>; 121 pinctrl-names = "default"; 122 simple-audio-card,aux-devs = <&_headphone>, <&_speaker>; 123 simple-audio-card,bitclock-master = <&masterdai>; 124 simple-audio-card,format = "i2s"; 125 simple-audio-card,frame-master = <&masterdai>; 126 simple-audio-card,hp-det-gpios = <&gpio3 RK_PA6 GPIO_ACTIVE_LOW>; 127 simple-audio-card,mclk-fs = <256>; 128 simple-audio-card,name = "rockchip,es8388-codec"; 129 simple-audio-card,pin-switches = "Headphones", "Speaker"; 130 simple-audio-card,routing = 131 "Speaker Amplifier INL", "LOUT2", 132 "Speaker Amplifier INR", "ROUT2", 133 "Speaker", "Speaker Amplifier OUTL", 134 "Speaker", "Speaker Amplifier OUTR", 135 "Headphones Amplifier INL", "LOUT1", 136 "Headphones Amplifier INR", "ROUT1", 137 "Headphones", "Headphones Amplifier OUTL", 138 "Headphones", "Headphones Amplifier OUTR", 139 "LINPUT1", "Microphone Jack", 140 "RINPUT1", "Microphone Jack", 141 "LINPUT2", "Onboard Microphone", 142 "RINPUT2", "Onboard Microphone"; 143 simple-audio-card,widgets = 144 "Microphone", "Microphone Jack", 145 "Microphone", "Onboard Microphone", 146 "Headphone", "Headphones", 147 "Speaker", "Speaker"; 148 149 masterdai: simple-audio-card,codec { 150 sound-dai = <&es8388>; 151 system-clock-frequency = <12288000>; 152 }; 153 154 simple-audio-card,cpu { 155 sound-dai = <&i2s0_8ch>; 156 }; 157 }; 158 159 backlight: backlight { 160 compatible = "pwm-backlight"; 161 enable-gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_HIGH>; 162 pinctrl-0 = <&lcd_bl_en>; 163 pinctrl-names = "default"; 164 pwms = <&pwm13 0 25000 PWM_POLARITY_INVERTED>; 165 }; 166 167 battery: battery { 168 compatible = "simple-battery"; 169 charge-full-design-microamp-hours = <3700000>; 170 constant-charge-current-max-microamp = <2500000>; 171 constant-charge-voltage-max-microvolt = <8750000>; 172 voltage-min-design-microvolt = <7400000>; 173 }; 174 175 gpio_keys: gpio-keys { 176 compatible = "gpio-keys"; 177 pinctrl-0 = <&btn_pins_ctrl>; 178 pinctrl-names = "default"; 179 180 button-a { 181 gpios = <&gpio1 RK_PC6 GPIO_ACTIVE_LOW>; 182 label = "EAST"; 183 linux,code = <BTN_EAST>; 184 }; 185 186 button-b { 187 gpios = <&gpio1 RK_PA5 GPIO_ACTIVE_LOW>; 188 label = "SOUTH"; 189 linux,code = <BTN_SOUTH>; 190 }; 191 192 button-down { 193 gpios = <&gpio1 RK_PB1 GPIO_ACTIVE_LOW>; 194 label = "DPAD-DOWN"; 195 linux,code = <BTN_DPAD_DOWN>; 196 }; 197 198 button-home { 199 gpios = <&gpio1 RK_PA0 GPIO_ACTIVE_LOW>; 200 label = "FUNCTION"; 201 linux,code = <BTN_MODE>; 202 }; 203 204 button-l1 { 205 gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_LOW>; 206 label = "L1"; 207 linux,code = <BTN_TL>; 208 }; 209 210 button-left { 211 gpios = <&gpio1 RK_PD7 GPIO_ACTIVE_LOW>; 212 label = "DPAD-LEFT"; 213 linux,code = <BTN_DPAD_LEFT>; 214 }; 215 216 button-menu { 217 gpios = <&gpio1 RK_PB0 GPIO_ACTIVE_LOW>; 218 label = "HOME"; 219 linux,code = <KEY_HOME>; 220 }; 221 222 button-r1 { 223 gpios = <&gpio1 RK_PB2 GPIO_ACTIVE_LOW>; 224 label = "R1"; 225 linux,code = <BTN_TR>; 226 }; 227 228 button-right { 229 gpios = <&gpio1 RK_PB7 GPIO_ACTIVE_LOW>; 230 label = "DPAD-RIGHT"; 231 linux,code = <BTN_DPAD_RIGHT>; 232 }; 233 234 button-select { 235 gpios = <&gpio1 RK_PA3 GPIO_ACTIVE_LOW>; 236 label = "SELECT"; 237 linux,code = <BTN_SELECT>; 238 }; 239 240 button-start { 241 gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_LOW>; 242 label = "START"; 243 linux,code = <BTN_START>; 244 }; 245 246 button-thumbl { 247 gpios = <&gpio1 RK_PA4 GPIO_ACTIVE_LOW>; 248 label = "THUMBL"; 249 linux,code = <BTN_THUMBL>; 250 }; 251 252 button-thumbr { 253 gpios = <&gpio1 RK_PD6 GPIO_ACTIVE_LOW>; 254 label = "THUMBR"; 255 linux,code = <BTN_THUMBR>; 256 }; 257 258 button-up { 259 gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_LOW>; 260 label = "DPAD-UP"; 261 linux,code = <BTN_DPAD_UP>; 262 }; 263 264 button-x { 265 gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_LOW>; 266 label = "NORTH"; 267 linux,code = <BTN_NORTH>; 268 }; 269 270 button-y { 271 gpios = <&gpio1 RK_PB3 GPIO_ACTIVE_LOW>; 272 label = "WEST"; 273 linux,code = <BTN_WEST>; 274 }; 275 }; 276 277 gpio_leds: gpio-leds { 278 compatible = "gpio-leds"; 279 pinctrl-names = "default"; 280 pinctrl-0 = <&led_pins>; 281 282 green_led: led-0 { 283 color = <LED_COLOR_ID_GREEN>; 284 gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_HIGH>; 285 function = LED_FUNCTION_STATUS; 286 }; 287 288 red_led: led-1 { 289 color = <LED_COLOR_ID_RED>; 290 gpios = <&gpio3 RK_PC2 GPIO_ACTIVE_HIGH>; 291 function = LED_FUNCTION_CHARGING; 292 }; 293 }; 294 295 amp_headphone: headphone-amplifier { 296 compatible = "simple-audio-amplifier"; 297 enable-gpios = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>; 298 pinctrl-0 = <&headphone_amplifier_en>; 299 pinctrl-names = "default"; 300 sound-name-prefix = "Headphones Amplifier"; 301 }; 302 303 pwm_fan: pwm-fan { 304 compatible = "pwm-fan"; 305 #cooling-cells = <2>; 306 cooling-levels = <0 120 150 180 210 240 255>; 307 fan-supply = <&vcc5v0_sys>; 308 interrupt-parent = <&gpio4>; 309 interrupts = <RK_PB2 IRQ_TYPE_EDGE_RISING>; 310 pulses-per-revolution = <4>; 311 pwms = <&pwm12 0 50000 PWM_POLARITY_INVERTED>; 312 }; 313 314 pwm_gpio33: pwm-33 { 315 compatible = "pwm-gpio"; 316 gpios = <&gpio1 RK_PA1 GPIO_ACTIVE_HIGH>; 317 pinctrl-0 = <&vib_right_h>; 318 pinctrl-names = "default"; 319 #pwm-cells = <3>; 320 }; 321 322 pwm_gpio132: pwm-132 { 323 compatible = "pwm-gpio"; 324 gpios = <&gpio4 RK_PA4 GPIO_ACTIVE_HIGH>; 325 pinctrl-0 = <&vib_left_h>; 326 pinctrl-names = "default"; 327 #pwm-cells = <3>; 328 }; 329 330 sdio_pwrseq: sdio-pwrseq { 331 compatible = "mmc-pwrseq-simple"; 332 clock-names = "ext_clock"; 333 clocks = <&rtc_hym8563>; 334 pinctrl-0 = <&wifi_enable_h>; 335 pinctrl-names = "default"; 336 post-power-on-delay-ms = <200>; 337 power-off-delay-us = <5000000>; 338 reset-gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>; 339 }; 340 341 amp_speaker: speaker-amplifier { 342 compatible = "simple-audio-amplifier"; 343 enable-gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>; 344 pinctrl-0 = <&speaker_amplifier_en>; 345 pinctrl-names = "default"; 346 sound-name-prefix = "Speaker Amplifier"; 347 VCC-supply = <&vcc5v0_spk>; 348 }; 349 350 vcc_1v1_nldo_s3: regulator-vcc-1v1-nldo-s3 { 351 compatible = "regulator-fixed"; 352 regulator-always-on; 353 regulator-boot-on; 354 regulator-max-microvolt = <1100000>; 355 regulator-min-microvolt = <1100000>; 356 regulator-name = "vcc_1v1_nldo_s3"; 357 vin-supply = <&vcc5v0_sys>; 358 }; 359 360 vcc3v3_lcd0_n: regulator-vcc3v3-lcd0-n { 361 compatible = "regulator-fixed"; 362 enable-active-high; 363 gpio = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>; 364 pinctrl-0 = <&vcc_lcd_h>; 365 pinctrl-names = "default"; 366 regulator-max-microvolt = <3300000>; 367 regulator-min-microvolt = <3300000>; 368 regulator-name = "vcc3v3_lcd0_n"; 369 vin-supply = <&vcc_3v3_s3>; 370 regulator-state-mem { 371 regulator-off-in-suspend; 372 }; 373 }; 374 375 vcc_3v3_sd_s0: regulator-vcc-3v3-sd-s0 { 376 compatible = "regulator-fixed"; 377 enable-active-high; 378 gpio = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>; 379 pinctrl-0 = <&sd_s0_pwr>; 380 pinctrl-names = "default"; 381 regulator-max-microvolt = <3000000>; 382 regulator-min-microvolt = <3000000>; 383 regulator-name = "vcc_3v3_sd_s0"; 384 vin-supply = <&vcc_3v3_s3>; 385 }; 386 387 vcc5v0_spk: regulator-vcc5v0-spk { 388 compatible = "regulator-fixed"; 389 enable-active-high; 390 gpio = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>; 391 pinctrl-0 = <&vcc5v0_spk_pwr>; 392 pinctrl-names = "default"; 393 regulator-max-microvolt = <5000000>; 394 regulator-min-microvolt = <5000000>; 395 regulator-name = "vcc5v0_spk"; 396 vin-supply = <&vcc5v0_sys>; 397 regulator-state-mem { 398 regulator-off-in-suspend; 399 }; 400 }; 401 402 vcc5v0_sys: regulator-vcc5v0-sys { 403 compatible = "regulator-fixed"; 404 regulator-always-on; 405 regulator-boot-on; 406 regulator-max-microvolt = <5000000>; 407 regulator-min-microvolt = <5000000>; 408 regulator-name = "vcc5v0_sys"; 409 }; 410 411 vibrator_l: vibrator-l { 412 compatible = "pwm-vibrator"; 413 pwm-names = "enable"; 414 pwms = <&pwm_gpio132 0 20000000 0>; 415 }; 416 417 vibrator_r: vibrator-r { 418 compatible = "pwm-vibrator"; 419 pwm-names = "enable"; 420 pwms = <&pwm_gpio33 0 20000000 0>; 421 }; 422}; 423 424&combphy2_psu { 425 status = "okay"; 426}; 427 428&cpu_l0 { 429 cpu-supply = <&vdd_cpu_lit_s0>; 430}; 431 432&cpu_l1 { 433 cpu-supply = <&vdd_cpu_lit_s0>; 434}; 435 436&cpu_l2 { 437 cpu-supply = <&vdd_cpu_lit_s0>; 438}; 439 440&cpu_l3 { 441 cpu-supply = <&vdd_cpu_lit_s0>; 442}; 443 444&cpu_b0 { 445 cpu-supply = <&vdd_cpu_big0_s0>; 446}; 447 448&cpu_b1 { 449 cpu-supply = <&vdd_cpu_big0_s0>; 450}; 451 452&cpu_b2 { 453 cpu-supply = <&vdd_cpu_big1_s0>; 454}; 455 456&cpu_b3 { 457 cpu-supply = <&vdd_cpu_big1_s0>; 458}; 459 460&dsi0 { 461 #address-cells = <1>; 462 #size-cells = <0>; 463 status = "okay"; 464 465 panel@0 { 466 compatible = "huiling,hl055fhav028c", "himax,hx8399c"; 467 reg = <0>; 468 backlight = <&backlight>; 469 iovcc-supply = <&vcc3v3_lcd0_n>; 470 pinctrl-0 = <&lcd_rst>; 471 pinctrl-names = "default"; 472 reset-gpios = <&gpio1 RK_PD5 GPIO_ACTIVE_LOW>; 473 rotation = <90>; 474 vcc-supply = <&vcc3v3_lcd0_n>; 475 476 port { 477 mipi_panel_in: endpoint { 478 remote-endpoint = <&dsi0_out_panel>; 479 }; 480 }; 481 }; 482}; 483 484&dsi0_in { 485 dsi0_in_vp3: endpoint { 486 remote-endpoint = <&vp3_out_dsi0>; 487 }; 488}; 489 490&dsi0_out { 491 dsi0_out_panel: endpoint { 492 remote-endpoint = <&mipi_panel_in>; 493 }; 494}; 495 496&gpu { 497 mali-supply = <&vdd_gpu_s0>; 498 status = "okay"; 499}; 500 501&i2c0 { 502 pinctrl-0 = <&i2c0m2_xfer>; 503 pinctrl-names = "default"; 504 status = "okay"; 505 506 vdd_cpu_big0_s0: regulator@42 { 507 compatible = "rockchip,rk8602"; 508 reg = <0x42>; 509 fcs,suspend-voltage-selector = <1>; 510 regulator-max-microvolt = <1050000>; 511 regulator-min-microvolt = <550000>; 512 regulator-name = "vdd_cpu_big0_s0"; 513 regulator-ramp-delay = <2300>; 514 vin-supply = <&vcc5v0_sys>; 515 516 regulator-state-mem { 517 regulator-off-in-suspend; 518 }; 519 }; 520 521 vdd_cpu_big1_s0: regulator@43 { 522 compatible = "rockchip,rk8603", "rockchip,rk8602"; 523 reg = <0x43>; 524 fcs,suspend-voltage-selector = <1>; 525 regulator-max-microvolt = <1050000>; 526 regulator-min-microvolt = <550000>; 527 regulator-name = "vdd_cpu_big1_s0"; 528 regulator-ramp-delay = <2300>; 529 vin-supply = <&vcc5v0_sys>; 530 531 regulator-state-mem { 532 regulator-off-in-suspend; 533 }; 534 }; 535}; 536 537&i2c2 { 538 status = "okay"; 539 540 vdd_npu_s0: regulator@42 { 541 compatible = "rockchip,rk8602"; 542 reg = <0x42>; 543 fcs,suspend-voltage-selector = <1>; 544 regulator-max-microvolt = <950000>; 545 regulator-min-microvolt = <550000>; 546 regulator-name = "vdd_npu_s0"; 547 regulator-ramp-delay = <2300>; 548 vin-supply = <&vcc5v0_sys>; 549 550 regulator-state-mem { 551 regulator-off-in-suspend; 552 }; 553 }; 554}; 555 556&i2c3 { 557 status = "okay"; 558 559 touchscreen@14 { 560 compatible = "goodix,gt911"; 561 reg = <0x14>; 562 interrupt-parent = <&gpio1>; 563 interrupts = <RK_PA6 IRQ_TYPE_LEVEL_LOW>; 564 irq-gpios = <&gpio1 RK_PA6 GPIO_ACTIVE_HIGH>; 565 pinctrl-0 = <&touch_int>, <&touch_rst>; 566 pinctrl-names = "default"; 567 reset-gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_HIGH>; 568 touchscreen-inverted-x; 569 touchscreen-size-x = <1080>; 570 touchscreen-size-y = <1920>; 571 touchscreen-swapped-x-y; 572 }; 573}; 574 575&i2c4 { 576 pinctrl-0 = <&i2c4m2_xfer>; 577 status = "okay"; 578 579 ti_adc: adc@48 { 580 compatible = "ti,ads1015"; 581 reg = <0x48>; 582 #address-cells = <1>; 583 #io-channel-cells = <1>; 584 #size-cells = <0>; 585 586 channel@4 { 587 reg = <4>; 588 }; 589 590 channel@5 { 591 reg = <5>; 592 }; 593 594 channel@6 { 595 reg = <6>; 596 }; 597 598 channel@7 { 599 reg = <7>; 600 }; 601 }; 602 603 imu@68 { 604 compatible = "invensense,mpu6880"; 605 reg = <0x68>; 606 interrupt-parent = <&gpio0>; 607 interrupts = <RK_PD3 IRQ_TYPE_EDGE_RISING>; 608 }; 609}; 610 611&i2c6 { 612 pinctrl-0 = <&i2c6m3_xfer>; 613 status = "okay"; 614 615 rtc_hym8563: rtc@51 { 616 compatible = "haoyu,hym8563"; 617 reg = <0x51>; 618 #clock-cells = <0>; 619 clock-output-names = "hym8563"; 620 interrupt-parent = <&gpio0>; 621 interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>; 622 pinctrl-0 = <&hym8563_int>, <&clk32k_in>; 623 pinctrl-names = "default"; 624 wakeup-source; 625 }; 626 627 /* Battery profile from BSP device tree. */ 628 battery@62 { 629 compatible = "cellwise,cw2015"; 630 reg = <0x62>; 631 632 cellwise,battery-profile = /bits/ 8 633 <0x18 0x0A 0x76 0x6A 0x6A 0x6A 0x68 0x66 634 0x62 0x5E 0x5A 0x58 0x5F 0x59 0x46 0x3D 635 0x35 0x2D 0x28 0x21 0x29 0x38 0x44 0x50 636 0x1A 0x85 0x07 0xAE 0x14 0x28 0x48 0x56 637 0x66 0x66 0x66 0x6A 0x3E 0x1A 0x6C 0x3D 638 0x09 0x38 0x1A 0x49 0x7B 0x96 0xA2 0x15 639 0x3B 0x77 0x9A 0xB1 0x80 0x87 0xB0 0xCB 640 0x2F 0x00 0x64 0xA5 0xB5 0x1C 0xF0 0x49>; 641 cellwise,monitor-interval-ms = <5000>; 642 monitored-battery = <&battery>; 643 status = "okay"; 644 }; 645}; 646 647&i2c7 { 648 status = "okay"; 649 650 es8388: audio-codec@11 { 651 compatible = "everest,es8388", "everest,es8328"; 652 reg = <0x11>; 653 assigned-clock-rates = <12288000>; 654 assigned-clocks = <&cru I2S0_8CH_MCLKOUT>; 655 AVDD-supply = <&vcc_3v3_s3>; 656 clocks = <&cru I2S0_8CH_MCLKOUT>; 657 DVDD-supply = <&vcc_1v8_s3>; 658 HPVDD-supply = <&vcc_3v3_s3>; 659 PVDD-supply = <&vcc_1v8_s3>; 660 #sound-dai-cells = <0>; 661 }; 662}; 663 664&i2s0_8ch { 665 pinctrl-0 = <&i2s0_lrck 666 &i2s0_mclk 667 &i2s0_sclk 668 &i2s0_sdi0 669 &i2s0_sdo0>; 670 status = "okay"; 671}; 672 673&mipidcphy0 { 674 status = "okay"; 675}; 676 677&package_thermal { 678 polling-delay = <1000>; 679 680 trips { 681 package_fan0: package-fan0 { 682 temperature = <55000>; 683 hysteresis = <2000>; 684 type = "active"; 685 }; 686 687 package_fan1: package-fan1 { 688 temperature = <65000>; 689 hysteresis = <2000>; 690 type = "active"; 691 }; 692 }; 693 694 cooling-maps { 695 map1 { 696 trip = <&package_fan0>; 697 cooling-device = <&pwm_fan THERMAL_NO_LIMIT 1>; 698 }; 699 700 map2 { 701 trip = <&package_fan1>; 702 cooling-device = <&pwm_fan 2 THERMAL_NO_LIMIT>; 703 }; 704 }; 705}; 706 707/* 708 * Attempts to use an M.2 SATA in this slot worked intermittently 709 * with the correct nodes enabled in device-tree, but eventually 710 * resulted in a destroyed board. Advise caution. 711 */ 712&pcie2x1l1 { 713 pinctrl-0 = <&pcie_rst>; 714 pinctrl-names = "default"; 715 reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>; 716 status = "okay"; 717}; 718 719&pd_gpu { 720 domain-supply = <&vdd_gpu_s0>; 721}; 722 723&pinctrl { 724 audio-amplifier { 725 headphone_amplifier_en: headphone-amplifier-en { 726 rockchip,pins = 727 <0 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>; 728 }; 729 730 hp_detect: headphone-detect { 731 rockchip,pins = 732 <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>; 733 }; 734 735 speaker_amplifier_en: speaker-amplifier-en { 736 rockchip,pins = 737 <4 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>; 738 }; 739 }; 740 741 bt { 742 bt_enable_h: bt-enable-h { 743 rockchip,pins = 744 <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>; 745 }; 746 747 bt_host_wake_l: bt-host-wake-l { 748 rockchip,pins = 749 <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_down>; 750 }; 751 752 bt_wake_l: bt-wake-l { 753 rockchip,pins = 754 <3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>; 755 }; 756 }; 757 758 charger { 759 boost_enable_h: boost-enable-h { 760 rockchip,pins = 761 <4 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>; 762 }; 763 charger_int_h: charger-int-h { 764 rockchip,pins = 765 <0 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>; 766 }; 767 }; 768 769 hym8563 { 770 hym8563_int: hym8563-int { 771 rockchip,pins = 772 <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>; 773 }; 774 }; 775 776 gpio-btns { 777 btn_pins_ctrl: btn-pins-ctrl { 778 rockchip,pins = 779 <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>, 780 <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>, 781 <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>, 782 <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>, 783 <1 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>, 784 <1 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>, 785 <1 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>, 786 <1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>, 787 <1 RK_PB3 RK_FUNC_GPIO &pcfg_pull_up>, 788 <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>, 789 <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>, 790 <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>, 791 <1 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>, 792 <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>, 793 <1 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>, 794 <1 RK_PD7 RK_FUNC_GPIO &pcfg_pull_up>; 795 }; 796 }; 797 798 gpio-leds { 799 led_pins: led-pins { 800 rockchip,pins = 801 <3 RK_PC1 RK_FUNC_GPIO &pcfg_pull_up>, 802 <3 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>; 803 }; 804 }; 805 806 lcd { 807 lcd_bl_en: lcd-bl-en { 808 rockchip,pins = 809 <3 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>; 810 }; 811 812 lcd_rst: lcd-rst { 813 rockchip,pins = 814 <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>; 815 }; 816 }; 817 818 pcie-pins { 819 pcie_rst: pcie-rst { 820 rockchip,pins = 821 <3 RK_PD1 RK_FUNC_GPIO &pcfg_pull_up>; 822 }; 823 }; 824 825 sd-pwr { 826 sd_s0_pwr: sd-s0-pwr { 827 rockchip,pins = 828 <4 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>; 829 }; 830 }; 831 832 spk-pwr { 833 vcc5v0_spk_pwr: vcc5v0-spk-pwr { 834 rockchip,pins = 835 <4 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>; 836 }; 837 }; 838 839 touch { 840 touch_int: touch-int { 841 rockchip,pins = 842 <1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>; 843 }; 844 845 touch_rst: touch-rst { 846 rockchip,pins = 847 <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>; 848 }; 849 }; 850 851 usb-typec { 852 usbc0_int: usbc0-int { 853 rockchip,pins = 854 <0 RK_PC7 RK_FUNC_GPIO &pcfg_pull_up>; 855 }; 856 }; 857 858 vcc3v3-lcd { 859 vcc_lcd_h: vcc-lcd-h { 860 rockchip,pins = 861 <4 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>; 862 }; 863 }; 864 865 vibrator { 866 vib_left_h: vib-left-h { 867 rockchip,pins = 868 <4 RK_PA4 RK_FUNC_GPIO &pcfg_pull_down>; 869 }; 870 871 vib_right_h: vib-right-h { 872 rockchip,pins = 873 <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_down>; 874 }; 875 }; 876 877 wifi { 878 wifi_enable_h: wifi-enable-h { 879 rockchip,pins = 880 <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>; 881 }; 882 883 wifi_host_wake_irq: wifi-host-wake-irq { 884 rockchip,pins = 885 <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_down>; 886 }; 887 }; 888}; 889 890&pwm12 { 891 pinctrl-0 = <&pwm12m1_pins>; 892 status = "okay"; 893}; 894 895&pwm13 { 896 pinctrl-0 = <&pwm13m1_pins>; 897 status = "okay"; 898}; 899 900&saradc { 901 vref-supply = <&vcc_1v8_s0>; 902 status = "okay"; 903}; 904 905&sdhci { 906 bus-width = <8>; 907 mmc-hs400-1_8v; 908 mmc-hs400-enhanced-strobe; 909 no-sd; 910 no-sdio; 911 non-removable; 912 status = "okay"; 913}; 914 915&sdio { 916 #address-cells = <1>; 917 bus-width = <4>; 918 cap-sd-highspeed; 919 cap-sdio-irq; 920 disable-wp; 921 keep-power-in-suspend; 922 max-frequency = <150000000>; 923 mmc-pwrseq = <&sdio_pwrseq>; 924 no-mmc; 925 no-sd; 926 sd-uhs-sdr104; 927 #size-cells = <0>; 928 status = "okay"; 929 930 brcmf: wifi@1 { 931 compatible = "brcm,bcm43456-fmac", "brcm,bcm4329-fmac"; 932 reg = <1>; 933 interrupt-parent = <&gpio0>; 934 interrupts = <RK_PA0 IRQ_TYPE_LEVEL_HIGH>; 935 interrupt-names = "host-wake"; 936 pinctrl-0 = <&wifi_host_wake_irq>; 937 pinctrl-names = "default"; 938 }; 939}; 940 941&sdmmc { 942 bus-width = <4>; 943 cap-mmc-highspeed; 944 cap-sd-highspeed; 945 disable-wp; 946 max-frequency = <150000000>; 947 no-sdio; 948 no-mmc; 949 sd-uhs-sdr104; 950 vmmc-supply = <&vcc_3v3_sd_s0>; 951 vqmmc-supply = <&vccio_sd_s0>; 952 status = "okay"; 953}; 954 955&spi2 { 956 #address-cells = <1>; 957 assigned-clocks = <&cru CLK_SPI2>; 958 assigned-clock-rates = <200000000>; 959 num-cs = <1>; 960 pinctrl-0 = <&spi2m2_pins>, <&spi2m2_cs0>; 961 pinctrl-names = "default"; 962 #size-cells = <0>; 963 status = "okay"; 964 965 pmic@0 { 966 compatible = "rockchip,rk806"; 967 reg = <0x0>; 968 #gpio-cells = <2>; 969 gpio-controller; 970 interrupt-parent = <&gpio0>; 971 interrupts = <RK_PA7 IRQ_TYPE_LEVEL_LOW>; 972 pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>, 973 <&rk806_dvs2_null>, <&rk806_dvs3_null>; 974 pinctrl-names = "default"; 975 spi-max-frequency = <1000000>; 976 system-power-controller; 977 978 vcc1-supply = <&vcc5v0_sys>; 979 vcc2-supply = <&vcc5v0_sys>; 980 vcc3-supply = <&vcc5v0_sys>; 981 vcc4-supply = <&vcc5v0_sys>; 982 vcc5-supply = <&vcc5v0_sys>; 983 vcc6-supply = <&vcc5v0_sys>; 984 vcc7-supply = <&vcc5v0_sys>; 985 vcc8-supply = <&vcc5v0_sys>; 986 vcc9-supply = <&vcc5v0_sys>; 987 vcc10-supply = <&vcc5v0_sys>; 988 vcc11-supply = <&vcc_2v0_pldo_s3>; 989 vcc12-supply = <&vcc5v0_sys>; 990 vcc13-supply = <&vcc_1v1_nldo_s3>; 991 vcc14-supply = <&vcc_1v1_nldo_s3>; 992 vcca-supply = <&vcc5v0_sys>; 993 994 rk806_dvs1_null: dvs1-null-pins { 995 pins = "gpio_pwrctrl1"; 996 function = "pin_fun0"; 997 }; 998 999 rk806_dvs2_null: dvs2-null-pins { 1000 pins = "gpio_pwrctrl2"; 1001 function = "pin_fun0"; 1002 }; 1003 1004 rk806_dvs3_null: dvs3-null-pins { 1005 pins = "gpio_pwrctrl3"; 1006 function = "pin_fun0"; 1007 }; 1008 1009 regulators { 1010 vdd_gpu_s0: dcdc-reg1 { 1011 regulator-boot-on; 1012 regulator-enable-ramp-delay = <400>; 1013 regulator-max-microvolt = <950000>; 1014 regulator-min-microvolt = <550000>; 1015 regulator-name = "vdd_gpu_s0"; 1016 regulator-ramp-delay = <12500>; 1017 regulator-state-mem { 1018 regulator-off-in-suspend; 1019 }; 1020 }; 1021 1022 vdd_cpu_lit_s0: dcdc-reg2 { 1023 regulator-always-on; 1024 regulator-boot-on; 1025 regulator-max-microvolt = <950000>; 1026 regulator-min-microvolt = <550000>; 1027 regulator-ramp-delay = <12500>; 1028 regulator-name = "vdd_cpu_lit_s0"; 1029 regulator-state-mem { 1030 regulator-off-in-suspend; 1031 }; 1032 }; 1033 1034 vdd_logic_s0: dcdc-reg3 { 1035 regulator-always-on; 1036 regulator-boot-on; 1037 regulator-max-microvolt = <750000>; 1038 regulator-min-microvolt = <675000>; 1039 regulator-name = "vdd_logic_s0"; 1040 regulator-ramp-delay = <12500>; 1041 regulator-state-mem { 1042 regulator-on-in-suspend; 1043 regulator-suspend-microvolt = <750000>; 1044 }; 1045 }; 1046 1047 vdd_vdenc_s0: dcdc-reg4 { 1048 regulator-always-on; 1049 regulator-boot-on; 1050 regulator-max-microvolt = <950000>; 1051 regulator-min-microvolt = <550000>; 1052 regulator-name = "vdd_vdenc_s0"; 1053 regulator-ramp-delay = <12500>; 1054 regulator-state-mem { 1055 regulator-off-in-suspend; 1056 }; 1057 }; 1058 1059 vdd_ddr_s0: dcdc-reg5 { 1060 regulator-always-on; 1061 regulator-boot-on; 1062 regulator-min-microvolt = <675000>; 1063 regulator-max-microvolt = <900000>; 1064 regulator-ramp-delay = <12500>; 1065 regulator-name = "vdd_ddr_s0"; 1066 regulator-state-mem { 1067 regulator-off-in-suspend; 1068 regulator-suspend-microvolt = <850000>; 1069 }; 1070 }; 1071 1072 vdd2_ddr_s3: dcdc-reg6 { 1073 regulator-always-on; 1074 regulator-boot-on; 1075 regulator-name = "vdd2_ddr_s3"; 1076 regulator-state-mem { 1077 regulator-on-in-suspend; 1078 }; 1079 }; 1080 1081 vcc_2v0_pldo_s3: dcdc-reg7 { 1082 regulator-always-on; 1083 regulator-boot-on; 1084 regulator-max-microvolt = <2000000>; 1085 regulator-min-microvolt = <2000000>; 1086 regulator-name = "vdd_2v0_pldo_s3"; 1087 regulator-state-mem { 1088 regulator-on-in-suspend; 1089 regulator-suspend-microvolt = <2000000>; 1090 }; 1091 }; 1092 1093 vcc_3v3_s3: dcdc-reg8 { 1094 regulator-always-on; 1095 regulator-boot-on; 1096 regulator-max-microvolt = <3300000>; 1097 regulator-min-microvolt = <3300000>; 1098 regulator-name = "vcc_3v3_s3"; 1099 regulator-state-mem { 1100 regulator-on-in-suspend; 1101 regulator-suspend-microvolt = <3300000>; 1102 }; 1103 }; 1104 1105 vddq_ddr_s0: dcdc-reg9 { 1106 regulator-always-on; 1107 regulator-boot-on; 1108 regulator-name = "vddq_ddr_s0"; 1109 regulator-state-mem { 1110 regulator-off-in-suspend; 1111 }; 1112 }; 1113 1114 vcc_1v8_s3: dcdc-reg10 { 1115 regulator-always-on; 1116 regulator-boot-on; 1117 regulator-max-microvolt = <1800000>; 1118 regulator-min-microvolt = <1800000>; 1119 regulator-name = "vcc_1v8_s3"; 1120 regulator-state-mem { 1121 regulator-on-in-suspend; 1122 regulator-suspend-microvolt = <1800000>; 1123 }; 1124 }; 1125 1126 avcc_1v8_s0: pldo-reg1 { 1127 regulator-always-on; 1128 regulator-boot-on; 1129 regulator-max-microvolt = <1800000>; 1130 regulator-min-microvolt = <1800000>; 1131 regulator-name = "avcc_1v8_s0"; 1132 regulator-state-mem { 1133 regulator-off-in-suspend; 1134 }; 1135 }; 1136 1137 vcc_1v8_s0: pldo-reg2 { 1138 regulator-always-on; 1139 regulator-boot-on; 1140 regulator-max-microvolt = <1800000>; 1141 regulator-min-microvolt = <1800000>; 1142 regulator-name = "vcc_1v8_s0"; 1143 regulator-state-mem { 1144 regulator-off-in-suspend; 1145 regulator-suspend-microvolt = <1800000>; 1146 }; 1147 }; 1148 1149 avdd_1v2_s0: pldo-reg3 { 1150 regulator-always-on; 1151 regulator-boot-on; 1152 regulator-max-microvolt = <1200000>; 1153 regulator-min-microvolt = <1200000>; 1154 regulator-name = "avdd_1v2_s0"; 1155 regulator-state-mem { 1156 regulator-off-in-suspend; 1157 }; 1158 }; 1159 1160 vcc_3v3_s0: pldo-reg4 { 1161 regulator-always-on; 1162 regulator-boot-on; 1163 regulator-max-microvolt = <3300000>; 1164 regulator-min-microvolt = <3300000>; 1165 regulator-name = "vcc_3v3_s0"; 1166 regulator-state-mem { 1167 regulator-off-in-suspend; 1168 }; 1169 }; 1170 1171 vccio_sd_s0: pldo-reg5 { 1172 regulator-always-on; 1173 regulator-boot-on; 1174 regulator-max-microvolt = <3300000>; 1175 regulator-min-microvolt = <1800000>; 1176 regulator-name = "vccio_sd_s0"; 1177 regulator-state-mem { 1178 regulator-off-in-suspend; 1179 }; 1180 }; 1181 1182 vcc_1v8_s3_pldo6: pldo-reg6 { 1183 regulator-always-on; 1184 regulator-boot-on; 1185 regulator-max-microvolt = <1800000>; 1186 regulator-min-microvolt = <1800000>; 1187 regulator-name = "vcc_1v8_s3_pldo6"; 1188 regulator-state-mem { 1189 regulator-on-in-suspend; 1190 regulator-suspend-microvolt = <1800000>; 1191 }; 1192 }; 1193 1194 vdd_0v75_s3: nldo-reg1 { 1195 regulator-always-on; 1196 regulator-boot-on; 1197 regulator-max-microvolt = <750000>; 1198 regulator-min-microvolt = <750000>; 1199 regulator-name = "vdd_0v75_s3"; 1200 regulator-state-mem { 1201 regulator-on-in-suspend; 1202 regulator-suspend-microvolt = <750000>; 1203 }; 1204 }; 1205 1206 vdd_ddr_pll_s0: nldo-reg2 { 1207 regulator-always-on; 1208 regulator-boot-on; 1209 regulator-max-microvolt = <850000>; 1210 regulator-min-microvolt = <850000>; 1211 regulator-name = "vdd_ddr_pll_s0"; 1212 regulator-state-mem { 1213 regulator-off-in-suspend; 1214 regulator-suspend-microvolt = <850000>; 1215 }; 1216 }; 1217 1218 avdd_0v75_s0: nldo-reg3 { 1219 regulator-always-on; 1220 regulator-boot-on; 1221 regulator-max-microvolt = <837500>; 1222 regulator-min-microvolt = <837500>; 1223 regulator-name = "avdd_0v75_s0"; 1224 regulator-state-mem { 1225 regulator-off-in-suspend; 1226 }; 1227 }; 1228 1229 vdd_0v85_s0: nldo-reg4 { 1230 regulator-always-on; 1231 regulator-boot-on; 1232 regulator-min-microvolt = <850000>; 1233 regulator-max-microvolt = <850000>; 1234 regulator-name = "vdd_0v85_s0"; 1235 regulator-state-mem { 1236 regulator-off-in-suspend; 1237 }; 1238 }; 1239 1240 vdd_0v75_s0: nldo-reg5 { 1241 regulator-always-on; 1242 regulator-boot-on; 1243 regulator-min-microvolt = <750000>; 1244 regulator-max-microvolt = <750000>; 1245 regulator-name = "vdd_0v75_s0"; 1246 regulator-state-mem { 1247 regulator-off-in-suspend; 1248 }; 1249 }; 1250 }; 1251 }; 1252}; 1253 1254&tsadc { 1255 status = "okay"; 1256}; 1257 1258&u2phy0 { 1259 status = "okay"; 1260}; 1261 1262&u2phy0_otg { 1263 status = "okay"; 1264}; 1265 1266&uart2 { 1267 pinctrl-0 = <&uart2m0_xfer>; 1268 status = "okay"; 1269}; 1270 1271&uart9 { 1272 pinctrl-0 = <&uart9m2_xfer>, <&uart9m2_ctsn>, <&uart9m2_rtsn>; 1273 uart-has-rtscts; 1274 status = "okay"; 1275 1276 bluetooth { 1277 compatible = "brcm,bcm4345c5"; 1278 clocks = <&rtc_hym8563>; 1279 clock-names = "lpo"; 1280 device-wakeup-gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_HIGH>; 1281 interrupt-parent = <&gpio3>; 1282 interrupts = <RK_PB0 IRQ_TYPE_EDGE_FALLING>; 1283 pinctrl-0 = <&bt_enable_h>, <&bt_host_wake_l>, <&bt_wake_l>; 1284 pinctrl-names = "default"; 1285 shutdown-gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_HIGH>; 1286 }; 1287}; 1288 1289&vop { 1290 status = "okay"; 1291}; 1292 1293&vop_mmu { 1294 status = "okay"; 1295}; 1296 1297&vp3 { 1298 #address-cells = <1>; 1299 #size-cells = <0>; 1300 1301 vp3_out_dsi0: endpoint@ROCKCHIP_VOP2_EP_MIPI0 { 1302 reg = <ROCKCHIP_VOP2_EP_MIPI0>; 1303 remote-endpoint = <&dsi0_in_vp3>; 1304 }; 1305}; 1306