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