1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2/* 3 * Copyright (c) 2022 Rockchip Electronics Co., Ltd. 4 * 5 */ 6 7#include "rk3528.dtsi" 8#include <dt-bindings/gpio/gpio.h> 9#include <dt-bindings/input/rk-input.h> 10#include <dt-bindings/pinctrl/rockchip.h> 11 12/ { 13 acodec_sound: acodec-sound { 14 status = "okay"; 15 compatible = "simple-audio-card"; 16 simple-audio-card,name = "rk3528-acodec"; 17 simple-audio-card,format = "i2s"; 18 simple-audio-card,mclk-fs = <256>; 19 simple-audio-card,cpu { 20 sound-dai = <&sai2>; 21 }; 22 simple-audio-card,codec { 23 sound-dai = <&acodec>; 24 }; 25 }; 26 27 adc_keys: adc-keys { 28 status = "okay"; 29 compatible = "adc-keys"; 30 io-channels = <&saradc 1>; 31 io-channel-names = "buttons"; 32 keyup-threshold-microvolt = <1800000>; 33 poll-interval = <100>; 34 35 vol-up-key { 36 label = "volume up"; 37 linux,code = <KEY_VOLUMEUP>; 38 press-threshold-microvolt = <1750>; 39 }; 40 }; 41 42 bt_sco: bt-sco { 43 status = "disabled"; 44 compatible = "delta,dfbmcs320"; 45 #sound-dai-cells = <1>; 46 }; 47 48 bt_sound: bt-sound { 49 status = "disabled"; 50 compatible = "simple-audio-card"; 51 simple-audio-card,format = "dsp_a"; 52 simple-audio-card,bitclock-inversion = <0>; 53 simple-audio-card,mclk-fs = <256>; 54 simple-audio-card,name = "rockchip,bt"; 55 simple-audio-card,cpu { 56 sound-dai = <&sai0>; 57 }; 58 simple-audio-card,codec { 59 sound-dai = <&bt_sco 1>; 60 }; 61 }; 62 63 dc_12v: dc-12v { 64 compatible = "regulator-fixed"; 65 regulator-name = "dc_12v"; 66 regulator-always-on; 67 regulator-boot-on; 68 regulator-min-microvolt = <12000000>; 69 regulator-max-microvolt = <12000000>; 70 }; 71 72 es7243_sound: es7243-sound { 73 status = "disabled"; 74 compatible = "simple-audio-card"; 75 simple-audio-card,name = "rockchip,es7243"; 76 simple-audio-card,format = "i2s"; 77 simple-audio-card,mclk-fs = <256>; 78 79 simple-audio-card,cpu { 80 sound-dai = <&sai1>; 81 }; 82 simple-audio-card,codec { 83 sound-dai = <&es7243e>; 84 }; 85 }; 86 87 hdmi_sound: hdmi-sound { 88 compatible = "rockchip,hdmi"; 89 rockchip,mclk-fs = <128>; 90 rockchip,card-name = "rockchip,hdmi"; 91 rockchip,cpu = <&sai3>; 92 rockchip,codec = <&hdmi>; 93 rockchip,jack-det; 94 }; 95 96 pdmics: dummy-codec { 97 status = "disabled"; 98 compatible = "rockchip,dummy-codec"; 99 #sound-dai-cells = <0>; 100 }; 101 102 pdm_mic_array: pdm-mic-array { 103 status = "disabled"; 104 compatible = "simple-audio-card"; 105 simple-audio-card,name = "rockchip,pdm-mic-array"; 106 simple-audio-card,cpu { 107 sound-dai = <&pdm>; 108 }; 109 simple-audio-card,codec { 110 sound-dai = <&pdmics>; 111 }; 112 }; 113 114 spdif-sound { 115 status = "okay"; 116 compatible = "simple-audio-card"; 117 simple-audio-card,name = "ROCKCHIP,SPDIF"; 118 simple-audio-card,mclk-fs = <128>; 119 simple-audio-card,cpu { 120 sound-dai = <&spdif_8ch>; 121 }; 122 simple-audio-card,codec { 123 sound-dai = <&spdif_out>; 124 }; 125 }; 126 127 spdif_out: spdif-out { 128 status = "okay"; 129 compatible = "linux,spdif-dit"; 130 #sound-dai-cells = <0>; 131 }; 132 133 vcc5v0_sys: vcc5v0-sys { 134 compatible = "regulator-fixed"; 135 regulator-name = "vcc5v0_sys"; 136 regulator-always-on; 137 regulator-boot-on; 138 regulator-min-microvolt = <5000000>; 139 regulator-max-microvolt = <5000000>; 140 vin-supply = <&dc_12v>; 141 }; 142 143 vcc5v0_host: vcc5v0-host-regulator { 144 compatible = "regulator-fixed"; 145 regulator-name = "vcc5v0_host"; 146 regulator-boot-on; 147 regulator-always-on; 148 regulator-min-microvolt = <5000000>; 149 regulator-max-microvolt = <5000000>; 150 enable-active-high; 151 gpio = <&gpio4 RK_PB5 GPIO_ACTIVE_HIGH>; 152 vin-supply = <&vcc5v0_sys>; 153 pinctrl-names = "default"; 154 pinctrl-0 = <&vcc5v0_host_en>; 155 }; 156 157 vcc5v0_otg: vcc5v0-otg-regulator { 158 compatible = "regulator-fixed"; 159 regulator-name = "vcc5v0_otg"; 160 regulator-min-microvolt = <5000000>; 161 regulator-max-microvolt = <5000000>; 162 enable-active-high; 163 gpio = <&gpio4 RK_PC1 GPIO_ACTIVE_HIGH>; 164 vin-supply = <&vcc5v0_sys>; 165 pinctrl-names = "default"; 166 pinctrl-0 = <&vcc5v0_otg_en>; 167 }; 168 169 /omit-if-no-ref/ 170 vccio_sd: vccio-sd { 171 compatible = "regulator-gpio"; 172 regulator-name = "vccio_sd"; 173 regulator-min-microvolt = <1800000>; 174 regulator-max-microvolt = <3300000>; 175 gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>; 176 vin-supply = <&vcc5v0_sys>; 177 states = <1800000 0x0 178 3300000 0x1>; 179 }; 180 181 vdd_logic: vdd-logic { 182 compatible = "pwm-regulator"; 183 pwms = <&pwm2 0 5000 1>; 184 regulator-name = "vdd_logic"; 185 regulator-min-microvolt = <705000>; 186 regulator-max-microvolt = <1006000>; 187 regulator-init-microvolt = <900000>; 188 regulator-always-on; 189 regulator-boot-on; 190 regulator-settling-time-up-us = <250>; 191 pwm-supply = <&vcc5v0_sys>; 192 status = "okay"; 193 }; 194 195 vdd_cpu: vdd-cpu { 196 compatible = "pwm-regulator"; 197 pwms = <&pwm1 0 5000 1>; 198 regulator-name = "vdd_cpu"; 199 regulator-min-microvolt = <746000>; 200 regulator-max-microvolt = <1201000>; 201 regulator-init-microvolt = <953000>; 202 regulator-always-on; 203 regulator-boot-on; 204 regulator-settling-time-up-us = <250>; 205 pwm-supply = <&vcc5v0_sys>; 206 status = "okay"; 207 }; 208 209 vdd_gpu: vdd-gpu { 210 compatible = "pwm-regulator"; 211 pwms = <&pwm0 0 5000 1>; 212 regulator-name = "vdd_gpu"; 213 regulator-min-microvolt = <705000>; 214 regulator-max-microvolt = <1148000>; 215 regulator-init-microvolt = <900000>; 216 regulator-always-on; 217 regulator-boot-on; 218 regulator-settling-time-up-us = <250>; 219 pwm-supply = <&vcc5v0_sys>; 220 status = "okay"; 221 }; 222 223 vdd_0v9_s3: vdd-0v9-s3 { 224 compatible = "regulator-fixed"; 225 regulator-name = "vdd_0v9_s3"; 226 regulator-always-on; 227 regulator-boot-on; 228 regulator-min-microvolt = <900000>; 229 regulator-max-microvolt = <900000>; 230 vin-supply = <&vcc5v0_sys>; 231 }; 232 233 vdd_1v8_s3: vdd-1v8-s3 { 234 compatible = "regulator-fixed"; 235 regulator-name = "vdd_1v8_s3"; 236 regulator-always-on; 237 regulator-boot-on; 238 regulator-min-microvolt = <1800000>; 239 regulator-max-microvolt = <1800000>; 240 vin-supply = <&vcc5v0_sys>; 241 }; 242 243 vcc_3v3_s3: vcc-3v3-s3 { 244 compatible = "regulator-fixed"; 245 regulator-name = "vcc_3v3_s3"; 246 regulator-always-on; 247 regulator-boot-on; 248 regulator-min-microvolt = <3300000>; 249 regulator-max-microvolt = <3300000>; 250 vin-supply = <&vcc5v0_sys>; 251 }; 252 253 /omit-if-no-ref/ 254 vcc_sd: vcc-sd { 255 compatible = "regulator-fixed"; 256 gpio = <&gpio4 RK_PA1 GPIO_ACTIVE_LOW>; 257 regulator-name = "vcc_sd"; 258 regulator-min-microvolt = <3300000>; 259 regulator-max-microvolt = <3300000>; 260 vin-supply = <&vcc_3v3_s3>; 261 }; 262 263 vcc_ddr_s3: vcc-ddr-s3 { 264 compatible = "regulator-fixed"; 265 regulator-name = "vcc_ddr_s3"; 266 regulator-always-on; 267 regulator-boot-on; 268 regulator-min-microvolt = <1200000>; 269 regulator-max-microvolt = <1200000>; 270 vin-supply = <&vcc5v0_sys>; 271 }; 272}; 273 274&acodec { 275 pa-ctl-gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>; 276 status = "okay"; 277}; 278 279&avsd { 280 status = "okay"; 281}; 282 283&combphy_pu { 284 status = "okay"; 285}; 286 287&cpu0 { 288 cpu-supply = <&vdd_cpu>; 289}; 290 291&crypto { 292 status = "okay"; 293}; 294 295&dfi { 296 status = "okay"; 297}; 298 299&display_subsystem { 300 status = "okay"; 301}; 302 303&dmc { 304 center-supply = <&vdd_logic>; 305 status = "okay"; 306}; 307 308&gmac0 { 309 status = "okay"; 310}; 311 312&gpu { 313 mali-supply = <&vdd_gpu>; 314 status = "okay"; 315}; 316 317&gpu_bus { 318 bus-supply = <&vdd_logic>; 319 status = "okay"; 320}; 321 322&hdmi { 323 status = "okay"; 324}; 325 326&hdmi_in_vp0 { 327 status = "okay"; 328}; 329 330&hdmiphy { 331 status = "okay"; 332}; 333 334&i2c6 { 335 status = "disabled"; 336 es7243e: es7243e@10 { 337 status = "okay"; 338 #sound-dai-cells = <0>; 339 compatible = "ES7243E_MicArray_0"; 340 reg = <0x10>; 341 }; 342 343 es7243e_11: es7243e@11 { 344 status = "okay"; 345 #sound-dai-cells = <0>; 346 compatible = "ES7243E_MicArray_1"; 347 reg = <0x11>; 348 }; 349 350 es7243e_12: es7243e@12 { 351 status = "okay"; 352 #sound-dai-cells = <0>; 353 compatible = "ES7243E_MicArray_2"; 354 reg = <0x12>; 355 }; 356}; 357 358&iep { 359 status = "okay"; 360}; 361 362&iep_mmu { 363 status = "okay"; 364}; 365 366&jpegd { 367 status = "okay"; 368}; 369 370&jpegd_mmu { 371 status = "okay"; 372}; 373 374&mpp_srv { 375 status = "okay"; 376}; 377 378&pinctrl { 379 usb { 380 vcc5v0_host_en: vcc5v0-host-en { 381 rockchip,pins = <4 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>; 382 }; 383 384 vcc5v0_otg_en: vcc5v0-otg-en { 385 rockchip,pins = <4 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>; 386 }; 387 }; 388}; 389 390&pwm0 { 391 status = "okay"; 392}; 393 394&pwm1 { 395 status = "okay"; 396}; 397 398&pwm2 { 399 status = "okay"; 400}; 401 402&pwm3 { 403 compatible = "rockchip,remotectl-pwm"; 404 pinctrl-names = "default"; 405 pinctrl-0 = <&pwm3m0_pins>; 406 remote_pwm_id = <3>; 407 handle_cpu_id = <1>; 408 remote_support_psci = <0>; 409 status = "okay"; 410 411 ir_key1 { 412 rockchip,usercode = <0x4040>; 413 rockchip,key_table = 414 <0xf2 KEY_REPLY>, 415 <0xba KEY_BACK>, 416 <0xf4 KEY_UP>, 417 <0xf1 KEY_DOWN>, 418 <0xef KEY_LEFT>, 419 <0xee KEY_RIGHT>, 420 <0xbd KEY_HOME>, 421 <0xea KEY_VOLUMEUP>, 422 <0xe3 KEY_VOLUMEDOWN>, 423 <0xe2 KEY_SEARCH>, 424 <0xb2 KEY_POWER>, 425 <0xbc KEY_MUTE>, 426 <0xec KEY_MENU>, 427 <0xbf 0x190>, 428 <0xe0 0x191>, 429 <0xe1 0x192>, 430 <0xe9 183>, 431 <0xe6 248>, 432 <0xe8 185>, 433 <0xe7 186>, 434 <0xf0 388>, 435 <0xbe 0x175>; 436 }; 437 438 ir_key2 { 439 rockchip,usercode = <0xff00>; 440 rockchip,key_table = 441 <0xf9 KEY_HOME>, 442 <0xbf KEY_BACK>, 443 <0xfb KEY_MENU>, 444 <0xaa KEY_REPLY>, 445 <0xb9 KEY_UP>, 446 <0xe9 KEY_DOWN>, 447 <0xb8 KEY_LEFT>, 448 <0xea KEY_RIGHT>, 449 <0xeb KEY_VOLUMEDOWN>, 450 <0xef KEY_VOLUMEUP>, 451 <0xf7 KEY_MUTE>, 452 <0xe7 KEY_POWER>, 453 <0xfc KEY_POWER>, 454 <0xa9 KEY_VOLUMEDOWN>, 455 <0xa8 KEY_PLAYPAUSE>, 456 <0xe0 KEY_VOLUMEDOWN>, 457 <0xa5 KEY_VOLUMEDOWN>, 458 <0xab 183>, 459 <0xb7 388>, 460 <0xe8 388>, 461 <0xf8 184>, 462 <0xaf 185>, 463 <0xed KEY_VOLUMEDOWN>, 464 <0xee 186>, 465 <0xb3 KEY_VOLUMEDOWN>, 466 <0xf1 KEY_VOLUMEDOWN>, 467 <0xf2 KEY_VOLUMEDOWN>, 468 <0xf3 KEY_SEARCH>, 469 <0xb4 KEY_VOLUMEDOWN>, 470 <0xa4 KEY_SETUP>, 471 <0xbe KEY_SEARCH>; 472 }; 473 474 ir_key3 { 475 rockchip,usercode = <0x1dcc>; 476 rockchip,key_table = 477 <0xee KEY_REPLY>, 478 <0xf0 KEY_BACK>, 479 <0xf8 KEY_UP>, 480 <0xbb KEY_DOWN>, 481 <0xef KEY_LEFT>, 482 <0xed KEY_RIGHT>, 483 <0xfc KEY_HOME>, 484 <0xf1 KEY_VOLUMEUP>, 485 <0xfd KEY_VOLUMEDOWN>, 486 <0xb7 KEY_SEARCH>, 487 <0xff KEY_POWER>, 488 <0xf3 KEY_MUTE>, 489 <0xbf KEY_MENU>, 490 <0xf9 0x191>, 491 <0xf5 0x192>, 492 <0xb3 388>, 493 <0xbe KEY_1>, 494 <0xba KEY_2>, 495 <0xb2 KEY_3>, 496 <0xbd KEY_4>, 497 <0xf9 KEY_5>, 498 <0xb1 KEY_6>, 499 <0xfc KEY_7>, 500 <0xf8 KEY_8>, 501 <0xb0 KEY_9>, 502 <0xb6 KEY_0>, 503 <0xb5 KEY_BACKSPACE>; 504 }; 505}; 506 507&rga2 { 508 status = "okay"; 509}; 510 511&rga2_mmu { 512 status = "okay"; 513}; 514 515&rkvdec { 516 status = "okay"; 517}; 518 519&rkvdec_mmu { 520 status = "okay"; 521}; 522 523&rkvenc { 524 status = "okay"; 525}; 526 527&rkvenc_mmu { 528 status = "okay"; 529}; 530 531&rkvtunnel { 532 status = "okay"; 533}; 534 535&rockchip_suspend { 536 status = "okay"; 537 rockchip,sleep-debug-en = <1>; 538 rockchip,virtual-poweroff = <1>; 539 rockchip,sleep-mode-config = < 540 (0 541 | RKPM_SLP_ARMPD 542 ) 543 >; 544 rockchip,wakeup-config = < 545 (0 546 | RKPM_CPU0_WKUP_EN 547 | RKPM_GPIO_WKUP_EN 548 ) 549 >; 550 rockchip,pwm-regulator-config = < 551 (0 552 | RKPM_PWM0_M0_REGULATOR_EN 553 | RKPM_PWM1_M0_REGULATOR_EN 554 ) 555 >; 556}; 557 558&sai0 { 559 pinctrl-0 = <&i2s0m1_lrck &i2s0m1_sclk &i2s0m1_sdi &i2s0m1_sdo>; 560 status = "disabled"; 561}; 562 563&sai2 { 564 status = "okay"; 565}; 566 567&sai3 { 568 status = "okay"; 569}; 570 571&saradc { 572 status = "okay"; 573 vref-supply = <&vdd_1v8_s3>; 574}; 575 576&sdhci { 577 bus-width = <8>; 578 no-sd; 579 no-sdio; 580 non-removable; 581 mmc-hs400-1_8v; 582 mmc-hs400-enhanced-strobe; 583 max-frequency = <200000000>; 584 status = "okay"; 585}; 586 587&sdmmc { 588 bus-width = <4>; 589 cap-mmc-highspeed; 590 cap-sd-highspeed; 591 disable-wp; 592 max-frequency = <150000000>; 593 pinctrl-names = "default"; 594 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_det &sdmmc_bus4>; 595 rockchip,default-sample-phase = <90>; 596 supports-sd; 597 sd-uhs-sdr12; 598 sd-uhs-sdr25; 599 sd-uhs-sdr50; 600 sd-uhs-sdr104; 601 vqmmc-supply = <&vccio_sd>; 602 vmmc-supply = <&vcc_sd>; 603 status = "disabled"; 604}; 605 606&sfc { 607 status = "okay"; 608}; 609 610&spdif_8ch { 611 status = "okay"; 612}; 613 614&tsadc { 615 status = "okay"; 616}; 617 618&tve { 619 status = "okay"; 620}; 621 622&tve_in_vp1 { 623 status = "okay"; 624}; 625 626&u2phy_host { 627 phy-supply = <&vcc5v0_host>; 628 status = "okay"; 629}; 630 631&u2phy_otg { 632 vbus-supply = <&vcc5v0_otg>; 633 status = "okay"; 634}; 635 636&usb2phy { 637 status = "okay"; 638}; 639 640&usb_host0_ehci { 641 status = "okay"; 642}; 643 644&usb_host0_ohci { 645 status = "okay"; 646}; 647 648&usbdrd30 { 649 status = "okay"; 650}; 651 652&usbdrd_dwc3 { 653 dr_mode = "otg"; 654 extcon = <&usb2phy>; 655 status = "okay"; 656}; 657 658&vdpp { 659 status = "okay"; 660}; 661 662&vdpu { 663 status = "okay"; 664}; 665 666&vdpu_mmu { 667 status = "okay"; 668}; 669 670&vop { 671 status = "okay"; 672}; 673 674&vop_mmu { 675 status = "okay"; 676}; 677