1/* 2 * Copyright (c) 2020-2024, Arm Limited. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7/* If SCMI power domain control is enabled */ 8#if TC_SCMI_PD_CTRL_EN 9#define GPU_SCMI_PD_IDX (PLAT_MAX_CPUS_PER_CLUSTER + 1) 10#define DPU_SCMI_PD_IDX (PLAT_MAX_CPUS_PER_CLUSTER + 2) 11#endif /* TC_SCMI_PD_CTRL_EN */ 12 13/* Use SCMI controlled clocks */ 14#if TC_DPU_USE_SCMI_CLK 15#define DPU_CLK_ATTR1 \ 16 clocks = <&scmi_clk 0>; \ 17 clock-names = "aclk" 18 19#define DPU_CLK_ATTR2 \ 20 clocks = <&scmi_clk 1>; \ 21 clock-names = "pxclk" 22 23#define DPU_CLK_ATTR3 \ 24 clocks = <&scmi_clk 2>; \ 25 clock-names = "pxclk" \ 26/* Use fixed clocks */ 27#else /* !TC_DPU_USE_SCMI_CLK */ 28#define DPU_CLK_ATTR1 \ 29 clocks = <&dpu_aclk>; \ 30 clock-names = "aclk" 31 32#define DPU_CLK_ATTR2 \ 33 clocks = <&dpu_pixel_clk>, <&dpu_aclk>; \ 34 clock-names = "pxclk", "aclk" 35 36#define DPU_CLK_ATTR3 DPU_CLK_ATTR2 37#endif /* !TC_DPU_USE_SCMI_CLK */ 38 39/ { 40 compatible = "arm,tc"; 41 interrupt-parent = <&gic>; 42 #address-cells = <2>; 43 #size-cells = <2>; 44 45 aliases { 46 serial0 = &os_uart; 47 }; 48 49 chosen { 50 /* 51 * Add some dummy entropy for Linux so it 52 * doesn't delay the boot waiting for it. 53 */ 54 rng-seed = <0x01 0x02 0x04 0x05 0x06 0x07 0x08 \ 55 0x01 0x02 0x04 0x05 0x06 0x07 0x08 \ 56 0x01 0x02 0x04 0x05 0x06 0x07 0x08 \ 57 0x01 0x02 0x04 0x05 0x06 0x07 0x08 \ 58 0x01 0x02 0x04 0x05 0x06 0x07 0x08 \ 59 0x01 0x02 0x04 0x05 0x06 0x07 0x08 \ 60 0x01 0x02 0x04 0x05 0x06 0x07 0x08 \ 61 0x01 0x02 0x04 0x05 0x06 0x07 0x08 >; 62 }; 63 64 cpus { 65 #address-cells = <1>; 66 #size-cells = <0>; 67 68 cpu-map { 69 cluster0 { 70 core0 { 71 cpu = <&CPU0>; 72 }; 73 core1 { 74 cpu = <&CPU1>; 75 }; 76 core2 { 77 cpu = <&CPU2>; 78 }; 79 core3 { 80 cpu = <&CPU3>; 81 }; 82 core4 { 83 cpu = <&CPU4>; 84 }; 85 core5 { 86 cpu = <&CPU5>; 87 }; 88 core6 { 89 cpu = <&CPU6>; 90 }; 91 core7 { 92 cpu = <&CPU7>; 93 }; 94 }; 95 }; 96 97 /* 98 * The timings below are just to demonstrate working cpuidle. 99 * These values may be inaccurate. 100 */ 101 idle-states { 102 entry-method = "psci"; 103 104 CPU_SLEEP_0: cpu-sleep-0 { 105 compatible = "arm,idle-state"; 106 arm,psci-suspend-param = <0x0010000>; 107 local-timer-stop; 108 entry-latency-us = <300>; 109 exit-latency-us = <1200>; 110 min-residency-us = <2000>; 111 }; 112 CLUSTER_SLEEP_0: cluster-sleep-0 { 113 compatible = "arm,idle-state"; 114 arm,psci-suspend-param = <0x1010000>; 115 local-timer-stop; 116 entry-latency-us = <400>; 117 exit-latency-us = <1200>; 118 min-residency-us = <2500>; 119 }; 120 }; 121 122 amus { 123 amu: amu-0 { 124 #address-cells = <1>; 125 #size-cells = <0>; 126 127 mpmm_gear0: counter@0 { 128 reg = <0>; 129 enable-at-el3; 130 }; 131 132 mpmm_gear1: counter@1 { 133 reg = <1>; 134 enable-at-el3; 135 }; 136 137 mpmm_gear2: counter@2 { 138 reg = <2>; 139 enable-at-el3; 140 }; 141 }; 142 }; 143 144 CPU0:cpu@0 { 145 device_type = "cpu"; 146 compatible = "arm,armv8"; 147 reg = <0x0>; 148 enable-method = "psci"; 149 clocks = <&scmi_dvfs 0>; 150 cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>; 151 capacity-dmips-mhz = <LIT_CAPACITY>; 152 amu = <&amu>; 153 supports-mpmm; 154 }; 155 156 CPU1:cpu@100 { 157 device_type = "cpu"; 158 compatible = "arm,armv8"; 159 reg = <0x100>; 160 enable-method = "psci"; 161 clocks = <&scmi_dvfs 0>; 162 cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>; 163 capacity-dmips-mhz = <LIT_CAPACITY>; 164 amu = <&amu>; 165 supports-mpmm; 166 }; 167 168 CPU2:cpu@200 { 169 device_type = "cpu"; 170 compatible = "arm,armv8"; 171 reg = <0x200>; 172 enable-method = "psci"; 173 cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>; 174 amu = <&amu>; 175 supports-mpmm; 176 }; 177 178 CPU3:cpu@300 { 179 device_type = "cpu"; 180 compatible = "arm,armv8"; 181 reg = <0x300>; 182 enable-method = "psci"; 183 cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>; 184 amu = <&amu>; 185 supports-mpmm; 186 }; 187 188 CPU4:cpu@400 { 189 device_type = "cpu"; 190 compatible = "arm,armv8"; 191 reg = <0x400>; 192 enable-method = "psci"; 193 clocks = <&scmi_dvfs 1>; 194 cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>; 195 capacity-dmips-mhz = <MID_CAPACITY>; 196 amu = <&amu>; 197 supports-mpmm; 198 }; 199 200 CPU5:cpu@500 { 201 device_type = "cpu"; 202 compatible = "arm,armv8"; 203 reg = <0x500>; 204 enable-method = "psci"; 205 clocks = <&scmi_dvfs 1>; 206 cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>; 207 capacity-dmips-mhz = <MID_CAPACITY>; 208 amu = <&amu>; 209 supports-mpmm; 210 }; 211 212 CPU6:cpu@600 { 213 device_type = "cpu"; 214 compatible = "arm,armv8"; 215 reg = <0x600>; 216 enable-method = "psci"; 217 cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>; 218 amu = <&amu>; 219 supports-mpmm; 220 }; 221 222 CPU7:cpu@700 { 223 device_type = "cpu"; 224 compatible = "arm,armv8"; 225 reg = <0x700>; 226 enable-method = "psci"; 227 cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>; 228 amu = <&amu>; 229 supports-mpmm; 230 }; 231 }; 232 233 reserved-memory { 234 #address-cells = <2>; 235 #size-cells = <2>; 236 ranges; 237 238 linux,cma { 239 compatible = "shared-dma-pool"; 240 reusable; 241 size = <0x0 0x8000000>; 242 linux,cma-default; 243 }; 244 245 optee { 246 compatible = "restricted-dma-pool"; 247 reg = <0x0 TC_NS_OPTEE_BASE 0x0 TC_NS_OPTEE_SIZE>; 248 }; 249 250 fwu_mm { 251 reg = <0x0 TC_NS_FWU_BASE 0x0 TC_NS_FWU_SIZE>; 252 no-map; 253 }; 254 }; 255 256 memory { 257 device_type = "memory"; 258 reg = <0x0 TC_NS_DRAM1_BASE 0x0 TC_NS_DRAM1_SIZE>, 259 <HI(PLAT_ARM_DRAM2_BASE) LO(PLAT_ARM_DRAM2_BASE) 260 HI(TC_NS_DRAM2_SIZE) LO(TC_NS_DRAM2_SIZE)>; 261 }; 262 263 psci { 264 compatible = "arm,psci-1.0", "arm,psci-0.2"; 265 method = "smc"; 266 }; 267 268 cpu-pmu { 269 compatible = "arm,armv8-pmuv3"; 270 interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH>; 271 }; 272 273 sram: sram@6000000 { 274 compatible = "mmio-sram"; 275 reg = <0x0 PLAT_ARM_NSRAM_BASE 0x0 PLAT_ARM_NSRAM_SIZE>; 276 277 #address-cells = <1>; 278 #size-cells = <1>; 279 ranges = <0 0x0 PLAT_ARM_NSRAM_BASE PLAT_ARM_NSRAM_SIZE>; 280 281 cpu_scp_scmi_a2p: scp-shmem@0 { 282 compatible = "arm,scmi-shmem"; 283 reg = <0x0 0x80>; 284 }; 285 }; 286 287 mbox_db_rx: mhu@MHU_RX_ADDR { 288 compatible = MHU_RX_COMPAT; 289 reg = <0x0 ADDRESSIFY(MHU_RX_ADDR) 0x0 MHU_OFFSET>; 290 clocks = <&soc_refclk>; 291 clock-names = "apb_pclk"; 292 #mbox-cells = <MHU_MBOX_CELLS>; 293 interrupts = <GIC_SPI MHU_RX_INT_NUM IRQ_TYPE_LEVEL_HIGH>; 294 interrupt-names = MHU_RX_INT_NAME; 295 }; 296 297 mbox_db_tx: mhu@MHU_TX_ADDR { 298 compatible = MHU_TX_COMPAT; 299 reg = <0x0 ADDRESSIFY(MHU_TX_ADDR) 0x0 MHU_OFFSET>; 300 clocks = <&soc_refclk>; 301 clock-names = "apb_pclk"; 302 #mbox-cells = <MHU_MBOX_CELLS>; 303 interrupt-names = MHU_TX_INT_NAME; 304 }; 305 306 firmware { 307 scmi { 308 compatible = "arm,scmi"; 309 mbox-names = "tx", "rx"; 310 #address-cells = <1>; 311 #size-cells = <0>; 312 313#if TC_SCMI_PD_CTRL_EN 314 scmi_devpd: protocol@11 { 315 reg = <0x11>; 316 #power-domain-cells = <1>; 317 }; 318#endif /* TC_SCMI_PD_CTRL_EN */ 319 320 scmi_dvfs: protocol@13 { 321 reg = <0x13>; 322 #clock-cells = <1>; 323 }; 324 325 scmi_clk: protocol@14 { 326 reg = <0x14>; 327 #clock-cells = <1>; 328 }; 329 }; 330 }; 331 332 gic: interrupt-controller@GIC_CTRL_ADDR { 333 compatible = "arm,gic-v3"; 334 #address-cells = <2>; 335 #interrupt-cells = <3>; 336 #size-cells = <2>; 337 ranges; 338 interrupt-controller; 339 reg = <0x0 0x30000000 0 0x10000>, /* GICD */ 340 <0x0 0x30080000 0 GIC_GICR_OFFSET>; /* GICR */ 341 interrupts = <GIC_PPI 0x9 IRQ_TYPE_LEVEL_LOW>; 342 }; 343 344 timer { 345 compatible = "arm,armv8-timer"; 346 interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>, 347 <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>, 348 <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>, 349 <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>; 350 }; 351 352 soc_refclk: refclk { 353 compatible = "fixed-clock"; 354 #clock-cells = <0>; 355 clock-frequency = <1000000000>; 356 clock-output-names = "apb_pclk"; 357 }; 358 359 soc_refclk60mhz: refclk60mhz { 360 compatible = "fixed-clock"; 361 #clock-cells = <0>; 362 clock-frequency = <60000000>; 363 clock-output-names = "iofpga_clk"; 364 }; 365 366 soc_uartclk: uartclk { 367 compatible = "fixed-clock"; 368 #clock-cells = <0>; 369 clock-frequency = <UARTCLK_FREQ>; 370 clock-output-names = "uartclk"; 371 }; 372 373 /* soc_uart0 on FPGA, ap_ns_uart on FVP */ 374 os_uart: serial@2a400000 { 375 compatible = "arm,pl011", "arm,primecell"; 376 reg = <0x0 0x2A400000 0x0 UART_OFFSET>; 377 interrupts = <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>; 378 clocks = <&soc_uartclk>, <&soc_refclk>; 379 clock-names = "uartclk", "apb_pclk"; 380 status = "okay"; 381 }; 382 383#if !TC_DPU_USE_SCMI_CLK 384 dpu_aclk: dpu_aclk { 385 compatible = "fixed-clock"; 386 #clock-cells = <0>; 387 clock-frequency = <VENCODER_TIMING_CLK>; 388 clock-output-names = "fpga:dpu_aclk"; 389 }; 390 391 dpu_pixel_clk: dpu-pixel-clk { 392 compatible = "fixed-clock"; 393 #clock-cells = <0>; 394 clock-frequency = <VENCODER_TIMING_CLK>; 395 clock-output-names = "pxclk"; 396 }; 397#endif /* !TC_DPU_USE_SCMI_CLK */ 398 399 vencoder { 400 compatible = "drm,virtual-encoder"; 401 port { 402 vencoder_in: endpoint { 403 remote-endpoint = <&dp_pl0_out0>; 404 }; 405 }; 406 407 display-timings { 408 timing-panel { 409 VENCODER_TIMING; 410 }; 411 }; 412 413 }; 414 415 ethernet: ethernet@18000000 { 416 reg = <0x0 0x18000000 0x0 0x10000>; 417 interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>; 418 419 reg-io-width = <2>; 420 smsc,irq-push-pull; 421 }; 422 423 bp_clock24mhz: clock24mhz { 424 compatible = "fixed-clock"; 425 #clock-cells = <0>; 426 clock-frequency = <24000000>; 427 clock-output-names = "bp:clock24mhz"; 428 }; 429 430 431 sysreg: sysreg@1c010000 { 432 compatible = "arm,vexpress-sysreg"; 433 reg = <0x0 0x001c010000 0x0 0x1000>; 434 gpio-controller; 435 #gpio-cells = <2>; 436 }; 437 438 fixed_3v3: v2m-3v3 { 439 compatible = "regulator-fixed"; 440 regulator-name = "3V3"; 441 regulator-min-microvolt = <3300000>; 442 regulator-max-microvolt = <3300000>; 443 regulator-always-on; 444 }; 445 446 mmci: mmci@1c050000 { 447 compatible = "arm,pl180", "arm,primecell"; 448 reg = <0x0 0x001c050000 0x0 0x1000>; 449 interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>, 450 <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>; 451 wp-gpios = <&sysreg 1 0>; 452 bus-width = <4>; 453 max-frequency = <25000000>; 454 vmmc-supply = <&fixed_3v3>; 455 clocks = <&bp_clock24mhz>, <&bp_clock24mhz>; 456 clock-names = "mclk", "apb_pclk"; 457 }; 458 459 gpu_clk: gpu_clk { 460 compatible = "fixed-clock"; 461 #clock-cells = <0>; 462 clock-frequency = <1000000000>; 463 }; 464 465 gpu_core_clk: gpu_core_clk { 466 compatible = "fixed-clock"; 467 #clock-cells = <0>; 468 clock-frequency = <1000000000>; 469 }; 470 471 gpu: gpu@2d000000 { 472 compatible = "arm,mali-midgard"; 473 reg = <0x0 0x2d000000 0x0 0x200000>; 474 interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>, 475 <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>, 476 <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>; 477 interrupt-names = "JOB", "MMU", "GPU"; 478 clocks = <&gpu_core_clk>; 479 clock-names = "shadercores"; 480#if TC_SCMI_PD_CTRL_EN 481 power-domains = <&scmi_devpd GPU_SCMI_PD_IDX>; 482 scmi-perf-domain = <3>; 483#endif /* TC_SCMI_PD_CTRL_EN */ 484 485 pbha { 486 int-id-override = <0 0x22>, <2 0x23>, <4 0x23>, <7 0x22>, 487 <8 0x22>, <9 0x22>, <10 0x22>, <11 0x22>, 488 <12 0x22>, <13 0x22>, <16 0x22>, <17 0x32>, 489 <18 0x32>, <19 0x22>, <20 0x22>, <21 0x32>, 490 <22 0x32>, <24 0x22>, <28 0x32>; 491 propagate-bits = <0x0f>; 492 }; 493 }; 494 495 power_model_simple { 496 /* 497 * Numbers used are irrelevant to Titan, 498 * it helps suppressing the kernel warnings. 499 */ 500 compatible = "arm,mali-simple-power-model"; 501 static-coefficient = <2427750>; 502 dynamic-coefficient = <4687>; 503 ts = <20000 2000 (-20) 2>; 504 thermal-zone = ""; 505 }; 506 507 smmu_600: smmu@2ce00000 { 508 compatible = "arm,smmu-v3"; 509 reg = <0 0x2ce00000 0 0x20000>; 510 interrupts = <GIC_SPI 75 IRQ_TYPE_EDGE_RISING>, 511 <GIC_SPI 74 IRQ_TYPE_EDGE_RISING>, 512 <GIC_SPI 76 IRQ_TYPE_EDGE_RISING>, 513 <GIC_SPI 77 IRQ_TYPE_EDGE_RISING>; 514 interrupt-names = "eventq", "priq", "cmdq-sync", "gerror"; 515 #iommu-cells = <1>; 516 status = "disabled"; 517 }; 518 519 smmu_700: iommu@3f000000 { 520 #iommu-cells = <1>; 521 compatible = "arm,smmu-v3"; 522 reg = <0x0 0x3f000000 0x0 0x5000000>; 523 interrupts = <GIC_SPI 228 IRQ_TYPE_EDGE_RISING>, 524 <GIC_SPI 229 IRQ_TYPE_EDGE_RISING>, 525 <GIC_SPI 230 IRQ_TYPE_EDGE_RISING>; 526 interrupt-names = "eventq", "cmdq-sync", "gerror"; 527 dma-coherent; 528 status = "disabled"; 529 }; 530 531 smmu_700_dpu: iommu@4002a00000 { 532 #iommu-cells = <1>; 533 compatible = "arm,smmu-v3"; 534 reg = <HI(0x4002a00000) LO(0x4002a00000) 0x0 0x5000000>; 535 interrupts = <GIC_SPI 481 IRQ_TYPE_EDGE_RISING>, 536 <GIC_SPI 482 IRQ_TYPE_EDGE_RISING>, 537 <GIC_SPI 483 IRQ_TYPE_EDGE_RISING>; 538 interrupt-names = "eventq", "cmdq-sync", "gerror"; 539 dma-coherent; 540 status = "disabled"; 541 }; 542 543 dp0: display@DPU_ADDR { 544 #address-cells = <1>; 545 #size-cells = <0>; 546 compatible = "arm,mali-d71"; 547 reg = <HI(ADDRESSIFY(DPU_ADDR)) LO(ADDRESSIFY(DPU_ADDR)) 0 0x20000>; 548 interrupts = <GIC_SPI DPU_IRQ IRQ_TYPE_LEVEL_HIGH>; 549 interrupt-names = "DPU"; 550 DPU_CLK_ATTR1; 551 552 pl0: pipeline@0 { 553 reg = <0>; 554 DPU_CLK_ATTR2; 555 pl_id = <0>; 556 ports { 557 #address-cells = <1>; 558 #size-cells = <0>; 559 port@0 { 560 reg = <0>; 561 dp_pl0_out0: endpoint { 562 remote-endpoint = <&vencoder_in>; 563 }; 564 }; 565 }; 566 }; 567 568 pl1: pipeline@1 { 569 reg = <1>; 570 DPU_CLK_ATTR3; 571 pl_id = <1>; 572 ports { 573 #address-cells = <1>; 574 #size-cells = <0>; 575 port@0 { 576 reg = <0>; 577 }; 578 }; 579 }; 580 }; 581 582 /* 583 * L3 cache in the DSU is the Memory System Component (MSC) 584 * The MPAM registers are accessed through utility bus in the DSU 585 */ 586 msc0 { 587 compatible = "arm,mpam-msc"; 588 reg = <MPAM_ADDR 0x0 0x2000>; 589 }; 590 591 ete0 { 592 compatible = "arm,embedded-trace-extension"; 593 cpu = <&CPU0>; 594 }; 595 596 ete1 { 597 compatible = "arm,embedded-trace-extension"; 598 cpu = <&CPU1>; 599 }; 600 601 ete2 { 602 compatible = "arm,embedded-trace-extension"; 603 cpu = <&CPU2>; 604 }; 605 606 ete3 { 607 compatible = "arm,embedded-trace-extension"; 608 cpu = <&CPU3>; 609 }; 610 611 ete4 { 612 compatible = "arm,embedded-trace-extension"; 613 cpu = <&CPU4>; 614 }; 615 616 ete5 { 617 compatible = "arm,embedded-trace-extension"; 618 cpu = <&CPU5>; 619 }; 620 621 ete6 { 622 compatible = "arm,embedded-trace-extension"; 623 cpu = <&CPU6>; 624 }; 625 626 ete7 { 627 compatible = "arm,embedded-trace-extension"; 628 cpu = <&CPU7>; 629 }; 630 631 trbe { 632 compatible = "arm,trace-buffer-extension"; 633 interrupts = <GIC_PPI 2 IRQ_TYPE_LEVEL_LOW>; 634 }; 635 636 trusty { 637 #size-cells = <0x02>; 638 #address-cells = <0x02>; 639 ranges = <0x00>; 640 compatible = "android,trusty-v1"; 641 642 virtio { 643 compatible = "android,trusty-virtio-v1"; 644 }; 645 646 test { 647 compatible = "android,trusty-test-v1"; 648 }; 649 650 log { 651 compatible = "android,trusty-log-v1"; 652 }; 653 654 irq { 655 ipi-range = <0x08 0x0f 0x08>; 656 interrupt-ranges = <0x00 0x0f 0x00 0x10 0x1f 0x01 0x20 0x3f 0x02>; 657 interrupt-templates = <0x01 0x00 0x8001 0x01 0x01 0x04 0x8001 0x01 0x00 0x04>; 658 compatible = "android,trusty-irq-v1"; 659 }; 660 }; 661 662 /* used in U-boot, Linux doesn't care */ 663 arm_ffa { 664 compatible = "arm,ffa"; 665 method = "smc"; 666 }; 667}; 668