Commit graph

11338 commits

Author SHA1 Message Date
Patrick Delaunay
7d197d6281 refactor(stm32mp1): move DT_UART_COMPAT in include file
Move the definition of DT_UART_COMPAT in stm32mp1_def.h to be used
in several files.

Change-Id: I74d0350bcd971df9b15697f2b9ec04061d6a7656
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-09-23 15:17:43 +02:00
Patrick Delaunay
4b2f23e55f feat(stm32mp1): configure the serial boot load address
For product with 128MB DDR size, the OP-TEE is located at the end
of the DDR and the FIP can't be loaded at the default location
because it overlap the OP-TEE final location. So the default value
for DWL_BUFFER_BASE is invalid.

To avoid this conflict the serial boot load address = DWL_BUFFER_BASE
can be modified with a configuration flags.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: Ie27b87c10c57fea5d4c6200ce4f624e775b9a080
2022-09-23 15:17:43 +02:00
Patrick Delaunay
32f2ca04bf fix(stm32mp1): update the FIP load address for serial boot
Update the FIP load address and size for serial boot to support
product with a DDR size = 128MB
1/ Move the FIP location at the end of the first 128MB
2/ Reduce the DWL_BUFFER_SIZE to 16MB, to be coherent with the value
   indicated in USB enumeration
   - for STM32MP13x: "@SSBL /0x03/1*16Me"
   - for STM32MP15x: "@Partition3 /0x03/1*16Me"

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: Id93bf00c64832c17426bfd78e060861275677ecc
2022-09-23 15:17:43 +02:00
Patrick Delaunay
e7705e9afd refactor(st): configure baudrate for UART programmer
Add the possibility to configure the UART baudrate; reused the
console configuration, defined in STM32MP_UART_BAUDRATE.

The default value remains 115200.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: Ifcf2b36e8ac929265405bc88e824ee78be3b5bbb
2022-09-23 15:17:43 +02:00
Patrick Delaunay
1258189515 refactor(st-uart): compute the over sampling dynamically
The parameter over_sampling of stm32_uart_init_s is not required
as it can be computed dynamically from clock rate of the serial
device and the requested baudrate.

Oversampling by 8 is allowed only for higher speed
(up to clock_rate / 8) to reduce the maximum receiver tolerance
to clock deviation.

This patch update the driver, the serial init struct and the
only user, the stm32cubeprogrammer over uart support.

Change-Id: I422731089730a288defeb7fa49886db65d0902b2
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-09-23 15:17:43 +02:00
Manish V Badarkhe
278bc857d8 Merge changes from topic "bl31_in_sram" into integration
* changes:
  feat(sgi): remove override for `ARM_BL31_IN_DRAM` build-option
  feat(sgi): configure SRAM and BL31 size for sgi platform
2022-09-23 13:32:09 +02:00
Olivier Deprez
aef9b0da2a Merge "fix(bl31): fix validate_el3_interrupt_rm preprocessor usage" into integration 2022-09-23 10:14:13 +02:00
Rohit Mathew
a371327ba9 feat(sgi): remove override for ARM_BL31_IN_DRAM build-option
RD-N2* variants of Neoverse reference design platforms could be
configured to boot from SRAM or DRAM. Having ARM_BL31_IN_DRAM set to 1
within the common makefile would deter these platforms from having this
flexibility. Remove the default override configuration for
`ARM_BL31_IN_DRAM`.

Signed-off-by: Rohit Mathew <rohit.mathew@arm.com>
Change-Id: I8d79969c003a984675cbe705de890b51a1f7f4ea
2022-09-22 20:44:58 +01:00
Rohit Mathew
8fd820ffb9 feat(sgi): configure SRAM and BL31 size for sgi platform
Update SRAM size for Neoverse reference design platforms from 256KB to
512KB. This is required to place and execute BL31 image from the
on-chip SRAM. Additionally, revise BL31 image size to accommodate
larger BL31 images of multi-chip platforms.

Signed-off-by: Rohit Mathew <rohit.mathew@arm.com>
Change-Id: I11c2672a1089f24a9fafcf6555b8e1d52032cfde
2022-09-22 16:58:18 +01:00
Manish Pandey
602394507f Merge changes from topic "mediatek upstream" into integration
* changes:
  refactor(mt8188): move platform_def.h to mt8188/include
  feat(mt8188): add MCUSYS support
  feat(mt8188): add armv8.2 support
  feat(mt8188): add DFD control in SiP service
  feat(mt8188): add EMI MPU basic drivers
  feat(mt8188): add DCM driver
  feat(mt8188): add reset and poweroff functions
  feat(mediatek): add more flexibility of mtk_pm.c
  feat(mediatek): add more options for build helper
  feat(mt8188): add LPM driver support
  feat(mt8188): apply ERRATA for CA-78
  fix(mediatek): remove unused cold_boot.[c|h]
  fix(mediatek): wrap cold_boot.h with MTK_SIP_KERNEL_BOOT_ENABLE
  feat(mt8186): add EMI MPU support for SCP and DSP
2022-09-22 16:31:49 +02:00
Bo-Chen Chen
a64d9f442e refactor(mt8188): move platform_def.h to mt8188/include
It is more suitable to place platform_def.h in mt8188/include.

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: I35720690ff4f2ca99c9430edb8bbe17edf9aefb9
2022-09-22 19:26:15 +08:00
Edward-JW Yang
4cc1ff7ef2 feat(mt8188): add MCUSYS support
Add MCUSYS drivers support for MT8188.

Signed-off-by: Edward-JW Yang <edward-jw.yang@mediatek.com>
Change-Id: I84107702a9fd021c37d2997ad25b321a483a1a66
2022-09-22 19:26:15 +08:00
Edward-JW Yang
45711e4e16 feat(mt8188): add armv8.2 support
Add armv8.2 support for MT8188.

Signed-off-by: Edward-JW Yang <edward-jw.yang@mediatek.com>
Change-Id: I0ac865949ba864fb207ee1f0937092cbabd550de
2022-09-22 19:26:15 +08:00
Fengquan Chen
7079a942bd feat(mt8188): add DFD control in SiP service
DFD (Design for Debug) is a debugging tool, which scans flip-flops and
dumps to internal RAM on the WDT reset. After system reboots, those
values could be showed for debugging.

TEST=build pass.
BUG=b:244216434

Signed-off-by: Fengquan Chen <fengquan.chen@mediatek.corp-partner.google.com>
Change-Id: I468036131e941a46bc1ec12d33105146000730d8
2022-09-22 19:26:15 +08:00
Dawei Chien
8454f0d65e feat(mt8188): add EMI MPU basic drivers
EMI MPU stands for external memory interface memory protect unit.
MT8188 supports 32 regions and 16 domains.

Signed-off-by: Dawei Chien <dawei.chien@mediatek.com>
Change-Id: I9bbeb355665401cc71dda6db22157d9d751570d1
2022-09-22 19:26:15 +08:00
Garmin Chang
bc9410e237 feat(mt8188): add DCM driver
DCM means dynamic clock management, and it can dynamically
slow down or gate clocks during CPU or bus idle.

1. Add MCUSYS related DCM drivers.
2. Enable MCUSYS related DCM by default.

Signed-off-by: Garmin Chang <garmin.chang@mediatek.com>
Change-Id: I131354d72bbc190af504e9639bcc85a720e2bb17
2022-09-22 19:26:15 +08:00
Rex-BC Chen
a72b9e7754 feat(mt8188): add reset and poweroff functions
- Add mtk_pm_system_reset_cros() for cros reset.
- Add mtk_pm_system_off_cros() for cros power-off.

TEST=build pass
BUG=b:236331724

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: I4117f6080e282551b37a936a490ab7b37ac31827
2022-09-22 19:26:15 +08:00
Edward-JW Yang
6ca2046ef1 feat(mediatek): add more flexibility of mtk_pm.c
To use power manager function more easier, we add some drivers to let
the implementation easier.

Signed-off-by: Edward-JW Yang <edward-jw.yang@mediatek.com>
Change-Id: Ibc6e1680c4534592ed37de49da39b6667f468ea1
2022-09-22 19:26:15 +08:00
Edward-JW Yang
5b95e439c7 feat(mediatek): add more options for build helper
To support more LPM feature, we add more options for build helper.

Signed-off-by: Edward-JW Yang <edward-jw.yang@mediatek.com>
Change-Id: I17eeedbe0674e321f1891074ba0c72d858841dae
2022-09-22 19:26:15 +08:00
Bo-Chen Chen
f604e4ef6e feat(mt8188): add LPM driver support
Add LPM drivers and create rules.mk for makefile.

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: I0bfb99a4a763e7ca93260f62d1ced184259acb39
2022-09-22 19:26:15 +08:00
Bo-Chen Chen
abb995abbe feat(mt8188): apply ERRATA for CA-78
Apply ERRATA_A78_2376745 and ERRATA_A78_2395406 for CA-78.

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: I4575e83025af971a669dc1f8561cf19e1fdac469
2022-09-22 19:26:15 +08:00
Bo-Chen Chen
8cd3b693d6 fix(mediatek): remove unused cold_boot.[c|h]
We are not using cold_boot.[c|h] for mt8188, so remove them first.

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: I721aca37d5fb422f274bb1ab46150e1eddf7c480
2022-09-22 19:26:15 +08:00
Bo-Chen Chen
24476b2e61 fix(mediatek): wrap cold_boot.h with MTK_SIP_KERNEL_BOOT_ENABLE
We should wrap cold_boot.h with MTK_SIP_KERNEL_BOOT_ENABLE to avoid
build error.

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: Idfd760fbb7c782d4fc9de674d86a7123e0129c0d
2022-09-22 19:26:15 +08:00
Allen-KH Cheng
3d4b6f9324 feat(mt8186): add EMI MPU support for SCP and DSP
1. Enable domain D0 and D3 (SCP) access 0x50000000~0x5109FFFF.
2. Enable domain D4 (DSP & AFE) access 0x60000000~0x610FFFFF.

BUG=b:204229221
TEST=build pass

Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.corp-partner.google.com>
Change-Id: I6a7d2eafaaa7a558829a0d741dfb3307885e3b98
2022-09-22 19:26:15 +08:00
Claus Pedersen
885e268304 refactor(libc): clean up dependencies in libc
- Removing platform dependencies from libc modules.
- Replacing panicking with actual error handling.
- Debug macros are included indirectly from assert.h. Removing
  "platform_def.h" from assert.h and adding "common/debug.h"
  where the macros are used.
- Removing hack for fixing PLAT_LOG_LEVEL_ASSERT to 40.
  Instead removing assert with expression, as this
  does not provide additional information.

Signed-off-by: Claus Pedersen <claustbp@google.com>
Change-Id: Icc201ea7b63c1277e423c1cfd13fd6816c2bc568
2022-09-22 13:23:49 +02:00
Manish Pandey
93910a7487 Merge "feat(pauth): add/modify helpers to support QARMA3" into integration 2022-09-22 11:59:39 +02:00
Manish V Badarkhe
2c20c24211 Merge "fix(synquacer): increase size of BL33" into integration 2022-09-22 10:46:06 +02:00
Joanna Farley
f530821abf Merge "feat(versal_net): add support for QEMU COSIM platform" into integration 2022-09-22 10:22:10 +02:00
Joanna Farley
ae69686b58 Merge "docs(maintainers): update xilinx record to cover docs" into integration 2022-09-22 10:15:38 +02:00
Michal Simek
def661b6ef docs(maintainers): update xilinx record to cover docs
Recently new Xilinx Versal NET platform has been merged but documentation
cover only zynqmp. Fix the fragment to cover all Xilinx documentation.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Change-Id: I10f8f865ca8d46518135adb80ba0ba4470534529
2022-09-22 08:53:45 +02:00
Sai Pavan Boddu
6a079efd90 feat(versal_net): add support for QEMU COSIM platform
QEMU COSIM platform is equivalent to qemu with additional cosim
extensions, so just switching platform_id to QEMU if QEMU_COSIM is
detected.

Signed-off-by: Sai Pavan Boddu <sai.pavan.boddu@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Change-Id: I922d10b1605c7f900158fa7fbe82571d3b9d4792
2022-09-22 08:45:53 +02:00
Jassi Brar
a12a66d0d6 fix(synquacer): increase size of BL33
Increase the max possible size of BL33 from 1MB to 2MB.
For example, edk2 is usually bigger than 1MB

Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Change-Id: Idd4762e25e623de145c65f31cf2dfe1fee466a74
2022-09-21 22:14:29 +02:00
Joanna Farley
cdbea24097 Merge "docs(build): update GCC to 11.3.Rel1 version" into integration 2022-09-21 18:43:02 +02:00
Joanna Farley
f47d38ba02 Merge changes from topic "xilinx-versal-net" into integration
* changes:
  feat(versal-net): add support for platform management
  feat(versal-net): add support for IPI
  feat(versal-net): add SMP support for Versal NET
  feat(versal-net): add support for Xilinx Versal NET platform
  feat(versal-net): add documentation for Versal NET SoC
2022-09-21 18:29:58 +02:00
Marco Felsch
6e08cffcd2 fix(bl31): fix validate_el3_interrupt_rm preprocessor usage
Fix the "#if defined(FOO)" usage introduced by commit 7c2fe62f1
("fix(bl31): allow use of EHF with S-EL2 SPMC") since the defines are
always passed as -DFOO=0 or as -DFOO=1. The "#if defined(FOO)" will now
always be true which is wrong.

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Change-Id: I84fb144debc9899727a1fc021acdd59b4a6f0171
2022-09-21 17:54:57 +02:00
Jay Buddhabhatti
0654ab7f75 feat(versal-net): add support for platform management
Add support for PM EEMI interface for Versal_net. Also use PM
APIs in psci ops. Added TFA_NO_PM flag to disable PM functionality.

Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Change-Id: If2b2941c868bc9b0850d7f3adb81eac0e660c149
2022-09-20 19:02:42 +02:00
Michal Simek
0bf622de68 feat(versal-net): add support for IPI
Add support to send IPI to firmware.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Akshay Belsare <Akshay.Belsare@amd.com>
Change-Id: I8cd54c05b6a726e0d398dfc1cdcc7f4cf09ba725
2022-09-20 19:02:39 +02:00
Madhukar Pappireddy
a9e567cbe8 Merge "fix(imx8m): move caam init after serial init" into integration 2022-09-20 15:12:04 +02:00
Andrey Zhizhikin
901d74b2d4 fix(imx8m): move caam init after serial init
CAAM provides serial output during initialization, but the serial init
occurs after CAAM. This leads to serial output produced by CAAM init
function to be omitted and not displayed.

Change the order of initialization and call CAAM init after Serial. This
has no impact as Serial does not require CAAM to be initialized upfront.

Fixes: 2502709f60 ("plat: imx8m: Add caam module init on imx8m")
Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Cc: Jacky Bai <ping.bai@nxp.com>
Change-Id: I09c0a5474a1babfb0b53c4455891689ec08b5bdb
2022-09-20 15:12:00 +02:00
Madhukar Pappireddy
7d3287f340 Merge "fix(imx8m): correct serial output for HAB JR0" into integration 2022-09-20 15:11:25 +02:00
Michal Simek
8529c7694f feat(versal-net): add SMP support for Versal NET
Add SMP support for Versal NET via register access.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Akshay Belsare <Akshay.Belsare@amd.com>
Change-Id: I46d73e2cd678ae720b5255722b6b0611c22659e8
2022-09-20 09:25:32 +02:00
Michal Simek
1d333e6909 feat(versal-net): add support for Xilinx Versal NET platform
New SoC is a78 based with gicv3 and uart over pl011. Communication
interfaces are similar to Versal platform. System starts with Xilinx PLM
firmware which loads TF-A(bl31) to DDR, which is already configured, and
jumps to it. PLM also prepare handoff structure for TF-A with information
what components were load and flags which indicate which EL level SW should
be started.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Akshay Belsare <Akshay.Belsare@amd.com>
Change-Id: I2a16c242a77be6c91be3d198727dc3b9bbb97410
2022-09-20 09:19:43 +02:00
Andrey Zhizhikin
6e24d79509 fix(imx8m): correct serial output for HAB JR0
Serial output is missing the EOL marker, which makes the output garbled.

Add EOL to the output, which adds a newline and makes log output
consistent.

Fixes: 77850c96f2 ("feat(plat/imx8m): do not release JR0 to NS if HAB is using it")
Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Cc: Franck LENORMAND <franck.lenormand@nxp.com>
Cc: Jacky Bai <ping.bai@nxp.com>
Change-Id: I58b67f441016122bc9361d7224d310522917eff0
2022-09-20 08:03:57 +02:00
Joanna Farley
9f8de54b0f Merge "fix(zynqmp): resolve the misra 4.6 warnings" into integration 2022-09-19 18:23:28 +02:00
Michal Simek
4efdc48896 feat(versal-net): add documentation for Versal NET SoC
Add description for Versal NET SoC.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Akshay Belsare <Akshay.Belsare@amd.com>
Change-Id: Idcbb893c6b9e46512308c53ba2a0bee48a022b0a
2022-09-19 15:01:51 +02:00
HariBabu Gattem
15dc3e4f8d fix(zynqmp): resolve the misra 4.6 warnings
MISRA Violation: MISRA-C:2012 R.4.6
- Using basic numerical type int rather than a typedef
that includes size and signedness information.

Change-Id: Id85e69b29b124052b4a87462ce27fcdfc00c13c9
Signed-off-by: HariBabu Gattem <haribabu.gattem@amd.com>
2022-09-19 04:17:50 -07:00
Joanna Farley
8edd190e64 Merge "feat(versal): update macro name to generic and move to common place" into integration 2022-09-16 10:56:59 +02:00
Joanna Farley
b86cbe10d2 Merge changes from topic "provencore-spd" into integration
* changes:
  feat(zynqmp): add support for ProvenCore
  feat(services): add a SPD for ProvenCore
  feat(gic): add APIs to raise NS and S-EL1 SGIs
2022-09-16 10:52:37 +02:00
Manish V Badarkhe
75eb87f073 Merge changes from topic "RDN2_WARM_REBOOT_WITH_SGI" into integration
* changes:
  feat(sgi): enable css implementation of warm reset
  feat(scmi): send powerdown request to online secondary cpus
  feat(plat/arm/css): add interrupt handler for reboot request
  refactor(psci): move psci_do_pwrdown_sequence() out of private header
  feat(plat/arm/css): add per-cpu power down support for warm reset
  feat(scmi): set warm reboot entry point
  fix(gicv3): update the affinity mask to 8 bit
2022-09-16 10:27:21 +02:00
Manish V Badarkhe
eb3d4015a3 docs(fwu): update firmware update design
Refactored legacy firmware design and added details about PSA
firmware updates.

Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
Change-Id: I9c123b3f62580d4271dbaff0a728b6412fae7890
2022-09-16 09:12:00 +01:00