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