blob: fa16dcd2e24202f902312c2631555cb5a61ba222 [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>;
Leo Yanf9565b22024-04-14 22:09:34 +0100126 };
127
128 CPU9:cpu@900 {
129 device_type = "cpu";
130 compatible = "arm,armv8";
131 reg = <0x900>;
132 enable-method = "psci";
133 clocks = <&scmi_dvfs 2>;
134 capacity-dmips-mhz = <BIG2_CAPACITY>;
Leo Yanf9565b22024-04-14 22:09:34 +0100135 };
136
137 CPU10:cpu@A00 {
138 device_type = "cpu";
139 compatible = "arm,armv8";
140 reg = <0xA00>;
141 enable-method = "psci";
142 clocks = <&scmi_dvfs 2>;
143 capacity-dmips-mhz = <BIG2_CAPACITY>;
Leo Yanf9565b22024-04-14 22:09:34 +0100144 };
145
146 CPU11:cpu@B00 {
147 device_type = "cpu";
148 compatible = "arm,armv8";
149 reg = <0xB00>;
150 enable-method = "psci";
151 clocks = <&scmi_dvfs 2>;
152 capacity-dmips-mhz = <BIG2_CAPACITY>;
Leo Yanf9565b22024-04-14 22:09:34 +0100153 };
154
155 CPU12:cpu@C00 {
156 device_type = "cpu";
157 compatible = "arm,armv8";
158 reg = <0xC00>;
159 enable-method = "psci";
160 clocks = <&scmi_dvfs 3>;
161 capacity-dmips-mhz = <BIG_CAPACITY>;
Leo Yanf9565b22024-04-14 22:09:34 +0100162 };
163
164 CPU13:cpu@D00 {
165 device_type = "cpu";
166 compatible = "arm,armv8";
167 reg = <0xD00>;
168 enable-method = "psci";
169 clocks = <&scmi_dvfs 3>;
170 capacity-dmips-mhz = <BIG_CAPACITY>;
Leo Yanf9565b22024-04-14 22:09:34 +0100171 };
172#endif
173 };
174
175#if TARGET_FLAVOUR_FPGA
176 ete8 {
177 compatible = "arm,embedded-trace-extension";
178 cpu = <&CPU8>;
179 };
180
181 ete9 {
182 compatible = "arm,embedded-trace-extension";
183 cpu = <&CPU9>;
184 };
185
186 ete10 {
187 compatible = "arm,embedded-trace-extension";
188 cpu = <&CPU10>;
189 };
190
191 ete11 {
192 compatible = "arm,embedded-trace-extension";
193 cpu = <&CPU11>;
194 };
195
196 ete12 {
197 compatible = "arm,embedded-trace-extension";
198 cpu = <&CPU12>;
199 };
200
201 ete13 {
202 compatible = "arm,embedded-trace-extension";
203 cpu = <&CPU13>;
204 };
205#endif /* TARGET_FLAVOUR_FPGA */
206
Leo Yandefcfb22024-04-24 09:53:21 +0100207 cmn-pmu {
208 compatible = "arm,ci-700";
209 reg = <0x0 0x50000000 0x0 0x10000000>;
Jagdish Gediya1300bbc2024-04-23 12:06:47 +0100210 interrupts = <GIC_SPI 460 IRQ_TYPE_LEVEL_HIGH 0>;
Leo Yandefcfb22024-04-24 09:53:21 +0100211 };
Leo Yanf9565b22024-04-14 22:09:34 +0100212
Boyan Karatotevc33a3932024-04-19 12:00:49 +0100213 mbox_db_rx: mhu@MHU_RX_ADDR {
214 arm,mhuv2-protocols = <0 1>;
215 };
216
217 mbox_db_tx: mhu@MHU_TX_ADDR {
218 arm,mhuv2-protocols = <0 1>;
219 };
220
Boyan Karatotevf2596ff2024-04-19 12:27:46 +0100221 firmware {
222 /*
223 * TC2 does not have a P2A channel, but wiring one was needed to make Linux work
224 * (by chance). At the time the SCMI driver did not support bidirectional
225 * mailboxes so as a workaround, the A2P channel was wired for TX communication
226 * and the synchronous replies would be read asyncrhonously as if coming from
227 * the P2A channel, while being the actual A2P channel.
228 *
229 * This will not work with kernels > 5.15, but keep it around to keep TC2
230 * working with its target kernel. Newer kernels will still work, but SCMI
231 * won't as they check that the two regions are distinct.
232 */
233 scmi {
234 mboxes = <&mbox_db_tx 0 0 &mbox_db_rx 0 0>;
235 shmem = <&cpu_scp_scmi_a2p &cpu_scp_scmi_a2p>;
236 };
237 };
238
Jagdish Gediyaebc991b2024-04-23 12:36:32 +0100239 gic: interrupt-controller@GIC_CTRL_ADDR {
240 ppi-partitions {
241 ppi_partition_little: interrupt-partition-0 {
242 affinity = <&CPU0>, <&CPU1>, <&CPU2>, <&CPU3>;
243 };
244
245#if TARGET_FLAVOUR_FVP
246 ppi_partition_mid: interrupt-partition-1 {
247 affinity = <&CPU4>, <&CPU5>, <&CPU6>;
248 };
249
250 ppi_partition_big: interrupt-partition-2 {
251 affinity = <&CPU7>;
252 };
253#elif TARGET_FLAVOUR_FPGA
254 ppi_partition_mid: interrupt-partition-1 {
255 affinity = <&CPU4>, <&CPU5>, <&CPU6>, <&CPU7>, <&CPU8>;
256 };
257
258 ppi_partition_big: interrupt-partition-2 {
259 affinity = <&CPU9>, <&CPU10>, <&CPU11>, <&CPU12>, <&CPU13>;
260 };
261#endif
262 };
263 };
264
Jagdish Gediya77080f62024-04-23 13:46:41 +0100265 spe-pmu-big {
266 status = "okay";
267 };
268
Leo Yan2458b382024-06-04 12:51:12 +0100269 smmu_700: iommu@3f000000 {
270 status = "okay";
271 };
272
Leo Yanf9565b22024-04-14 22:09:34 +0100273 dp0: display@DPU_ADDR {
274#if TC_SCMI_PD_CTRL_EN
275 power-domains = <&scmi_devpd (PLAT_MAX_CPUS_PER_CLUSTER + 2)>;
276#endif
Leo Yan2458b382024-06-04 12:51:12 +0100277 iommus = <&smmu_700 0x100>;
278 };
279
280 gpu: gpu@2d000000 {
Leo Yanb3a4f8c2024-04-22 18:02:52 +0100281 interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH 0>,
282 <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH 0>,
283 <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH 0>;
284 interrupt-names = "JOB", "MMU", "GPU";
Leo Yan2458b382024-06-04 12:51:12 +0100285 iommus = <&smmu_700 0x200>;
Leo Yanf9565b22024-04-14 22:09:34 +0100286 };
Leo Yandefcfb22024-04-24 09:53:21 +0100287};