1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Device Tree Source for the R-Car M3-W+ (R8A77961) SoC 4 * 5 * Copyright (C) 2016-2017 Renesas Electronics Corp. 6 */ 7 8#include <dt-bindings/clock/r8a77961-cpg-mssr.h> 9#include <dt-bindings/interrupt-controller/arm-gic.h> 10#include <dt-bindings/power/r8a77961-sysc.h> 11 12#define CPG_AUDIO_CLK_I R8A77961_CLK_S0D4 13 14/ { 15 compatible = "renesas,r8a77961"; 16 #address-cells = <2>; 17 #size-cells = <2>; 18 19 /* 20 * The external audio clocks are configured as 0 Hz fixed frequency 21 * clocks by default. 22 * Boards that provide audio clocks should override them. 23 */ 24 audio_clk_a: audio_clk_a { 25 compatible = "fixed-clock"; 26 #clock-cells = <0>; 27 clock-frequency = <0>; 28 }; 29 30 audio_clk_b: audio_clk_b { 31 compatible = "fixed-clock"; 32 #clock-cells = <0>; 33 clock-frequency = <0>; 34 }; 35 36 audio_clk_c: audio_clk_c { 37 compatible = "fixed-clock"; 38 #clock-cells = <0>; 39 clock-frequency = <0>; 40 }; 41 42 /* External CAN clock - to be overridden by boards that provide it */ 43 can_clk: can { 44 compatible = "fixed-clock"; 45 #clock-cells = <0>; 46 clock-frequency = <0>; 47 }; 48 49 cluster0_opp: opp_table0 { 50 compatible = "operating-points-v2"; 51 opp-shared; 52 53 opp-500000000 { 54 opp-hz = /bits/ 64 <500000000>; 55 opp-microvolt = <820000>; 56 clock-latency-ns = <300000>; 57 }; 58 opp-1000000000 { 59 opp-hz = /bits/ 64 <1000000000>; 60 opp-microvolt = <820000>; 61 clock-latency-ns = <300000>; 62 }; 63 opp-1500000000 { 64 opp-hz = /bits/ 64 <1500000000>; 65 opp-microvolt = <820000>; 66 clock-latency-ns = <300000>; 67 }; 68 opp-1600000000 { 69 opp-hz = /bits/ 64 <1600000000>; 70 opp-microvolt = <900000>; 71 clock-latency-ns = <300000>; 72 turbo-mode; 73 }; 74 opp-1700000000 { 75 opp-hz = /bits/ 64 <1700000000>; 76 opp-microvolt = <900000>; 77 clock-latency-ns = <300000>; 78 turbo-mode; 79 }; 80 opp-1800000000 { 81 opp-hz = /bits/ 64 <1800000000>; 82 opp-microvolt = <960000>; 83 clock-latency-ns = <300000>; 84 turbo-mode; 85 }; 86 }; 87 88 cluster1_opp: opp_table1 { 89 compatible = "operating-points-v2"; 90 opp-shared; 91 92 opp-800000000 { 93 opp-hz = /bits/ 64 <800000000>; 94 opp-microvolt = <820000>; 95 clock-latency-ns = <300000>; 96 }; 97 opp-1000000000 { 98 opp-hz = /bits/ 64 <1000000000>; 99 opp-microvolt = <820000>; 100 clock-latency-ns = <300000>; 101 }; 102 opp-1200000000 { 103 opp-hz = /bits/ 64 <1200000000>; 104 opp-microvolt = <820000>; 105 clock-latency-ns = <300000>; 106 }; 107 opp-1300000000 { 108 opp-hz = /bits/ 64 <1300000000>; 109 opp-microvolt = <820000>; 110 clock-latency-ns = <300000>; 111 turbo-mode; 112 }; 113 }; 114 115 cpus { 116 #address-cells = <1>; 117 #size-cells = <0>; 118 119 cpu-map { 120 cluster0 { 121 core0 { 122 cpu = <&a57_0>; 123 }; 124 core1 { 125 cpu = <&a57_1>; 126 }; 127 }; 128 129 cluster1 { 130 core0 { 131 cpu = <&a53_0>; 132 }; 133 core1 { 134 cpu = <&a53_1>; 135 }; 136 core2 { 137 cpu = <&a53_2>; 138 }; 139 core3 { 140 cpu = <&a53_3>; 141 }; 142 }; 143 }; 144 145 a57_0: cpu@0 { 146 compatible = "arm,cortex-a57"; 147 reg = <0x0>; 148 device_type = "cpu"; 149 power-domains = <&sysc R8A77961_PD_CA57_CPU0>; 150 next-level-cache = <&L2_CA57>; 151 enable-method = "psci"; 152 cpu-idle-states = <&CPU_SLEEP_0>; 153 dynamic-power-coefficient = <854>; 154 clocks = <&cpg CPG_CORE R8A77961_CLK_Z>; 155 operating-points-v2 = <&cluster0_opp>; 156 capacity-dmips-mhz = <1024>; 157 #cooling-cells = <2>; 158 }; 159 160 a57_1: cpu@1 { 161 compatible = "arm,cortex-a57"; 162 reg = <0x1>; 163 device_type = "cpu"; 164 power-domains = <&sysc R8A77961_PD_CA57_CPU1>; 165 next-level-cache = <&L2_CA57>; 166 enable-method = "psci"; 167 cpu-idle-states = <&CPU_SLEEP_0>; 168 clocks = <&cpg CPG_CORE R8A77961_CLK_Z>; 169 operating-points-v2 = <&cluster0_opp>; 170 capacity-dmips-mhz = <1024>; 171 #cooling-cells = <2>; 172 }; 173 174 a53_0: cpu@100 { 175 compatible = "arm,cortex-a53"; 176 reg = <0x100>; 177 device_type = "cpu"; 178 power-domains = <&sysc R8A77961_PD_CA53_CPU0>; 179 next-level-cache = <&L2_CA53>; 180 enable-method = "psci"; 181 cpu-idle-states = <&CPU_SLEEP_1>; 182 #cooling-cells = <2>; 183 dynamic-power-coefficient = <277>; 184 clocks = <&cpg CPG_CORE R8A77961_CLK_Z2>; 185 operating-points-v2 = <&cluster1_opp>; 186 capacity-dmips-mhz = <535>; 187 }; 188 189 a53_1: cpu@101 { 190 compatible = "arm,cortex-a53"; 191 reg = <0x101>; 192 device_type = "cpu"; 193 power-domains = <&sysc R8A77961_PD_CA53_CPU1>; 194 next-level-cache = <&L2_CA53>; 195 enable-method = "psci"; 196 cpu-idle-states = <&CPU_SLEEP_1>; 197 clocks = <&cpg CPG_CORE R8A77961_CLK_Z2>; 198 operating-points-v2 = <&cluster1_opp>; 199 capacity-dmips-mhz = <535>; 200 }; 201 202 a53_2: cpu@102 { 203 compatible = "arm,cortex-a53"; 204 reg = <0x102>; 205 device_type = "cpu"; 206 power-domains = <&sysc R8A77961_PD_CA53_CPU2>; 207 next-level-cache = <&L2_CA53>; 208 enable-method = "psci"; 209 cpu-idle-states = <&CPU_SLEEP_1>; 210 clocks = <&cpg CPG_CORE R8A77961_CLK_Z2>; 211 operating-points-v2 = <&cluster1_opp>; 212 capacity-dmips-mhz = <535>; 213 }; 214 215 a53_3: cpu@103 { 216 compatible = "arm,cortex-a53"; 217 reg = <0x103>; 218 device_type = "cpu"; 219 power-domains = <&sysc R8A77961_PD_CA53_CPU3>; 220 next-level-cache = <&L2_CA53>; 221 enable-method = "psci"; 222 cpu-idle-states = <&CPU_SLEEP_1>; 223 clocks = <&cpg CPG_CORE R8A77961_CLK_Z2>; 224 operating-points-v2 = <&cluster1_opp>; 225 capacity-dmips-mhz = <535>; 226 }; 227 228 L2_CA57: cache-controller-0 { 229 compatible = "cache"; 230 power-domains = <&sysc R8A77961_PD_CA57_SCU>; 231 cache-unified; 232 cache-level = <2>; 233 }; 234 235 L2_CA53: cache-controller-1 { 236 compatible = "cache"; 237 power-domains = <&sysc R8A77961_PD_CA53_SCU>; 238 cache-unified; 239 cache-level = <2>; 240 }; 241 242 idle-states { 243 entry-method = "psci"; 244 245 CPU_SLEEP_0: cpu-sleep-0 { 246 compatible = "arm,idle-state"; 247 arm,psci-suspend-param = <0x0010000>; 248 local-timer-stop; 249 entry-latency-us = <400>; 250 exit-latency-us = <500>; 251 min-residency-us = <4000>; 252 }; 253 254 CPU_SLEEP_1: cpu-sleep-1 { 255 compatible = "arm,idle-state"; 256 arm,psci-suspend-param = <0x0010000>; 257 local-timer-stop; 258 entry-latency-us = <700>; 259 exit-latency-us = <700>; 260 min-residency-us = <5000>; 261 }; 262 }; 263 }; 264 265 extal_clk: extal { 266 compatible = "fixed-clock"; 267 #clock-cells = <0>; 268 /* This value must be overridden by the board */ 269 clock-frequency = <0>; 270 }; 271 272 extalr_clk: extalr { 273 compatible = "fixed-clock"; 274 #clock-cells = <0>; 275 /* This value must be overridden by the board */ 276 clock-frequency = <0>; 277 }; 278 279 /* External PCIe clock - can be overridden by the board */ 280 pcie_bus_clk: pcie_bus { 281 compatible = "fixed-clock"; 282 #clock-cells = <0>; 283 clock-frequency = <0>; 284 }; 285 286 pmu_a53 { 287 compatible = "arm,cortex-a53-pmu"; 288 interrupts-extended = <&gic GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>, 289 <&gic GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>, 290 <&gic GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>, 291 <&gic GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>; 292 interrupt-affinity = <&a53_0>, <&a53_1>, <&a53_2>, <&a53_3>; 293 }; 294 295 pmu_a57 { 296 compatible = "arm,cortex-a57-pmu"; 297 interrupts-extended = <&gic GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>, 298 <&gic GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>; 299 interrupt-affinity = <&a57_0>, <&a57_1>; 300 }; 301 302 psci { 303 compatible = "arm,psci-1.0", "arm,psci-0.2"; 304 method = "smc"; 305 }; 306 307 /* External SCIF clock - to be overridden by boards that provide it */ 308 scif_clk: scif { 309 compatible = "fixed-clock"; 310 #clock-cells = <0>; 311 clock-frequency = <0>; 312 }; 313 314 soc { 315 compatible = "simple-bus"; 316 interrupt-parent = <&gic>; 317 #address-cells = <2>; 318 #size-cells = <2>; 319 ranges; 320 321 rwdt: watchdog@e6020000 { 322 compatible = "renesas,r8a77961-wdt", 323 "renesas,rcar-gen3-wdt"; 324 reg = <0 0xe6020000 0 0x0c>; 325 clocks = <&cpg CPG_MOD 402>; 326 power-domains = <&sysc R8A77961_PD_ALWAYS_ON>; 327 resets = <&cpg 402>; 328 status = "disabled"; 329 }; 330 331 gpio2: gpio@e6052000 { 332 reg = <0 0xe6052000 0 0x50>; 333 #gpio-cells = <2>; 334 gpio-controller; 335 #interrupt-cells = <2>; 336 interrupt-controller; 337 /* placeholder */ 338 }; 339 340 gpio3: gpio@e6053000 { 341 reg = <0 0xe6053000 0 0x50>; 342 #gpio-cells = <2>; 343 gpio-controller; 344 #interrupt-cells = <2>; 345 interrupt-controller; 346 /* placeholder */ 347 }; 348 349 gpio4: gpio@e6054000 { 350 reg = <0 0xe6054000 0 0x50>; 351 #gpio-cells = <2>; 352 gpio-controller; 353 #interrupt-cells = <2>; 354 interrupt-controller; 355 /* placeholder */ 356 }; 357 358 gpio5: gpio@e6055000 { 359 reg = <0 0xe6055000 0 0x50>; 360 #gpio-cells = <2>; 361 gpio-controller; 362 #interrupt-cells = <2>; 363 interrupt-controller; 364 /* placeholder */ 365 }; 366 367 gpio6: gpio@e6055400 { 368 reg = <0 0xe6055400 0 0x50>; 369 #gpio-cells = <2>; 370 gpio-controller; 371 #interrupt-cells = <2>; 372 interrupt-controller; 373 /* placeholder */ 374 }; 375 376 pfc: pin-controller@e6060000 { 377 compatible = "renesas,pfc-r8a77961"; 378 reg = <0 0xe6060000 0 0x50c>; 379 }; 380 381 cpg: clock-controller@e6150000 { 382 compatible = "renesas,r8a77961-cpg-mssr"; 383 reg = <0 0xe6150000 0 0x1000>; 384 clocks = <&extal_clk>, <&extalr_clk>; 385 clock-names = "extal", "extalr"; 386 #clock-cells = <2>; 387 #power-domain-cells = <0>; 388 #reset-cells = <1>; 389 }; 390 391 rst: reset-controller@e6160000 { 392 compatible = "renesas,r8a77961-rst"; 393 reg = <0 0xe6160000 0 0x0200>; 394 }; 395 396 sysc: system-controller@e6180000 { 397 compatible = "renesas,r8a77961-sysc"; 398 reg = <0 0xe6180000 0 0x0400>; 399 #power-domain-cells = <1>; 400 }; 401 402 intc_ex: interrupt-controller@e61c0000 { 403 #interrupt-cells = <2>; 404 interrupt-controller; 405 reg = <0 0xe61c0000 0 0x200>; 406 /* placeholder */ 407 }; 408 409 i2c2: i2c@e6510000 { 410 #address-cells = <1>; 411 #size-cells = <0>; 412 reg = <0 0xe6510000 0 0x40>; 413 /* placeholder */ 414 }; 415 416 i2c4: i2c@e66d8000 { 417 #address-cells = <1>; 418 #size-cells = <0>; 419 reg = <0 0xe66d8000 0 0x40>; 420 /* placeholder */ 421 }; 422 423 i2c_dvfs: i2c@e60b0000 { 424 #address-cells = <1>; 425 #size-cells = <0>; 426 reg = <0 0xe60b0000 0 0x425>; 427 /* placeholder */ 428 }; 429 430 hscif1: serial@e6550000 { 431 reg = <0 0xe6550000 0 0x60>; 432 /* placeholder */ 433 }; 434 435 hsusb: usb@e6590000 { 436 reg = <0 0xe6590000 0 0x200>; 437 /* placeholder */ 438 }; 439 440 usb3_phy0: usb-phy@e65ee000 { 441 reg = <0 0xe65ee000 0 0x90>; 442 #phy-cells = <0>; 443 /* placeholder */ 444 }; 445 446 avb: ethernet@e6800000 { 447 reg = <0 0xe6800000 0 0x800>, <0 0xe6a00000 0 0x10000>; 448 #address-cells = <1>; 449 #size-cells = <0>; 450 /* placeholder */ 451 }; 452 453 pwm1: pwm@e6e31000 { 454 reg = <0 0xe6e31000 0 8>; 455 #pwm-cells = <2>; 456 /* placeholder */ 457 }; 458 459 scif1: serial@e6e68000 { 460 reg = <0 0xe6e68000 0 64>; 461 /* placeholder */ 462 }; 463 464 scif2: serial@e6e88000 { 465 compatible = "renesas,scif-r8a77961", 466 "renesas,rcar-gen3-scif", "renesas,scif"; 467 reg = <0 0xe6e88000 0 64>; 468 interrupts = <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>; 469 clocks = <&cpg CPG_MOD 310>, 470 <&cpg CPG_CORE R8A77961_CLK_S3D1>, 471 <&scif_clk>; 472 clock-names = "fck", "brg_int", "scif_clk"; 473 power-domains = <&sysc R8A77961_PD_ALWAYS_ON>; 474 resets = <&cpg 310>; 475 status = "disabled"; 476 }; 477 478 vin0: video@e6ef0000 { 479 reg = <0 0xe6ef0000 0 0x1000>; 480 /* placeholder */ 481 }; 482 483 vin1: video@e6ef1000 { 484 reg = <0 0xe6ef1000 0 0x1000>; 485 /* placeholder */ 486 }; 487 488 vin2: video@e6ef2000 { 489 reg = <0 0xe6ef2000 0 0x1000>; 490 /* placeholder */ 491 }; 492 493 vin3: video@e6ef3000 { 494 reg = <0 0xe6ef3000 0 0x1000>; 495 /* placeholder */ 496 }; 497 498 vin4: video@e6ef4000 { 499 reg = <0 0xe6ef4000 0 0x1000>; 500 /* placeholder */ 501 }; 502 503 vin5: video@e6ef5000 { 504 reg = <0 0xe6ef5000 0 0x1000>; 505 /* placeholder */ 506 }; 507 508 vin6: video@e6ef6000 { 509 reg = <0 0xe6ef6000 0 0x1000>; 510 /* placeholder */ 511 }; 512 513 vin7: video@e6ef7000 { 514 reg = <0 0xe6ef7000 0 0x1000>; 515 /* placeholder */ 516 }; 517 518 rcar_sound: sound@ec500000 { 519 reg = <0 0xec500000 0 0x1000>, /* SCU */ 520 <0 0xec5a0000 0 0x100>, /* ADG */ 521 <0 0xec540000 0 0x1000>, /* SSIU */ 522 <0 0xec541000 0 0x280>, /* SSI */ 523 <0 0xec760000 0 0x200>; /* Audio DMAC peri peri*/ 524 /* placeholder */ 525 rcar_sound,dvc { 526 dvc0: dvc-0 { }; 527 dvc1: dvc-1 { }; 528 }; 529 530 rcar_sound,src { 531 src0: src-0 { }; 532 src1: src-1 { }; 533 }; 534 535 rcar_sound,ssi { 536 ssi0: ssi-0 { }; 537 ssi1: ssi-1 { }; 538 }; 539 }; 540 541 xhci0: usb@ee000000 { 542 reg = <0 0xee000000 0 0xc00>; 543 /* placeholder */ 544 }; 545 546 usb3_peri0: usb@ee020000 { 547 reg = <0 0xee020000 0 0x400>; 548 /* placeholder */ 549 }; 550 551 ohci0: usb@ee080000 { 552 reg = <0 0xee080000 0 0x100>; 553 /* placeholder */ 554 }; 555 556 ohci1: usb@ee0a0000 { 557 reg = <0 0xee0a0000 0 0x100>; 558 /* placeholder */ 559 }; 560 561 ehci0: usb@ee080100 { 562 reg = <0 0xee080100 0 0x100>; 563 /* placeholder */ 564 }; 565 566 ehci1: usb@ee0a0100 { 567 reg = <0 0xee0a0100 0 0x100>; 568 /* placeholder */ 569 }; 570 571 usb2_phy0: usb-phy@ee080200 { 572 reg = <0 0xee080200 0 0x700>; 573 /* placeholder */ 574 }; 575 576 usb2_phy1: usb-phy@ee0a0200 { 577 reg = <0 0xee0a0200 0 0x700>; 578 /* placeholder */ 579 }; 580 581 sdhi0: sd@ee100000 { 582 reg = <0 0xee100000 0 0x2000>; 583 /* placeholder */ 584 }; 585 586 sdhi2: sd@ee140000 { 587 reg = <0 0xee140000 0 0x2000>; 588 /* placeholder */ 589 }; 590 591 sdhi3: sd@ee160000 { 592 reg = <0 0xee160000 0 0x2000>; 593 /* placeholder */ 594 }; 595 596 gic: interrupt-controller@f1010000 { 597 compatible = "arm,gic-400"; 598 #interrupt-cells = <3>; 599 #address-cells = <0>; 600 interrupt-controller; 601 reg = <0x0 0xf1010000 0 0x1000>, 602 <0x0 0xf1020000 0 0x20000>, 603 <0x0 0xf1040000 0 0x20000>, 604 <0x0 0xf1060000 0 0x20000>; 605 interrupts = <GIC_PPI 9 606 (GIC_CPU_MASK_SIMPLE(6) | IRQ_TYPE_LEVEL_HIGH)>; 607 clocks = <&cpg CPG_MOD 408>; 608 clock-names = "clk"; 609 power-domains = <&sysc R8A77961_PD_ALWAYS_ON>; 610 resets = <&cpg 408>; 611 }; 612 613 pciec0: pcie@fe000000 { 614 reg = <0 0xfe000000 0 0x80000>; 615 /* placeholder */ 616 }; 617 618 pciec1: pcie@ee800000 { 619 reg = <0 0xee800000 0 0x80000>; 620 /* placeholder */ 621 }; 622 623 csi20: csi2@fea80000 { 624 reg = <0 0xfea80000 0 0x10000>; 625 /* placeholder */ 626 627 ports { 628 #address-cells = <1>; 629 #size-cells = <0>; 630 631 port@1 { 632 #address-cells = <1>; 633 #size-cells = <0>; 634 reg = <1>; 635 }; 636 }; 637 }; 638 639 csi40: csi2@feaa0000 { 640 reg = <0 0xfeaa0000 0 0x10000>; 641 /* placeholder */ 642 643 ports { 644 #address-cells = <1>; 645 #size-cells = <0>; 646 647 port@1 { 648 #address-cells = <1>; 649 #size-cells = <0>; 650 651 reg = <1>; 652 }; 653 }; 654 }; 655 656 hdmi0: hdmi@fead0000 { 657 reg = <0 0xfead0000 0 0x10000>; 658 /* placeholder */ 659 660 ports { 661 #address-cells = <1>; 662 #size-cells = <0>; 663 port@0 { 664 reg = <0>; 665 }; 666 port@1 { 667 reg = <1>; 668 }; 669 port@2 { 670 /* HDMI sound */ 671 reg = <2>; 672 }; 673 }; 674 }; 675 676 du: display@feb00000 { 677 reg = <0 0xfeb00000 0 0x70000>; 678 /* placeholder */ 679 680 ports { 681 #address-cells = <1>; 682 #size-cells = <0>; 683 684 port@0 { 685 reg = <0>; 686 du_out_rgb: endpoint { 687 }; 688 }; 689 port@1 { 690 reg = <1>; 691 du_out_hdmi0: endpoint { 692 }; 693 }; 694 port@2 { 695 reg = <2>; 696 du_out_lvds0: endpoint { 697 }; 698 }; 699 }; 700 }; 701 702 prr: chipid@fff00044 { 703 compatible = "renesas,prr"; 704 reg = <0 0xfff00044 0 4>; 705 }; 706 }; 707 708 timer { 709 compatible = "arm,armv8-timer"; 710 interrupts-extended = <&gic GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(6) | IRQ_TYPE_LEVEL_LOW)>, 711 <&gic GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(6) | IRQ_TYPE_LEVEL_LOW)>, 712 <&gic GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(6) | IRQ_TYPE_LEVEL_LOW)>, 713 <&gic GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(6) | IRQ_TYPE_LEVEL_LOW)>; 714 }; 715 716 /* External USB clocks - can be overridden by the board */ 717 usb3s0_clk: usb3s0 { 718 compatible = "fixed-clock"; 719 #clock-cells = <0>; 720 clock-frequency = <0>; 721 }; 722 723 usb_extal_clk: usb_extal { 724 compatible = "fixed-clock"; 725 #clock-cells = <0>; 726 clock-frequency = <0>; 727 }; 728}; 729