| .. | .. |
|---|
| 7 | 7 | #include <dt-bindings/gpio/gpio.h> |
|---|
| 8 | 8 | #include <dt-bindings/pinctrl/rockchip.h> |
|---|
| 9 | 9 | #include <dt-bindings/clock/rk3066a-cru.h> |
|---|
| 10 | +#include <dt-bindings/power/rk3066-power.h> |
|---|
| 10 | 11 | #include "rk3xxx.dtsi" |
|---|
| 11 | 12 | |
|---|
| 12 | 13 | / { |
|---|
| 13 | 14 | compatible = "rockchip,rk3066a"; |
|---|
| 15 | + |
|---|
| 16 | + aliases { |
|---|
| 17 | + gpio0 = &gpio0; |
|---|
| 18 | + gpio1 = &gpio1; |
|---|
| 19 | + gpio2 = &gpio2; |
|---|
| 20 | + gpio3 = &gpio3; |
|---|
| 21 | + gpio4 = &gpio4; |
|---|
| 22 | + gpio6 = &gpio6; |
|---|
| 23 | + }; |
|---|
| 14 | 24 | |
|---|
| 15 | 25 | cpus { |
|---|
| 16 | 26 | #address-cells = <1>; |
|---|
| .. | .. |
|---|
| 25 | 35 | operating-points-v2 = <&cpu0_opp_table>; |
|---|
| 26 | 36 | clocks = <&cru ARMCLK>; |
|---|
| 27 | 37 | }; |
|---|
| 28 | | - cpu@1 { |
|---|
| 38 | + cpu1: cpu@1 { |
|---|
| 29 | 39 | device_type = "cpu"; |
|---|
| 30 | 40 | compatible = "arm,cortex-a9"; |
|---|
| 31 | 41 | next-level-cache = <&L2>; |
|---|
| .. | .. |
|---|
| 62 | 72 | clock-latency-ns = <40000>; |
|---|
| 63 | 73 | status = "disabled"; |
|---|
| 64 | 74 | }; |
|---|
| 75 | + }; |
|---|
| 76 | + |
|---|
| 77 | + display-subsystem { |
|---|
| 78 | + compatible = "rockchip,display-subsystem"; |
|---|
| 79 | + ports = <&vop0_out>, <&vop1_out>; |
|---|
| 65 | 80 | }; |
|---|
| 66 | 81 | |
|---|
| 67 | 82 | sram: sram@10080000 { |
|---|
| .. | .. |
|---|
| 162 | 177 | <&cru DCLK_LCDC0>, |
|---|
| 163 | 178 | <&cru HCLK_LCDC0>; |
|---|
| 164 | 179 | clock-names = "aclk_vop", "dclk_vop", "hclk_vop"; |
|---|
| 180 | + power-domains = <&power RK3066_PD_VIO>; |
|---|
| 165 | 181 | resets = <&cru SRST_LCDC0_AXI>, |
|---|
| 166 | 182 | <&cru SRST_LCDC0_AHB>, |
|---|
| 167 | 183 | <&cru SRST_LCDC0_DCLK>; |
|---|
| .. | .. |
|---|
| 171 | 187 | vop0_out: port { |
|---|
| 172 | 188 | #address-cells = <1>; |
|---|
| 173 | 189 | #size-cells = <0>; |
|---|
| 190 | + |
|---|
| 174 | 191 | vop0_out_hdmi: endpoint@0 { |
|---|
| 175 | 192 | reg = <0>; |
|---|
| 176 | 193 | remote-endpoint = <&hdmi_in_vop0>; |
|---|
| .. | .. |
|---|
| 186 | 203 | <&cru DCLK_LCDC1>, |
|---|
| 187 | 204 | <&cru HCLK_LCDC1>; |
|---|
| 188 | 205 | clock-names = "aclk_vop", "dclk_vop", "hclk_vop"; |
|---|
| 206 | + power-domains = <&power RK3066_PD_VIO>; |
|---|
| 189 | 207 | resets = <&cru SRST_LCDC1_AXI>, |
|---|
| 190 | 208 | <&cru SRST_LCDC1_AHB>, |
|---|
| 191 | 209 | <&cru SRST_LCDC1_DCLK>; |
|---|
| .. | .. |
|---|
| 195 | 213 | vop1_out: port { |
|---|
| 196 | 214 | #address-cells = <1>; |
|---|
| 197 | 215 | #size-cells = <0>; |
|---|
| 198 | | - }; |
|---|
| 199 | | - }; |
|---|
| 200 | 216 | |
|---|
| 201 | | - display-subsystem { |
|---|
| 202 | | - compatible = "rockchip,display-subsystem"; |
|---|
| 203 | | - ports = <&vop0_out>, <&vop1_out>; |
|---|
| 217 | + vop1_out_hdmi: endpoint@0 { |
|---|
| 218 | + reg = <0>; |
|---|
| 219 | + remote-endpoint = <&hdmi_in_vop1>; |
|---|
| 220 | + }; |
|---|
| 221 | + }; |
|---|
| 204 | 222 | }; |
|---|
| 205 | 223 | |
|---|
| 206 | 224 | hdmi: hdmi@10116000 { |
|---|
| .. | .. |
|---|
| 209 | 227 | interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>; |
|---|
| 210 | 228 | clocks = <&cru HCLK_HDMI>; |
|---|
| 211 | 229 | clock-names = "hclk"; |
|---|
| 212 | | - rockchip,grf = <&grf>; |
|---|
| 213 | 230 | pinctrl-names = "default"; |
|---|
| 214 | 231 | pinctrl-0 = <&hdmii2c_xfer>, <&hdmi_hpd>; |
|---|
| 232 | + power-domains = <&power RK3066_PD_VIO>; |
|---|
| 233 | + rockchip,grf = <&grf>; |
|---|
| 215 | 234 | status = "disabled"; |
|---|
| 216 | 235 | |
|---|
| 217 | | - hdmi_in: port { |
|---|
| 236 | + ports { |
|---|
| 218 | 237 | #address-cells = <1>; |
|---|
| 219 | 238 | #size-cells = <0>; |
|---|
| 220 | | - hdmi_in_vop0: endpoint@0 { |
|---|
| 239 | + |
|---|
| 240 | + hdmi_in: port@0 { |
|---|
| 221 | 241 | reg = <0>; |
|---|
| 222 | | - remote-endpoint = <&vop0_out_hdmi>; |
|---|
| 242 | + #address-cells = <1>; |
|---|
| 243 | + #size-cells = <0>; |
|---|
| 244 | + |
|---|
| 245 | + hdmi_in_vop0: endpoint@0 { |
|---|
| 246 | + reg = <0>; |
|---|
| 247 | + remote-endpoint = <&vop0_out_hdmi>; |
|---|
| 248 | + }; |
|---|
| 249 | + |
|---|
| 250 | + hdmi_in_vop1: endpoint@1 { |
|---|
| 251 | + reg = <1>; |
|---|
| 252 | + remote-endpoint = <&vop1_out_hdmi>; |
|---|
| 253 | + }; |
|---|
| 254 | + }; |
|---|
| 255 | + |
|---|
| 256 | + hdmi_out: port@1 { |
|---|
| 257 | + reg = <1>; |
|---|
| 223 | 258 | }; |
|---|
| 224 | 259 | }; |
|---|
| 225 | 260 | }; |
|---|
| .. | .. |
|---|
| 228 | 263 | compatible = "rockchip,rk3066-i2s"; |
|---|
| 229 | 264 | reg = <0x10118000 0x2000>; |
|---|
| 230 | 265 | interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>; |
|---|
| 231 | | - #address-cells = <1>; |
|---|
| 232 | | - #size-cells = <0>; |
|---|
| 233 | 266 | pinctrl-names = "default"; |
|---|
| 234 | 267 | pinctrl-0 = <&i2s0_bus>; |
|---|
| 235 | 268 | dmas = <&dmac1_s 4>, <&dmac1_s 5>; |
|---|
| .. | .. |
|---|
| 240 | 273 | reset-names = "reset-m"; |
|---|
| 241 | 274 | rockchip,playback-channels = <8>; |
|---|
| 242 | 275 | rockchip,capture-channels = <2>; |
|---|
| 276 | + #sound-dai-cells = <0>; |
|---|
| 243 | 277 | status = "disabled"; |
|---|
| 244 | 278 | }; |
|---|
| 245 | 279 | |
|---|
| .. | .. |
|---|
| 247 | 281 | compatible = "rockchip,rk3066-i2s"; |
|---|
| 248 | 282 | reg = <0x1011a000 0x2000>; |
|---|
| 249 | 283 | interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>; |
|---|
| 250 | | - #address-cells = <1>; |
|---|
| 251 | | - #size-cells = <0>; |
|---|
| 252 | 284 | pinctrl-names = "default"; |
|---|
| 253 | 285 | pinctrl-0 = <&i2s1_bus>; |
|---|
| 254 | 286 | dmas = <&dmac1_s 6>, <&dmac1_s 7>; |
|---|
| .. | .. |
|---|
| 259 | 291 | reset-names = "reset-m"; |
|---|
| 260 | 292 | rockchip,playback-channels = <2>; |
|---|
| 261 | 293 | rockchip,capture-channels = <2>; |
|---|
| 294 | + #sound-dai-cells = <0>; |
|---|
| 262 | 295 | status = "disabled"; |
|---|
| 263 | 296 | }; |
|---|
| 264 | 297 | |
|---|
| .. | .. |
|---|
| 266 | 299 | compatible = "rockchip,rk3066-i2s"; |
|---|
| 267 | 300 | reg = <0x1011c000 0x2000>; |
|---|
| 268 | 301 | interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>; |
|---|
| 269 | | - #address-cells = <1>; |
|---|
| 270 | | - #size-cells = <0>; |
|---|
| 271 | 302 | pinctrl-names = "default"; |
|---|
| 272 | 303 | pinctrl-0 = <&i2s2_bus>; |
|---|
| 273 | 304 | dmas = <&dmac1_s 9>, <&dmac1_s 10>; |
|---|
| .. | .. |
|---|
| 278 | 309 | reset-names = "reset-m"; |
|---|
| 279 | 310 | rockchip,playback-channels = <2>; |
|---|
| 280 | 311 | rockchip,capture-channels = <2>; |
|---|
| 312 | + #sound-dai-cells = <0>; |
|---|
| 281 | 313 | status = "disabled"; |
|---|
| 282 | 314 | }; |
|---|
| 283 | 315 | |
|---|
| .. | .. |
|---|
| 387 | 419 | compatible = "rockchip,gpio-bank"; |
|---|
| 388 | 420 | reg = <0x20034000 0x100>; |
|---|
| 389 | 421 | interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>; |
|---|
| 422 | + clock-names = "bus"; |
|---|
| 390 | 423 | clocks = <&cru PCLK_GPIO0>; |
|---|
| 391 | 424 | |
|---|
| 392 | 425 | gpio-controller; |
|---|
| .. | .. |
|---|
| 400 | 433 | compatible = "rockchip,gpio-bank"; |
|---|
| 401 | 434 | reg = <0x2003c000 0x100>; |
|---|
| 402 | 435 | interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>; |
|---|
| 436 | + clock-names = "bus"; |
|---|
| 403 | 437 | clocks = <&cru PCLK_GPIO1>; |
|---|
| 404 | 438 | |
|---|
| 405 | 439 | gpio-controller; |
|---|
| .. | .. |
|---|
| 413 | 447 | compatible = "rockchip,gpio-bank"; |
|---|
| 414 | 448 | reg = <0x2003e000 0x100>; |
|---|
| 415 | 449 | interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>; |
|---|
| 450 | + clock-names = "bus"; |
|---|
| 416 | 451 | clocks = <&cru PCLK_GPIO2>; |
|---|
| 417 | 452 | |
|---|
| 418 | 453 | gpio-controller; |
|---|
| .. | .. |
|---|
| 426 | 461 | compatible = "rockchip,gpio-bank"; |
|---|
| 427 | 462 | reg = <0x20080000 0x100>; |
|---|
| 428 | 463 | interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>; |
|---|
| 464 | + clock-names = "bus"; |
|---|
| 429 | 465 | clocks = <&cru PCLK_GPIO3>; |
|---|
| 430 | 466 | |
|---|
| 431 | 467 | gpio-controller; |
|---|
| .. | .. |
|---|
| 439 | 475 | compatible = "rockchip,gpio-bank"; |
|---|
| 440 | 476 | reg = <0x20084000 0x100>; |
|---|
| 441 | 477 | interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>; |
|---|
| 478 | + clock-names = "bus"; |
|---|
| 442 | 479 | clocks = <&cru PCLK_GPIO4>; |
|---|
| 443 | 480 | |
|---|
| 444 | 481 | gpio-controller; |
|---|
| .. | .. |
|---|
| 452 | 489 | compatible = "rockchip,gpio-bank"; |
|---|
| 453 | 490 | reg = <0x2000a000 0x100>; |
|---|
| 454 | 491 | interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>; |
|---|
| 492 | + clock-names = "bus"; |
|---|
| 455 | 493 | clocks = <&cru PCLK_GPIO6>; |
|---|
| 456 | 494 | |
|---|
| 457 | 495 | gpio-controller; |
|---|
| .. | .. |
|---|
| 463 | 501 | |
|---|
| 464 | 502 | pcfg_pull_default: pcfg_pull_default { |
|---|
| 465 | 503 | bias-pull-pin-default; |
|---|
| 466 | | - }; |
|---|
| 467 | | - |
|---|
| 468 | | - pcfg_pull_up: pcfg-pull-up { |
|---|
| 469 | | - bias-pull-up; |
|---|
| 470 | 504 | }; |
|---|
| 471 | 505 | |
|---|
| 472 | 506 | pcfg_pull_none: pcfg_pull_none { |
|---|
| .. | .. |
|---|
| 510 | 544 | * been already set correctly by firmware, as |
|---|
| 511 | 545 | * flash/emmc is the boot-device. |
|---|
| 512 | 546 | */ |
|---|
| 547 | + }; |
|---|
| 548 | + |
|---|
| 549 | + hdmi { |
|---|
| 550 | + hdmi_hpd: hdmi-hpd { |
|---|
| 551 | + rockchip,pins = <0 RK_PA0 1 &pcfg_pull_default>; |
|---|
| 552 | + }; |
|---|
| 553 | + |
|---|
| 554 | + hdmii2c_xfer: hdmii2c-xfer { |
|---|
| 555 | + rockchip,pins = <0 RK_PA1 1 &pcfg_pull_none>, |
|---|
| 556 | + <0 RK_PA2 1 &pcfg_pull_none>; |
|---|
| 557 | + }; |
|---|
| 513 | 558 | }; |
|---|
| 514 | 559 | |
|---|
| 515 | 560 | i2c0 { |
|---|
| .. | .. |
|---|
| 609 | 654 | |
|---|
| 610 | 655 | uart0 { |
|---|
| 611 | 656 | uart0_xfer: uart0-xfer { |
|---|
| 612 | | - rockchip,pins = <1 RK_PA0 1 &pcfg_pull_up>, |
|---|
| 613 | | - <1 RK_PA1 1 &pcfg_pull_up>; |
|---|
| 657 | + rockchip,pins = <1 RK_PA0 1 &pcfg_pull_default>, |
|---|
| 658 | + <1 RK_PA1 1 &pcfg_pull_default>; |
|---|
| 614 | 659 | }; |
|---|
| 615 | 660 | |
|---|
| 616 | 661 | uart0_cts: uart0-cts { |
|---|
| .. | .. |
|---|
| 624 | 669 | |
|---|
| 625 | 670 | uart1 { |
|---|
| 626 | 671 | uart1_xfer: uart1-xfer { |
|---|
| 627 | | - rockchip,pins = <1 RK_PA4 1 &pcfg_pull_up>, |
|---|
| 628 | | - <1 RK_PA5 1 &pcfg_pull_up>; |
|---|
| 672 | + rockchip,pins = <1 RK_PA4 1 &pcfg_pull_default>, |
|---|
| 673 | + <1 RK_PA5 1 &pcfg_pull_default>; |
|---|
| 629 | 674 | }; |
|---|
| 630 | 675 | |
|---|
| 631 | 676 | uart1_cts: uart1-cts { |
|---|
| .. | .. |
|---|
| 639 | 684 | |
|---|
| 640 | 685 | uart2 { |
|---|
| 641 | 686 | uart2_xfer: uart2-xfer { |
|---|
| 642 | | - rockchip,pins = <1 RK_PB0 1 &pcfg_pull_up>, |
|---|
| 643 | | - <1 RK_PB1 1 &pcfg_pull_up>; |
|---|
| 687 | + rockchip,pins = <1 RK_PB0 1 &pcfg_pull_default>, |
|---|
| 688 | + <1 RK_PB1 1 &pcfg_pull_default>; |
|---|
| 644 | 689 | }; |
|---|
| 645 | 690 | /* no rts / cts for uart2 */ |
|---|
| 646 | 691 | }; |
|---|
| 647 | 692 | |
|---|
| 648 | 693 | uart3 { |
|---|
| 649 | 694 | uart3_xfer: uart3-xfer { |
|---|
| 650 | | - rockchip,pins = <3 RK_PD3 1 &pcfg_pull_up>, |
|---|
| 651 | | - <3 RK_PD4 1 &pcfg_pull_up>; |
|---|
| 695 | + rockchip,pins = <3 RK_PD3 1 &pcfg_pull_default>, |
|---|
| 696 | + <3 RK_PD4 1 &pcfg_pull_default>; |
|---|
| 652 | 697 | }; |
|---|
| 653 | 698 | |
|---|
| 654 | 699 | uart3_cts: uart3-cts { |
|---|
| .. | .. |
|---|
| 753 | 798 | <0 RK_PD5 1 &pcfg_pull_default>; |
|---|
| 754 | 799 | }; |
|---|
| 755 | 800 | }; |
|---|
| 756 | | - |
|---|
| 757 | | - hdmi { |
|---|
| 758 | | - hdmi_hpd: hdmi-hpd { |
|---|
| 759 | | - rockchip,pins = <0 RK_PA0 1 &pcfg_pull_default>; |
|---|
| 760 | | - }; |
|---|
| 761 | | - hdmii2c_xfer: hdmii2c-xfer { |
|---|
| 762 | | - rockchip,pins = <0 RK_PA1 1 &pcfg_pull_none>, |
|---|
| 763 | | - <0 RK_PA2 1 &pcfg_pull_none>; |
|---|
| 764 | | - }; |
|---|
| 765 | | - }; |
|---|
| 766 | 801 | }; |
|---|
| 767 | 802 | }; |
|---|
| 768 | 803 | |
|---|
| .. | .. |
|---|
| 788 | 823 | "ppmmu2", |
|---|
| 789 | 824 | "pp3", |
|---|
| 790 | 825 | "ppmmu3"; |
|---|
| 826 | + power-domains = <&power RK3066_PD_GPU>; |
|---|
| 791 | 827 | }; |
|---|
| 792 | 828 | |
|---|
| 793 | 829 | &i2c0 { |
|---|
| .. | .. |
|---|
| 836 | 872 | dma-names = "rx-tx"; |
|---|
| 837 | 873 | }; |
|---|
| 838 | 874 | |
|---|
| 875 | +&pmu { |
|---|
| 876 | + power: power-controller { |
|---|
| 877 | + compatible = "rockchip,rk3066-power-controller"; |
|---|
| 878 | + #power-domain-cells = <1>; |
|---|
| 879 | + #address-cells = <1>; |
|---|
| 880 | + #size-cells = <0>; |
|---|
| 881 | + |
|---|
| 882 | + power-domain@RK3066_PD_VIO { |
|---|
| 883 | + reg = <RK3066_PD_VIO>; |
|---|
| 884 | + clocks = <&cru ACLK_LCDC0>, |
|---|
| 885 | + <&cru ACLK_LCDC1>, |
|---|
| 886 | + <&cru DCLK_LCDC0>, |
|---|
| 887 | + <&cru DCLK_LCDC1>, |
|---|
| 888 | + <&cru HCLK_LCDC0>, |
|---|
| 889 | + <&cru HCLK_LCDC1>, |
|---|
| 890 | + <&cru SCLK_CIF1>, |
|---|
| 891 | + <&cru ACLK_CIF1>, |
|---|
| 892 | + <&cru HCLK_CIF1>, |
|---|
| 893 | + <&cru SCLK_CIF0>, |
|---|
| 894 | + <&cru ACLK_CIF0>, |
|---|
| 895 | + <&cru HCLK_CIF0>, |
|---|
| 896 | + <&cru HCLK_HDMI>, |
|---|
| 897 | + <&cru ACLK_IPP>, |
|---|
| 898 | + <&cru HCLK_IPP>, |
|---|
| 899 | + <&cru ACLK_RGA>, |
|---|
| 900 | + <&cru HCLK_RGA>; |
|---|
| 901 | + pm_qos = <&qos_lcdc0>, |
|---|
| 902 | + <&qos_lcdc1>, |
|---|
| 903 | + <&qos_cif0>, |
|---|
| 904 | + <&qos_cif1>, |
|---|
| 905 | + <&qos_ipp>, |
|---|
| 906 | + <&qos_rga>; |
|---|
| 907 | + }; |
|---|
| 908 | + |
|---|
| 909 | + power-domain@RK3066_PD_VIDEO { |
|---|
| 910 | + reg = <RK3066_PD_VIDEO>; |
|---|
| 911 | + clocks = <&cru ACLK_VDPU>, |
|---|
| 912 | + <&cru ACLK_VEPU>, |
|---|
| 913 | + <&cru HCLK_VDPU>, |
|---|
| 914 | + <&cru HCLK_VEPU>; |
|---|
| 915 | + pm_qos = <&qos_vpu>; |
|---|
| 916 | + }; |
|---|
| 917 | + |
|---|
| 918 | + power-domain@RK3066_PD_GPU { |
|---|
| 919 | + reg = <RK3066_PD_GPU>; |
|---|
| 920 | + clocks = <&cru ACLK_GPU>; |
|---|
| 921 | + pm_qos = <&qos_gpu>; |
|---|
| 922 | + }; |
|---|
| 923 | + }; |
|---|
| 924 | +}; |
|---|
| 925 | + |
|---|
| 839 | 926 | &pwm0 { |
|---|
| 840 | 927 | pinctrl-names = "active"; |
|---|
| 841 | 928 | pinctrl-0 = <&pwm0_out>; |
|---|