1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 3 #include <dt-bindings/gpio/gpio.h> 4 #include <dt-bindings/input/gpio-keys.h> 5 #include <dt-bindings/input/input.h> 6 #include <dt-bindings/leds/common.h> 7 #include <dt-bindings/pinctrl/rockchip.h> 8 9 #include "rk3566.dtsi" 10 11 / { 12 aliases { 13 mmc0 = &sdhci; 14 }; 15 16 chosen { 17 stdout-path = "serial2:1500000 18 }; 19 20 adc-keys { 21 compatible = "adc-keys"; 22 io-channels = <&saradc 0>; 23 io-channel-names = "buttons"; 24 keyup-threshold-microvolt = <1 25 26 button-recovery { 27 label = "recovery"; 28 linux,code = <KEY_VEND 29 press-threshold-microv 30 }; 31 }; 32 33 spk_amp: audio-amplifier { 34 compatible = "simple-audio-amp 35 enable-gpios = <&gpio3 RK_PC4 36 pinctrl-0 = <&spk_amp_enable_h 37 pinctrl-names = "default"; 38 sound-name-prefix = "Speaker A 39 }; 40 41 dmic_codec: dmic-codec { 42 compatible = "dmic-codec"; 43 num-channels = <6>; 44 #sound-dai-cells = <0>; 45 }; 46 47 gpio-keys { 48 compatible = "gpio-keys"; 49 pinctrl-0 = <&hall_int_l>; 50 pinctrl-names = "default"; 51 52 switch-cover { 53 label = "cover"; 54 gpios = <&gpio0 RK_PC7 55 linux,input-type = <EV 56 linux,code = <SW_MACHI 57 linux,can-disable; 58 wakeup-event-action = 59 wakeup-source; 60 }; 61 }; 62 63 gpio-leds { 64 compatible = "gpio-leds"; 65 pinctrl-0 = <&led_pin>; 66 pinctrl-names = "default"; 67 68 led-0 { 69 color = <LED_COLOR_ID_ 70 function = LED_FUNCTIO 71 gpios = <&gpio3 RK_PC5 72 }; 73 }; 74 75 sdio_pwrseq: sdio-pwrseq { 76 compatible = "mmc-pwrseq-simpl 77 clocks = <&rk817 1>; 78 clock-names = "ext_clock"; 79 pinctrl-0 = <&wifi_enable_h>; 80 pinctrl-names = "default"; 81 reset-gpios = <&gpio0 RK_PC6 G 82 }; 83 84 sound { 85 compatible = "simple-audio-car 86 simple-audio-card,name = "Pine 87 simple-audio-card,aux-devs = < 88 simple-audio-card,widgets = "H 89 "S 90 simple-audio-card,routing = "H 91 "H 92 "I 93 "I 94 "S 95 "S 96 simple-audio-card,pin-switches 97 #address-cells = <1>; 98 #size-cells = <0>; 99 100 simple-audio-card,dai-link@0 { 101 reg = <0>; 102 bitclock-master = <&li 103 format = "i2s"; 104 frame-master = <&link0 105 mclk-fs = <256>; 106 107 link0_cpu: cpu { 108 sound-dai = <& 109 }; 110 111 link0_codec: codec { 112 sound-dai = <& 113 }; 114 }; 115 116 simple-audio-card,dai-link@1 { 117 reg = <1>; 118 bitclock-master = <&li 119 format = "pdm"; 120 frame-master = <&link1 121 122 link1_cpu: cpu { 123 sound-dai = <& 124 }; 125 126 link1_codec: codec { 127 sound-dai = <& 128 }; 129 }; 130 }; 131 132 vbat_4g: vbat-4g { 133 compatible = "regulator-fixed" 134 regulator-name = "vbat_4g"; 135 regulator-min-microvolt = <380 136 regulator-max-microvolt = <380 137 /* powered by vcc_bat, enabled 138 vin-supply = <&vbat_4g_en>; 139 }; 140 141 vcc_1v8: vcc-1v8 { 142 compatible = "regulator-fixed" 143 regulator-name = "vcc_1v8"; 144 regulator-always-on; 145 regulator-min-microvolt = <180 146 regulator-max-microvolt = <180 147 /* powered by vcc_sys, enabled 148 vin-supply = <&vcc_1v8_en>; 149 }; 150 151 vcc_bat: vcc-bat { 152 compatible = "regulator-fixed" 153 regulator-name = "vcc_bat"; 154 regulator-always-on; 155 regulator-min-microvolt = <380 156 regulator-max-microvolt = <380 157 }; 158 159 vcc_hall_3v3: vcc-hall-3v3 { 160 compatible = "regulator-fixed" 161 regulator-name = "vcc_hall_3v3 162 regulator-always-on; 163 regulator-min-microvolt = <330 164 regulator-max-microvolt = <330 165 vin-supply = <&vcc_sys>; 166 }; 167 168 vcc_sys: vcc-sys { 169 compatible = "regulator-fixed" 170 regulator-name = "vcc_sys"; 171 regulator-always-on; 172 regulator-min-microvolt = <380 173 regulator-max-microvolt = <380 174 vin-supply = <&vcc_bat>; 175 }; 176 177 vcc_wl: vcc-wl { 178 compatible = "regulator-fixed" 179 enable-active-high; 180 gpio = <&gpio0 RK_PA0 GPIO_ACT 181 pinctrl-0 = <&vcc_wl_pin>; 182 pinctrl-names = "default"; 183 regulator-name = "vcc_wl"; 184 regulator-min-microvolt = <330 185 regulator-max-microvolt = <330 186 vin-supply = <&vcc_bat>; 187 }; 188 189 vdda_0v9: vdda-0v9 { 190 compatible = "regulator-fixed" 191 regulator-name = "vdda_0v9"; 192 regulator-always-on; 193 regulator-min-microvolt = <900 194 regulator-max-microvolt = <900 195 /* powered by vcc_sys, enabled 196 vin-supply = <&vcc_1v8_en>; 197 }; 198 }; 199 200 &cpu0 { 201 cpu-supply = <&vdd_cpu>; 202 }; 203 204 &cpu1 { 205 cpu-supply = <&vdd_cpu>; 206 }; 207 208 &cpu2 { 209 cpu-supply = <&vdd_cpu>; 210 }; 211 212 &cpu3 { 213 cpu-supply = <&vdd_cpu>; 214 }; 215 216 &i2c0 { 217 status = "okay"; 218 219 vdd_cpu: regulator@1c { 220 compatible = "tcs,tcs4525"; 221 reg = <0x1c>; 222 fcs,suspend-voltage-selector = 223 regulator-name = "vdd_cpu"; 224 regulator-min-microvolt = <712 225 regulator-max-microvolt = <139 226 regulator-ramp-delay = <2300>; 227 regulator-always-on; 228 vin-supply = <&vcc_sys>; 229 230 regulator-state-mem { 231 regulator-on-in-suspen 232 }; 233 }; 234 235 rk817: pmic@20 { 236 compatible = "rockchip,rk817"; 237 reg = <0x20>; 238 interrupt-parent = <&gpio0>; 239 interrupts = <RK_PA3 IRQ_TYPE_ 240 assigned-clocks = <&cru I2S1_M 241 assigned-clock-parents = <&cru 242 clocks = <&cru I2S1_MCLKOUT_TX 243 clock-names = "mclk"; 244 #clock-cells = <1>; 245 pinctrl-0 = <&i2s1m0_mclk>, <& 246 pinctrl-names = "default"; 247 rockchip,system-power-controll 248 #sound-dai-cells = <0>; 249 wakeup-source; 250 251 vcc1-supply = <&vcc_sys>; 252 vcc2-supply = <&vcc_sys>; 253 vcc3-supply = <&vcc_sys>; 254 vcc4-supply = <&vcc_sys>; 255 vcc5-supply = <&vcc_sys>; 256 vcc6-supply = <&vcc_sys>; 257 vcc7-supply = <&vcc_sys>; 258 vcc8-supply = <&vcc_sys>; 259 vcc9-supply = <&dcdc_boost>; 260 261 regulators { 262 vdd_logic: DCDC_REG1 { 263 regulator-name 264 regulator-alwa 265 regulator-min- 266 regulator-max- 267 regulator-ramp 268 regulator-init 269 270 regulator-stat 271 regula 272 regula 273 }; 274 }; 275 276 vdd_gpu_npu: DCDC_REG2 277 regulator-name 278 regulator-min- 279 regulator-max- 280 regulator-ramp 281 regulator-init 282 283 regulator-stat 284 regula 285 }; 286 }; 287 288 vcc_ddr: DCDC_REG3 { 289 regulator-name 290 regulator-alwa 291 regulator-init 292 293 regulator-stat 294 regula 295 }; 296 }; 297 298 vcc_3v3: DCDC_REG4 { 299 regulator-name 300 regulator-alwa 301 regulator-min- 302 regulator-max- 303 regulator-init 304 305 regulator-stat 306 regula 307 }; 308 }; 309 310 vcca_1v8_pmu: LDO_REG1 311 regulator-name 312 regulator-alwa 313 regulator-min- 314 regulator-max- 315 316 regulator-stat 317 regula 318 }; 319 }; 320 321 /* unused */ 322 vdda_0v9_ldo: LDO_REG2 323 regulator-name 324 regulator-min- 325 regulator-max- 326 327 regulator-stat 328 regula 329 }; 330 }; 331 332 vdda_0v9_pmu: LDO_REG3 333 regulator-name 334 regulator-alwa 335 regulator-min- 336 regulator-max- 337 338 regulator-stat 339 regula 340 }; 341 }; 342 343 vccio_acodec: LDO_REG4 344 regulator-name 345 regulator-alwa 346 regulator-min- 347 regulator-max- 348 349 regulator-stat 350 regula 351 }; 352 }; 353 354 /* unused */ 355 vccio_sd: LDO_REG5 { 356 regulator-name 357 regulator-min- 358 regulator-max- 359 360 regulator-stat 361 regula 362 }; 363 }; 364 365 vcc_3v3_pmu: LDO_REG6 366 regulator-name 367 regulator-alwa 368 regulator-min- 369 regulator-max- 370 371 regulator-stat 372 regula 373 }; 374 }; 375 376 vcc_1v8_en: LDO_REG7 { 377 regulator-name 378 regulator-min- 379 regulator-max- 380 381 regulator-stat 382 regula 383 }; 384 }; 385 386 vbat_4g_en: LDO_REG8 { 387 regulator-name 388 regulator-min- 389 regulator-max- 390 391 regulator-stat 392 regula 393 }; 394 }; 395 396 sleep_sta_ctl: LDO_REG 397 regulator-name 398 regulator-min- 399 regulator-max- 400 401 regulator-stat 402 regula 403 }; 404 }; 405 406 dcdc_boost: BOOST { 407 regulator-name 408 regulator-min- 409 regulator-max- 410 411 regulator-stat 412 regula 413 }; 414 }; 415 416 otg_switch: OTG_SWITCH 417 regulator-name 418 419 regulator-stat 420 regula 421 }; 422 }; 423 }; 424 }; 425 }; 426 427 &i2c1 { 428 status = "okay"; 429 430 digitizer@9 { 431 compatible = "wacom,w9013", "h 432 reg = <0x09>; 433 interrupt-parent = <&gpio0>; 434 interrupts = <RK_PB6 IRQ_TYPE_ 435 hid-descr-addr = <0x1>; 436 pinctrl-0 = <&pen_fwe>, <&pen_ 437 pinctrl-names = "default"; 438 vdd-supply = <&vcc_3v3_pmu>; 439 }; 440 }; 441 442 &i2c3 { 443 pinctrl-0 = <&i2c3m1_xfer>; 444 status = "okay"; 445 446 led-controller@36 { 447 compatible = "ti,lm3630a"; 448 reg = <0x36>; 449 enable-gpios = <&gpio0 RK_PB7 450 pinctrl-0 = <&backlight_hwen_h 451 pinctrl-names = "default"; 452 #address-cells = <1>; 453 #size-cells = <0>; 454 455 led@0 { 456 reg = <0>; 457 label = "backlight_coo 458 default-brightness = < 459 }; 460 461 led@1 { 462 reg = <1>; 463 label = "backlight_war 464 default-brightness = < 465 }; 466 }; 467 468 wusb3801: tcpc@60 { 469 compatible = "willsemi,wusb380 470 reg = <0x60>; 471 interrupt-parent = <&gpio0>; 472 interrupts = <RK_PA4 IRQ_TYPE_ 473 pinctrl-0 = <&tcpc_int_l>; 474 pinctrl-names = "default"; 475 476 connector { 477 compatible = "usb-c-co 478 label = "USB-C"; 479 vbus-supply = <&otg_sw 480 power-role = "dual"; 481 try-power-role = "sink 482 data-role = "dual"; 483 typec-power-opmode = " 484 pd-disable; 485 486 ports { 487 #address-cells 488 #size-cells = 489 490 port@0 { 491 reg = 492 493 typec_ 494 495 }; 496 }; 497 }; 498 }; 499 }; 500 }; 501 502 &i2c5 { 503 status = "okay"; 504 505 accelerometer@18 { 506 compatible = "silan,sc7a20"; 507 reg = <0x18>; 508 interrupt-parent = <&gpio3>; 509 interrupts = <RK_PB2 IRQ_TYPE_ 510 pinctrl-0 = <&accelerometer_in 511 pinctrl-names = "default"; 512 st,drdy-int-pin = <1>; 513 vdd-supply = <&vcc_3v3>; 514 vddio-supply = <&vcc_3v3>; 515 }; 516 }; 517 518 &i2s1_8ch { 519 pinctrl-0 = <&i2s1m0_lrcktx>, <&i2s1m0 520 rockchip,trcm-sync-tx-only; 521 status = "okay"; 522 }; 523 524 &pdm { 525 pinctrl-0 = <&pdmm0_clk1>, <&pdmm0_sdi 526 /* microphones are on channels 1 and 2 527 rockchip,path-map = <1>, <2>, <0>, <3> 528 status = "okay"; 529 }; 530 531 &pinctrl { 532 accelerometer { 533 accelerometer_int_l: accelerom 534 rockchip,pins = <3 RK_ 535 }; 536 }; 537 538 audio-amplifier { 539 spk_amp_enable_h: spk-amp-enab 540 rockchip,pins = <3 RK_ 541 }; 542 }; 543 544 backlight { 545 backlight_hwen_h: backlight-hw 546 rockchip,pins = <0 RK_ 547 }; 548 }; 549 550 bt { 551 bt_enable_h: bt-enable-h { 552 rockchip,pins = <0 RK_ 553 }; 554 555 bt_host_wake_l: bt-host-wake-l 556 rockchip,pins = <0 RK_ 557 }; 558 559 bt_wake_h: bt-wake-h { 560 rockchip,pins = <0 RK_ 561 }; 562 }; 563 564 led { 565 led_pin: led-pin { 566 rockchip,pins = <3 RK_ 567 }; 568 }; 569 570 hall { 571 hall_int_l: hall-int-l { 572 rockchip,pins = <0 RK_ 573 }; 574 }; 575 576 pen { 577 pen_fwe: pen-fwe { 578 rockchip,pins = <3 RK_ 579 }; 580 581 pen_irq_l: pen-irq-l { 582 rockchip,pins = <0 RK_ 583 }; 584 585 pen_rst_l: pen-rst-l { 586 rockchip,pins = <0 RK_ 587 }; 588 }; 589 590 pmic { 591 pmic_int_l: pmic-int-l { 592 rockchip,pins = <0 RK_ 593 }; 594 595 pmic_sleep: pmic-sleep { 596 rockchip,pins = <0 RK_ 597 }; 598 }; 599 600 sdio-pwrseq { 601 wifi_enable_h: wifi-enable-h { 602 rockchip,pins = <0 RK_ 603 }; 604 }; 605 606 tcpc { 607 tcpc_int_l: tcpc-int-l { 608 rockchip,pins = <0 RK_ 609 }; 610 }; 611 612 vcc-wl { 613 vcc_wl_pin: vcc-wl-pin { 614 rockchip,pins = <0 RK_ 615 }; 616 }; 617 618 wifi { 619 wifi_host_wake_l: wifi-host-wa 620 rockchip,pins = <0 RK_ 621 }; 622 }; 623 }; 624 625 &pmu_io_domains { 626 pmuio1-supply = <&vcc_3v3_pmu>; 627 pmuio2-supply = <&vcc_3v3_pmu>; 628 vccio1-supply = <&vccio_acodec>; 629 vccio2-supply = <&vcc_1v8>; 630 vccio3-supply = <&vcc_3v3>; 631 vccio4-supply = <&vcca_1v8_pmu>; 632 vccio5-supply = <&vcc_3v3>; 633 vccio6-supply = <&vcc_3v3>; 634 status = "okay"; 635 }; 636 637 &saradc { 638 vref-supply = <&vcc_1v8>; 639 status = "okay"; 640 }; 641 642 &sdhci { 643 bus-width = <8>; 644 mmc-hs200-1_8v; 645 non-removable; 646 pinctrl-0 = <&emmc_bus8>, <&emmc_clk>, 647 pinctrl-names = "default"; 648 vmmc-supply = <&vcc_3v3>; 649 vqmmc-supply = <&vcc_1v8>; 650 status = "okay"; 651 }; 652 653 &sdmmc1 { 654 bus-width = <4>; 655 cap-sd-highspeed; 656 cap-sdio-irq; 657 keep-power-in-suspend; 658 mmc-pwrseq = <&sdio_pwrseq>; 659 non-removable; 660 pinctrl-0 = <&sdmmc1_bus4>, <&sdmmc1_c 661 pinctrl-names = "default"; 662 sd-uhs-sdr104; 663 vmmc-supply = <&vcc_wl>; 664 vqmmc-supply = <&vcca_1v8_pmu>; 665 status = "okay"; 666 }; 667 668 &tsadc { 669 /* tshut mode 0:CRU 1:GPIO */ 670 rockchip,hw-tshut-mode = <1>; 671 /* tshut polarity 0:LOW 1:HIGH */ 672 rockchip,hw-tshut-polarity = <0>; 673 status = "okay"; 674 }; 675 676 &uart1 { 677 dma-names = "tx", "rx"; 678 pinctrl-0 = <&uart1m0_ctsn>, <&uart1m0 679 pinctrl-names = "default"; 680 uart-has-rtscts; 681 status = "okay"; 682 683 bluetooth { 684 compatible = "brcm,bcm43438-bt 685 clocks = <&rk817 1>; 686 clock-names = "lpo"; 687 device-wakeup-gpios = <&gpio0 688 host-wakeup-gpios = <&gpio0 RK 689 pinctrl-0 = <&bt_enable_h>, <& 690 pinctrl-names = "default"; 691 shutdown-gpios = <&gpio0 RK_PC 692 vbat-supply = <&vcc_wl>; 693 vddio-supply = <&vcca_1v8_pmu> 694 }; 695 }; 696 697 &uart2 { 698 status = "okay"; 699 }; 700 701 &usb_host0_xhci { 702 dr_mode = "otg"; 703 status = "okay"; 704 }; 705 706 &usb2phy0 { 707 status = "okay"; 708 }; 709 710 &usb2phy0_otg { 711 status = "okay"; 712 713 port { 714 usb2phy0_typec_hs: endpoint { 715 remote-endpoint = <&ty 716 }; 717 }; 718 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.