1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2/* 3 * Copyright (c) 2022 Rockchip Electronics Co., Ltd. 4 * 5 */ 6 7/dts-v1/; 8#include <dt-bindings/sensor-dev.h> 9#include <dt-bindings/input/input.h> 10#include <dt-bindings/display/mipi_dsi.h> 11#include <dt-bindings/pwm/pwm.h> 12#include "rk3399.dtsi" 13#include "rk3399-android.dtsi" 14#include "rk3399-opp.dtsi" 15#include "rk3399-vop-clk-set.dtsi" 16 17/ { 18 compatible = "rockchip,rk3399-mid", "rockchip,rk3399"; 19 chosen: chosen { 20 bootargs = "earlycon=uart8250,mmio32,0xff1a0000 console=ttyFIQ0 init=/init initrd=0x62000001,0x00800000 coherent_pool=1m"; 21 }; 22 23 adc_keys { 24 compatible = "adc-keys"; 25 io-channels = <&saradc 1>; 26 io-channel-names = "buttons"; 27 keyup-threshold-microvolt = <1800000>; 28 poll-interval = <100>; 29 30 vol-up-key { 31 label = "volume up"; 32 linux,code = <KEY_VOLUMEUP>; 33 press-threshold-microvolt = <1000>; 34 }; 35 36 vol-down-key { 37 label = "volume down"; 38 linux,code = <KEY_VOLUMEDOWN>; 39 press-threshold-microvolt = <170000>; 40 }; 41 }; 42 43 rk_headset: rk-headset { 44 compatible = "rockchip_headset"; 45 headset_gpio = <&gpio4 RK_PD4 GPIO_ACTIVE_LOW>; 46 pinctrl-names = "default"; 47 pinctrl-0 = <&hp_det>; 48 io-channels = <&saradc 2>; 49 }; 50 51 charge-animation { 52 compatible = "rockchip,uboot-charge"; 53 rockchip,uboot-charge-on = <1>; 54 rockchip,android-charge-on = <0>; 55 rockchip,uboot-low-power-voltage = <6700>; 56 rockchip,screen-on-voltage = <6800>; 57 status = "okay"; 58 }; 59 60 sdio_pwrseq: sdio-pwrseq { 61 compatible = "mmc-pwrseq-simple"; 62 clocks = <&rk818 1>; 63 clock-names = "ext_clock"; 64 pinctrl-names = "default"; 65 pinctrl-0 = <&wifi_enable_h>; 66 67 /* 68 * On the module itself this is one of these (depending 69 * on the actual card populated): 70 * - SDIO_RESET_L_WL_REG_ON 71 * - PDN (power down when low) 72 */ 73 reset-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; /* GPIO0_B2 */ 74 }; 75 76 hall_sensor: hall-mh248 { 77 compatible = "hall-mh248"; 78 pinctrl-names = "default"; 79 pinctrl-0 = <&mh248_irq_gpio>; 80 irq-gpio = <&gpio1 2 IRQ_TYPE_EDGE_BOTH>; 81 hall-active = <1>; 82 status = "okay"; 83 }; 84 85 vcc_sys: vcc-sys { 86 compatible = "regulator-fixed"; 87 regulator-name = "vcc_sys"; 88 regulator-always-on; 89 regulator-boot-on; 90 regulator-min-microvolt = <3900000>; 91 regulator-max-microvolt = <3900000>; 92 }; 93 94 vcc3v3_sys: vcc3v3-sys { 95 compatible = "regulator-fixed"; 96 regulator-name = "vcc3v3_sys"; 97 regulator-always-on; 98 regulator-boot-on; 99 regulator-min-microvolt = <3300000>; 100 regulator-max-microvolt = <3300000>; 101 }; 102 103 vcc5v0_host: vcc5v0-host-regulator { 104 compatible = "regulator-fixed"; 105 enable-active-high; 106 gpio = <&gpio4 25 GPIO_ACTIVE_HIGH>; 107 pinctrl-names = "default"; 108 pinctrl-0 = <&host_vbus_drv>; 109 regulator-name = "vcc5v0_host"; 110 regulator-always-on; 111 }; 112 113 vdd_log: vdd-log { 114 compatible = "pwm-regulator"; 115 pwms = <&pwm2 0 25000 1>; 116 rockchip,pwm_id= <2>; 117 rockchip,pwm_voltage = <900000>; 118 regulator-name = "vdd_log"; 119 regulator-min-microvolt = <750000>; 120 regulator-max-microvolt = <1350000>; 121 regulator-always-on; 122 regulator-boot-on; 123 }; 124 125 xin32k: xin32k { 126 compatible = "fixed-clock"; 127 clock-frequency = <32768>; 128 clock-output-names = "xin32k"; 129 #clock-cells = <0>; 130 }; 131 132 edp_panel: edp-panel { 133 compatible = "lg,lp079qx1-sp0v", "panel-simple"; 134 bus-format = <MEDIA_BUS_FMT_RGB666_1X18>; 135 bpc = <6>; 136 backlight = <&backlight>; 137 power-supply = <&vcc3v3_s0>; 138 enable-gpios = <&gpio3 8 GPIO_ACTIVE_HIGH>; 139 ports { 140 panel_in_edp: endpoint { 141 remote-endpoint = <&edp_out_panel>; 142 }; 143 }; 144 }; 145 146 backlight: backlight { 147 compatible = "pwm-backlight"; 148 pwms = <&pwm0 0 25000 0>; 149 brightness-levels = < 150 255 200 199 198 197 197 196 195 194 193 193 192 151 191 190 189 189 188 187 186 185 185 184 183 182 152 181 181 180 179 178 177 177 176 175 174 173 173 153 172 171 170 169 169 168 167 166 165 165 164 163 154 162 161 161 160 159 158 157 157 156 155 154 153 155 153 152 151 150 149 149 148 147 146 145 145 144 156 143 142 141 141 140 139 138 137 137 136 135 134 157 133 133 132 131 130 129 129 128 127 126 125 125 158 124 123 122 121 121 120 119 118 117 117 116 115 159 114 113 113 112 111 110 109 109 108 107 106 105 160 105 104 103 102 101 101 100 99 98 97 97 96 161 95 94 93 93 92 91 90 89 89 88 87 86 162 85 85 84 83 82 81 81 80 79 78 77 77 163 76 75 74 73 73 72 71 70 69 69 68 67 164 66 65 65 64 63 62 61 61 60 59 58 57 165 57 56 55 54 53 53 52 51 50 49 49 48 166 47 46 45 45 44 43 42 41 41 40 39 38 167 37 37 36 35 34 33 33 32 31 30 29 29 168 28 27 26 25 25 24 23 22 21 21 20 19 169 18 17 17 16 15 14 13 13 12 11 10 9 170 9 8 7 6 5 5 4 3 2 1 1 0 171 0 0 0 0>; 172 default-brightness-level = <200>; 173 enable-gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>; 174 }; 175 176 vcc_phy: vcc-phy-regulator { 177 compatible = "regulator-fixed"; 178 regulator-name = "vcc_phy"; 179 regulator-always-on; 180 regulator-boot-on; 181 }; 182 183 es8316-sound { 184 compatible = "simple-audio-card"; 185 simple-audio-card,format = "i2s"; 186 simple-audio-card,name = "rockchip,es8316-codec"; 187 simple-audio-card,mclk-fs = <256>; 188 simple-audio-card,widgets = 189 "Microphone", "Mic Jack", 190 "Headphone", "Headphone Jack"; 191 simple-audio-card,routing = 192 "Mic Jack", "MICBIAS1", 193 "IN1P", "Mic Jack", 194 "Headphone Jack", "HPOL", 195 "Headphone Jack", "HPOR"; 196 simple-audio-card,cpu { 197 sound-dai = <&i2s0>; 198 }; 199 simple-audio-card,codec { 200 sound-dai = <&es8316>; 201 }; 202 }; 203 204 spdif-sound { 205 compatible = "simple-audio-card"; 206 simple-audio-card,name = "rockchip,spdif"; 207 simple-audio-card,mclk-fs = <128>; 208 simple-audio-card,cpu { 209 sound-dai = <&spdif>; 210 }; 211 simple-audio-card,codec { 212 sound-dai = <&spdif_out>; 213 }; 214 }; 215 216 spdif_out: spdif-out { 217 compatible = "linux,spdif-dit"; 218 #sound-dai-cells = <0>; 219 }; 220 221 sdio_pwrseq: sdio-pwrseq { 222 compatible = "mmc-pwrseq-simple"; 223 clocks = <&rk818 1>; 224 clock-names = "ext_clock"; 225 pinctrl-names = "default"; 226 pinctrl-0 = <&wifi_enable_h>; 227 228 /* 229 * On the module itself this is one of these (depending 230 * on the actual card populated): 231 * - SDIO_RESET_L_WL_REG_ON 232 * - PDN (power down when low) 233 */ 234 reset-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; /* GPIO0_B2 */ 235 }; 236 237 wireless-wlan { 238 compatible = "wlan-platdata"; 239 rockchip,grf = <&grf>; 240 wifi_chip_type = "ap6354"; 241 sdio_vref = <1800>; 242 WIFI,host_wake_irq = <&gpio0 3 GPIO_ACTIVE_HIGH>; /* GPIO0_a3 */ 243 status = "okay"; 244 }; 245 246 wireless-bluetooth { 247 compatible = "bluetooth-platdata"; 248 clocks = <&rk818 1>; 249 clock-names = "ext_clock"; 250 //wifi-bt-power-toggle; 251 uart_rts_gpios = <&gpio2 19 GPIO_ACTIVE_LOW>; /* GPIO2_C3 */ 252 pinctrl-names = "default", "rts_gpio"; 253 pinctrl-0 = <&uart0_rts>, <&bt_reset_gpio>, <&bt_wake_gpio>, <&bt_irq_gpio>; 254 pinctrl-1 = <&uart0_gpios>; 255 //BT,power_gpio = <&gpio3 19 GPIO_ACTIVE_HIGH>; /* GPIOx_xx */ 256 BT,reset_gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>; /* GPIO0_B1 */ 257 BT,wake_gpio = <&gpio2 26 GPIO_ACTIVE_HIGH>; /* GPIO2_D2 */ 258 BT,wake_host_irq = <&gpio0 4 GPIO_ACTIVE_HIGH>; /* GPIO0_A4 */ 259 status = "okay"; 260 }; 261 262 vibrator { 263 compatible = "rk-vibrator-gpio"; 264 vibrator-gpio = <&gpio4 30 GPIO_ACTIVE_LOW>; 265 status = "okay"; 266 }; 267 268}; 269 270&dfi { 271 status = "okay"; 272}; 273 274&dmc { 275 status = "okay"; 276 center-supply = <&vdd_center>; 277 upthreshold = <40>; 278 downdifferential = <20>; 279 system-status-freq = < 280 /*system status freq(KHz)*/ 281 SYS_STATUS_NORMAL 800000 282 SYS_STATUS_REBOOT 528000 283 SYS_STATUS_SUSPEND 200000 284 SYS_STATUS_VIDEO_1080P 200000 285 SYS_STATUS_VIDEO_4K 600000 286 SYS_STATUS_VIDEO_4K_10B 800000 287 SYS_STATUS_PERFORMANCE 800000 288 SYS_STATUS_BOOST 600000 289 SYS_STATUS_DUALVIEW 600000 290 SYS_STATUS_ISP 600000 291 >; 292 vop-bw-dmc-freq = < 293 /* min_bw(MB/s) max_bw(MB/s) freq(KHz) */ 294 0 762 200000 295 763 1893 400000 296 1894 3012 528000 297 3013 99999 800000 298 >; 299 300 auto-min-freq = <200000>; 301}; 302 303&sdmmc { 304 clock-frequency = <50000000>; 305 clock-freq-min-max = <400000 150000000>; 306 no-sdio; 307 no-mmc; 308 bus-width = <4>; 309 cap-mmc-highspeed; 310 cap-sd-highspeed; 311 disable-wp; 312 num-slots = <1>; 313 //sd-uhs-sdr104; 314 vqmmc-supply = <&vcc_sd>; 315 pinctrl-names = "default"; 316 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>; 317 status = "okay"; 318}; 319 320&sdio0 { 321 clock-frequency = <150000000>; 322 clock-freq-min-max = <200000 150000000>; 323 no-sd; 324 no-mmc; 325 bus-width = <4>; 326 disable-wp; 327 cap-sd-highspeed; 328 cap-sdio-irq; 329 keep-power-in-suspend; 330 mmc-pwrseq = <&sdio_pwrseq>; 331 non-removable; 332 num-slots = <1>; 333 pinctrl-names = "default"; 334 pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>; 335 sd-uhs-sdr104; 336 status = "okay"; 337}; 338 339&emmc_phy { 340 status = "okay"; 341}; 342 343&sdhci { 344 bus-width = <8>; 345 mmc-hs400-1_8v; 346 no-sdio; 347 no-sd; 348 non-removable; 349 keep-power-in-suspend; 350 mmc-hs400-enhanced-strobe; 351 status = "okay"; 352}; 353 354&i2s0 { 355 status = "okay"; 356 rockchip,i2s-broken-burst-len; 357 rockchip,playback-channels = <8>; 358 rockchip,capture-channels = <8>; 359 #sound-dai-cells = <0>; 360}; 361 362&i2s2 { 363 #sound-dai-cells = <0>; 364}; 365 366&spdif { 367 status = "disabled"; 368 #sound-dai-cells = <0>; 369}; 370 371&i2c0 { 372 status = "okay"; 373 i2c-scl-rising-time-ns = <180>; 374 i2c-scl-falling-time-ns = <30>; 375 clock-frequency = <400000>; 376 377 vdd_cpu_b: syr837@40 { 378 compatible = "silergy,syr827"; 379 reg = <0x40>; 380 vin-supply = <&vcc_sys>; 381 regulator-compatible = "fan53555-reg"; 382 pinctrl-0 = <&vsel1_gpio>; 383 vsel-gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>; 384 regulator-name = "vdd_cpu_b"; 385 regulator-min-microvolt = <712500>; 386 regulator-max-microvolt = <1500000>; 387 regulator-ramp-delay = <1000>; 388 fcs,suspend-voltage-selector = <1>; 389 regulator-always-on; 390 regulator-initial-state = <3>; 391 regulator-state-mem { 392 regulator-off-in-suspend; 393 }; 394 }; 395 396 vdd_gpu: syr828@41 { 397 compatible = "silergy,syr828"; 398 status = "okay"; 399 reg = <0x41>; 400 vin-supply = <&vcc_sys>; 401 regulator-compatible = "fan53555-reg"; 402 pinctrl-0 = <&vsel2_gpio>; 403 vsel-gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>; 404 regulator-name = "vdd_gpu"; 405 regulator-min-microvolt = <735000>; 406 regulator-max-microvolt = <1400000>; 407 regulator-ramp-delay = <1000>; 408 fcs,suspend-voltage-selector = <1>; 409 regulator-always-on; 410 regulator-boot-on; 411 regulator-state-mem { 412 regulator-off-in-suspend; 413 }; 414 }; 415 416 rk818: pmic@1c { 417 compatible = "rockchip,rk818"; 418 status = "okay"; 419 reg = <0x1c>; 420 clock-output-names = "rk818-clkout1", "wifibt_32kin"; 421 interrupt-parent = <&gpio1>; 422 interrupts = <21 IRQ_TYPE_LEVEL_LOW>; 423 pinctrl-names = "default"; 424 pinctrl-0 = <&pmic_int_l>; 425 rockchip,system-power-controller; 426 rk818,support_dc_chg = <1>;/*1: dc chg; 0:usb chg*/ 427 wakeup-source; 428 extcon = <&fusb0>; 429 #clock-cells = <1>; 430 431 vcc1-supply = <&vcc_sys>; 432 vcc2-supply = <&vcc_sys>; 433 vcc3-supply = <&vcc_sys>; 434 vcc4-supply = <&vcc_sys>; 435 vcc6-supply = <&vcc_sys>; 436 vcc7-supply = <&vcc3v3_sys>; 437 vcc8-supply = <&vcc_sys>; 438 vcc9-supply = <&vcc3v3_sys>; 439 440 regulators { 441 vdd_cpu_l: DCDC_REG1 { 442 regulator-name = "vdd_cpu_l"; 443 regulator-always-on; 444 regulator-boot-on; 445 regulator-min-microvolt = <750000>; 446 regulator-max-microvolt = <1350000>; 447 regulator-ramp-delay = <6001>; 448 regulator-state-mem { 449 regulator-off-in-suspend; 450 }; 451 }; 452 453 vdd_center: DCDC_REG2 { 454 regulator-name = "vdd_center"; 455 regulator-always-on; 456 regulator-boot-on; 457 regulator-min-microvolt = <800000>; 458 regulator-max-microvolt = <1350000>; 459 regulator-ramp-delay = <6001>; 460 regulator-state-mem { 461 regulator-off-in-suspend; 462 }; 463 }; 464 465 vcc_ddr: DCDC_REG3 { 466 regulator-name = "vcc_ddr"; 467 regulator-always-on; 468 regulator-boot-on; 469 regulator-state-mem { 470 regulator-on-in-suspend; 471 }; 472 }; 473 474 vcc_1v8: DCDC_REG4 { 475 regulator-name = "vcc_1v8"; 476 regulator-always-on; 477 regulator-boot-on; 478 regulator-min-microvolt = <1800000>; 479 regulator-max-microvolt = <1800000>; 480 regulator-state-mem { 481 regulator-on-in-suspend; 482 regulator-suspend-microvolt = <1800000>; 483 }; 484 }; 485 486 vcca3v0_codec: LDO_REG1 { 487 regulator-always-on; 488 regulator-boot-on; 489 regulator-min-microvolt = <3000000>; 490 regulator-max-microvolt = <3000000>; 491 regulator-name = "vcca3v0_codec"; 492 regulator-state-mem { 493 regulator-off-in-suspend; 494 }; 495 }; 496 497 vcc3v0_tp: LDO_REG2 { 498 regulator-always-on; 499 regulator-boot-on; 500 regulator-min-microvolt = <3000000>; 501 regulator-max-microvolt = <3000000>; 502 regulator-name = "vcc3v0_tp"; 503 regulator-state-mem { 504 regulator-off-in-suspend; 505 }; 506 }; 507 508 vcca1v8_codec: LDO_REG3 { 509 regulator-always-on; 510 regulator-boot-on; 511 regulator-min-microvolt = <1800000>; 512 regulator-max-microvolt = <1800000>; 513 regulator-name = "vcca1v8_codec"; 514 regulator-state-mem { 515 regulator-off-in-suspend; 516 }; 517 }; 518 519 vcc_power_on: LDO_REG4 { 520 regulator-always-on; 521 regulator-boot-on; 522 regulator-min-microvolt = <3300000>; 523 regulator-max-microvolt = <3300000>; 524 regulator-name = "vcc_power_on"; 525 regulator-state-mem { 526 regulator-on-in-suspend; 527 regulator-suspend-microvolt = <3300000>; 528 }; 529 }; 530 531 vcc_3v0: LDO_REG5 { 532 regulator-always-on; 533 regulator-boot-on; 534 regulator-min-microvolt = <3000000>; 535 regulator-max-microvolt = <3000000>; 536 regulator-name = "vcc_3v0"; 537 regulator-state-mem { 538 regulator-on-in-suspend; 539 regulator-suspend-microvolt = <3000000>; 540 }; 541 }; 542 543 vcc_1v5: LDO_REG6 { 544 regulator-always-on; 545 regulator-boot-on; 546 regulator-min-microvolt = <1500000>; 547 regulator-max-microvolt = <1500000>; 548 regulator-name = "vcc_1v5"; 549 regulator-state-mem { 550 regulator-on-in-suspend; 551 regulator-suspend-microvolt = <1500000>; 552 }; 553 }; 554 555 vcc1v8_dvp: LDO_REG7 { 556 regulator-always-on; 557 regulator-boot-on; 558 regulator-min-microvolt = <1800000>; 559 regulator-max-microvolt = <1800000>; 560 regulator-name = "vcc1v8_dvp"; 561 regulator-state-mem { 562 regulator-off-in-suspend; 563 }; 564 }; 565 566 vcc3v3_s3: LDO_REG8 { 567 regulator-always-on; 568 regulator-boot-on; 569 regulator-min-microvolt = <3300000>; 570 regulator-max-microvolt = <3300000>; 571 regulator-name = "vcc3v3_s3"; 572 regulator-state-mem { 573 regulator-off-in-suspend; 574 }; 575 }; 576 577 vcc_sd: LDO_REG9 { 578 regulator-always-on; 579 regulator-boot-on; 580 regulator-min-microvolt = <1800000>; 581 regulator-max-microvolt = <3000000>; 582 regulator-name = "vcc_sd"; 583 regulator-state-mem { 584 regulator-on-in-suspend; 585 regulator-suspend-microvolt = <3000000>; 586 }; 587 }; 588 589 vcc3v3_s0: SWITCH_REG { 590 regulator-always-on; 591 regulator-boot-on; 592 regulator-name = "vcc3v3_s0"; 593 regulator-state-mem { 594 regulator-on-in-suspend; 595 }; 596 }; 597 598 boost_otg: DCDC_BOOST { 599 regulator-name = "boost_otg"; 600 regulator-always-on; 601 regulator-boot-on; 602 regulator-min-microvolt = <5000000>; 603 regulator-max-microvolt = <5000000>; 604 regulator-state-mem { 605 regulator-on-in-suspend; 606 regulator-suspend-microvolt = <5000000>; 607 }; 608 }; 609 610 otg_switch: OTG_SWITCH { 611 regulator-name = "otg_switch"; 612 }; 613 }; 614 615 battery { 616 compatible = "rk818-battery"; 617 ocv_table = <3400 3675 3689 3716 3740 3756 3768 3780 618 3793 3807 3827 3853 3896 3937 3974 4007 4066 619 4110 4161 4217 4308>; 620 design_capacity = <7916>; 621 design_qmax = <8708>; 622 bat_res = <65>; 623 max_input_current = <3000>; 624 max_chrg_current = <3000>; 625 max_chrg_voltage = <4350>; 626 sleep_enter_current = <300>; 627 sleep_exit_current = <300>; 628 power_off_thresd = <3400>; 629 zero_algorithm_vol = <3950>; 630 fb_temperature = <105>; 631 sample_res = <20>; 632 max_soc_offset = <60>; 633 energy_mode = <0>; 634 monitor_sec = <5>; 635 virtual_power = <0>; 636 power_dc2otg = <0>; 637 }; 638 }; 639}; 640 641&i2c1 { 642 status = "okay"; 643 i2c-scl-rising-time-ns = <140>; 644 i2c-scl-falling-time-ns = <30>; 645 646 es8316: es8316@10 { 647 #sound-dai-cells = <0>; 648 compatible = "everest,es8316"; 649 reg = <0x11>; 650 clocks = <&cru SCLK_I2S_8CH_OUT>; 651 clock-names = "mclk"; 652 pinctrl-names = "default"; 653 pinctrl-0 = <&i2s_8ch_mclk>; 654 spk-con-gpio = <&gpio0 11 GPIO_ACTIVE_HIGH>; 655 }; 656}; 657 658&i2c4 { 659 status = "okay"; 660 i2c-scl-rising-time-ns = <345>; 661 i2c-scl-falling-time-ns = <11>; 662 clock-frequency = <400000>; 663 664 lsm330_accel@1e { 665 status = "okay"; 666 compatible = "lsm330_acc"; 667 pinctrl-names = "default"; 668 pinctrl-0 = <&lsm330a_irq_gpio>; 669 reg = <0x1e>; 670 irq-gpio = <&gpio2 27 IRQ_TYPE_EDGE_RISING>; 671 type = <SENSOR_TYPE_ACCEL>; 672 irq_enable = <1>; 673 poll_delay_ms = <30>; 674 power-off-in-suspend = <1>; 675 layout = <4>; 676 }; 677 678 lsm330_gyro@6a { 679 status = "okay"; 680 compatible = "lsm330_gyro"; 681 pinctrl-names = "default"; 682 pinctrl-0 = <&lsm330g_irq_gpio>; 683 reg = <0x6a>; 684 irq-gpio = <&gpio1 20 IRQ_TYPE_EDGE_RISING>; 685 type = <SENSOR_TYPE_GYROSCOPE>; 686 irq_enable = <0>; 687 power-off-in-suspend = <1>; 688 poll_delay_ms = <30>; 689 }; 690 691 mpu6500@68 { 692 status = "disabled"; 693 compatible = "invensense,mpu6500"; 694 pinctrl-names = "default"; 695 pinctrl-0 = <&mpu6500_irq_gpio>; 696 reg = <0x68>; 697 irq-gpio = <&gpio2 27 IRQ_TYPE_EDGE_RISING>; 698 mpu-int_config = <0x10>; 699 mpu-level_shifter = <0>; 700 mpu-orientation = <1 0 0 0 1 0 0 0 1>; 701 orientation-x= <1>; 702 orientation-y= <1>; 703 orientation-z= <0>; 704 support-hw-poweroff = <1>; 705 mpu-debug = <1>; 706 }; 707 708 sensor@0d { 709 status = "okay"; 710 compatible = "ak8963"; 711 pinctrl-names = "default"; 712 pinctrl-0 = <&ak8963_irq_gpio>; 713 reg = <0x0d>; 714 type = <SENSOR_TYPE_COMPASS>; 715 irq-gpio = <&gpio2 28 IRQ_TYPE_EDGE_RISING>; 716 irq_enable = <0>; 717 poll_delay_ms = <30>; 718 layout = <3>; 719 }; 720 721 sensor@10 { 722 status = "okay"; 723 compatible = "capella,light_cm3218"; 724 pinctrl-names = "default"; 725 pinctrl-0 = <&cm3218_irq_gpio>; 726 reg = <0x10>; 727 type = <SENSOR_TYPE_LIGHT>; 728 irq-gpio = <&gpio4 24 IRQ_TYPE_EDGE_FALLING>; 729 irq_enable = <1>; 730 poll_delay_ms = <30>; 731 }; 732 733 fusb0: fusb30x@22 { 734 compatible = "fairchild,fusb302"; 735 reg = <0x22>; 736 pinctrl-names = "default"; 737 pinctrl-0 = <&fusb0_int>; 738 int-n-gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>; 739 status = "okay"; 740 }; 741}; 742 743&i2c5 { 744 status = "okay"; 745 i2c-scl-rising-time-ns = <150>; 746 i2c-scl-falling-time-ns = <30>; 747 clock-frequency = <400000>; 748 749 gt9xx: gt9xx@14 { 750 compatible = "goodix,gt9xx"; 751 reg = <0x14>; 752 touch-gpio = <&gpio3 12 IRQ_TYPE_LEVEL_LOW>; 753 reset-gpio = <&gpio3 13 GPIO_ACTIVE_HIGH>; 754 max-x = <1536>; 755 max-y = <2048>; 756 tp-size = <970>; 757 tp-supply = <&vcc3v0_tp>; 758 }; 759}; 760 761&io_domains { 762 status = "okay"; 763 764 bt656-supply = <&vcc1v8_dvp>; 765 audio-supply = <&vcca1v8_codec>; 766 sdmmc-supply = <&vcc_sd>; 767 gpio1830-supply = <&vcc_3v0>; 768}; 769 770&isp0_mmu { 771 status = "okay"; 772}; 773 774&isp1_mmu { 775 status = "okay"; 776}; 777 778&cpu_l0 { 779 cpu-supply = <&vdd_cpu_l>; 780}; 781 782&cpu_l1 { 783 cpu-supply = <&vdd_cpu_l>; 784}; 785 786&cpu_l2 { 787 cpu-supply = <&vdd_cpu_l>; 788}; 789 790&cpu_l3 { 791 cpu-supply = <&vdd_cpu_l>; 792}; 793 794&cpu_b0 { 795 cpu-supply = <&vdd_cpu_b>; 796}; 797 798&cpu_b1 { 799 cpu-supply = <&vdd_cpu_b>; 800}; 801 802&gpu { 803 status = "okay"; 804 mali-supply = <&vdd_gpu>; 805}; 806 807&spi1 { 808 status = "disabled"; 809 max-freq = <50000000>; 810 mpu6500@0 { 811 status = "disabled"; 812 compatible = "inv-spi,mpu6500"; 813 pinctrl-names = "default"; 814 pinctrl-0 = <&mpu6500_irq_gpio>; 815 irq-gpio = <&gpio2 27 IRQ_TYPE_EDGE_RISING>; 816 reg = <0>; 817 spi-max-frequency = <1000000>; 818 spi-cpha; 819 spi-cpol; 820 mpu-int_config = <0x00>; 821 mpu-level_shifter = <0>; 822 mpu-orientation = <1 0 0 0 1 0 0 0 1>; 823 orientation-x= <1>; 824 orientation-y= <0>; 825 orientation-z= <1>; 826 support-hw-poweroff = <1>; 827 mpu-debug = <1>; 828 }; 829}; 830 831&tcphy0 { 832 extcon = <&fusb0>; 833 status = "okay"; 834}; 835 836&tsadc { 837 rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */ 838 rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */ 839 status = "okay"; 840}; 841 842&u2phy0 { 843 status = "okay"; 844 extcon = <&fusb0>; 845 846 u2phy0_otg: otg-port { 847 status = "okay"; 848 }; 849 850 u2phy0_host: host-port { 851 phy-supply = <&vcc5v0_host>; 852 status = "okay"; 853 }; 854}; 855 856&uart0 { 857 pinctrl-names = "default"; 858 pinctrl-0 = <&uart0_xfer &uart0_cts>; 859 status = "okay"; 860}; 861 862&uart2 { 863 status = "okay"; 864}; 865 866&usb_host0_ehci { 867 status = "okay"; 868}; 869 870&usb_host0_ohci { 871 status = "okay"; 872}; 873 874&usbdrd3_0 { 875 status = "okay"; 876}; 877 878&usbdrd_dwc3_0 { 879 status = "okay"; 880 extcon = <&fusb0>; 881}; 882 883&pwm0 { 884 status = "okay"; 885}; 886 887&pwm2 { 888 status = "okay"; 889 pinctrl-names = "active"; 890 pinctrl-0 = <&pwm2_pin_pull_down>; 891}; 892 893&saradc { 894 status = "okay"; 895}; 896 897&rockchip_suspend { 898 status = "okay"; 899 rockchip,sleep-debug-en = <1>; 900 rockchip,sleep-mode-config = < 901 (0 902 | RKPM_SLP_ARMPD 903 | RKPM_SLP_PERILPPD 904 | RKPM_SLP_DDR_RET 905 | RKPM_SLP_PLLPD 906 | RKPM_SLP_CENTER_PD 907 | RKPM_SLP_OSC_DIS 908 | RKPM_SLP_AP_PWROFF 909 ) 910 >; 911 rockchip,wakeup-config = < 912 (0 913 | RKPM_GPIO_WKUP_EN 914 ) 915 >; 916 rockchip,pwm-regulator-config = < 917 (0 918 | PWM2_REGULATOR_EN 919 ) 920 >; 921 rockchip,power-ctrl = 922 <&gpio1 17 GPIO_ACTIVE_HIGH>, 923 <&gpio1 14 GPIO_ACTIVE_HIGH>; 924}; 925 926&pinctrl { 927 sdio-pwrseq { 928 wifi_enable_h: wifi-enable-h { 929 rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>; 930 }; 931 }; 932 933 wireless-bluetooth { 934 uart0_gpios: uart0-gpios { 935 rockchip,pins = <2 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>; 936 }; 937 938 bt_reset_gpio: bt-reset-gpio { 939 rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>; 940 }; 941 942 bt_wake_gpio: bt-wake-gpio { 943 rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>; 944 }; 945 946 bt_irq_gpio: bt-irq-gpio { 947 rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_down>; 948 }; 949 }; 950 951 pmic { 952 pmic_int_l: pmic-int-l { 953 rockchip,pins = 954 <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>; 955 }; 956 957 pmic_dvs2: pmic-dvs2 { 958 rockchip,pins = 959 <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>; 960 }; 961 vsel1_gpio: vsel1-gpio { 962 rockchip,pins = 963 <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>; 964 }; 965 vsel2_gpio: vsel2-gpio { 966 rockchip,pins = 967 <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>; 968 }; 969 }; 970 971 hallsensor { 972 mh248_irq_gpio: mh248-irq-gpio { 973 rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>; 974 }; 975 }; 976 977 headphone { 978 hp_det: hp-det { 979 rockchip,pins = <4 RK_PD4 RK_FUNC_GPIO &pcfg_pull_up>; 980 }; 981 }; 982 983 lsm330_a { 984 lsm330a_irq_gpio: lsm330a-irq-gpio { 985 rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>; 986 }; 987 }; 988 989 lsm330_g { 990 lsm330g_irq_gpio: lsm330g-irq-gpio { 991 rockchip,pins = <1 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>; 992 }; 993 }; 994 995 mpu6500 { 996 mpu6500_irq_gpio: mpu6500-irq-gpio { 997 rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>; 998 }; 999 }; 1000 1001 ak8963 { 1002 ak8963_irq_gpio: ak8963-irq-gpio { 1003 rockchip,pins = <2 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>; 1004 }; 1005 }; 1006 1007 cm3218 { 1008 cm3218_irq_gpio: cm3218-irq-gpio { 1009 rockchip,pins = <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>; 1010 }; 1011 }; 1012 1013 usb2 { 1014 host_vbus_drv: host-vbus-drv { 1015 rockchip,pins = 1016 <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>; 1017 }; 1018 }; 1019 1020 fusb30x { 1021 fusb0_int: fusb0-int { 1022 rockchip,pins = 1023 <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>; 1024 }; 1025 }; 1026}; 1027 1028&edp { 1029 status = "okay"; 1030 pinctrl-names = "default"; 1031 pinctrl-0 = <&edp_hpd>; 1032 1033 ports { 1034 edp_out: port@1 { 1035 reg = <1>; 1036 #address-cells = <1>; 1037 #size-cells = <0>; 1038 edp_out_panel: endpoint@0 { 1039 reg = <0>; 1040 remote-endpoint = <&panel_in_edp>; 1041 }; 1042 }; 1043 }; 1044}; 1045 1046&edp_in_vopl { 1047 status = "disabled"; 1048}; 1049 1050&hdmi { 1051 status = "disabled"; 1052}; 1053 1054&hdmi_in_vopb { 1055 status = "disabled"; 1056}; 1057 1058&cdn_dp { 1059 status = "okay"; 1060 extcon = <&fusb0>; 1061 phys = <&tcphy0_dp>; 1062}; 1063 1064&dp_in_vopb { 1065 status = "disabled"; 1066}; 1067 1068&pmu_io_domains { 1069 status = "okay"; 1070 pmu1830-supply = <&vcc_1v8>; 1071}; 1072 1073&route_edp { 1074 status = "okay"; 1075 logo,mode = "center"; 1076}; 1077 1078&vopb { 1079 assigned-clocks = <&cru DCLK_VOP0_DIV>; 1080 assigned-clock-parents = <&cru PLL_CPLL>; 1081}; 1082 1083&vopl { 1084 assigned-clocks = <&cru DCLK_VOP1_DIV>; 1085 assigned-clock-parents = <&cru PLL_VPLL>; 1086}; 1087