]> git.baikalelectronics.ru Git - arm-tf.git/log
arm-tf.git
3 years agofeat(bl31): aarch64: RESET_TO_BL31_WITH_PARAMS
Jorge Ramirez-Ortiz [Fri, 15 Apr 2022 09:46:47 +0000 (11:46 +0200)]
feat(bl31): aarch64: RESET_TO_BL31_WITH_PARAMS

It is not always the case that RESET_TO_BL31 enabled platforms don't
execute a bootloader before BL31.

For those use cases, being able to receive arguments from that first
loader (i.e: a DTB with TPM logs) might be necessary feature.

This code has been validated on iMX8mm.

Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Change-Id: Ibf00c3867cb1d1012b8b376e64ccaeca1c9d2bff

3 years agoMerge "fix(errata): workaround for Cortex-X2 erratum 2147715" into integration
Joanna Farley [Tue, 19 Apr 2022 15:07:49 +0000 (17:07 +0200)]
Merge "fix(errata): workaround for Cortex-X2 erratum 2147715" into integration

3 years agoMerge changes from topic "st_nvmem_layout" into integration
Manish Pandey [Tue, 19 Apr 2022 14:11:24 +0000 (16:11 +0200)]
Merge changes from topic "st_nvmem_layout" into integration

* changes:
  refactor(stm32mp1-fdts): remove nvmem_layout node
  refactor(stm32mp1): drop the "st,stm32-nvmem-layout" node
  refactor(st): remove useless includes

3 years agoMerge "refactor(ufs): delete unused variables" into integration
Manish Pandey [Tue, 19 Apr 2022 09:51:12 +0000 (11:51 +0200)]
Merge "refactor(ufs): delete unused variables" into integration

3 years agorefactor(ufs): delete unused variables
Jorge Troncoso [Thu, 14 Apr 2022 21:31:29 +0000 (14:31 -0700)]
refactor(ufs): delete unused variables

The result variable is not being used so it's better to delete it.

Signed-off-by: Jorge Troncoso <jatron@google.com>
Change-Id: Icae614076ce1ba7cdc86267473d59a8bec682f6c

3 years agoMerge "refactor(context mgmt): add cm_prepare_el3_exit_ns function" into integration
Joanna Farley [Tue, 12 Apr 2022 15:44:52 +0000 (17:44 +0200)]
Merge "refactor(context mgmt): add cm_prepare_el3_exit_ns function" into integration

3 years agoMerge "refactor(mpam): remove initialization of EL2 registers when EL2 is used" into...
Joanna Farley [Tue, 12 Apr 2022 15:44:41 +0000 (17:44 +0200)]
Merge "refactor(mpam): remove initialization of EL2 registers when EL2 is used" into integration

3 years agoMerge "refactor(context mgmt): refactor the cm_setup_context function" into integration
Joanna Farley [Tue, 12 Apr 2022 15:44:31 +0000 (17:44 +0200)]
Merge "refactor(context mgmt): refactor the cm_setup_context function" into integration

3 years agoMerge "refactor(context mgmt): remove registers accessible only from secure state...
Joanna Farley [Tue, 12 Apr 2022 15:44:00 +0000 (17:44 +0200)]
Merge "refactor(context mgmt): remove registers accessible only from secure state from EL2 context" into integration

3 years agorefactor(context mgmt): add cm_prepare_el3_exit_ns function
Zelalem Aweke [Mon, 31 Jan 2022 22:59:42 +0000 (16:59 -0600)]
refactor(context mgmt): add cm_prepare_el3_exit_ns function

As part of the RFC:
https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/13651,
this patch adds the 'cm_prepare_el3_exit_ns' function. The function is
a wrapper to 'cm_prepare_el3_exit' function for Non-secure state.

When EL2 sysregs context exists (CTX_INCLUDE_EL2_REGS is
enabled) EL1 and EL2 sysreg values are restored from the context
instead of directly updating the registers.

Signed-off-by: Zelalem Aweke <zelalem.aweke@arm.com>
Change-Id: I9b071030576bb05500d54090e2a03b3f125d1653

3 years agorefactor(mpam): remove initialization of EL2 registers when EL2 is used
Zelalem Aweke [Wed, 2 Feb 2022 21:29:13 +0000 (15:29 -0600)]
refactor(mpam): remove initialization of EL2 registers when EL2 is used

The patch removes initialization of MPAM EL2 registers when an EL2
software exists. The patch assumes the EL2 software will perform
the necessary initializations of the registers.

Signed-off-by: Zelalem Aweke <zelalem.aweke@arm.com>
Change-Id: I5bed81bc22f417bc3e3cbbcd860a8553cd4307cd

3 years agorefactor(context mgmt): refactor the cm_setup_context function
Zelalem Aweke [Wed, 5 Jan 2022 23:12:24 +0000 (17:12 -0600)]
refactor(context mgmt): refactor the cm_setup_context function

This patch splits the function 'cm_setup_context' into four
functions to make it more readable and easier to maintain.

The function is split into the following functions based on
the security state of the context.

 - setup_context_common - performs common initializations
 - setup_secure_context - performs Secure state specific
  initializations
 - setup_realm_context - performs Realm state specific
 initializations
 - setup_ns_context - performs Non-secure state specific
      initializations

Signed-off-by: Zelalem Aweke <zelalem.aweke@arm.com>
Change-Id: Ie14a1c2fc6586087e7aa36537cf9064c80802f8f

3 years agorefactor(context mgmt): remove registers accessible only from secure state from EL2...
Zelalem Aweke [Wed, 3 Nov 2021 18:31:53 +0000 (13:31 -0500)]
refactor(context mgmt): remove registers accessible only from secure state from EL2 context

The following registers are only accessible from secure state,
therefore don't need to be saved/restored during world switch.
 - SDER32_EL2
 - VSTCR_EL2
 - VSTTBR_EL2

This patch removes these registers from EL2 context.

Signed-off-by: Zelalem Aweke <zelalem.aweke@arm.com>
Change-Id: I24d08aacb1b6def261c7b37d3e1265bb76adafdc

3 years agoMerge "chore(measured boot): remove unused DTC flags" into integration
Lauren Wehrmeister [Tue, 12 Apr 2022 15:19:01 +0000 (17:19 +0200)]
Merge "chore(measured boot): remove unused DTC flags" into integration

3 years agoMerge "style(plat/arm/corstone1000): resolve checkpatch warnings" into integration
Sandrine Bailleux [Tue, 12 Apr 2022 15:17:14 +0000 (17:17 +0200)]
Merge "style(plat/arm/corstone1000): resolve checkpatch warnings" into integration

3 years agofix(errata): workaround for Cortex-X2 erratum 2147715
Bipin Ravi [Tue, 8 Mar 2022 16:37:43 +0000 (10:37 -0600)]
fix(errata): workaround for Cortex-X2 erratum 2147715

Cortex-X2 erratum 2147715 is a Cat B erratum that applies to revision
r2p0 and is fixed in r2p1. The workaround is to set CPUACTLR_EL1[22]=1,
which will cause the CFP instruction to invalidate all branch predictor
resources regardless of context.

SDEN can be found here:
https://developer.arm.com/documentation/SDEN1775100/latest

Signed-off-by: Bipin Ravi <bipin.ravi@arm.com>
Change-Id: I2d81867486d9130f2c36cd4554ca9a8f37254b57

3 years agoMerge "refactor(arm): use MBEDTLS_CONFIG_FILE macro" into integration
Sandrine Bailleux [Mon, 11 Apr 2022 12:33:04 +0000 (14:33 +0200)]
Merge "refactor(arm): use MBEDTLS_CONFIG_FILE macro" into integration

3 years agorefactor(arm): use MBEDTLS_CONFIG_FILE macro
Manish V Badarkhe [Mon, 21 Feb 2022 09:43:49 +0000 (09:43 +0000)]
refactor(arm): use MBEDTLS_CONFIG_FILE macro

Used MBEDTLS_CONFIG_FILE macro for including mbedTLS
configuration.

Signed-off-by: Manish V Badarkhe <manish.badarkhe@arm.com>
Change-Id: I374b59a31df3ab1e69481b2c37a6f7455a106b6e

3 years agoMerge "refactor(corstone700): namespace MHU driver filenames" into integration
Sandrine Bailleux [Mon, 11 Apr 2022 10:47:08 +0000 (12:47 +0200)]
Merge "refactor(corstone700): namespace MHU driver filenames" into integration

3 years agoMerge changes I573e6478,I52dc3bee,I7e543664 into integration
Manish Pandey [Fri, 8 Apr 2022 12:42:45 +0000 (14:42 +0200)]
Merge changes I573e6478,I52dc3bee,I7e543664 into integration

* changes:
  feat(gic600ae_fmu): enable all GICD, PPI, ITS SMs
  feat(gic600ae_fmu): disable SMID for unavailable blocks
  feat(gic600ae_fmu): introduce support for RAS error handling

3 years agochore(measured boot): remove unused DTC flags
Sandrine Bailleux [Fri, 8 Apr 2022 08:25:41 +0000 (10:25 +0200)]
chore(measured boot): remove unused DTC flags

We no longer need to pass special flags to the device tree compiler
for measured boot. These are a left over from the days where we used
to pass BL2 measurement to BL2 image via TB_FW configuration file.

This should have been removed as part of commit eab78e9ba4e36da27
("refactor(measured_boot): remove passing of BL2 hash via device
tree") but was missed at the time.

Change-Id: Iced7e60af7ca660c342c0fc3a33b51865d67f04d
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
3 years agoMerge "build(changelog): add new scope for TI platform" into integration
Manish Pandey [Thu, 7 Apr 2022 15:44:31 +0000 (17:44 +0200)]
Merge "build(changelog): add new scope for TI platform" into integration

3 years agofeat(gic600ae_fmu): enable all GICD, PPI, ITS SMs
Varun Wadekar [Wed, 26 Jan 2022 08:33:02 +0000 (00:33 -0800)]
feat(gic600ae_fmu): enable all GICD, PPI, ITS SMs

The following SMIDs are disabled by default.

* GICD: MBIST REQ error and GICD FMU ClkGate override
* PPI: MBIST REQ error and PPI FMU ClkGate override
* ITS: MBIST REQ error and ITS FMU ClkGate override

This patch explicitly enables them during the FMU init sequence.

Change-Id: I573e64786e3318d4cbcd07d0a1caf25f8e6e9200
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
3 years agoMerge changes from topic "jc/detect_feat" into integration
Manish Pandey [Thu, 7 Apr 2022 13:19:04 +0000 (15:19 +0200)]
Merge changes from topic "jc/detect_feat" into integration

* changes:
  docs(build): update the feature enablement flags
  refactor(el3-runtime): replace ARM_ARCH_AT_LEAST macro with FEAT flags
  refactor(el3-runtime): add arch-features detection mechanism

3 years agoMerge changes from topic "mapping" into integration
Manish Pandey [Thu, 7 Apr 2022 12:55:58 +0000 (14:55 +0200)]
Merge changes from topic "mapping" into integration

* changes:
  feat(debug): update print_memory_map.py
  feat(bl_common): add XLAT tables symbols in linker script

3 years agofeat(debug): update print_memory_map.py
Yann Gautier [Mon, 4 Apr 2022 16:22:45 +0000 (18:22 +0200)]
feat(debug): update print_memory_map.py

Add some entries in blx_symbols, that are used when the flag
SEPARATE_CODE_AND_RODATA is not enabled (__RO_* and __TEXT_RESIDENT_*).
Add all new symbols that were not yet present in the script.
Correct __BSS_END to __BSS_END__, and add __BSS_START__.
Add new *_XLAT_TABLE_* symbols.
As those strings are longer than 22, update display format string to
be dependent on the longest string.
The script also skips lines for which the _START__ and _END__
symbols have the same address (empty sections).

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: I6c510ced6116b35d14ee2cb7a6711405604380d6

3 years agofeat(gic600ae_fmu): disable SMID for unavailable blocks
Varun Wadekar [Tue, 25 Jan 2022 11:39:28 +0000 (03:39 -0800)]
feat(gic600ae_fmu): disable SMID for unavailable blocks

This patch updates the gic600_fmu_init function to disable all safety
mechanisms for a block ID that is not present on the platform. All
safety mechanisms for GIC-600AE are enabled by default and should be
disabled for blocks that are not present on the platform to avoid
false positive RAS errors.

Change-Id: I52dc3bee9a8b49fd2e51d7ed851fdc803a48e6e3
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
3 years agofeat(bl_common): add XLAT tables symbols in linker script
Yann Gautier [Tue, 5 Apr 2022 08:53:18 +0000 (10:53 +0200)]
feat(bl_common): add XLAT tables symbols in linker script

Add __BASE_XLAT_TABLE_START__/_END__ and __XLAT_TABLE_START__/_END__
symbols in the linker script to have them in the .map file.
This allows displaying those areas when running memory map script.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I768a459c5cecc403a9b81b36a71397ecc3179f4f

3 years agofeat(gic600ae_fmu): introduce support for RAS error handling
Varun Wadekar [Mon, 24 Jan 2022 13:45:15 +0000 (05:45 -0800)]
feat(gic600ae_fmu): introduce support for RAS error handling

The GIC-600AE uses a range of RAS features for all RAMs, which include
SECDED, ECC, and Scrub, software and bus error reporting. The GIC makes
all necessary information available to software through Armv8.2 RAS
architecture compliant register space.

This patch introduces support to probe the FMU_ERRGSR register to find
the right error record. Once the correct record is identified, the
"handler" function queries the FMU_ERR<m>STATUS register to further
identify the block ID, safety mechanism and the architecturally defined
primary error code. The description of the error is displayed on the
console to simplify debug.

Change-Id: I7e543664b74457afee2da250549f4c3d9beb1a03
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
3 years agodocs(build): update the feature enablement flags
Jayanth Dodderi Chidanand [Mon, 28 Feb 2022 23:41:41 +0000 (23:41 +0000)]
docs(build): update the feature enablement flags

Adding the newly introduced build flags for feature enablement of the
following features:
1.FEAT_AMUv1p1 - ENABLE_FEAT_AMUv1p1
2.FEAT_CSV2_2  - ENABLE_FEAT_CSV2_2
3.FEAT_VHE     - ENABLE_FEAT_VHE
4.FEAT_DIT     - ENABLE_FEAT_DIT
5.FEAT_SB      - ENABLE_FEAT_SB
6.FEAT_SEL2    - ENABLE_FEAT_SEL2

Also as part of feature detection mechanism, we now support three
states for each of these features, allowing the flags to take either
(0 , 1 , 2) values. Henceforth the existing feature build options are
converted from boolean to numeric type and is updated accordingly
in this patch.

The build flags take a default value and will be internally enabled
when they become mandatory from a particular architecture version
and upwards. Platforms have the flexibility to overide this
internal enablement via this feature specific explicit build flags.

Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
Change-Id: I0090c8c780c2e7d1a50ed9676983fe1df7a35e50

3 years agoMerge "fix(st): remove extra chars from dtc version" into integration
Manish Pandey [Tue, 5 Apr 2022 09:31:14 +0000 (11:31 +0200)]
Merge "fix(st): remove extra chars from dtc version" into integration

3 years agofix(st): remove extra chars from dtc version
Yann Gautier [Mon, 28 Mar 2022 11:37:01 +0000 (13:37 +0200)]
fix(st): remove extra chars from dtc version

In some implementations of dtc tool (e.g. with yocto), there can be a 'v'
at the beginning of the version, and a '+' at the end. Just keep numbers
then, with a grep -o.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I180e97ab75ba3e5ceacb4b1961a1f22788b428a3

3 years agorefactor(el3-runtime): replace ARM_ARCH_AT_LEAST macro with FEAT flags
Jayanth Dodderi Chidanand [Wed, 26 Jan 2022 17:14:43 +0000 (17:14 +0000)]
refactor(el3-runtime): replace ARM_ARCH_AT_LEAST macro with FEAT flags

Replacing ARM_ARCH_AT_LEAST macro with feature specific build options
to prevent unconditional accesses to the registers during context save
and restore routines.

Registers are tightly coupled with features more than architecture
versions. Henceforth having a feature-specific build flag guarding the
respective registers, will restrict any undefined actions.

Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
Change-Id: I809774df580530803c8a6e05a62d8d4de0910e02

3 years agorefactor(el3-runtime): add arch-features detection mechanism
Jayanth Dodderi Chidanand [Mon, 17 Jan 2022 18:57:17 +0000 (18:57 +0000)]
refactor(el3-runtime): add arch-features detection mechanism

This patch adds architectural features detection procedure to ensure
features enabled are present in the given hardware implementation.

It verifies whether the architecture build flags passed during
compilation match the respective features by reading their ID
registers. It reads through all the enabled feature specific ID
registers at once and panics in case of mismatch(feature enabled
but not implemented in PE).

Feature flags are used at sections (context_management,
save and restore routines of registers) during context switch.
If the enabled feature flag is not supported by the PE, it causes an
exception while saving or restoring the registers guarded by them.

With this mechanism, the build flags are validated at an early
phase prior to their usage, thereby preventing any undefined action
under their control.

This implementation is based on tristate approach for each feature and
currently FEAT_STATE=0 and FEAT_STATE=1 are covered as part of this
patch. FEAT_STATE=2 is planned for phase-2 implementation and will be
taken care separately.

The patch has been explicitly tested, by adding a new test_config
with build config enabling majority of the features and detected
all of them under FVP launched with parameters enabling v8.7 features.

Note: This is an experimental procedure and the mechanism itself is
      guarded by a macro "FEATURE_DETECTION", which is currently being
      disabled by default.

The "FEATURE_DETECTION" macro is documented and the platforms are
encouraged to make use of this diagnostic tool by enabling this
"FEATURE_DETECTION" flag explicitly and get used to its behaviour
during booting before the procedure gets mandated.

Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
Change-Id: Ia23d95430fe82d417a938b672bfb5edc401b0f43

3 years agorefactor(corstone700): namespace MHU driver filenames
Sandrine Bailleux [Fri, 18 Mar 2022 11:44:27 +0000 (12:44 +0100)]
refactor(corstone700): namespace MHU driver filenames

There are plans to contribute a generic MHU driver to the TF-A code
base in the short term.

In preparation for this, rename the Corstone-700 MHU driver source
files and prefix them with the name of the platform to avoid any
ambiguity or name clashes with the upcoming generic MHU driver. Also
rename the header guard accordingly.

This renaming is inline with other platform-specific MHU drivers, such
as the ones used on Broadcom [1], Socionext [2] or Amlogic [3] platforms.

[1] plat/brcm/common/brcm_mhu.h
[2] plat/socionext/synquacer/drivers/mhu/sq_mhu.h
[3] plat/amlogic/common/aml_mhu.c

Change-Id: I8a5e5b16e7c19bf931a90422dfca8f6a2a0663b4
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
3 years agostyle(plat/arm/corstone1000): resolve checkpatch warnings
David Vincze [Thu, 3 Mar 2022 13:35:51 +0000 (14:35 +0100)]
style(plat/arm/corstone1000): resolve checkpatch warnings

Change-Id: Ic8cb9b0834806675c792018e809d7ba77fbe856f
Signed-off-by: David Vincze <david.vincze@arm.com>
3 years agoMerge changes I84e257b3,I1317e482 into integration
Joanna Farley [Wed, 30 Mar 2022 07:38:52 +0000 (09:38 +0200)]
Merge changes I84e257b3,I1317e482 into integration

* changes:
  fix(layerscape): fix coverity issue
  fix(nxp-ddr): fix coverity issue

3 years agofix(layerscape): fix coverity issue
Jiafei Pan [Tue, 29 Mar 2022 07:01:09 +0000 (15:01 +0800)]
fix(layerscape): fix coverity issue

Check return value of mmap_add_dynamic_region().

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: I84e257b3052371e18af158c3254f42a1bae0da10

3 years agoMerge "fix(scmi): use same type for message_id" into integration
Joanna Farley [Tue, 29 Mar 2022 15:01:48 +0000 (17:01 +0200)]
Merge "fix(scmi): use same type for message_id" into integration

3 years agofix(nxp-ddr): fix coverity issue
Jiafei Pan [Tue, 29 Mar 2022 06:43:12 +0000 (14:43 +0800)]
fix(nxp-ddr): fix coverity issue

Check return value of mmap_add_dynamic_region().

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: I1317e4822f3da329185d54005f08047872b5cdce

3 years agoMerge changes Ic1796898,I93bd392a into integration
Joanna Farley [Mon, 28 Mar 2022 22:21:37 +0000 (00:21 +0200)]
Merge changes Ic1796898,I93bd392a into integration

* changes:
  fix(errata): workaround for Cortex A78 AE erratum 2395408
  fix(errata): workaround for Cortex A78 AE erratum 2376748

3 years agoMerge changes from topic "rme-attest" into integration
Soby Mathew [Mon, 28 Mar 2022 16:32:27 +0000 (18:32 +0200)]
Merge changes from topic "rme-attest" into integration

* changes:
  feat(rme): add dummy realm attestation key to RMMD
  feat(rme): add dummy platform token to RMMD

3 years agorefactor(stm32mp1-fdts): remove nvmem_layout node
Patrick Delaunay [Fri, 4 Mar 2022 10:34:09 +0000 (11:34 +0100)]
refactor(stm32mp1-fdts): remove nvmem_layout node

Remove the nvmem_layout node with compatible "st,stm32-nvmem-layout"
no more used in TF-A code to simplify the device tree.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: I3748b20b7d3c60ee64ead15541fac1fd12656600

3 years agorefactor(stm32mp1): drop the "st,stm32-nvmem-layout" node
Patrick Delaunay [Tue, 1 Mar 2022 08:56:03 +0000 (09:56 +0100)]
refactor(stm32mp1): drop the "st,stm32-nvmem-layout" node

Simplify the DT parsing by removing the parsing of the nvmem layout node
with "st,stm32-nvmem-layout" compatible.

The expected OTP NAME can directly be found in a sub-node named
NAME@ADDRESS of the BSEC node, the NVMEM provider node.

This patch also removes this specific binding introduced for TF-A.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: Ic703385fad1bec5bef1cee583fbe9fbbf6aea216

3 years agorefactor(st): remove useless includes
Yann Gautier [Mon, 21 Mar 2022 16:58:32 +0000 (17:58 +0100)]
refactor(st): remove useless includes

The stm32mp_dt.c file does not need anything from DDR header files.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: Ibfe23204d68ee2e863cd2eda3d725baa830b729a

3 years agoMerge changes from topics "ls1088a", "ls1088a-prepare" into integration
Joanna Farley [Mon, 28 Mar 2022 15:40:59 +0000 (17:40 +0200)]
Merge changes from topics "ls1088a", "ls1088a-prepare" into integration

* changes:
  docs(layerscape): add ls1088a soc and board support
  feat(ls1088aqds): add ls1088aqds board support
  feat(ls1088ardb): add ls1088ardb board support
  feat(ls1088a): add new SoC platform ls1088a
  build(changelog): add new scopes for ls1088a
  feat(bl2): add support to separate no-loadable sections
  refactor(layerscape): refine comparison of inerconnection
  feat(layerscape): add soc helper macro definition for chassis 3
  feat(nxp-gic): add some macros definition for gicv3
  feat(layerscape): add CHASSIS 3 support for tbbr
  feat(layerscape): define more chassis 3 hardware address
  feat(nxp-crypto): add chassis 3 support
  feat(nxp-dcfg): add Chassis 3 support
  feat(lx2): enable DDR erratas for lx2 platforms
  feat(layerscape): print DDR errata information
  feat(nxp-ddr): add workaround for errata A050958
  feat(layerscape): add new soc errata a010539 support
  feat(layerscape): add new soc errata a009660 support
  feat(nxp-ddr): add rawcard 1F support
  fix(layerscape): fix build issue of mmap_add_ddr_region_dynamically
  fix(nxp-tools): fix create_pbl print log
  build(changelog): add new scopes for NXP driver

3 years agofeat(rme): add dummy realm attestation key to RMMD
Soby Mathew [Tue, 22 Mar 2022 16:21:19 +0000 (16:21 +0000)]
feat(rme): add dummy realm attestation key to RMMD

Add a dummy realm attestation key to RMMD, and return it on request.
The realm attestation key is requested with an SMC with the following
parameters:
    * Fid (0xC400001B2).
    * Attestation key buffer PA (the realm attestation key is copied
      at this address by the monitor).
    * Attestation key buffer length as input and size of realm
      attesation key as output.
    * Type of elliptic curve.

Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Signed-off-by: Subhasish Ghosh <subhasish.ghosh@arm.com>
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Change-Id: I12d8d98fd221f4638ef225c9383374ddf6e65eac

3 years agoMerge "fix(fwu): rename is_fwu_initialized" into integration
Manish Pandey [Mon, 28 Mar 2022 11:59:23 +0000 (13:59 +0200)]
Merge "fix(fwu): rename is_fwu_initialized" into integration

3 years agoMerge "docs(maintainers): add the new maintainer for MediaTek SoCs" into integration
Manish Pandey [Mon, 28 Mar 2022 10:41:46 +0000 (12:41 +0200)]
Merge "docs(maintainers): add the new maintainer for MediaTek SoCs" into integration

3 years agodocs(maintainers): add the new maintainer for MediaTek SoCs
Rex-BC Chen [Mon, 28 Mar 2022 03:06:21 +0000 (11:06 +0800)]
docs(maintainers): add the new maintainer for MediaTek SoCs

Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Change-Id: Ia9409127e91e55726db0856e3f13f009d3c7c866

3 years agofix(fwu): rename is_fwu_initialized
Sebastien Pasdeloup [Tue, 1 Mar 2022 13:13:21 +0000 (14:13 +0100)]
fix(fwu): rename is_fwu_initialized

The variable is_fwu_initialized was initialized after
plat_fwu_set_images_source() is called.
But some functions called by plat_fwu_set_images_source() for STM32MP1
implementation expect is_fwu_initialized is set to true with asserts.
Rename is_fwu_initialized to is_metadata_initialized, and set it before
plat_fwu_set_images_source() is called.

Change-Id: I17c6ee6293dfa55385b0c859db442647f0bebaed
Signed-off-by: Sebastien Pasdeloup <sebastien.pasdeloup-ext@st.com>
Signed-off-by: Yann Gautier <yann.gautier@st.com>
3 years agodocs(layerscape): add ls1088a soc and board support
Jiafei Pan [Thu, 24 Feb 2022 08:18:21 +0000 (16:18 +0800)]
docs(layerscape): add ls1088a soc and board support

Update document for nxp-layerscape to add ls1088a SoC and ls1088ardb,
update maintainer of ls1088a platforms.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: Ic7fdc7b1bbf22e50646991093366a88ee523ffe3

3 years agofeat(ls1088aqds): add ls1088aqds board support
Jiafei Pan [Fri, 18 Feb 2022 07:27:45 +0000 (15:27 +0800)]
feat(ls1088aqds): add ls1088aqds board support

Add QDS support for ls1088a.

Signed-off-by: Ruchika Gupta <ruchika.gupta@nxp.com>
Signed-off-by: York Sun <york.sun@nxp.com>
Signed-off-by: Pankaj Gupta <pankaj.gupta@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: I6c7a7a23fa6b9ba01c011a7e6237f8063d45e261

3 years agofeat(ls1088ardb): add ls1088ardb board support
Jiafei Pan [Fri, 18 Feb 2022 07:27:01 +0000 (15:27 +0800)]
feat(ls1088ardb): add ls1088ardb board support

The LS1088A reference design board provides a comprehensive platform
that enables design and evaluation of the product (LS1088A processor).

Signed-off-by: Ruchika Gupta <ruchika.gupta@nxp.com>
Signed-off-by: York Sun <york.sun@nxp.com>
Signed-off-by: Pankaj Gupta <pankaj.gupta@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: If4ca24fcee7a4c2c514303853955f1b00298c0e5

3 years agofeat(ls1088a): add new SoC platform ls1088a
Jiafei Pan [Fri, 18 Feb 2022 07:26:08 +0000 (15:26 +0800)]
feat(ls1088a): add new SoC platform ls1088a

LS1088A is a cost-effective, powerefficient, and highly integrated
SoC device featuring eight extremely power-efficient 64-bit ARM
Cortex-A53 cores with ECC-protected L1 and L2 cache memories for
high reliability, running up to 1.6 GHz.

This patch is to add ls1088a SoC support in TF-A.

Signed-off-by: Ruchika Gupta <ruchika.gupta@nxp.com>
Signed-off-by: rocket <rod.dorris@nxp.com>
Signed-off-by: Pankaj Gupta <pankaj.gupta@nxp.com>
Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: Id9ebcdad1beab07ea81a41955edd4f471d6cf090

3 years agobuild(changelog): add new scopes for ls1088a
Jiafei Pan [Thu, 24 Feb 2022 08:00:35 +0000 (16:00 +0800)]
build(changelog): add new scopes for ls1088a

Add new scopes for ls1088a SoC, RDB and QDS boards.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: I7c0018ecee3c590253cf258851a28c4dd7f9c1a1

3 years agofeat(bl2): add support to separate no-loadable sections
Jiafei Pan [Thu, 24 Feb 2022 02:47:33 +0000 (10:47 +0800)]
feat(bl2): add support to separate no-loadable sections

Add new options SEPARATE_BL2_NOLOAD_REGION to separate no-loadable
sections (.bss, stack, page tables) to a ram region specified
by BL2_NOLOAD_START and BL2_NOLOAD_LIMIT.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: I844ee0fc405474af0aff978d292c826fbe0a82fd

3 years agorefactor(layerscape): refine comparison of inerconnection
Biwen Li [Mon, 8 Mar 2021 03:42:11 +0000 (11:42 +0800)]
refactor(layerscape): refine comparison of inerconnection

Refine the code to be compatible with new CCN504 which is used
by ls2088a.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: I2e2b3bbb9392862b04bf8a89dfb9575bf4be974a

3 years agofeat(layerscape): add soc helper macro definition for chassis 3
Jiafei Pan [Fri, 18 Feb 2022 07:29:47 +0000 (15:29 +0800)]
feat(layerscape): add soc helper macro definition for chassis 3

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: I27b3a1f597de84dc2a007798e54eb919c877281a

3 years agofeat(nxp-gic): add some macros definition for gicv3
Biwen Li [Sun, 17 Jan 2021 06:30:33 +0000 (14:30 +0800)]
feat(nxp-gic): add some macros definition for gicv3

Add macros as follows,
    - GICD_ISENABLER_1
    - GICD_ISENABLER_3
    - GICD_ICENABLER_1
    - GICD_ICENABLER_3

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: Ia522ab4bc496d9a47613a49829b65db96e2b1279

3 years agofeat(layerscape): add CHASSIS 3 support for tbbr
Biwen Li [Tue, 5 Jan 2021 10:15:48 +0000 (18:15 +0800)]
feat(layerscape): add CHASSIS 3 support for tbbr

Support CHASSIS 3.0(such as SoC LS1088A).

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: I60843bc4d604f0de1d91c6d3ad5eb4921cdcc91a

3 years agofeat(layerscape): define more chassis 3 hardware address
Jiafei Pan [Fri, 18 Feb 2022 07:24:27 +0000 (15:24 +0800)]
feat(layerscape): define more chassis 3 hardware address

Add base address definiton for Chassis 3 platforms.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: I6041b93c9e9bb49af60743bd277ac7cc6f1b9da8

3 years agofeat(nxp-crypto): add chassis 3 support
Jiafei Pan [Fri, 18 Feb 2022 07:22:37 +0000 (15:22 +0800)]
feat(nxp-crypto): add chassis 3 support

Add Chassis 3 support for CAAM driver.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: Ied26dd3881489a03017a45966888a61a0813492c

3 years agofeat(nxp-dcfg): add Chassis 3 support
Biwen Li [Tue, 5 Jan 2021 06:58:57 +0000 (14:58 +0800)]
feat(nxp-dcfg): add Chassis 3 support

Add support for Chassis 3.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: I85cf68d4f1db81bf344e34dce13799ae173aa23a

3 years agofeat(lx2): enable DDR erratas for lx2 platforms
Jiafei Pan [Fri, 18 Feb 2022 10:43:44 +0000 (18:43 +0800)]
feat(lx2): enable DDR erratas for lx2 platforms

Enable DDR erratas for lx2 platforms.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: Ia2cf6ed077acf81882247153ec38bda708a6f007

3 years agofeat(layerscape): print DDR errata information
Jiafei Pan [Fri, 18 Feb 2022 10:45:37 +0000 (18:45 +0800)]
feat(layerscape): print DDR errata information

Print Errata information in debug mode.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: I70d6baa4dc3ffd79fedbc827555268d8f06605c7

3 years agofeat(nxp-ddr): add workaround for errata A050958
Pankit Garg [Tue, 13 Jul 2021 08:10:06 +0000 (13:40 +0530)]
feat(nxp-ddr): add workaround for errata A050958

Set the receiver gain to max value to recover
cold temp marginality issue for phy-gen2

Signed-off-by: Pankit Garg <pankit.garg@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: If639fa3ed404cf6e1b8abcc2b7137db1fdd0b2c2

3 years agofeat(layerscape): add new soc errata a010539 support
Jiafei Pan [Fri, 18 Feb 2022 10:32:18 +0000 (18:32 +0800)]
feat(layerscape): add new soc errata a010539 support

Add new soc errata a010539 support.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: Idbd8caaac12da8ab4f39dc0019cb656bcf4f3401

3 years agofeat(layerscape): add new soc errata a009660 support
Jiafei Pan [Fri, 18 Feb 2022 10:30:05 +0000 (18:30 +0800)]
feat(layerscape): add new soc errata a009660 support

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: Ice37155d971dec5c610026043e34b64f761fc1b7

3 years agofeat(nxp-ddr): add rawcard 1F support
Maninder Singh [Tue, 15 Jun 2021 05:36:38 +0000 (22:36 -0700)]
feat(nxp-ddr): add rawcard 1F support

New UDIMM 18ADF2G72AZ-2G6E1 has raw card ID = 0x1F

Also, changing mask for raw card ID from - 0x8f -> 0x9f

Changing the mask need the raw card to changed from 0x0f -> 0x1f

Signed-off-by: Maninder Singh <maninder.singh_1@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: Iee8e732ebc5e09cdca6917be608f1597c7edd9f9

3 years agofix(layerscape): fix build issue of mmap_add_ddr_region_dynamically
Biwen Li [Mon, 11 Jan 2021 03:11:44 +0000 (11:11 +0800)]
fix(layerscape): fix build issue of mmap_add_ddr_region_dynamically

Fix build issue of mmap_add_ddr_region_dynamically():
ls_bl2_el3_setup.c:(.text.bl2_plat_preload_setup+0x28): undefined
reference to mmap_add_ddr_region_dynamically

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: I74a8b4c2337fc0646d6acb16ce61755c5efbdf38

3 years agofix(nxp-tools): fix create_pbl print log
Biwen Li [Wed, 6 Jan 2021 05:56:58 +0000 (13:56 +0800)]
fix(nxp-tools): fix create_pbl print log

Replace bl2_offset with bl2_loc, and fix byte-swapping for
Chassis2 SoC(s) only.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: Ieb5fd6468178325bfb6fb89b6c31c75cd9030363

3 years agobuild(changelog): add new scopes for NXP driver
Jiafei Pan [Tue, 22 Feb 2022 03:05:00 +0000 (11:05 +0800)]
build(changelog): add new scopes for NXP driver

Add new scope for NXP DDR drivers and GIC drivers.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: I8ff4d203c474593fe2cff846e0040fc8651b20b6

3 years agofeat(rme): add dummy platform token to RMMD
Soby Mathew [Tue, 22 Mar 2022 16:19:39 +0000 (16:19 +0000)]
feat(rme): add dummy platform token to RMMD

Add a dummy platform token to RMMD and return it on request. The
platform token is requested with an SMC with the following parameters:
    * Fid (0xC40001B3).
    * Platform token PA (the platform token is copied at this address by
      the monitor). The challenge object needs to be passed by
      the caller in this buffer.
    * Platform token len.
    * Challenge object len.

When calling the SMC, the platform token buffer received by EL3 contains
the challenge object. It is not used on the FVP and is only printed to
the log.

Signed-off-by: Mate Toth-Pal <mate.toth-pal@arm.com>
Signed-off-by: Subhasish Ghosh <subhasish.ghosh@arm.com>
Change-Id: I8b2f1d54426c04e76d7a3baa6b0fbc40b0116348

3 years agoMerge "refactor(rme): reorg existing RMMD EL3 service FIDs" into integration
Soby Mathew [Fri, 25 Mar 2022 16:45:54 +0000 (17:45 +0100)]
Merge "refactor(rme): reorg existing RMMD EL3 service FIDs" into integration

3 years agorefactor(rme): reorg existing RMMD EL3 service FIDs
Soby Mathew [Tue, 22 Mar 2022 13:58:52 +0000 (13:58 +0000)]
refactor(rme): reorg existing RMMD EL3 service FIDs

This patch reworks the GTSI service implementation in RMMD
such that it is made internal to RMMD. This rework also
lays the ground work for additional RMMD services which
can be invoked from RMM.

The rework renames some of the FID macros to make it
more suited for adding more RMMD services. All the RMM-EL31
service SMCs are now routed via rmmd_rmm_el3_handler().

Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Change-Id: Ic52ca0f33b79a1fd1deefa8136f9586b088b2e07

3 years agofix(errata): workaround for Cortex A78 AE erratum 2395408
Varun Wadekar [Wed, 9 Mar 2022 22:20:32 +0000 (22:20 +0000)]
fix(errata): workaround for Cortex A78 AE erratum 2395408

Cortex A78 AE erratum 2395408 is a Cat B erratum that applies
to revisions <= r0p1. It is still open.

This erratum states, "A translation table walk that matches an
existing L1 prefetch with a read request outstanding on CHI might
fold into the prefetch, which might lead to data corruption for
a future instruction fetch"

This erratum is avoided by setting CPUACTLR2_EL1[40] to 1 to
disable folding of demand requests into older prefetches with
L2 miss requests outstanding.

SDEN is available at https://developer.arm.com/documentation/SDEN-1707912

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: Ic17968987ca3c67fa7f64211bcde6dfcb35ed5d6

3 years agofix(errata): workaround for Cortex A78 AE erratum 2376748
Varun Wadekar [Wed, 9 Mar 2022 22:04:00 +0000 (22:04 +0000)]
fix(errata): workaround for Cortex A78 AE erratum 2376748

Cortex A78 AE erratum 2376748 is a Cat B erratum that applies
to revisions <= r0p1. It is still open.

The erratum states, "A PE executing a PLDW or PRFM PST instruction
that lies on a mispredicted branch path might cause a second PE
executing a store exclusive to the same cache line address to fail
continuously."

The erratum is avoided by setting CPUACTLR2_EL1[0] to 1 to force
PLDW/PFRM ST to behave like PLD/PRFM LD and not cause invalidations
to other PE caches. There might be a small performance degradation
to this workaround for certain workloads that share data.

SDEN is available at https://developer.arm.com/documentation/SDEN-1707912

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: I93bd392a870d4584f3e12c8e4626dbe5a3a40a4d

3 years agoMerge "build(sptool): handle uuid field in SP layout file" into integration
Joanna Farley [Wed, 23 Mar 2022 13:31:31 +0000 (14:31 +0100)]
Merge "build(sptool): handle uuid field in SP layout file" into integration

3 years agoMerge "fix(security): workaround for CVE-2022-23960 for A76AE, A78AE, A78C" into...
Joanna Farley [Wed, 23 Mar 2022 09:05:10 +0000 (10:05 +0100)]
Merge "fix(security): workaround for CVE-2022-23960 for A76AE, A78AE, A78C" into integration

3 years agoMerge "fix(tegra194/ras): remove incorrect erxctlr assert" into integration
Manish Pandey [Tue, 22 Mar 2022 22:02:24 +0000 (23:02 +0100)]
Merge "fix(tegra194/ras): remove incorrect erxctlr assert" into integration

3 years agobuild(changelog): add new scope for TI platform
Dave Gerlach [Tue, 22 Mar 2022 16:02:52 +0000 (11:02 -0500)]
build(changelog): add new scope for TI platform

Add new scope for TI and K3 platforms.

Change-Id: I3b666c73e3ee8bcf73fcd155b7a372f44b56b033
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
3 years agoMerge changes from topic "stm32mp13" into integration
Manish Pandey [Tue, 22 Mar 2022 15:42:16 +0000 (16:42 +0100)]
Merge changes from topic "stm32mp13" into integration

* changes:
  feat(stm32mp1): select platform compilation either by flag or DT
  feat(stm32mp1-fdts): add support for STM32MP13 DK board
  feat(stm32mp1-fdts): add DDR support for STM32MP13
  feat(stm32mp1-fdts): add st-io_policies node for STM32MP13
  feat(stm32mp1): updates for STM32MP13 device tree compilation
  feat(stm32mp1-fdts): add DT files for STM32MP13
  feat(dt-bindings): add TZC400 bindings for STM32MP13
  feat(stm32mp1): add "Boot mode" management for STM32MP13
  feat(stm32mp1): manage HSLV on STM32MP13
  feat(stm32mp1): add sdmmc compatible in platform define
  feat(st-sdmmc2): allow compatible to be defined in platform code
  feat(stm32mp1): update IO compensation on STM32MP13
  feat(stm32mp1): call pmic_voltages_init() in platform init
  feat(st-pmic): add pmic_voltages_init() function
  feat(stm32mp1): update CFG0 OTP for STM32MP13
  feat(stm32mp1): usb descriptor update for STM32MP13
  feat(st-clock): add clock driver for STM32MP13
  feat(dt-bindings): add bindings for STM32MP13
  feat(stm32mp1): get CPU info from SYSCFG on STM32MP13
  feat(stm32mp1): use only one filter for TZC400 on STM32MP13
  feat(stm32mp1): add a second fixed regulator
  feat(stm32mp1): adaptations for STM32MP13 image header
  feat(stm32mp1): update boot API for header v2.0
  feat(stm32mp1): update IP addresses for STM32MP13
  feat(stm32mp1): add part numbers for STM32MP13
  feat(stm32mp1): chip rev. Z is 0x1001 on STM32MP13
  feat(stm32mp1): update BACKUP_BOOT_MODE for STM32MP13
  feat(stm32mp1): stm32mp_is_single_core() for STM32MP13
  feat(stm32mp1): remove unsupported features on STM32MP13
  feat(stm32mp1): update memory mapping for STM32MP13
  feat(stm32mp1): introduce new flag for STM32MP13
  feat(st): update stm32image tool for header v2

3 years agoMerge "docs(a3k): update documentation about DEBUG mode for UART" into integration
Manish Pandey [Tue, 22 Mar 2022 11:51:02 +0000 (12:51 +0100)]
Merge "docs(a3k): update documentation about DEBUG mode for UART" into integration

3 years agoMerge "fix(plat/arm): fix SP count limit without dual root CoT" into integration
Manish Pandey [Tue, 22 Mar 2022 10:40:17 +0000 (11:40 +0100)]
Merge "fix(plat/arm): fix SP count limit without dual root CoT" into integration

3 years agoMerge changes I1517b69c,Ie01f36ff into integration
Manish Pandey [Tue, 22 Mar 2022 10:21:30 +0000 (11:21 +0100)]
Merge changes I1517b69c,Ie01f36ff into integration

* changes:
  fix(ufs): move nutrs assignment to ufs_init
  refactor(ufs): adds a function for sending command

3 years agofeat(stm32mp1): select platform compilation either by flag or DT
Yann Gautier [Thu, 1 Apr 2021 17:31:46 +0000 (19:31 +0200)]
feat(stm32mp1): select platform compilation either by flag or DT

To choose either STM32MP13 or STM32MP15, one of the two flags can be
set to 1 in the make command line. Or the platform selection can be
done with device tree name, if it begins with stm32mp13 or stm32mp15.

Change-Id: I72f42665c105b71a84b4952ef3fcd6c06ae4598c
Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com>
Signed-off-by: Yann Gautier <yann.gautier@st.com>
3 years agofeat(stm32mp1-fdts): add support for STM32MP13 DK board
Yann Gautier [Wed, 8 Sep 2021 15:14:21 +0000 (17:14 +0200)]
feat(stm32mp1-fdts): add support for STM32MP13 DK board

This stm32mp135f-dk board embeds a STM32MP135F SoC (900MHz / crypto
capabilities) and following peripherals: STPMIC (power delivery), 512MB
DDR3L memory, SDcard, dual RMII Ethernet, display H7, RPI connector,
wifi/BT murata combo, USBOTG/STM32G0/TypeC, STMIPID02/CSI OV5640.
Add board DT file taken from kernel.
Add fw-config files for this new board.

Change-Id: I7cce1f8eb39815d7d1df79311bd7ad41061524b8
Signed-off-by: Yann Gautier <yann.gautier@st.com>
3 years agofeat(stm32mp1-fdts): add DDR support for STM32MP13
Nicolas Le Bayon [Tue, 12 Jan 2021 17:18:27 +0000 (18:18 +0100)]
feat(stm32mp1-fdts): add DDR support for STM32MP13

Add dedicated device tree files for STM32MP13.
Add new DDR compatible for STM32MP13x.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com>
Change-Id: Ib1bb9ad8cb2ab9f5f81549635d6604093aeb99d3

3 years agofeat(stm32mp1-fdts): add st-io_policies node for STM32MP13
Yann Gautier [Wed, 21 Oct 2020 15:57:51 +0000 (17:57 +0200)]
feat(stm32mp1-fdts): add st-io_policies node for STM32MP13

To be able to load images with FIP and FCONF on STM32MP13,
the st-io_policies has to be filled.
It is a copy of the node in stm32mp15_bl2.dtsi .

Change-Id: Ia15f50d1179e9b8aefe621dc5e0070ea845d6aac
Signed-off-by: Yann Gautier <yann.gautier@st.com>
3 years agofeat(stm32mp1): updates for STM32MP13 device tree compilation
Yann Gautier [Tue, 25 Feb 2020 16:08:10 +0000 (17:08 +0100)]
feat(stm32mp1): updates for STM32MP13 device tree compilation

Add stm32mp13_bl2.dtsi files.
Update compilation variables for STM32MP13.

Change-Id: Ia3aa3abfe09c04c1a57541e565c212aa094e285c
Signed-off-by: Yann Gautier <yann.gautier@st.com>
3 years agofeat(stm32mp1-fdts): add DT files for STM32MP13
Yann Gautier [Tue, 25 Feb 2020 14:14:52 +0000 (15:14 +0100)]
feat(stm32mp1-fdts): add DT files for STM32MP13

STM32MP13 is a single Cortex-A7 CPU, without co-processor.
As for STM32MP15x SoC family, STM32MP15x SoCs come with different
features, depending on SoC version. Each peripheral node is created.
Some are left empty for the moment , and will be filled later on.

Change-Id: I0166bb70dfa7f717e89e89883b059a5b873c4ef7
Signed-off-by: Yann Gautier <yann.gautier@st.com>
3 years agofeat(dt-bindings): add TZC400 bindings for STM32MP13
Yann Gautier [Fri, 16 Oct 2020 16:59:33 +0000 (18:59 +0200)]
feat(dt-bindings): add TZC400 bindings for STM32MP13

And new file stm32mp13-tzc400.h is created for STM32MP13.

Change-Id: I18d6aa443d07dc42c0fff56fefb2a47632a2c0e6
Signed-off-by: Yann Gautier <yann.gautier@st.com>
3 years agofeat(stm32mp1): add "Boot mode" management for STM32MP13
Nicolas Toromanoff [Wed, 3 Feb 2021 15:52:03 +0000 (16:52 +0100)]
feat(stm32mp1): add "Boot mode" management for STM32MP13

Add new APIs to enter and exit "boot mode".

In this mode a potential tamper won't block access or reset
the secure IPs needed while boot, without this mode a dead
lock may occurs.

Change-Id: Iad60d4a0420ec125b842a285f73a20eb54cd1828
Signed-off-by: Nicolas Toromanoff <nicolas.toromanoff@st.com>
3 years agofeat(stm32mp1): manage HSLV on STM32MP13
Yann Gautier [Tue, 12 Jan 2021 14:52:19 +0000 (15:52 +0100)]
feat(stm32mp1): manage HSLV on STM32MP13

On STM32MP13, the high speed mode for pads in low voltage is different
from STM32MP15. Each peripheral supporting the feature has its own
register.
Special care is taken for SDMMC peripherals. The HSLV mode is enabled
only if the max voltage for the pads is lower or equal to 1.8V.

Change-Id: Id94d2cca17dd4aca4d764230a643b2bb9a5f3342
Signed-off-by: Yann Gautier <yann.gautier@st.com>
3 years agofeat(stm32mp1): add sdmmc compatible in platform define
Yann Gautier [Wed, 20 Jan 2021 13:10:57 +0000 (14:10 +0100)]
feat(stm32mp1): add sdmmc compatible in platform define

Add DT_SDMMC2_COMPAT define in stm32mp1_def.h file in platform.
It allows the use of the compatible in platform code.

Change-Id: I535ad67dd133bab59cf81881adaef42d8e88632c
Signed-off-by: Yann Gautier <yann.gautier@st.com>
3 years agofeat(st-sdmmc2): allow compatible to be defined in platform code
Yann Gautier [Wed, 20 Jan 2021 13:08:32 +0000 (14:08 +0100)]
feat(st-sdmmc2): allow compatible to be defined in platform code

Put DT_SDMMC2_COMPAT under #ifndef. Keep the default value if it is not
defined in platform code.

Change-Id: I611baaf1fc622d33e655ee2c78d9c287baaa6a67
Signed-off-by: Yann Gautier <yann.gautier@st.com>
3 years agofeat(stm32mp1): update IO compensation on STM32MP13
Yann Gautier [Tue, 17 Nov 2020 14:27:58 +0000 (15:27 +0100)]
feat(stm32mp1): update IO compensation on STM32MP13

On STM32MP13, two new SD1 and SD2 IO compensations cells are added,
for SDMMC1 and SDMMC2. They have to be managed the same way as the
main compensation cell.

Change-Id: Ib7aa648d65fc98e1613bfb46b0e7dd568fd21002
Signed-off-by: Yann Gautier <yann.gautier@st.com>
3 years agofeat(stm32mp1): call pmic_voltages_init() in platform init
Yann Gautier [Tue, 18 Jan 2022 09:39:52 +0000 (10:39 +0100)]
feat(stm32mp1): call pmic_voltages_init() in platform init

The nominal voltage for VDDCPU when Cortex-A7 runs at 650MHz is 1.25V
on STM32MP13. VDDCORE should be set at 1.25V as well.
This is necessary, as the PMIC values in its NVMEM are 1.2V.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I3c24fe4cd68c7bf143cf9318ab38a15d6d41b5d2

3 years agofeat(st-pmic): add pmic_voltages_init() function
Yann Gautier [Tue, 18 Jan 2022 14:49:42 +0000 (15:49 +0100)]
feat(st-pmic): add pmic_voltages_init() function

This new function pmic_voltages_init() is used to set the minimum value
for STM32MP13 VDDCPU and VDDCORE regulators. This value is retrieved
from device tree.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: Ibbe237cb5dccc1fddf92e07ffd3955048ff82075