Commit graph

392 commits

Author SHA1 Message Date
Davidson K
25a2fe3b74 feat(tc): remove static memory used for fwu
With the updated firmware update implementation in the Trusted Services,
it is no longer needed to carve out static memory. Memory will be
allocated dynamically in U-Boot and shared with the firmware update
secure partition of Trusted Services.

Change-Id: I0fb128a458773236ee10526edfa1116b229e4d6e
Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
Signed-off-by: Jackson Cooper-Driver <jackson.cooper-driver@arm.com>
Signed-off-by: Icen Zeyada <Icen.Zeyada2@arm.com>
2024-10-04 14:08:09 +00:00
Divin Raj
bb7c7e7130 feat(rd1ae): add device tree files
This commit Add FW_CONFIG and HW_CONFIG device trees

Signed-off-by: Divin Raj <divin.raj@arm.com>
Change-Id: Ia6cbf06def8ec9b74ef9040bab801278a3117899
2024-09-27 14:59:57 +01:00
Divin Raj
973e0b7f2c feat(arm): add support for loading CONFIG from BL2
This commit introduces a new ARM platform-specific build option called
`ARM_FW_CONFIG_LOAD_ENABLE`. This option enables the loading of the
`fw_config` device tree when resetting to the BL2 scenario.

Additionally, the FW_CONFIG image reference has been added to the
fdts/tbbr_cot_descriptors.dtsi file in order to use in the scenario of
RESET_TO_BL2.

Signed-off-by: Divin Raj <divin.raj@arm.com>
Change-Id: I11de497b7dbb1386ed84d939d6fd2a11856e9e1b
2024-09-27 14:58:58 +01:00
Pascal Paillet
e97467068a feat(stm32mp2-fdts): describe stpmic2 power supplies
Describe PMIC power supplies in STM32MP257F-EV1 board DT file.

Change-Id: I14df5d210909d95b2164197eb910a9ea0aa0b51d
Signed-off-by: Pascal Paillet <p.paillet@st.com>
2024-09-20 14:49:01 +02:00
Yann Gautier
0a0820885d feat(stm32mp2-fdts): add I2C7 pin muxing
It will be used for PMIC on STM32MP257F-EV board.

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: I7f95220512de4416323b381fec7c7dcb044c64fd
2024-09-20 14:49:01 +02:00
Yann Gautier
c7cfe27a24 feat(stm32mp2-fdts): add UART and I2C nodes for STM32MP2
Update stm32mp251.dtsi SoC DT file to include UART and I2C nodes.

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Signed-off-by: Maxime Méré <maxime.mere@foss.st.com>
Change-Id: I6f52ec2c1735d28ba4a424af71e7eae5b0ac3e0d
2024-09-20 14:48:58 +02:00
Maxime Méré
ae84525f44 feat(stm32mp2): manage DDR FW via FIP
This feature is enabled by default using STM32MP_DDR_FIP_IO_STORAGE.

DDR firmware binary is loaded from FIP to SRAM1 which needs to be
mapped.
Only half of the SRAM1 will be allocated to TF-A.
RISAB3 has to be configured to allow access to SRAM1.
Add image ID and update maximum number on platform side also.

Fill related descriptor information, add policy and update numbers.
DDR_TYPE variable is used to identify binary file, and image is now
added in the fiptool command line.

The DDR PHY firmware is not in TF-A repository. It can be found at
https://github.com/STMicroelectronics/stm32-ddr-phy-binary
To ease the selection of the firmware path, STM32MP_DDR_FW_PATH is added
to platform.mk file.

Change-Id: I09ab0a5c63406055a7b5ccd16d65e443de47ca2f
Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com>
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Signed-off-by: Maxime Méré <maxime.mere@foss.st.com>
2024-09-13 17:57:58 +02:00
Yann Gautier
a370c856f1 feat(stm32mp2-fdts): add BL31 info in fw-config
Add BL31 load address (beginning on SYSRAM) and size in fw-config DT
file.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Signed-off-by: Maxime Méré <maxime.mere@foss.st.com>
Change-Id: I2fcd8d326f394090401ac59b47216d59d3e911bc
2024-09-13 17:38:11 +02:00
Jackson Cooper-Driver
e365479d0d feat(tc): bind DPU SMMU on TC4
TC4 adds a new SMMU-700 specifically for the DPU (in the RoS). This is
used as the DPU SMMU instead of the existing SMMU used for both the GPU
and DPU. Update the devicetree to reflect this.

Note that the streamID values have also changes for this new SMMU. This
is because TC4 also updates the new SMMU to use a different streamID for
each DPU port - these must all be added to the device tree.

Change-Id: If2ce9749e40937fd1291346d071b691cfb662f2e
Signed-off-by: Jackson Cooper-Driver <jackson.cooper-driver@arm.com>
Signed-off-by: Leo Yan <leo.yan@arm.com>
2024-08-29 14:39:21 +01:00
Leo Yan
11ec5de695 feat(tc): bind GPU SMMU on TC4
A SMMU-700 is used on TC4 for only GPU, on both FVP and FPGA. Add DT
binding for it.

Change-Id: I1b840676fd02c3961d4efdd769f12a4b01d459fb
Signed-off-by: Leo Yan <leo.yan@arm.com>
2024-08-29 14:39:21 +01:00
Leo Yan
b3a4f8cfcf feat(tc): update DT for Drage GPU
This patch incorporates the changes for Drage GPU to uses new access
window interface "IRQ_AW". As the interrupt properties are different
between TC4 and other TC platforms, this patch appends the interrupt
properties in platform specific DT binding file.

Change-Id: I2ca505846f03ce64b8e5f02fd202962dbfe39f25
Signed-off-by: Leo Yan <leo.yan@arm.com>
2024-08-29 14:39:21 +01:00
Jackson Cooper-Driver
e9e83e96bb feat(tc): add new TC4 RoS definitions
The TC4 uses a new RoS (Virtual Peripherals) and places them at
different address to that in TC3. Add these addresses to the DTS.

Change-Id: Ia62a670e47cdc98b3c113a670a21edc65905cafe
Signed-off-by: Jackson Cooper-Driver <jackson.cooper-driver@arm.com>
Signed-off-by: Leo Yan <leo.yan@arm.com>
2024-08-29 14:39:21 +01:00
Leo Yan
3cedc47b1d feat(tc): add device tree binding for TC4
Since TC3 and TC4 share most components in the hardware design, they can
reuse the device tree binding. For this reason, this patch extracts the
common modules from tc3.dts and put into the file tc3-4-based.dtsi.

As a result, a new created tc4.dts file includes tc3-4-based.dtsi for
support DT binding for the TC4 platform.

Change-Id: Ib7497162cb131d94a722aeaa14a1a37fb0095829
Signed-off-by: Leo Yan <leo.yan@arm.com>
2024-08-29 14:39:08 +01:00
Madhukar Pappireddy
d76d27e978 Merge changes from topic "stm32mp2_bl2_updates" into integration
* changes:
  feat(stm32mp2): load fw-config file
  feat(stm32mp2): add fw-config compilation
  feat(stm32mp2-fdts): add fw-config files for STM32MP257F-EV1
  feat(stm32mp2-fdts): add fw-config file
  feat(stm32mp2-fdts): add clock tree for STM32MP257F-EV1
  feat(stm32mp2): enable DDR sub-system clock
  feat(stm32mp2): add fixed regulators support
  feat(stm32mp2): print board info
  feat(stm32mp2): display CPU info
  feat(stm32mp2): get chip ID
  feat(stm32mp2): add BL2 boot first steps
  feat(stm32mp2): add defines for the PWR peripheral
  feat(stm32mp2-fdts): add SD-card and eMMC support on STM32MP257F-EV1
  feat(stm32mp2-fdts): add sdmmc pins definition
  feat(stm32mp2-fdts): add sdmmc nodes in SoC DT file
  feat(stm32mp2-fdts): add io_policies
  feat(stm32mp2-fdts): remove pins-are-numbered
2024-08-22 18:38:03 +02:00
Yann Gautier
83f571edb4 feat(stm32mp2-fdts): add fw-config files for STM32MP257F-EV1
Add the Firmware Config DT file for STM32MP257F-EV1 board.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I895ef919b1f388be1e8d25490f25b1e7195984f8
2024-08-12 15:54:52 +02:00
Yann Gautier
513b5cc83a feat(stm32mp2-fdts): add fw-config file
This is a generic file to be use on all STM32MP2 boards, as what is
done for STM32MP15.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I4ae0cf0b7d21b1a2072b7ff5e6b98837d603c860
2024-08-12 15:54:52 +02:00
Yann Gautier
293a4f3def feat(stm32mp2-fdts): add clock tree for STM32MP257F-EV1
Add dedicated RCC file to define clock tree and include it in
STM32MP257F-EV1 board DT file.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I259075f34d02534063c95fb571aec6ada480ce5f
2024-08-12 15:54:52 +02:00
Yann Gautier
381b2a6b02 feat(stm32mp2): display CPU info
Print information about CPU type, package and revision.
SoC revision ID of MP2 family are defined with the OTP 102.

Signed-off-by: Maxime Méré <maxime.mere@foss.st.com>
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I14a95c8a7cb9b06ce32c2e592ae69a1741067e8d
2024-08-12 15:54:52 +02:00
Yann Gautier
1dafb409ba feat(stm32mp2-fdts): add SD-card and eMMC support on STM32MP257F-EV1
Add sdmmc1 node to support SD-cards on STM32MP257F-EV1 board, and
sdmmc2 node for eMMC.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I375e35aa6a96719a69df976500915be51c395b00
2024-08-12 15:54:52 +02:00
Yann Gautier
6a85f6710f feat(stm32mp2-fdts): add sdmmc pins definition
Add the pins nodes for SD-card or eMMC. Those pins are used on
STM32MP257F-EV1 board.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I96fe8210502b073bc222a70453bee1863a257c7b
2024-08-12 15:54:52 +02:00
Yann Gautier
3879761fc2 feat(stm32mp2-fdts): add sdmmc nodes in SoC DT file
Add the sdmmc1 & sdmmc2 nodes in stm32mp251.dtsi file, to support
eMMC or SD-cards.
To avoid increasing DT size if SD-card or eMMC boot is not selected,
the nodes are removed from DT thanks to stm32mp25-bl2.dtsi overlay.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I2ed841442b7dddf0c441ae3b3d2462ef535f9951
2024-08-12 15:54:52 +02:00
Yann Gautier
53e89824aa feat(stm32mp2-fdts): add io_policies
This will be required for FCONF management on STM32MP2.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: If651a9aa36cdf415f570b2392daa08c198d629d2
2024-08-12 15:54:52 +02:00
Patrick Delaunay
a1a50ef1e2 feat(stm32mp2-fdts): remove pins-are-numbered
Remove the deprecated property "pins-are-numbered" from pinctrl and
pinctrl_z nodes of stm32mp25 soc to conform with the upstream series
of the link below.

Link: https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=69786

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: I1ed98c94c5003bc9903229957cb072da4211238f
2024-08-12 15:54:52 +02:00
Xialin Liu
479c833afc feat(arm): generate tbbr c file CoT dt2c
Integrate the cot-dt2c tool into build process
for TBBR configuration

Change-Id: I42ccbc96c5c8fd21266200e427306a80236a78aa
Signed-off-by: Xialin Liu <Xialin.Liu@ARM.com>
2024-08-07 08:46:30 +01:00
Xialin Liu
b6a95c4a80 refactor(st): align the NV counter naming
align the nv counter naming for stm32mp1-cot-descriptor.dtsi file

Change-Id: I8c41c5e323e8bf867e08b4590dfb42e86204ab65
Signed-off-by: Xialin Liu <Xialin.Liu@ARM.com>
2024-08-07 08:46:30 +01:00
Xialin Liu
04d02a9c0b refactor(fvp): align the NV counter naming
Align the naming of nv_counter to nv_ctr in the DTBs
so that they match with the static C files. Update the
binding documentation accordingly. This renaming is beneficial
for the upcoming conversion tool that will convert CoT DT files
to C files.

Change-Id: If65d51ad9fc6445b1ae9937f1691becf8742cf01
Signed-off-by: Xialin Liu <Xialin.Liu@ARM.com>
2024-08-07 08:46:30 +01:00
Jagdish Gediya
7aca660c4e fix(tc): correct CPU PMU binding
CPU PMU types are not same for all CPUs on TC platforms, so define the
PMU nodes per micro architectures.

Change-Id: I4e940976cdda9a6eab3e15936c6c41a2bb668c9d
Signed-off-by: Jagdish Gediya <jagdish.gediya@arm.com>
Signed-off-by: Leo Yan <leo.yan@arm.com>
2024-08-05 16:25:59 +01:00
Jagdish Gediya
77080f6aaf feat(tc): add device tree binding for SPE
Add node for Statistical Profiling Extension, which provides
periodic sampling of operations in the CPU pipeline and reports
this via the perf AUX interface.

Change-Id: Ic7a9d9ce927edbce02c7c09470a009dc56247240
Signed-off-by: Jagdish Gediya <jagdish.gediya@arm.com>
Signed-off-by: Leo Yan <leo.yan@arm.com>
2024-08-05 16:25:59 +01:00
Jagdish Gediya
ebc991b3a1 feat(tc): add PPI partitions in DT binding
Define ppi-partitions for little, middle, and big cpu groups. PPI
affinity is expressed as a single "ppi-partitions" node, containing a
set of sub-nodes for each microarchitecture type, each with the
property 'affinity' which should be a list of phandles to CPU nodes.

PPI paritions are useful to affine specific PPI with set of CPUs
so that the drivers of micro-architecture specific nodes which uses
PPI can be divided based on CPU list e.g. SPE-PMU, CPU-PMU etc.

Change-Id: If7d47f71387ac982d2d992a0ce2de1652d564bd6
Signed-off-by: Jagdish Gediya <jagdish.gediya@arm.com>
Signed-off-by: Leo Yan <leo.yan@arm.com>
2024-08-05 16:25:59 +01:00
Jagdish Gediya
1300bbce15 feat(tc): change GIC DT property 'interrupt-cells' to 4
Change the GIC's DT property 'interrupt-cells' to 4, so the 4th cell is
a phandle to a node describing a set of CPUs this interrupt is affine
to.

If an interrupt is a PPI, and the node pointed in the 4th cell must be a
subnode of the "ppi-partitions" in the GIC node. For interrupt types
other than PPI, this cell must be zero. This is a preparison for
sequential changes for interrupt partitions, as the first step, it sets
all zeros for the interrupt affinity.

Change-Id: I66490a86a27aad5db6b1a42c2d8e0d042eee46a9
Signed-off-by: Jagdish Gediya <jagdish.gediya@arm.com>
Signed-off-by: Leo Yan <leo.yan@arm.com>
2024-08-05 16:25:59 +01:00
Jagdish Gediya
169eb7daf2 feat(tc): add NI-Tower PMU node for TC3
Enable NI-Tower PMU on TC3.

Change-Id: I8a4d4e31e84ab33f95bc8b7661e873cf97561b79
Signed-off-by: Jagdish Gediya <jagdish.gediya@arm.com>
Signed-off-by: Leo Yan <leo.yan@arm.com>
2024-08-05 16:25:59 +01:00
Jagdish Gediya
d3ae67771d feat(tc): add DSU PMU node for tc3
Add DT binding for Arm DSU PMU node.

Change-Id: Iadfb5d3bb3f69c7a771516180d1c165e60eef51d
Signed-off-by: Jagdish Gediya <jagdish.gediya@arm.com>
Signed-off-by: Leo Yan <leo.yan@arm.com>
2024-07-23 15:34:25 +01:00
Manish V Badarkhe
b6b44e1fce Merge changes from topic "ip_smmu" into integration
* changes:
  feat(tc): bind SMMU-600 with the DPU on TC3 FPGA
  feat(tc): bind SMMU-700 with DPU on TC3
  refactor(tc): append binding for SMMU-700
2024-06-18 11:34:23 +02:00
Madhukar Pappireddy
78ff36192f Merge changes from topic "st_clk_update" into integration
* changes:
  feat(st-clock): use early traces
  fix(st-clock): adapt order of CSS on LSE and HSE
  refactor(st-clock): remove unused struct
  feat(stm32mp1-fdts): remove RTC clock configuration
  refactor(st-clock): move stm32mp1_clk_rcc_regs_*lock
  refactor(st-clock): driver size optimization
  refactor(st-clock): remove BL32 support on STM32MP13
  feat(st-clock): don't gate/ungate an oscillator if it is not wired
  feat(dt-bindings): add missing SPIx bus clocks
  feat(stm32mp1-fdts): remove PLL1 settings
  feat(st-clock): update with new bindings
  feat(stm32mp1-fdts): new RCC DT bindings for STM32MP1
  feat(dt-bindings): new RCC DT bindings
  feat(stm32mp1): always boot at 650MHz
  refactor(st-clock): remove LSEDRV_MEDIUM_HIGH for STM32MP13
  fix(st-clock): display proper PLL number for STM32MP13
  fix(st-clock): do not reconfigure LSE
  feat(stm32mp1-fdts): move RNG1 to CSI to improve random generation
  refactor(st-clock): remove unused clk function in API
  refactor(st-clock): support deactivated STGEN in stm32mp_stgen_config
  feat(st-clock): add function to restore generic timer rate
2024-06-14 15:20:22 +02:00
Manish V Badarkhe
93ffd7c3dc Merge changes from topic "us_mcn" into integration
* changes:
  feat(tc): configure MCN rdalloc and wralloc mode
  feat(tc): add dts entries for MCN PMU nodes
  feat(tc): enable MCN non-secure access to pmu counters on TC3
2024-06-14 12:18:50 +02:00
Manish Pandey
c4b215ff0b Merge changes from topic "dualroot_dtb" into integration
* changes:
  refactor(fvp): add CoT desc dtsi
  feat(arm): add COT_DESC_IN_DTB option for Dualroot
  feat(fvp): add Dualroot CoT in DTB support
  feat(dt-bindings): introduce Dualroot CoT DTB
2024-06-11 14:49:45 +02:00
Gabriel Fernandez
703a581e25 feat(stm32mp1-fdts): remove RTC clock configuration
RTC clock configuration is done now in OPTEE.
Note: The RTC clock source can only be configured once.
TF-A, configuring the RTC clock source will have no effect in OPTEE.

Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
Change-Id: I111ba96b27d0de0c45086ba8ef947dd2e6785672
2024-06-11 14:02:10 +02:00
Gabriel Fernandez
66d7c8bf8e feat(stm32mp1-fdts): remove PLL1 settings
TF-A BL2 always boot at 650MHz using an algorithm to calculate PLL1
settings, without reading DT. Remove the corresponding nodes.

Change-Id: I0003337d8d37df7b2a70a84b5475f4278c4c4669
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
2024-06-11 14:02:10 +02:00
Gabriel Fernandez
4391e5edea feat(stm32mp1-fdts): new RCC DT bindings for STM32MP1
RCC bindings alignment with MP13 RCC bindings

Change-Id: I02c89accd51e4214cd009d4a9433d8d9b6aeba25
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
2024-06-11 14:02:10 +02:00
Lionel Debieve
d594239d4e feat(stm32mp1-fdts): move RNG1 to CSI to improve random generation
LSI was too slow to provide enough random numbers (limited
to 6ms for 16 bytes production). Switch to CSI that allow
to get the RNG fifo ready in less than 50µs.

Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com>
Change-Id: I76d1fe58e2f4d5416a96f48123ae36bd82d8a8ee
2024-06-11 11:45:38 +02:00
Manish V Badarkhe
0909b52273 refactor(fdts): remove unused nodes from CoT device tree
Since the CoT device tree is intended solely for BL2, remove the
nodes that are not handled by BL2.

Change-Id: I977eec902f16de59743e97d15148d63934b7b863
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2024-06-05 14:04:00 +01:00
laurenw-arm
703df3a3ef feat(dt-bindings): introduce Dualroot CoT DTB
Add Dualroot CoT DTB, which allows Dualroot platforms to get their chain
of trust description from a configuration file, rather than hard-coding
it into the firmware source code itself.

Change-Id: I03af8f28ba7ad56b883ff5e7961500ffdb8c3957
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
2024-06-04 12:55:32 -05:00
Ben Horgan
4c6960ca40 feat(tc): bind SMMU-600 with the DPU on TC3 FPGA
The SMMU 600 is used on TC3 FPGA board with the display device, add the
device tree binding for it.

Change-Id: Iadf85873720ca47bbbda999aa7b18a9db98ae945
Signed-off-by: Ben Horgan <ben.horgan@arm.com>
Signed-off-by: Leo Yan <leo.yan@arm.com>
2024-06-04 15:13:51 +01:00
Jackson Cooper-Driver
0458d3acae feat(tc): bind SMMU-700 with DPU on TC3
TC3 adds a new SMMU-700 specifically for the DPU. This is used as the
DPU SMMU instead of the existing SMMU used for the DPU. Update the
device tree to reflect this.

Change-Id: I865140f8f53bceaa8849f6583190b240eeee0539
Signed-off-by: Jackson Cooper-Driver <jackson.cooper-driver@arm.com>
Signed-off-by: Leo Yan <leo.yan@arm.com>
2024-06-04 15:12:22 +01:00
Olivier Deprez
416aa42e55 Merge "feat(fvp): fdts: add stdout-path to the Foundation FVPs" into integration 2024-06-04 14:32:33 +02:00
Leo Yan
2458b38772 refactor(tc): append binding for SMMU-700
The usage for SMMU-700 is not consistent across TC platforms:

  SMMU-700 on TC2:

          | FVP   | FPGA
  --------+-------+------
  Display | Used  | Used
  GPU     | Used  | Used

  SMMU-700 on TC3:

          | FVP   | FPGA
  --------+-------+------
  Display | No    | No
  GPU     | Used  | No

This commit changes to use append mode for SMMU-700 to bind it on TC2
and TC3 separately. As a result, the TC_IOMMU_EN configuration is not
used, remove it.

Change-Id: Ic4152eb4c8ef97bf27b8a97c3c6cb86e32a2e8eb
Signed-off-by: Leo Yan <leo.yan@arm.com>
2024-06-04 13:31:27 +01:00
Jagdish Gediya
1401a42c95 feat(tc): add dts entries for MCN PMU nodes
TC3 has 4 MCN instances, each of them have PMU registers to count
different MCN cache access events, add entries for MCN PMU so that Linux
MCN PMU perf driver can be used with perf.

Change-Id: I7e0ac5025231c3f19d5291292d4cae186accc544
Signed-off-by: Jagdish Gediya <jagdish.gediya@arm.com>
Signed-off-by: Leo Yan <leo.yan@arm.com>
2024-06-04 11:24:51 +01:00
Manish V Badarkhe
a13449da37 Merge "feat(stm32mp15): remove OP-TEE shared mem" into integration 2024-06-03 09:50:20 +02:00
Manish V Badarkhe
6d5048f025 Merge "feat(tc): add default SLC policy for the gpu" into integration 2024-06-03 09:39:10 +02:00
Manish V Badarkhe
adf19215f9 Merge "feat(tc): support full-HD resolution for the FVP model" into integration 2024-06-03 09:39:01 +02:00