blob: ae37ce3ffcd52ccfd82be5957f256ee73dac7d0c [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
Leo Yan4d4a1972024-04-24 09:53:21 +010038#define MPAM_ADDR 0x1 0x00010000 /* 0x1_0001_0000 */
39#define UARTCLK_FREQ 5000000
40
41#define DPU_ADDR 2cc00000
42#define DPU_IRQ 69
43
Leo Yanb4d71342024-04-14 08:27:39 +010044#include "tc-common.dtsi"
45#if TARGET_FLAVOUR_FVP
46#include "tc-fvp.dtsi"
Leo Yan815f5502024-04-24 09:57:28 +010047#else
48#include "tc-fpga.dtsi"
Leo Yanb4d71342024-04-14 08:27:39 +010049#endif /* TARGET_FLAVOUR_FVP */
50#include "tc-base.dtsi"
Leo Yan4d4a1972024-04-24 09:53:21 +010051
52/ {
Leo Yan6705ff02024-04-14 22:09:34 +010053 cpus {
54#if TARGET_FLAVOUR_FPGA
55 cpu-map {
56 cluster0 {
57 core8 {
58 cpu = <&CPU8>;
59 };
60 core9 {
61 cpu = <&CPU9>;
62 };
63 core10 {
64 cpu = <&CPU10>;
65 };
66 core11 {
67 cpu = <&CPU11>;
68 };
69 core12 {
70 cpu = <&CPU12>;
71 };
72 core13 {
73 cpu = <&CPU13>;
74 };
75 };
76 };
77#endif
78
79 CPU2:cpu@200 {
80 clocks = <&scmi_dvfs 0>;
81 capacity-dmips-mhz = <LIT_CAPACITY>;
82 };
83
84 CPU3:cpu@300 {
85 clocks = <&scmi_dvfs 0>;
86 capacity-dmips-mhz = <LIT_CAPACITY>;
87 };
88
89 CPU6:cpu@600 {
90 clocks = <&scmi_dvfs 1>;
91 capacity-dmips-mhz = <MID_CAPACITY>;
92 };
93
94 CPU7:cpu@700 {
95 clocks = <&scmi_dvfs 1>;
96 capacity-dmips-mhz = <MID_CAPACITY>;
97 };
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
111 CPU9:cpu@900 {
112 device_type = "cpu";
113 compatible = "arm,armv8";
114 reg = <0x900>;
115 enable-method = "psci";
116 clocks = <&scmi_dvfs 2>;
117 capacity-dmips-mhz = <BIG2_CAPACITY>;
118 amu = <&amu>;
119 supports-mpmm;
120 };
121
122 CPU10:cpu@A00 {
123 device_type = "cpu";
124 compatible = "arm,armv8";
125 reg = <0xA00>;
126 enable-method = "psci";
127 clocks = <&scmi_dvfs 2>;
128 capacity-dmips-mhz = <BIG2_CAPACITY>;
129 amu = <&amu>;
130 supports-mpmm;
131 };
132
133 CPU11:cpu@B00 {
134 device_type = "cpu";
135 compatible = "arm,armv8";
136 reg = <0xB00>;
137 enable-method = "psci";
138 clocks = <&scmi_dvfs 2>;
139 capacity-dmips-mhz = <BIG2_CAPACITY>;
140 amu = <&amu>;
141 supports-mpmm;
142 };
143
144 CPU12:cpu@C00 {
145 device_type = "cpu";
146 compatible = "arm,armv8";
147 reg = <0xC00>;
148 enable-method = "psci";
149 clocks = <&scmi_dvfs 3>;
150 capacity-dmips-mhz = <BIG_CAPACITY>;
151 amu = <&amu>;
152 supports-mpmm;
153 };
154
155 CPU13:cpu@D00 {
156 device_type = "cpu";
157 compatible = "arm,armv8";
158 reg = <0xD00>;
159 enable-method = "psci";
160 clocks = <&scmi_dvfs 3>;
161 capacity-dmips-mhz = <BIG_CAPACITY>;
162 amu = <&amu>;
163 supports-mpmm;
164 };
165#endif
166 };
167
168#if TARGET_FLAVOUR_FPGA
169 ete8 {
170 compatible = "arm,embedded-trace-extension";
171 cpu = <&CPU8>;
172 };
173
174 ete9 {
175 compatible = "arm,embedded-trace-extension";
176 cpu = <&CPU9>;
177 };
178
179 ete10 {
180 compatible = "arm,embedded-trace-extension";
181 cpu = <&CPU10>;
182 };
183
184 ete11 {
185 compatible = "arm,embedded-trace-extension";
186 cpu = <&CPU11>;
187 };
188
189 ete12 {
190 compatible = "arm,embedded-trace-extension";
191 cpu = <&CPU12>;
192 };
193
194 ete13 {
195 compatible = "arm,embedded-trace-extension";
196 cpu = <&CPU13>;
197 };
198#endif /* TARGET_FLAVOUR_FPGA */
199
Leo Yan4d4a1972024-04-24 09:53:21 +0100200 cmn-pmu {
201 compatible = "arm,ci-700";
202 reg = <0x0 0x50000000 0x0 0x10000000>;
Jagdish Gediyabd6755d2024-04-23 12:06:47 +0100203 interrupts = <GIC_SPI 460 IRQ_TYPE_LEVEL_HIGH 0>;
Leo Yan4d4a1972024-04-24 09:53:21 +0100204 };
Leo Yan6705ff02024-04-14 22:09:34 +0100205
Boyan Karatotevd1f55502024-04-19 12:00:49 +0100206 mbox_db_rx: mhu@MHU_RX_ADDR {
207 arm,mhuv2-protocols = <0 1>;
208 };
209
210 mbox_db_tx: mhu@MHU_TX_ADDR {
211 arm,mhuv2-protocols = <0 1>;
212 };
213
Boyan Karatotev102554c2024-04-19 12:27:46 +0100214 firmware {
215 /*
216 * TC2 does not have a P2A channel, but wiring one was needed to make Linux work
217 * (by chance). At the time the SCMI driver did not support bidirectional
218 * mailboxes so as a workaround, the A2P channel was wired for TX communication
219 * and the synchronous replies would be read asyncrhonously as if coming from
220 * the P2A channel, while being the actual A2P channel.
221 *
222 * This will not work with kernels > 5.15, but keep it around to keep TC2
223 * working with its target kernel. Newer kernels will still work, but SCMI
224 * won't as they check that the two regions are distinct.
225 */
226 scmi {
227 mboxes = <&mbox_db_tx 0 0 &mbox_db_rx 0 0>;
228 shmem = <&cpu_scp_scmi_a2p &cpu_scp_scmi_a2p>;
229 };
230 };
231
Jagdish Gediya35625da2024-04-23 12:36:32 +0100232 gic: interrupt-controller@GIC_CTRL_ADDR {
233 ppi-partitions {
234 ppi_partition_little: interrupt-partition-0 {
235 affinity = <&CPU0>, <&CPU1>, <&CPU2>, <&CPU3>;
236 };
237
238#if TARGET_FLAVOUR_FVP
239 ppi_partition_mid: interrupt-partition-1 {
240 affinity = <&CPU4>, <&CPU5>, <&CPU6>;
241 };
242
243 ppi_partition_big: interrupt-partition-2 {
244 affinity = <&CPU7>;
245 };
246#elif TARGET_FLAVOUR_FPGA
247 ppi_partition_mid: interrupt-partition-1 {
248 affinity = <&CPU4>, <&CPU5>, <&CPU6>, <&CPU7>, <&CPU8>;
249 };
250
251 ppi_partition_big: interrupt-partition-2 {
252 affinity = <&CPU9>, <&CPU10>, <&CPU11>, <&CPU12>, <&CPU13>;
253 };
254#endif
255 };
256 };
257
Jagdish Gediyac71080f2024-04-23 13:46:41 +0100258 spe-pmu-big {
259 status = "okay";
260 };
261
Leo Yan983fd452024-06-04 12:51:12 +0100262 smmu_700: iommu@3f000000 {
263 status = "okay";
264 };
265
Leo Yan6705ff02024-04-14 22:09:34 +0100266 dp0: display@DPU_ADDR {
267#if TC_SCMI_PD_CTRL_EN
268 power-domains = <&scmi_devpd (PLAT_MAX_CPUS_PER_CLUSTER + 2)>;
269#endif
Leo Yan983fd452024-06-04 12:51:12 +0100270 iommus = <&smmu_700 0x100>;
271 };
272
273 gpu: gpu@2d000000 {
274 iommus = <&smmu_700 0x200>;
Leo Yan6705ff02024-04-14 22:09:34 +0100275 };
Leo Yan4d4a1972024-04-24 09:53:21 +0100276};