Commit Graph

9063 Commits

Author SHA1 Message Date
Marek Vasut 12c75c8886 feat(plat/rcar3): emit RPC status to DT fragment if RPC unlocked
In case the RCAR_RPC_HYPERFLASH_LOCKED is 0, emit DT node /soc/rpc@ee200000
with property status = "okay" into the DT fragment passed to subsequent
software, to indicate the RPC is unlocked.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: Id93c4573ab1c62cf13fa5a803dc5818584a2c13a
2021-07-10 18:50:17 +02:00
Toshiyuki Ogasahara f95d551217 feat(plat/rcar3): add a DRAM size setting for M3N
This commit adds a DRAM size setting when building with
RCAR_DRAM_LPDDR4_MEMCONF=2 for M3N Ver.1.1 4GB DRAM.

Signed-off-by: Toshiyuki Ogasahara <toshiyuki.ogasahara.bo@hitachi.com>
Signed-off-by: Yoshifumi Hosoya <yoshifumi.hosoya.wj@renesas.com>
Change-Id: Ib7fea862ab2e0bcafaf39ec030384f0fddda9b96
2021-07-10 17:35:43 +02:00
Toshiyuki Ogasahara c5f5bb17ab feat(plat/rcar3): update IPL and Secure Monitor Rev.3.0.0
Update the revision number in the revision management file.

Signed-off-by: Toshiyuki Ogasahara <toshiyuki.ogasahara.bo@hitachi.com>
Signed-off-by: Yoshifumi Hosoya <yoshifumi.hosoya.wj@renesas.com>
Change-Id: I44b9e5a992e8a44cfeafad6d2c1a97aa59baca4e
2021-07-10 17:35:39 +02:00
Toshiyuki Ogasahara 4379a3e974 feat(plat/rcar3): add new board revision for Salvator-XS/H3ULCB
Add new board revision for 8GB 1rank of Salvator-XS/H3ULCB

Signed-off-by: Toshiyuki Ogasahara <toshiyuki.ogasahara.bo@hitachi.com>
Signed-off-by: Yoshifumi Hosoya <yoshifumi.hosoya.wj@renesas.com>
Change-Id: I9e0ef7340d92de9c892fc5bd04abe24ad6ee4286
2021-07-10 17:35:36 +02:00
Toshiyuki Ogasahara 726050b8e2 feat(drivers/rcar3): ddr: add function to judge a DDR rank
This commit adds the function to change the settings used for DDR
initialization depending on the board ID and DDR rank.

Signed-off-by: Toshiyuki Ogasahara <toshiyuki.ogasahara.bo@hitachi.com>
Signed-off-by: Yoshifumi Hosoya <yoshifumi.hosoya.wj@renesas.com>
Change-Id: I94d550cea620748f5b15499fed1b791a69d61592
2021-07-10 17:35:32 +02:00
Chiaki Fujii ec767c1b99 fix(drivers/rcar3): ddr: update DDR setting for H3, M3, M3N
[IPL/DDR]
- Update H3, M3, M3N DDR setting rev.0.41.

Signed-off-by: Chiaki Fujii <chiaki.fujii.wj@renesas.com>
Signed-off-by: Yoshifumi Hosoya <yoshifumi.hosoya.wj@renesas.com>
Change-Id: Idd2fbea621365d84b566748b5b7d7fb2f0d08168
2021-07-10 17:35:28 +02:00
Toshiyuki Ogasahara b757d3a1d9 fix(drivers/rcar3): i2c_dvfs: fix I2C operation
This commit fixes value to write to the ICCR register according to
the hardware manual.

Signed-off-by: Toshiyuki Ogasahara <toshiyuki.ogasahara.bo@hitachi.com>
Signed-off-by: Yoshifumi Hosoya <yoshifumi.hosoya.wj@renesas.com>
Change-Id: I1f612a482c012a6739e2f31db80224b222df766c
2021-07-10 17:35:23 +02:00
Toshiyuki Ogasahara 0dae56bb2f fix(drivers/rcar3): fix CPG registers redefinition
This commit deletes the value of the redefined CPG register.

Signed-off-by: Toshiyuki Ogasahara <toshiyuki.ogasahara.bo@hitachi.com>
Signed-off-by: Yoshifumi Hosoya <yoshifumi.hosoya.wj@renesas.com>
Change-Id: I05cf4a449ae28adb2ddd59593971a7d0cbcb21de
2021-07-10 17:35:20 +02:00
Toshiyuki Ogasahara 36d5645aec fix(drivers/rcar3): emmc: remove CPG_CPGWPR redefinition
emmc_registers.h contains redefinition of
CPG_CPGWPR from bl2_cpg_register.h

Signed-off-by: Toshiyuki Ogasahara <toshiyuki.ogasahara.bo@hitachi.com>
Signed-off-by: Yoshifumi Hosoya <yoshifumi.hosoya.wj@renesas.com>
Change-Id: Ie13590100df08f32193653e50191e66ed42d2b28
2021-07-10 17:35:15 +02:00
Marek Vasut 21924f2466 fix(plat/rcar3): generate two memory nodes for larger than 2 GiB channel 0
The DRAM channel 0 memory area in 32bit space is limited to 2 GiB window.
Furthermore, the first 128 MiB of this memory window are reserved and not
accessible by the system software, hence the 32bit area memory node is
limited to range 0x4800_0000..0xbfff_ffff.

In case there are more than 2 GiB of DRAM populated in channel 0, it is
necessary to generate two memory nodes, once covering the 2 GiB - 128 MiB
area in the 32bit space, and another covering the rest of the memory in
64bit space. This patch implements handling of such a case.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: I3495241fb938e355352e817afaca8f01d04c81d2
2021-07-10 17:35:11 +02:00
Marek Vasut e624e98dc3 refactor(plat/rcar3): factor out DT memory node generation
Move the code that adds single new memory@ node into the DT fragment passed
to system software into separate function. Adjust the failure message to be
more specific and print the address range of node which failed to be added.
No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: Ie42cd7756b045271f070bca93c524fff6238f5a2
2021-07-10 17:35:08 +02:00
Marek Vasut ddf2ca0397 feat(plat/rcar3): add optional support for gzip-compressed BL33
The BL33 size on this platform is limited to 1 MiB, add optional
support for decompressing and starting gzip-compressed BL33, which
may help with this size limitation. This functionality is disabled
by default, set RCAR_GEN3_BL33_GZIP=1 during build to enable it.

The BL33 at 0x50000000 should then be gzip compressed, however if
the BL33 does not have a valid gzip header, it is copied to the
correct location and started as-is, this is a fallback for legacy
systems and systems which update to gzip-compressed BL33.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: Id93f1c7e6f17db1ffb952ea086562993473f6efa
2021-07-10 17:33:36 +02:00
Madhukar Pappireddy a43179a694 Merge "feat(plat/zynqmp): extend DT description by TF-A" into integration 2021-07-07 16:08:51 +02:00
Sandrine Bailleux 2cd9632945 Merge changes from topic "sb/measured-boot" into integration
* changes:
  refactor(measured boot): revisit error handling (3/3)
  refactor(measured boot): revisit error handling (2/3)
  refactor(measured boot): revisit error handling (1/3)
2021-07-07 14:07:38 +02:00
Madhukar Pappireddy 23b7ad5cc0 Merge changes from topic "stm32_io_update" into integration
* changes:
  refactor(plat/st): add stm32image_io_setup
  fix(plat/st): panic if boot interface is wrong
2021-07-07 03:09:54 +02:00
Manish Pandey bc97629b74 Merge changes from topic "st_fixes" into integration
* changes:
  fix(tools/stm32image): improve the tool
  fix(plat/st): add STM32IMAGE_SRC
2021-07-05 16:25:26 +02:00
Sandrine Bailleux 51018a0558 refactor(measured boot): revisit error handling (3/3)
- In tpm_record_measurement():

   The platform layer is responsible for providing an exhaustive list
   of images to measure. If it doesn't then this should be treated as
   a programming error, as documented in [1].

   Thus, turn the error test into an assertion.

[1] https://trustedfirmware-a.readthedocs.io/en/latest/process/coding-guidelines.html#using-assert-to-check-for-programming-errors

Change-Id: I002309c2ebdf2d348a7d12a8f7f9e82465046b8e
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2021-07-05 10:33:38 +02:00
Sandrine Bailleux 0c83207a55 refactor(measured boot): revisit error handling (2/3)
- In add_event2():

  Turn the first error condition checking whether there is room for an
  extra event2 data structure into an assertion. The platform layer is
  responsible for choosing an appropriate event log buffer size based
  on the number of measurements it expects. If this assertion fires,
  the platform macro EVENT_LOG_SIZE should be adjusted and the
  firmware recompiled.

  Call this assumption out in the function documentation.

  Also remove the second error condition check, which is a subset of
  the first one and thus is redundant.

  As a result of these changes, add_event2() can no longer fail. Thus,
  change its return type from int to void.

  Also, the 'size_of_event' local variable is now unused in release
  builds so remove it and move its value into the assertion.

Change-Id: I113fc141de59708b20435a0c7126255561ab7786
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2021-07-05 10:33:17 +02:00
Sandrine Bailleux ddb07a5689 refactor(measured boot): revisit error handling (1/3)
- In event_log_init():

   Throughout the function, we are incrementing a pointer by some fixed
   amounts of bytes (corresponding to the size of some data structure or
   to some constant number of bytes), there is no variable-size
   increments in the picture. Thus it seems pointless to verify that the
   pointer has indeed been incremented by this fixed amount of bytes
   afterwards.

   For this reason, remove these checks altogether. As a result, the
   start_ptr local variable is now unused so remove it as well.

Change-Id: I612e2278cd3a63d1417427e45d81e285503f5efe
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2021-07-05 10:32:55 +02:00
Sandrine Bailleux 976aedc9fc Merge "style(measured boot): fix incorrect indentation" into integration 2021-07-05 10:19:33 +02:00
Sandrine Bailleux ef65c9c6d1 style(measured boot): fix incorrect indentation
Change-Id: I5b84a28ed254a7c7bb95c18fa999592a4e3f6d90
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2021-07-05 10:19:30 +02:00
Sandrine Bailleux 9fa5db4da8 Merge changes from topic "sb/measured-boot" into integration
* changes:
  refactor(plat/fvp): tidy up list of images to measure
  docs: explain Measured Boot dependency on Trusted Boot
2021-07-05 10:19:19 +02:00
Manish Pandey 7fa35d068f Merge changes Ib8502f9b,I388fd231,I7bd37912,I3a186ed7 into integration
* changes:
  feat(plat/mediatek/mt8195): add SPM suspend driver
  feat(plat/mediatek/mt8195): support MCUSYS off when system suspend
  feat(plat/mediatek/mt8195): add support for PTP3
  fix(plat/mediatek/mt8195): extend MMU region size
2021-07-02 12:44:34 +02:00
Olivier Deprez 05f47b77dd Merge "feat(spm): add Ivy partition to tb fw config" into integration 2021-07-02 10:28:01 +02:00
Edward-JW Yang 859e346b89 feat(plat/mediatek/mt8195): add SPM suspend driver
Support DRAM/MAINPLL/26M off when system suspend.

Signed-off-by: Edward-JW Yang <edward-jw.yang@mediatek.corp-partner.google.com>
Change-Id: Ib8502f9b0b4e47aa405e5449f0b6d483bd3f5d77
2021-07-02 16:22:16 +08:00
Edward-JW Yang d336e093dd feat(plat/mediatek/mt8195): support MCUSYS off when system suspend
Add drivers to support MCUSYS off when system suspend.

Signed-off-by: Edward-JW Yang <edward-jw.yang@mediatek.corp-partner.google.com>
Change-Id: I388fd2318f471083158992464ecdf2181fc7d87a
2021-07-02 16:22:16 +08:00
Elly Chiang 048189637e feat(plat/mediatek/mt8195): add support for PTP3
Add PTP3 drivers to protect CPU excessive voltage drop
in CPU heavy loading.

Change-Id: I7bd37912c32d5328ba0287fccc8409794bd19c1d
Signed-off-by: Elly Chiang <elly.chiang@mediatek.com>
2021-07-02 16:22:16 +08:00
Tinghan Shen 9ff8b8ca93 fix(plat/mediatek/mt8195): extend MMU region size
In mt8195 suspend/resume flow, ATF has to communicate with a subsys by
read/write the subsys registers. However, the register region of subsys
doesn't include in the MMU mapping region. It triggers MMU faults.

This patch extends the MMU region 0 size to cover all mt8195 HW modules.
This patch also remove MMU region 1 because region 0 covers region 1.

Change-Id: I3a186ed71d0d963b59ae55e27a6d27a01fe4f638
Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
2021-07-02 16:22:16 +08:00
Daniel Boulby 1bc02c2e0f feat(spm): add Ivy partition to tb fw config
The partition layout description JSON file generated by TF-A tests
declares a fourth test partition called Ivy demonstrating the
implementation of a S-EL0 partition supported by a S-EL1 shim.

Change-Id: If8562acfc045d6496dfdb3df0524b3a069357f8e
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
2021-07-02 09:19:59 +01:00
Mark Dykes 365e0f7764 Merge changes from topic "st_fixes" into integration
* changes:
  fix(plat/st): correct IO compensation disabling
  fix(plat/st): correct BSEC error code management
  fix(drivers/st/pmic): missing error check
  fix(drivers/st/pmic): initialize i2c_state
  fix(drivers/st/clk): use correct return value
2021-07-01 17:23:30 +02:00
Mark Dykes 156a6e137c Merge "fix(drivers/mtd): macronix quad enable bit issue" into integration 2021-07-01 17:21:07 +02:00
Manish Pandey 800009756a Merge "docs: update maintainer entry for nxp platform code" into integration 2021-07-01 11:23:26 +02:00
Sandrine Bailleux 8d148183a7 Merge "refactor(measured boot): remove weak definition of plat_get_measured_boot_data()" into integration 2021-07-01 11:13:41 +02:00
Sandrine Bailleux c04cb15cfa refactor(measured boot): remove weak definition of plat_get_measured_boot_data()
Weak definitions are confusing and should be avoided if possible.
Thus, turn plat_get_measured_boot_data() into a strong definition that
platforms must provide (if they need measured boot).

We could have moved the old weak implementation under plat/common as a
sane, default implementation that platforms may pull in if it suits
them. However, this implementation right now simply measures BL2,
which is not enough to get a complete measured boot flow, so this
patch just removes it.

This change only affects the Arm FVP platform, as no other upstream
platform implements measured boot at the moment.

Change-Id: If8680a39ae0ef1044ee981315439d5e0c8461229
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2021-07-01 10:06:54 +02:00
Pankaj Gupta 75569c3092 docs: update maintainer entry for nxp platform code
Add maintainer entry for NXP platform code

Signed-off-by: Pankaj Gupta <pankaj.gupta@nxp.com>
Change-Id: Idd5407b8a9c1aa50ba812b2b1a7ce45e8fac5027
2021-06-30 21:52:09 +01:00
Patrick Delaunay c25ff16ecf refactor(plat/st): add stm32image_io_setup
Add a generic function to setup the stm32image IO.

Change-Id: I0f7cf4a6030605037643f3119b809e0319d926af
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
2021-06-30 17:07:10 +02:00
Yann Gautier 71693a6634 fix(plat/st): panic if boot interface is wrong
Add a panic() at the end of stm32mp_io_setup() if the boot interface
given in ROM code boot context is not supported.

Change-Id: I0d50f21a11231febd21041b6e63108cc3e6f4f0c
Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
2021-06-30 17:04:22 +02:00
Manish Pandey c1c14b3485 Merge "feat(plat/arm): enable PIE when RESET_TO_SP_MIN=1" into integration 2021-06-30 13:04:45 +02:00
Olivier Deprez 00aa63d104 Merge changes from topic "tc0_tfa_v25" into integration
* changes:
  fix(tc0): remove ffa and optee device tree node
  fix(tc0): set cactus-tertiary vcpu count to 1
  fix(tc0): change UUID to string format
2021-06-30 12:06:13 +02:00
Olivier Deprez 81a8b2da2c Merge "feat(sve): enable SVE for the secure world" into integration 2021-06-30 11:51:04 +02:00
Manish Pandey 204fd9913c Merge "errata: workaround for Cortex A77 errata 1791578" into integration 2021-06-29 22:44:29 +02:00
Sandrine Bailleux 64dd1dee2d refactor(plat/fvp): tidy up list of images to measure
We don't ever expect to load a binary with an STM32 header on the Arm
FVP platform so remove this type of image from the list of
measurements.

Also remove the GPT image type from the list, as it does not get
measured. GPT is a container, just like FIP is. We don't measure the FIP
but rather the images inside it. It would seem logical to treat GPT the
same way.

Besides, only images that get loaded through load_auth_image() get
measured right now. GPT processing happens before that and is handled in
a different way (see partition_init()).

Change-Id: Iac4de75380ed625b228e69ee4564cf9e67e19336
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2021-06-29 15:14:44 +02:00
Sandrine Bailleux cc255b9f85 docs: explain Measured Boot dependency on Trusted Boot
Change-Id: I04d9439d5967e93896dfdb0f3d7b0aec96c743f9
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2021-06-29 15:14:23 +02:00
Manish Pandey 7285fd5f9a feat(plat/arm): enable PIE when RESET_TO_SP_MIN=1
For Arm platforms PIE is enabled when RESET_TO_BL31=1 in aarch64 mode on
the similar lines enable PIE when RESET_TO_SP_MIN=1 in aarch32 mode.
The underlying changes for enabling PIE in aarch32 is submitted in
commit 4324a14bf

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: Ib8bb860198b3f97cdc91005503a3184d63e15469
2021-06-29 11:59:01 +01:00
Madhukar Pappireddy b9f7fcc949 Merge changes I8d334231,Icd1ce8ec,Ic963c21c into integration
* changes:
  feat(tc0): add cpu capacity to provide scheduling information
  fix(tc0): remove "arm,psci" from psci node
  feat(tc0): update mhuv2 dts node to align with upstream driver
2021-06-29 00:53:11 +02:00
Mark Dykes ce36b311a6 Merge "fix(drivers/mtd): fix MISRA issues and logic improvement" into integration 2021-06-28 22:15:02 +02:00
Mark Dykes 99ea2e912a Merge "style(scmi_common): add \n to warning messages" into integration 2021-06-28 21:59:41 +02:00
Usama Arif 309f5938e6
feat(tc0): add cpu capacity to provide scheduling information
Signed-off-by: Usama Arif <usama.arif@arm.com>
Change-Id: I8d3342315a46c78b4c41582ec114f0364a194316
2021-06-28 20:32:50 +01:00
Usama Arif 814646b4cb
fix(tc0): remove "arm,psci" from psci node
"arm,psci" expects the FIDs for cpu-on, cpu-off and cpu-suspend, which
arent present in the device tree, so remove it from psci compatible.

Signed-off-by: Usama Arif <usama.arif@arm.com>
Change-Id: Icd1ce8ec7fd3f270925e4b3d5d0187088ffe4ba5
2021-06-28 20:32:29 +01:00
Usama Arif 63067ce87e
feat(tc0): update mhuv2 dts node to align with upstream driver
The MHUv2 driver has been merged upstream, and it has a different
dts format compared to what was previously used. This patch aligns
with the upstream driver.

Signed-off-by: Usama Arif <usama.arif@arm.com>
Change-Id: Ic963c21c1475d301c3a75686718e6e17841831c3
2021-06-28 20:32:29 +01:00