blob: 0f92294f730e1950644393e5716f304bfb0fcb30 [file] [log] [blame]
Leo Yanb3a97372024-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 Yandefcfb22024-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 Yandefcfb22024-04-24 09:53:21 +010023#define MHU_TX_ADDR 45000000 /* hex */
Boyan Karatotev6c069e72024-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 Yandefcfb22024-04-24 09:53:21 +010027#define MHU_RX_ADDR 45010000 /* hex */
Boyan Karatotev6c069e72024-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 Gediya7aca6602024-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-Driver967999d2024-08-28 11:46:35 +010038#define DSU_MPAM_ADDR 0x1 0x00010000 /* 0x1_0001_0000 */
Leo Yandefcfb22024-04-24 09:53:21 +010039
40#define DPU_ADDR 2cc00000
41#define DPU_IRQ 69
42
Jackson Cooper-Drivere9e83e92024-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 Yanb3a97372024-04-14 08:27:39 +010063#include "tc-common.dtsi"
64#if TARGET_FLAVOUR_FVP
65#include "tc-fvp.dtsi"
Leo Yan4e772e62024-04-24 09:57:28 +010066#else
67#include "tc-fpga.dtsi"
Leo Yanb3a97372024-04-14 08:27:39 +010068#endif /* TARGET_FLAVOUR_FVP */
69#include "tc-base.dtsi"
Leo Yandefcfb22024-04-24 09:53:21 +010070
71/ {
Leo Yanf9565b22024-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>;
Leo Yanf9565b22024-04-14 22:09:34 +0100127 };
128
129 CPU9:cpu@900 {
130 device_type = "cpu";
131 compatible = "arm,armv8";
132 reg = <0x900>;
133 enable-method = "psci";
134 clocks = <&scmi_dvfs 2>;
135 capacity-dmips-mhz = <BIG2_CAPACITY>;
136 amu = <&amu>;
Leo Yanf9565b22024-04-14 22:09:34 +0100137 };
138
139 CPU10:cpu@A00 {
140 device_type = "cpu";
141 compatible = "arm,armv8";
142 reg = <0xA00>;
143 enable-method = "psci";
144 clocks = <&scmi_dvfs 2>;
145 capacity-dmips-mhz = <BIG2_CAPACITY>;
146 amu = <&amu>;
Leo Yanf9565b22024-04-14 22:09:34 +0100147 };
148
149 CPU11:cpu@B00 {
150 device_type = "cpu";
151 compatible = "arm,armv8";
152 reg = <0xB00>;
153 enable-method = "psci";
154 clocks = <&scmi_dvfs 2>;
155 capacity-dmips-mhz = <BIG2_CAPACITY>;
156 amu = <&amu>;
Leo Yanf9565b22024-04-14 22:09:34 +0100157 };
158
159 CPU12:cpu@C00 {
160 device_type = "cpu";
161 compatible = "arm,armv8";
162 reg = <0xC00>;
163 enable-method = "psci";
164 clocks = <&scmi_dvfs 3>;
165 capacity-dmips-mhz = <BIG_CAPACITY>;
166 amu = <&amu>;
Leo Yanf9565b22024-04-14 22:09:34 +0100167 };
168
169 CPU13:cpu@D00 {
170 device_type = "cpu";
171 compatible = "arm,armv8";
172 reg = <0xD00>;
173 enable-method = "psci";
174 clocks = <&scmi_dvfs 3>;
175 capacity-dmips-mhz = <BIG_CAPACITY>;
176 amu = <&amu>;
Leo Yanf9565b22024-04-14 22:09:34 +0100177 };
178#endif
179 };
180
181#if TARGET_FLAVOUR_FPGA
182 ete8 {
183 compatible = "arm,embedded-trace-extension";
184 cpu = <&CPU8>;
185 };
186
187 ete9 {
188 compatible = "arm,embedded-trace-extension";
189 cpu = <&CPU9>;
190 };
191
192 ete10 {
193 compatible = "arm,embedded-trace-extension";
194 cpu = <&CPU10>;
195 };
196
197 ete11 {
198 compatible = "arm,embedded-trace-extension";
199 cpu = <&CPU11>;
200 };
201
202 ete12 {
203 compatible = "arm,embedded-trace-extension";
204 cpu = <&CPU12>;
205 };
206
207 ete13 {
208 compatible = "arm,embedded-trace-extension";
209 cpu = <&CPU13>;
210 };
211#endif /* TARGET_FLAVOUR_FPGA */
212
Leo Yandefcfb22024-04-24 09:53:21 +0100213 cmn-pmu {
214 compatible = "arm,ci-700";
215 reg = <0x0 0x50000000 0x0 0x10000000>;
Jagdish Gediya1300bbc2024-04-23 12:06:47 +0100216 interrupts = <GIC_SPI 460 IRQ_TYPE_LEVEL_HIGH 0>;
Leo Yandefcfb22024-04-24 09:53:21 +0100217 };
Leo Yanf9565b22024-04-14 22:09:34 +0100218
Boyan Karatotevc33a3932024-04-19 12:00:49 +0100219 mbox_db_rx: mhu@MHU_RX_ADDR {
220 arm,mhuv2-protocols = <0 1>;
221 };
222
223 mbox_db_tx: mhu@MHU_TX_ADDR {
224 arm,mhuv2-protocols = <0 1>;
225 };
226
Boyan Karatotevf2596ff2024-04-19 12:27:46 +0100227 firmware {
228 /*
229 * TC2 does not have a P2A channel, but wiring one was needed to make Linux work
230 * (by chance). At the time the SCMI driver did not support bidirectional
231 * mailboxes so as a workaround, the A2P channel was wired for TX communication
232 * and the synchronous replies would be read asyncrhonously as if coming from
233 * the P2A channel, while being the actual A2P channel.
234 *
235 * This will not work with kernels > 5.15, but keep it around to keep TC2
236 * working with its target kernel. Newer kernels will still work, but SCMI
237 * won't as they check that the two regions are distinct.
238 */
239 scmi {
240 mboxes = <&mbox_db_tx 0 0 &mbox_db_rx 0 0>;
241 shmem = <&cpu_scp_scmi_a2p &cpu_scp_scmi_a2p>;
242 };
243 };
244
Jagdish Gediyaebc991b2024-04-23 12:36:32 +0100245 gic: interrupt-controller@GIC_CTRL_ADDR {
246 ppi-partitions {
247 ppi_partition_little: interrupt-partition-0 {
248 affinity = <&CPU0>, <&CPU1>, <&CPU2>, <&CPU3>;
249 };
250
251#if TARGET_FLAVOUR_FVP
252 ppi_partition_mid: interrupt-partition-1 {
253 affinity = <&CPU4>, <&CPU5>, <&CPU6>;
254 };
255
256 ppi_partition_big: interrupt-partition-2 {
257 affinity = <&CPU7>;
258 };
259#elif TARGET_FLAVOUR_FPGA
260 ppi_partition_mid: interrupt-partition-1 {
261 affinity = <&CPU4>, <&CPU5>, <&CPU6>, <&CPU7>, <&CPU8>;
262 };
263
264 ppi_partition_big: interrupt-partition-2 {
265 affinity = <&CPU9>, <&CPU10>, <&CPU11>, <&CPU12>, <&CPU13>;
266 };
267#endif
268 };
269 };
270
Jagdish Gediya77080f62024-04-23 13:46:41 +0100271 spe-pmu-big {
272 status = "okay";
273 };
274
Leo Yan2458b382024-06-04 12:51:12 +0100275 smmu_700: iommu@3f000000 {
276 status = "okay";
277 };
278
Leo Yanf9565b22024-04-14 22:09:34 +0100279 dp0: display@DPU_ADDR {
280#if TC_SCMI_PD_CTRL_EN
281 power-domains = <&scmi_devpd (PLAT_MAX_CPUS_PER_CLUSTER + 2)>;
282#endif
Leo Yan2458b382024-06-04 12:51:12 +0100283 iommus = <&smmu_700 0x100>;
284 };
285
286 gpu: gpu@2d000000 {
Leo Yanb3a4f8c2024-04-22 18:02:52 +0100287 interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH 0>,
288 <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH 0>,
289 <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH 0>;
290 interrupt-names = "JOB", "MMU", "GPU";
Leo Yan2458b382024-06-04 12:51:12 +0100291 iommus = <&smmu_700 0x200>;
Leo Yanf9565b22024-04-14 22:09:34 +0100292 };
Leo Yandefcfb22024-04-24 09:53:21 +0100293};