Commit graph

37 commits

Author SHA1 Message Date
Leo Yan
ab0450f34d refactor(tc): introduce a new macro ADDRESSIFY()
Now some macros (e.g., MHU_RX_ADDR(0x), MHU_TX_ADDR(0x), etc) add the
prefix '0x' at the beginning of the addresses for hexadecimal values.

For better readability, this patch introduces a new macro ADDRESSIFY(),
which explictly adds the prefix '0x' for hexadecimal values. With this
new macro, address macros can drop the parameter and be simplified to
hexadecimal address value.

Change-Id: Idd1af0394f6ef8288fbff1fd4d86b1709d1c1d16
Signed-off-by: Leo Yan <leo.yan@arm.com>
2024-04-30 14:20:18 +01:00
Boyan Karatotev
6dacc272b0 refactor(tc): correlate secure world addresses with platform_def
Similarly to the memory node in the NS device tree, platform_def already
defines all the necessary values to populate the spmc manifest and NS
related entries automatically. Use the macros directly so any changes
can propagate automatically.

The result of this is that TC3 and above get correct secure world
manifests automatically. They were previously broken.

One "breaking" change is that the FWU region moves. This should have
happened previously but it was missed when the secure portion of DRAM
was increased, leaving it in secure memory. This was caught when going
over the definitions and correlating them should prevent this in the
future.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: I1415e402be8c70f5e22f28eabddcb53298c57a11
2024-02-26 16:07:41 +00:00
Boyan Karatotev
5ee4deb8e6 feat(tc): add memory node in the device tree
With new TC revisions, memory banks move around which requires an update
in platform_def. It also requires an update in the device tree which
doesn't come naturally. To avoid this, add the memory node such that it
uses the macros defined in platform_def.

By doing this we can put u-boot out of its misery in trying to come up
with the correct memory node and tf-a's device tree becomes complete.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: Ia92cc6931abb12be2856ac3fb1455e4f3005b326
2024-02-26 16:07:41 +00:00
Boyan Karatotev
4fc4e9c969 feat(tc): add arm_ffa node in dts
For u-boot to use the device tree itself it needs to know about the
arm_ffa module. This is not relevant to linux but it doesn't hurt as it
won't use it.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: I6e75659e4950c62ce7377dc7941225eb5d7a3d8d
2024-02-26 16:07:41 +00:00
Ben Horgan
bafedcbe4f chore(tc): add dummy entropy to speed up the Linux boot
If the kernel is post 5.19 and is configured with
CONFIG_RANDOM_TRUST_BOOTLOADER=y then entropy can be passed to
Linux via the device tree. This avoids delaying the Linux boot
waiting for entropy. This is particularly noticeable when
booting android but also speeds up the generation of the ssl
certificates.

Signed-off-by: Ben Horgan <ben.horgan@arm.com>
Change-Id: I4c6136c54f0e971802a2a9de9f88cd32b610dce9
2024-02-26 16:07:40 +00:00
Davidson K
8e94163ec0 feat(tc): choose the DPU address and irq based on the target
Currently there are two configurations for DPU
Config 1: Address - 0x2CC0_0000    IRQ - 101
Config 2: Address - 0x40_0000_0000 IRQ - 547

Config 1 is used by all FPGA and TC0, TC1 and TC2 FVPs
Config 2 is used by TC3 FVP currently

Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
Change-Id: If0097441b6ab90f58911df032e45f6bf06fc7909
2024-02-26 16:07:40 +00:00
Kshitij Sisodia
a658b46dc7 feat(tc): add SCMI power domain and IOMMU toggles
Compile-time controls have been added for the following:

* SCMI power domain use for DPU and GPU.
* SMMU-700: planned rework required to use IOMMU correctly
  for DPU and GPU.

These will allow easier experimentation in the future without
ad-hoc changes needed in the dts file for any sort of analysis
that requires testing different paths.

For TC3 however, the DPU is in an always on power domain so SCMI power
domains are not supported.

Co-developed-by: Tintu Thomas <tintu.thomas@arm.com>
Signed-off-by: Kshitij Sisodia <kshitij.sisodia@arm.com>
Change-Id: If6179a3e4784c1b69f0338a8d52b552452c0eac1
2024-02-26 16:07:31 +00:00
Boyan Karatotev
e862f0bf0a refactor(tc): move the FVP RoS to a separate file
In trying to use the same DTS for the FVP and FPGA subvariants we need
to keep track of what is different. Move the FVP RoS, which is different
to the FPGA's, to reduce the number of ifdefs and make FVP-only changes
easier.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: Ib7999d3e39de55ab4a30e68dd81f95120be15a8c
2024-02-26 13:41:26 +00:00
Boyan Karatotev
1b8ed0993f feat(tc): factor in FVP/FPGA differences
Even though the FVP and FPGA are meant to be identical their RoS's (rest
of system) are different. Factor these in so the device tree works for
both. The differences are:
 * addresses of GIC and UART
 * displays (FPGA uses 4k)
 * ethernet devices and SD card (it's non removable on the FPGA)

Their frequencies are also different. The FVP simulates certain
frequencies but isn't very sensitive when we disregard them. To keep
code similar, update them with the FPGA values. This keeps working on
FVP even if slightly incorrect.

Also add an option for the DPU to either use fixed clocks or SCMI set
clocks, hidden behind a flag. This is useful during bringup and because
SCMI may not necessarily work on FPGA.

Co-developed-by: Kshitij Sisodia <kshitij.sisodia@arm.com>
Co-developed-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Co-developed-by: Usama Arif <usama.arif@arm.com>
Co-developed-by: Angel Rodriguez Garcia <angel.rodriguezgarcia@arm.com>
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: Ic7a4bfc302673a3a6571757e23a9e6184fba2a13
2024-02-26 13:41:25 +00:00
Boyan Karatotev
a02bb36caa feat(tc): introduce an FPGA subvariant and TC3 CPUs
TC is getting an FPGA port alongside the FVP. It is meant to be
identical, but the core configurations on TC2 differ (there are 14 in an
odd arrangement).

Introduce these differences and gate them behind a new TARGET_FLAVOUR
flag which defaults to FVP for compatibility.

While updating CPUs, it's a good time to do TC3 too. It has different
cores in a different configuration again, so it needs different capacity
values. Those have been derived using GeekBench 6.0 ST on the FPGA.

Finally GPU and DPU power domains are 1 above the CPUs so make that
relative.

In the end, the big/mid/little configurations are:
 * TC2 FVP:  1/3/4
 * TC2 FPGA: 2/3/5/4 (the 3 is a big "min" core)
 * TC3 both: 2/4/2 (with new capacities)

Co-developed-by: Tintu Thomas <tintu.thomas@arm.com>
Co-developed-by: Kshitij Sisodia <kshitij.sisodia@arm.com>
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: I3c3a10d6727f5010fd9026a404df27e9262dff6b
2024-02-26 13:41:25 +00:00
Boyan Karatotev
62320dc4fd feat(tc): add TC3 platform definitions
TC3 is a little different from TC2:

 * new address for its second DRAM bank
 * new CPUs
 * a few interrupts have changed
 * new SCP MHU base address.
 * utility space address (needed for MPAM) is different
 * no CMN (and therefore cmn-pmu)
 * the uart clock is different

This requires the dts to be different between revisions for the first
time. Introduce a tc_vers.dtsi that includes only definitions for things
that are different.

Signed-off-by: Tintu Thomas <tintu.thomas@arm.com>
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: I2940d87a69ea93502b7f5a22a539e4b70a63e827
2024-02-26 13:41:25 +00:00
Boyan Karatotev
0427414956 refactor(tc): sanitise the device tree
We have lots of errors in our device tree when running dt-validate.
Remove the majority so that dt-validate-ing is useful now.

Do this by renaming nodes to conform to spec, making addresses lowercase
with no 0x at the front, and removing nodes that shouldn't be there.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: I1840f0f5de34a56ee240c07eff08d73c856b338e
2024-02-26 13:41:25 +00:00
Boyan Karatotev
553b06b5d4 feat(tc): add PMU entry
TC has PMUs with interrupts in all cores and Linux needs to be told
about them.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: Ice0e6dab396b90c05f4b9668623ba7b3556a53ac
2024-02-26 13:41:25 +00:00
Boyan Karatotev
29d24bb799 chore(tc): remove unused hdlcd
The hdlcd device tree node is not in use for any TC incarnation. The DPU
replaces it. So drop it.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: I5393435e36d8307bef909a6519cb40305b77f0cf
2024-02-23 16:11:47 +00:00
Tudor Cretu
d0628728a6 feat(tc): add firmware update secure partition
Firmware update is a trusted service secure partition that implements
the PSA firmware update specification. It executes in the secure world
in total compute platform. To make it fit with Op-tee we need to reduce
its available memory.

Also, reserve 4 MB for stmm communication used for firmware update.
The firmware update secure partition and u-boot communicates using the
stmm communication layer and it needs a dedicated memory region.

Co-developed-by: Sergio Alves <sergio.dasilvalves@arm.com>
Co-developed-by: Davidson K <davidson.kumaresan@arm.com>
Signed-off-by: Tudor Cretu <tudor.cretu@arm.com>
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: I0427549845f6c7650b8ef4e450d387fe9702a847
2024-02-23 16:11:47 +00:00
Arunachalam Ganapathy
ba197f5f70 feat(tc): add spmc manifest with trusty sp
Add SPMC manifest with Trusty SP. Define Trusty's load address,
vcpu count, memory size.

Co-developed-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
Co-developed-by: Ben Horgan <ben.horgan@arm.com>
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: I1f7d7c1c6a5ef67541097ab04670343282458aeb
2024-02-23 16:11:47 +00:00
Boyan Karatotev
d2e44e7d71 fix(tc): correct interrupts
The gic and trbe0 are listed as active high, but the spec says they are
triggered on active low. Correct according to the spec.

While we're at it, convert all interrupts to use the macros so hopefully
no such confusion happens again.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: I2fc01cf0a34b031b95219b9656b613a19a2e9b2a
2024-02-23 16:11:46 +00:00
Kshitij Sisodia
2c406ddaf7 feat(tc): interrupt numbers for smmu_700
Interrupt numbers definitions and names added to `smmu_700`
node.

Signed-off-by: Kshitij Sisodia <kshitij.sisodia@arm.com>
Change-Id: Iee0b5e854e5516fce13315c1e6ad5bb2a55246ec
2024-02-23 16:11:46 +00:00
Ben Horgan
127eabeddf feat(tc): enable gpu/dpu scmi power domain and also gpu perf domain
The scmi-perf-domain property is a custom property while we
wait for proper support in the kernel for using the scmi_pm_domain
driver and scmi_perf_domain driver at the same time.

GPU operating points are now in the SCP firmware.

Change-Id: Ib6d8f52c8bf69194b1d2da4e065a34c4a341c221
Signed-off-by: Ben Horgan <ben.horgan@arm.com>
2024-02-23 16:11:46 +00:00
annsai01
77241043d2 refactor(tc): remap console logs
Remap TF-A console logs from SoC UART2 (S1 terminal) to CSS
secure (UART1_AP terminal) and Linux logs from SoC UART2
(S1 terminal) to CSS non-secure (UART_AP terminal) to align
with the latest FVP TC2 model (version 11.23/17).

Change-Id: I7206e64b65346bfdcc48d6acd3792b436041e45f
Signed-off-by: Annam Sai Manisha <annam.saimanisha@arm.com>
2024-02-13 14:57:15 +00:00
Manish V Badarkhe
6264643a07 Merge "refactor(tc): update total compute gpu device node" into integration 2023-02-03 17:04:42 +01:00
Rupinderjit Singh
cb3e9650f1 refactor(tc): update total compute gpu device node
updated gpu clocks and added gpu simple power model node

Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
Change-Id: Ia475f136bec8a569f764255eb87c212a692626dc
2023-02-03 12:53:38 +00:00
Davidson K
b45ec8cea4 feat(plat/tc): enable MPAM functionality of L3 DSU cache
The L3 cache in the DSU supports the Memory System Resources
Partitioning and Monitoring (MPAM). The MPAM specific registers in the
DSU are accessed through utility bus of DSU that are memory mapped from
0x1_0000_1000.

Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
Change-Id: I2798181d599228e96dd4c0043a2ccd94668c7e20
2023-01-27 08:01:02 +01:00
Arunachalam Ganapathy
7e3f6a87d7 fix(plat/tc): increase TC_TZC_DRAM1_SIZE
Increase TC_TZC_DRAM1_SIZE for Trusty image and its memory size.
Update OP-TEE reserved memory range in DTS

Change-Id: Iad433c3c155f28860b15bde2398df653487189dd
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
2023-01-04 15:03:51 +05:30
Davidson K
2fff46c80f fix(tc): change the properties of optee reserved memory
make it part of the restricted dma pool to ensure it is not used for
general dma operations.

Change-Id: Ia14738de70b4d7719d7460ed8d16e727aea8d8c4
Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
2022-12-20 12:01:05 +01:00
Davidson K
ed80eab6a6 feat(tc): use smmu 700
Enable smmu for gpu and dpu

Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
Change-Id: I6f4cffdc835dc542904b0a15b1db9a3382b78c08
2022-12-20 12:00:57 +01:00
Jayanth Dodderi Chidanand
066450abf3 fix(tc): resolve the static-checks errors
Converted the space indentation to tabs to fix the
errors listed under tf-static-checks CI job.

Change-Id: Ie911a5befd0eeaa5a2019245cc3c43ad375cd068
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
2022-09-28 13:48:12 +01:00
Rupinderjit Singh
a816de564f feat(tc): add RTC PL031 device tree node
It enables RTC PL031 driver in kernel.

Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
Change-Id: I6d7c1a5b6ce11b3d594f7575a747e72826c8d9b8
2022-09-15 13:04:44 +01:00
Rupinderjit Singh
fbfc59840f feat(tc): enable CI-700 PMU for profiling
Change-Id: Iaafdfc440b362022e6103eabf3fb2ebed85b6575
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
2022-04-26 22:29:32 +02:00
Anders Dellien
4a6ebeeca3 feat(tc): enable SMMU for DPU
The SMMU needs to be enabled to support 8GB RAM

Signed-off-by: Anders Dellien <anders.dellien@arm.com>
Change-Id: Ie81f2fc59886c52e9d6ed799ea73f49eb7a7c307
2022-02-01 10:58:01 +00:00
Anders Dellien
ad60a42cd7 feat(tc): add reserved memory region for Gralloc
Gralloc for Android S uses dmabuf, we need to add reserved memory area
for these allocations

Signed-off-by: Anders Dellien <anders.dellien@arm.com>
Change-Id: If869ac930fadc374ec435cae3847ba374584275b
2022-02-01 10:57:48 +00:00
Anders Dellien
82117bb481 feat(tc): enable GPU
Add DTS node for GPU to support hardware rendering in Android

Signed-off-by: Anders Dellien <anders.dellien@arm.com>
Change-Id: I2cf2badf5b15e59a910f6cf7d3d30fdfaf4fe9ce
2022-02-01 09:56:23 +00:00
Anders Dellien
68fe3cec25 fix(tc): remove the bootargs node
We need to keep the kernel command line in Yocto, otherwise we
can't support AVB.

Signed-off-by: Anders Dellien <anders.dellien@arm.com>
Change-Id: Ic291eb13620b307f10354c2c2797c6fc9b053e83
2022-02-01 09:56:11 +00:00
Davidson K
59da207e2f feat(tc): enable tracing
Total Compute has ETE and TRBE tracing components and they have
to be enabled to capture the execution trace of the processor.

Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
Change-Id: I3c86c11be2c655a61ecefa3eb2e4e3951577a113
2022-01-12 15:09:59 +05:30
Chris Kay
c19a82bef0 feat(tc): enable MPMM
This change enables MPMM and adds, to the TC firmware configuration
device tree, the AMU counters representing the "gears" for the
Maximum Power Mitigation Mechanism feature of the Cortex-X2,
Cortex-A710 and Cortex-A510:

- Gear 0: throttle medium and high bandwidth vector and viruses.
- Gear 1: throttle high bandwidth vector and viruses.
- Gear 2: throttle power viruses only.

This ensures these counters are enabled and context-switched as
expected.

Change-Id: I6df6e0fe3a5362861aa967a78ab7c34fc4bb8fc3
Signed-off-by: Chris Kay <chris.kay@arm.com>
2021-10-26 12:15:43 +01:00
Usama Arif
be42c4b4bf
fix(plat/arm): remove unused memory node
memory information is passed to kernel via u-boot.

Signed-off-by: Usama Arif <usama.arif@arm.com>
Change-Id: I3ef31047f92d96302cc98257e965751929a08541
2021-10-12 13:35:17 +01:00
Usama Arif
6ec0c65b09
feat(plat/arm): Introduce TC1 platform
This renames tc0 platform folder and files to tc, and introduces
TARGET_PLATFORM variable to account for the differences between
TC0 and TC1.

Signed-off-by: Usama Arif <usama.arif@arm.com>
Change-Id: I5b4a83f3453afd12542267091b3edab4c139c5cd
2021-08-11 11:36:50 +01:00
Renamed from fdts/tc0.dts (Browse further)