tc2.dts 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  1. /*
  2. * Copyright (c) 2020-2024, Arm Limited. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. /dts-v1/;
  7. #include <dt-bindings/interrupt-controller/arm-gic.h>
  8. #include <dt-bindings/interrupt-controller/irq.h>
  9. #include <platform_def.h>
  10. #if TARGET_FLAVOUR_FVP
  11. #define LIT_CAPACITY 406
  12. #define MID_CAPACITY 912
  13. #else /* TARGET_FLAVOUR_FPGA */
  14. #define LIT_CAPACITY 280
  15. #define MID_CAPACITY 775
  16. /* this is an area optimized configuration of the big core */
  17. #define BIG2_CAPACITY 930
  18. #endif /* TARGET_FLAVOUR_FPGA */
  19. #define BIG_CAPACITY 1024
  20. #define MHU_TX_ADDR 45000000 /* hex */
  21. #define MHU_TX_COMPAT "arm,mhuv2-tx","arm,primecell"
  22. #define MHU_TX_INT_NAME "mhu_tx"
  23. #define MHU_RX_ADDR 45010000 /* hex */
  24. #define MHU_RX_COMPAT "arm,mhuv2-rx","arm,primecell"
  25. #define MHU_OFFSET 0x1000
  26. #define MHU_MBOX_CELLS 2
  27. #define MHU_RX_INT_NUM 317
  28. #define MHU_RX_INT_NAME "mhu_rx"
  29. #define LIT_CPU_PMU_COMPATIBLE "arm,cortex-a520-pmu"
  30. #define MID_CPU_PMU_COMPATIBLE "arm,cortex-a720-pmu"
  31. #define BIG_CPU_PMU_COMPATIBLE "arm,cortex-x4-pmu"
  32. #define MPAM_ADDR 0x1 0x00010000 /* 0x1_0001_0000 */
  33. #define UARTCLK_FREQ 5000000
  34. #define DPU_ADDR 2cc00000
  35. #define DPU_IRQ 69
  36. #define ETHERNET_ADDR 18000000
  37. #define ETHERNET_INT 109
  38. #define SYS_REGS_ADDR 1c010000
  39. #define MMC_ADDR 1c050000
  40. #define MMC_INT_0 107
  41. #define MMC_INT_1 108
  42. #define RTC_ADDR 1c170000
  43. #define RTC_INT 100
  44. #define KMI_0_ADDR 1c060000
  45. #define KMI_0_INT 197
  46. #define KMI_1_ADDR 1c070000
  47. #define KMI_1_INT 103
  48. #define VIRTIO_BLOCK_ADDR 1c130000
  49. #define VIRTIO_BLOCK_INT 204
  50. #include "tc-common.dtsi"
  51. #if TARGET_FLAVOUR_FVP
  52. #include "tc-fvp.dtsi"
  53. #else
  54. #include "tc-fpga.dtsi"
  55. #endif /* TARGET_FLAVOUR_FVP */
  56. #include "tc-base.dtsi"
  57. / {
  58. cpus {
  59. #if TARGET_FLAVOUR_FPGA
  60. cpu-map {
  61. cluster0 {
  62. core8 {
  63. cpu = <&CPU8>;
  64. };
  65. core9 {
  66. cpu = <&CPU9>;
  67. };
  68. core10 {
  69. cpu = <&CPU10>;
  70. };
  71. core11 {
  72. cpu = <&CPU11>;
  73. };
  74. core12 {
  75. cpu = <&CPU12>;
  76. };
  77. core13 {
  78. cpu = <&CPU13>;
  79. };
  80. };
  81. };
  82. #endif
  83. CPU2:cpu@200 {
  84. clocks = <&scmi_dvfs 0>;
  85. capacity-dmips-mhz = <LIT_CAPACITY>;
  86. };
  87. CPU3:cpu@300 {
  88. clocks = <&scmi_dvfs 0>;
  89. capacity-dmips-mhz = <LIT_CAPACITY>;
  90. };
  91. CPU6:cpu@600 {
  92. clocks = <&scmi_dvfs 1>;
  93. capacity-dmips-mhz = <MID_CAPACITY>;
  94. };
  95. CPU7:cpu@700 {
  96. clocks = <&scmi_dvfs 1>;
  97. capacity-dmips-mhz = <MID_CAPACITY>;
  98. };
  99. #if TARGET_FLAVOUR_FPGA
  100. CPU8:cpu@800 {
  101. device_type = "cpu";
  102. compatible = "arm,armv8";
  103. reg = <0x800>;
  104. enable-method = "psci";
  105. clocks = <&scmi_dvfs 1>;
  106. capacity-dmips-mhz = <MID_CAPACITY>;
  107. amu = <&amu>;
  108. supports-mpmm;
  109. };
  110. CPU9:cpu@900 {
  111. device_type = "cpu";
  112. compatible = "arm,armv8";
  113. reg = <0x900>;
  114. enable-method = "psci";
  115. clocks = <&scmi_dvfs 2>;
  116. capacity-dmips-mhz = <BIG2_CAPACITY>;
  117. amu = <&amu>;
  118. supports-mpmm;
  119. };
  120. CPU10:cpu@A00 {
  121. device_type = "cpu";
  122. compatible = "arm,armv8";
  123. reg = <0xA00>;
  124. enable-method = "psci";
  125. clocks = <&scmi_dvfs 2>;
  126. capacity-dmips-mhz = <BIG2_CAPACITY>;
  127. amu = <&amu>;
  128. supports-mpmm;
  129. };
  130. CPU11:cpu@B00 {
  131. device_type = "cpu";
  132. compatible = "arm,armv8";
  133. reg = <0xB00>;
  134. enable-method = "psci";
  135. clocks = <&scmi_dvfs 2>;
  136. capacity-dmips-mhz = <BIG2_CAPACITY>;
  137. amu = <&amu>;
  138. supports-mpmm;
  139. };
  140. CPU12:cpu@C00 {
  141. device_type = "cpu";
  142. compatible = "arm,armv8";
  143. reg = <0xC00>;
  144. enable-method = "psci";
  145. clocks = <&scmi_dvfs 3>;
  146. capacity-dmips-mhz = <BIG_CAPACITY>;
  147. amu = <&amu>;
  148. supports-mpmm;
  149. };
  150. CPU13:cpu@D00 {
  151. device_type = "cpu";
  152. compatible = "arm,armv8";
  153. reg = <0xD00>;
  154. enable-method = "psci";
  155. clocks = <&scmi_dvfs 3>;
  156. capacity-dmips-mhz = <BIG_CAPACITY>;
  157. amu = <&amu>;
  158. supports-mpmm;
  159. };
  160. #endif
  161. };
  162. #if TARGET_FLAVOUR_FPGA
  163. ete8 {
  164. compatible = "arm,embedded-trace-extension";
  165. cpu = <&CPU8>;
  166. };
  167. ete9 {
  168. compatible = "arm,embedded-trace-extension";
  169. cpu = <&CPU9>;
  170. };
  171. ete10 {
  172. compatible = "arm,embedded-trace-extension";
  173. cpu = <&CPU10>;
  174. };
  175. ete11 {
  176. compatible = "arm,embedded-trace-extension";
  177. cpu = <&CPU11>;
  178. };
  179. ete12 {
  180. compatible = "arm,embedded-trace-extension";
  181. cpu = <&CPU12>;
  182. };
  183. ete13 {
  184. compatible = "arm,embedded-trace-extension";
  185. cpu = <&CPU13>;
  186. };
  187. #endif /* TARGET_FLAVOUR_FPGA */
  188. cmn-pmu {
  189. compatible = "arm,ci-700";
  190. reg = <0x0 0x50000000 0x0 0x10000000>;
  191. interrupts = <GIC_SPI 460 IRQ_TYPE_LEVEL_HIGH 0>;
  192. };
  193. mbox_db_rx: mhu@MHU_RX_ADDR {
  194. arm,mhuv2-protocols = <0 1>;
  195. };
  196. mbox_db_tx: mhu@MHU_TX_ADDR {
  197. arm,mhuv2-protocols = <0 1>;
  198. };
  199. firmware {
  200. /*
  201. * TC2 does not have a P2A channel, but wiring one was needed to make Linux work
  202. * (by chance). At the time the SCMI driver did not support bidirectional
  203. * mailboxes so as a workaround, the A2P channel was wired for TX communication
  204. * and the synchronous replies would be read asyncrhonously as if coming from
  205. * the P2A channel, while being the actual A2P channel.
  206. *
  207. * This will not work with kernels > 5.15, but keep it around to keep TC2
  208. * working with its target kernel. Newer kernels will still work, but SCMI
  209. * won't as they check that the two regions are distinct.
  210. */
  211. scmi {
  212. mboxes = <&mbox_db_tx 0 0 &mbox_db_rx 0 0>;
  213. shmem = <&cpu_scp_scmi_a2p &cpu_scp_scmi_a2p>;
  214. };
  215. };
  216. gic: interrupt-controller@GIC_CTRL_ADDR {
  217. ppi-partitions {
  218. ppi_partition_little: interrupt-partition-0 {
  219. affinity = <&CPU0>, <&CPU1>, <&CPU2>, <&CPU3>;
  220. };
  221. #if TARGET_FLAVOUR_FVP
  222. ppi_partition_mid: interrupt-partition-1 {
  223. affinity = <&CPU4>, <&CPU5>, <&CPU6>;
  224. };
  225. ppi_partition_big: interrupt-partition-2 {
  226. affinity = <&CPU7>;
  227. };
  228. #elif TARGET_FLAVOUR_FPGA
  229. ppi_partition_mid: interrupt-partition-1 {
  230. affinity = <&CPU4>, <&CPU5>, <&CPU6>, <&CPU7>, <&CPU8>;
  231. };
  232. ppi_partition_big: interrupt-partition-2 {
  233. affinity = <&CPU9>, <&CPU10>, <&CPU11>, <&CPU12>, <&CPU13>;
  234. };
  235. #endif
  236. };
  237. };
  238. spe-pmu-big {
  239. status = "okay";
  240. };
  241. smmu_700: iommu@3f000000 {
  242. status = "okay";
  243. };
  244. dp0: display@DPU_ADDR {
  245. #if TC_SCMI_PD_CTRL_EN
  246. power-domains = <&scmi_devpd (PLAT_MAX_CPUS_PER_CLUSTER + 2)>;
  247. #endif
  248. iommus = <&smmu_700 0x100>;
  249. };
  250. gpu: gpu@2d000000 {
  251. interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH 0>,
  252. <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH 0>,
  253. <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH 0>;
  254. interrupt-names = "JOB", "MMU", "GPU";
  255. iommus = <&smmu_700 0x200>;
  256. };
  257. };