1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2/* 3 * Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd 4 */ 5 6/dts-v1/; 7 8#include "rk3128x.dtsi" 9#include <dt-bindings/pwm/pwm.h> 10#include <dt-bindings/input/input.h> 11 12/ { 13 chosen: chosen { 14 bootargs = "earlycon=uart8250,mmio32,0x11030000"; 15 }; 16 17 fiq_debugger: fiq-debugger { 18 compatible = "rockchip,fiq-debugger"; 19 interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>; 20 rockchip,serial-id = <2>; 21 rockchip,signal-irq = <159>; 22 rockchip,wake-irq = <0>; 23 rockchip,irq-mode-enable = <0>; /* If enable uart uses irq instead of fiq */ 24 rockchip,baudrate = <1500000>; /* Only 115200 and 1500000 */ 25 pinctrl-names = "default"; 26 pinctrl-0 = <&uart21_xfer>; 27 }; 28 29 firmware { 30 firmware_android: android {}; 31 }; 32 33 reserved_memory: reserved-memory { 34 #address-cells = <1>; 35 #size-cells = <1>; 36 ranges; 37 38 drm_logo: drm-logo@00000000 { 39 compatible = "rockchip,drm-logo"; 40 reg = <0x0 0x0>; 41 }; 42 43 secure_memory: secure-memory@80000000 { 44 compatible = "rockchip,secure-memory"; 45 reg = <0x80000000 0x0>; 46 }; 47 48 ramoops: ramoops@62e00000 { 49 compatible = "ramoops"; 50 reg = <0x62e00000 0xf0000>; 51 record-size = <0x20000>; 52 console-size = <0x80000>; 53 ftrace-size = <0x00000>; 54 pmsg-size = <0x50000>; 55 }; 56 }; 57 58 gpio_keys: gpio-keys { 59 status = "okay"; 60 compatible = "gpio-keys"; 61 #address-cells = <1>; 62 #size-cells = <0>; 63 autorepeat; 64 65 pinctrl-names = "default"; 66 pinctrl-0 = <&pwr_key &volume_up_key>; 67 68 power_key: power-key { 69 label = "GPIO Key Power"; 70 gpios = <&gpio3 23 GPIO_ACTIVE_LOW>; 71 linux,code = <KEY_POWER>; 72 debounce-interval = <100>; 73 wakeup-source; 74 }; 75 76 volume_up: volume-up-key { 77 label = "GPIO Key Power"; 78 gpios = <&gpio3 25 GPIO_ACTIVE_LOW>; 79 linux,code = <KEY_VOLUMEUP>; 80 }; 81 }; 82 83 sound: sound { 84 compatible = "simple-audio-card"; 85 simple-audio-card,format = "i2s"; 86 simple-audio-card,mclk-fs = <256>; 87 simple-audio-card,name = "rockchip-rk3229"; 88 simple-audio-card,cpu { 89 sound-dai = <&i2s1>; 90 }; 91 simple-audio-card,codec { 92 sound-dai = <&codec>; 93 }; 94 }; 95 96 hdmi_sound: hdmi-sound { 97 status = "okay"; 98 compatible = "simple-audio-card"; 99 simple-audio-card,format = "i2s"; 100 simple-audio-card,mclk-fs = <128>; 101 simple-audio-card,name = "rockchip-hdmi"; 102 simple-audio-card,cpu { 103 sound-dai = <&i2s0>; 104 }; 105 simple-audio-card,codec { 106 sound-dai = <&hdmi>; 107 }; 108 }; 109 110 regulators: regulators { 111 compatible = "simple-bus"; 112 #address-cells = <1>; 113 #size-cells = <0>; 114 115 vccio_1v8_reg: regulator@0 { 116 compatible = "regulator-fixed"; 117 regulator-name = "vccio_1v8"; 118 regulator-min-microvolt = <1800000>; 119 regulator-max-microvolt = <1800000>; 120 regulator-always-on; 121 }; 122 123 vccio_3v3_reg: regulator@1 { 124 compatible = "regulator-fixed"; 125 regulator-name = "vccio_3v3"; 126 regulator-min-microvolt = <3300000>; 127 regulator-max-microvolt = <3300000>; 128 regulator-always-on; 129 }; 130 }; 131 132 rtc_fake: rtc-fake { 133 compatible = "rtc-fake"; 134 status = "okay"; 135 }; 136 137 sdio_pwrseq: sdio-pwrseq { 138 compatible = "mmc-pwrseq-simple"; 139 clocks = <&hym8563>; 140 /* clock-names = "ext_clock"; */ 141 pinctrl-names = "default"; 142 pinctrl-0 = <&wifi_enable_h>; 143 144 /* 145 * On the module itself this is one of these (depending 146 * on the actual card populated): 147 * - SDIO_RESET_L_WL_REG_ON 148 * - PDN (power down when low) 149 */ 150 reset-gpios = <&gpio2 26 GPIO_ACTIVE_LOW>; /* GPIO2_D2 */ 151 }; 152 153 spdif_out: spdif-out { 154 status = "okay"; 155 compatible = "linux,spdif-dit"; 156 #sound-dai-cells = <0>; 157 }; 158 159 spdif_sound: spdif-sound { 160 status = "okay"; 161 compatible = "simple-audio-card"; 162 simple-audio-card,name = "ROCKCHIP-SPDIF"; 163 simple-audio-card,mclk-fs = <128>; 164 simple-audio-card,cpu { 165 sound-dai = <&spdif>; 166 }; 167 simple-audio-card,codec { 168 sound-dai = <&spdif_out>; 169 }; 170 }; 171 172 vcc_host: vcc-host-regulator { 173 compatible = "regulator-fixed"; 174 enable-active-high; 175 gpio = <&gpio3 20 GPIO_ACTIVE_HIGH>; 176 pinctrl-names = "default"; 177 pinctrl-0 = <&host_vbus_drv>; 178 regulator-name = "vcc_host"; 179 regulator-always-on; 180 regulator-boot-on; 181 }; 182 183 vcc_otg_vbus: otg-vbus-regulator { 184 compatible = "regulator-fixed"; 185 gpio = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>; 186 pinctrl-names = "default"; 187 pinctrl-0 = <&otg_vbus_drv>; 188 regulator-name = "vcc_otg_vbus"; 189 regulator-min-microvolt = <5000000>; 190 regulator-max-microvolt = <5000000>; 191 enable-active-high; 192 }; 193 194 vcc_phy: vcc-phy-regulator { 195 compatible = "regulator-fixed"; 196 enable-active-high; 197 regulator-name = "vcc_phy"; 198 regulator-min-microvolt = <1800000>; 199 regulator-max-microvolt = <1800000>; 200 regulator-always-on; 201 regulator-boot-on; 202 }; 203 204 vdd_arm: vdd-arm-regulator { 205 compatible = "pwm-regulator"; 206 rockchip,pwm_id = <1>; 207 regulator-init-microvolt = <1200000>; 208 regulator-early-min-microvolt = <1200000>; 209 pwms = <&pwm1 0 5000 1>; 210 regulator-name = "vdd_arm"; 211 regulator-min-microvolt = <950000>; 212 regulator-max-microvolt = <1400000>; 213 regulator-settling-time-up-us = <250>; 214 regulator-always-on; 215 regulator-boot-on; 216 }; 217 218 wireless_bluetooth: wireless-bluetooth { 219 compatible = "bluetooth-platdata"; 220 clocks = <&hym8563>; 221 clock-names = "ext_clock"; 222 uart_rts_gpios = <&gpio3 6 GPIO_ACTIVE_LOW>; 223 pinctrl-names = "default", "rts_gpio"; 224 pinctrl-0 = <&uart11_rts>; 225 pinctrl-1 = <&uart11_rts_gpio>; 226 BT,power_gpio = <&gpio2 29 GPIO_ACTIVE_HIGH>; 227 BT,wake_host_irq = <&gpio3 26 GPIO_ACTIVE_HIGH>; 228 status = "okay"; 229 }; 230 231 wireless_wlan: wireless-wlan { 232 compatible = "wlan-platdata"; 233 rockchip,grf = <&grf>; 234 wifi_chip_type = "ssv6051"; 235 sdio_vref = <1800>; 236 WIFI,host_wake_irq = <&gpio0 28 GPIO_ACTIVE_HIGH>; 237 status = "okay"; 238 }; 239}; 240 241&codec { 242 #sound-dai-cells = <0>; 243 status = "okay"; 244}; 245 246&cpu0 { 247 cpu-supply = <&vdd_arm>; 248}; 249 250&display_subsystem { 251 logo-memory-region = <&drm_logo>; 252 secure-memory-region = <&secure_memory>; 253 status = "okay"; 254 255 route { 256 route_hdmi: route-hdmi { 257 status = "okay"; 258 logo,uboot = "logo.bmp"; 259 logo,kernel = "logo_kernel.bmp"; 260 logo,mode = "center"; 261 charge_logo,mode = "center"; 262 connect = <&vop_out_hdmi>; 263 }; 264 265 route_tve: route-tve { 266 status = "okay"; 267 logo,uboot = "logo.bmp"; 268 logo,kernel = "logo_kernel.bmp"; 269 logo,mode = "center"; 270 charge_logo,mode = "center"; 271 connect = <&vop_out_tve>; 272 }; 273 }; 274}; 275 276&dmc { 277 center-supply = <&vdd_arm>; 278 status = "okay"; 279}; 280 281&emmc { 282 broken-cd; 283 bus-width = <8>; 284 cap-mmc-highspeed; 285 mmc-hs200-1_8v; 286 no-sdio; 287 no-sd; 288 disable-wp; 289 non-removable; 290 num-slots = <1>; 291 /delete-property/ default-sample-phase; 292 /delete-property/ pinctrl-names; 293 /delete-property/ pinctrl-0; 294 status = "okay"; 295}; 296 297&gmac { 298 assigned-clocks = <&cru SCLK_MAC_SRC>; 299 assigned-clock-rates = <50000000>; 300 clock_in_out = "output"; 301 phy-supply = <&vcc_phy>; 302 phy-mode = "rmii"; 303 phy-is-integrated; 304 status = "okay"; 305}; 306 307&gpu { 308 status = "okay"; 309 mali-supply = <&vdd_arm>; 310}; 311 312&hdmi { 313 status = "okay"; 314 #sound-dai-cells = <0>; 315 ddc-i2c-scl-high-time-ns = <9625>; 316 ddc-i2c-scl-low-time-ns = <10000>; 317}; 318 319&hdmi_phy { 320 status = "okay"; 321}; 322 323&io_domains { 324 status = "okay"; 325 326 vccio1-supply = <&vccio_3v3_reg>; 327 vccio2-supply = <&vccio_3v3_reg>; 328 vccio4-supply = <&vccio_3v3_reg>; 329}; 330 331&i2c0 { 332 status = "okay"; 333 334 hym8563: hym8563@51 { 335 compatible = "haoyu,hym8563"; 336 reg = <0x51>; 337 #clock-cells = <0>; 338 clock-frequency = <32768>; 339 clock-output-names = "xin32k"; 340 }; 341}; 342 343&i2s0 { 344 status = "okay"; 345 rockchip,bclk-fs = <128>; 346 #sound-dai-cells = <0>; 347}; 348 349&i2s1 { 350 #sound-dai-cells = <0>; 351 status = "okay"; 352}; 353 354&iep { 355 status = "okay"; 356}; 357 358&iep_mmu { 359 status = "okay"; 360}; 361 362&nandc { 363 status = "okay"; 364}; 365 366&pinctrl { 367 keys { 368 pwr_key: pwr-key { 369 rockchip,pins = <3 RK_PC7 RK_FUNC_GPIO &pcfg_pull_up>; 370 }; 371 372 volume_up_key: volume-up { 373 rockchip,pins = <3 RK_PD1 RK_FUNC_GPIO &pcfg_pull_up>; 374 }; 375 }; 376 377 sdmmc { 378 sdmmc_pwr: sdmmc-pwr { 379 rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>; 380 }; 381 }; 382 383 sdio-pwrseq { 384 wifi_enable_h: wifi-enable-h { 385 rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>; 386 }; 387 }; 388 389 usb { 390 host_vbus_drv: host-vbus-drv { 391 rockchip,pins = <3 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>; 392 }; 393 394 otg_vbus_drv: otg-vbus-drv { 395 rockchip,pins = <3 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>; 396 }; 397 }; 398}; 399 400&pwm1 { 401 status = "okay"; 402 pinctrl-names = "active"; 403 pinctrl-0 = <&pwm1_pin_pull_down>; 404}; 405 406&pwm2 { 407 status = "okay"; 408}; 409 410&pwm3 { 411 status = "okay"; 412 pinctrl-names = "default"; 413 pinctrl-0 = <&pwm3_pin>; 414 compatible = "rockchip,remotectl-pwm"; 415 remote_pwm_id = <3>; 416 handle_cpu_id = <1>; 417 remote_support_psci = <1>; 418 419 ir_key1 { 420 rockchip,usercode = <0x4040>; 421 rockchip,key_table = 422 <0xf2 KEY_REPLY>, 423 <0xba KEY_BACK>, 424 <0xf4 KEY_UP>, 425 <0xf1 KEY_DOWN>, 426 <0xef KEY_LEFT>, 427 <0xee KEY_RIGHT>, 428 <0xbd KEY_HOME>, 429 <0xea KEY_VOLUMEUP>, 430 <0xe3 KEY_VOLUMEDOWN>, 431 <0xe2 KEY_SEARCH>, 432 <0xb2 KEY_POWER>, 433 <0xbc KEY_MUTE>, 434 <0xec KEY_MENU>, 435 <0xbf 0x190>, 436 <0xe0 0x191>, 437 <0xe1 0x192>, 438 <0xe9 183>, 439 <0xe6 248>, 440 <0xe8 185>, 441 <0xe7 186>, 442 <0xf0 388>, 443 <0xbe 0x175>; 444 }; 445 446 ir_key2 { 447 rockchip,usercode = <0xff00>; 448 rockchip,key_table = 449 <0xf9 KEY_HOME>, 450 <0xbf KEY_BACK>, 451 <0xfb KEY_MENU>, 452 <0xaa KEY_REPLY>, 453 <0xb9 KEY_UP>, 454 <0xe9 KEY_DOWN>, 455 <0xb8 KEY_LEFT>, 456 <0xea KEY_RIGHT>, 457 <0xeb KEY_VOLUMEDOWN>, 458 <0xef KEY_VOLUMEUP>, 459 <0xf7 KEY_MUTE>, 460 <0xe7 KEY_POWER>, 461 <0xfc KEY_POWER>, 462 <0xa9 KEY_VOLUMEDOWN>, 463 <0xa8 KEY_PLAYPAUSE>, 464 <0xe0 KEY_VOLUMEDOWN>, 465 <0xa5 KEY_VOLUMEDOWN>, 466 <0xab 183>, 467 <0xb7 388>, 468 <0xe8 388>, 469 <0xf8 184>, 470 <0xaf 185>, 471 <0xed KEY_VOLUMEDOWN>, 472 <0xee 186>, 473 <0xb3 KEY_VOLUMEDOWN>, 474 <0xf1 KEY_VOLUMEDOWN>, 475 <0xf2 KEY_VOLUMEDOWN>, 476 <0xf3 KEY_SEARCH>, 477 <0xb4 KEY_VOLUMEDOWN>, 478 <0xa4 KEY_SETUP>, 479 <0xbe KEY_SEARCH>; 480 }; 481 482 ir_key3 { 483 rockchip,usercode = <0x1dcc>; 484 rockchip,key_table = 485 <0xee KEY_REPLY>, 486 <0xf0 KEY_BACK>, 487 <0xf8 KEY_UP>, 488 <0xbb KEY_DOWN>, 489 <0xef KEY_LEFT>, 490 <0xed KEY_RIGHT>, 491 <0xfc KEY_HOME>, 492 <0xf1 KEY_VOLUMEUP>, 493 <0xfd KEY_VOLUMEDOWN>, 494 <0xb7 KEY_SEARCH>, 495 <0xff KEY_POWER>, 496 <0xf3 KEY_MUTE>, 497 <0xbf KEY_MENU>, 498 <0xf9 0x191>, 499 <0xf5 0x192>, 500 <0xb3 388>, 501 <0xbe KEY_1>, 502 <0xba KEY_2>, 503 <0xb2 KEY_3>, 504 <0xbd KEY_4>, 505 <0xf9 KEY_5>, 506 <0xb1 KEY_6>, 507 <0xfc KEY_7>, 508 <0xf8 KEY_8>, 509 <0xb0 KEY_9>, 510 <0xb6 KEY_0>, 511 <0xb5 KEY_BACKSPACE>; 512 }; 513 514 ir_key80{ 515 rockchip,usercode = <0x7f00>; 516 rockchip,key_table = <0xed KEY_POWER>; 517 }; 518}; 519 520&rockchip_suspend { 521 status = "okay"; 522 rockchip,virtual-poweroff = <1>; 523 rockchip,sleep-mode-config = < 524 (0 525 |RKPM_CTR_GTCLKS 526 |RKPM_CTR_IDLESRAM_MD 527 |RKPM_CTR_PMIC 528 ) 529 >; 530}; 531 532&sdio { 533 status = "okay"; 534 mmc-pwrseq = <&sdio_pwrseq>; 535 bus-width = <4>; 536 cap-mmc-highspeed; 537 cap-sd-highspeed; 538 cap-sdio-irq; 539 non-removable; 540 ignore-pm-notify; 541 keep-power-in-suspend; 542 max-frequency = <37500000>; 543 no-sd; 544 no-mmc; 545}; 546 547&sdmmc { 548 status = "okay"; 549 pinctrl-names = "default"; 550 pinctrl-0 = <&sdmmc_pwr &sdmmc_clk &sdmmc_cmd &sdmmc_bus4>; 551 bus-width = <4>; 552 cap-mmc-highspeed; 553 cap-sd-highspeed; 554 card-detect-delay = <200>; 555 disable-wp; 556 max-frequency = <50000000>; 557 num-slots = <1>; 558 no-sdio; 559 no-mmc; 560}; 561 562&spdif { 563 status = "okay"; 564 #sound-dai-cells = <0>; 565}; 566 567&threshold { 568 temperature = <90000>; /* millicelsius */ 569}; 570 571&target { 572 temperature = <105000>; /* millicelsius */ 573}; 574 575&soc_crit { 576 temperature = <115000>; /* millicelsius */ 577}; 578 579&tsadc { 580 rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */ 581 rockchip,hw-tshut-temp = <120000>; 582 status = "okay"; 583}; 584 585&tve { 586 status = "okay"; 587}; 588 589&u2phy0 { 590 status = "okay"; 591 592 u2phy0_otg: otg-port { 593 status = "okay"; 594 }; 595 596 u2phy0_host: host-port { 597 status = "okay"; 598 }; 599}; 600 601&u2phy1 { 602 status = "okay"; 603 604 u2phy1_otg: otg-port { 605 status = "okay"; 606 }; 607 608 u2phy1_host: host-port { 609 status = "okay"; 610 }; 611}; 612 613&uart1 { 614 pinctrl-names = "default"; 615 pinctrl-0 = <&uart11_xfer &uart11_cts>; 616 status = "okay"; 617}; 618 619&usb_otg { 620 status = "okay"; 621}; 622 623&u2phy0_host { 624 phy-supply = <&vcc_host>; 625}; 626 627&u2phy1_host { 628 phy-supply = <&vcc_host>; 629}; 630 631&u2phy0_otg { 632 vbus-supply = <&vcc_otg_vbus>; 633}; 634 635&usb_host0_ehci { 636 status = "okay"; 637}; 638 639&usb_host0_ohci { 640 status = "okay"; 641}; 642 643&usb_host1_ehci { 644 status = "okay"; 645}; 646 647&usb_host1_ohci { 648 status = "okay"; 649}; 650 651&usb_host2_ehci { 652 status = "okay"; 653}; 654 655&usb_host2_ohci { 656 status = "okay"; 657}; 658 659&vop { 660 assigned-clocks = <&cru DCLK_VOP>; 661 assigned-clock-parents = <&cru HDMIPHY>; 662 status = "okay"; 663}; 664 665&vop_mmu { 666 status = "okay"; 667}; 668 669&vpu_service { 670 status = "okay"; 671}; 672 673&vpu_mmu { 674 status = "okay"; 675}; 676 677&rkvdec { 678 vcodec-supply = <&vdd_arm>; 679 status = "okay"; 680}; 681 682&rkvdec_mmu { 683 status = "okay"; 684}; 685 686&rk_rga { 687 status = "okay"; 688}; 689