Commit graph

365 commits

Author SHA1 Message Date
Mark Dykes
5a16264208 Merge "feat(intel): provide atf build version via smc call" into integration 2025-03-14 16:35:07 +01:00
Jit Loon Lim
458b40df58 fix(intel): this patch is used to solve DDR and VAB
The patch provide solutions for:
1. Enable BL31 console logs during run-time.
2. Update VAB initialization.
3. Update DDR size accordin to Linux DTS configuration.
4. Solve VAB CCERT address issue.

Change-Id: I41eb0fab747de5010d369e845c33a45decb41e21
Signed-off-by: Jit Loon Lim <jit.loon.lim@altera.com>
2025-03-08 13:11:25 +08:00
Girisha Dengi
d1c58d8649 feat(intel): provide atf build version via smc call
This patch provides ATF build version via SMC call
on Agilex7, Agilex5, Stratix10 and N5X platforms.

Change-Id: I61af83433fe61f85987f38ffc86380a41cdb5289
Signed-off-by: Girisha Dengi <girisha.dengi@intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@altera.com>
2025-03-08 12:58:08 +08:00
Yann Gautier
23828430f3 Merge "feat(intel): add FDT support for Altera products" into integration 2025-02-24 17:10:17 +01:00
Jit Loon Lim
29d1e29d7c feat(intel): add FDT support for Altera products
Support FDT for Agilex5 platform
1. Created wrapper file socfpga_dt.c
2. Added in Agilex5 dts file
3. Implemented fdt_check_header
4. Implemented gic configuration
5. Implemented dram configuration

Remove init of FDT as Agilex5 has no plan to roll
out FDT at the moment.

Change-Id: If3990ed9524c6da5b3cb8966b63bc4a95d01fcda
Signed-off-by: Jit Loon Lim <jit.loon.lim@altera.com>
2025-02-24 22:48:04 +08:00
Jit Loon Lim
8a0a006af3 fix(altera): add in support for agilex5 b0 jtag id
Support Agilex5 B0 jtag id for fpga reconfig.

Change-Id: I4efb5a046a0f11009a1f08412ff0e48f376c94e1
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
2025-02-10 12:22:06 +08:00
Olivier Deprez
a2c5171461 Merge "fix(intel): update debug messages to appropriate class" into integration 2025-01-31 12:02:18 +01:00
Olivier Deprez
5cef096e4c Merge "fix(intel): update warm reset routine and bootscratch register usage" into integration 2025-01-31 12:01:35 +01:00
Jit Loon Lim
646a9a1615 fix(intel): update warm reset routine and bootscratch register usage
Agilex5 platform:
Boot scratch COLD6 register is meant for Customer use only.
So, use Intel specific COLD3 register with [5:2]bits to
determine the warm reset and SMP boot requests.
Also handle the unaligned DEVICE/IO memory store and load
in the assembly entrypoint startup code.

Agilex, Stratix10, N5X platforms:
Use only the LSB 4bits [3:0] of the boot scratch COLD6 register
to detect the warm reset request.

Change-Id: I4fd6e63fe0bd42ddcb4a3f81c7a7295bdc8ca65f
Signed-off-by: Girisha Dengi <girisha.dengi@intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@altera.com>
2025-01-13 16:31:42 +08:00
Girisha Dengi
a550aeb394 fix(intel): update debug messages to appropriate class
Update debug messages to VERBOSE class wherever required.

Change-Id: I44ea6b660581285290f54a507dd1131d26be2ec8
Signed-off-by: Girisha Dengi <girisha.dengi@intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@altera.com>
2025-01-13 16:27:17 +08:00
Sieu Mun Tang
bf3877e072 fix(intel): handle cold reset via physical reset switch
On the Agilex5 platform when cold reset is issued via CLI application
in the OS, it is received in the BL31 via a SMC call and handled
accordingly like flush/invalidate the caches. However, when the cold
reset is issued via an external switch these handlings are missed.
This patch addresses those missed cache operations.

Also, this patch is to restoring SCR_EL3 NS bit to its previous value
in order to avoid unintended behavior especially if subsequent code
expects the SCR_EL3 register to be in its original configuration.

Change-Id: I9737f2db649e483ba61fffa6eeb0b56a9d15074a
Signed-off-by: Girisha Dengi <girisha.dengi@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2024-12-23 17:52:41 +08:00
Boon Khai Ng
fcf906c900 feat(intel): add support for query SDM config error and status
Currently the FPGA reconfig status only return a single error status
which make the debugging of FPGA reconfiguration hard.

This patch is to expose the error status, major error code and
minor error code, for the FPGA reconfig to upper layer app.

Change-Id: I2fc68e30b45ff137f3e52f9569fdf2eaf2ca94ee
Signed-off-by: Boon Khai Ng <boon.khai.ng@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2024-12-05 11:41:14 +08:00
Sieu Mun Tang
6ce576c63d fix(intel): add FPGA isolation trigger when reconfiguration
This change is to add in new Mailbox CMD to SDM for MPFE isolation.

Change-Id: I52c84dc227e1c8edbded63c699ded63e431d9af2
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2024-11-09 00:34:13 +08:00
Sieu Mun Tang
42e906205e fix(intel): redesign F2SOC bridge enable and disable flow for Agilex5
This is to redesign the flow of F2SOC bridge enable and disable.

Change-Id: I9b2a2a11fa2ad8e622765971fdf59a0738246e13
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2024-11-09 00:32:49 +08:00
Mark Dykes
05b807616f Merge "fix(intel): add in JTAG ID for Linux FCS" into integration 2024-10-28 23:12:04 +01:00
Mark Dykes
2c878eb6c7 Merge "feat(intel): add build option for boot source" into integration 2024-10-28 23:08:07 +01:00
Mark Dykes
02711885d7 Merge "fix(intel): refactor SDMMC driver for Altera products" into integration 2024-10-28 23:03:29 +01:00
Mark Dykes
12211eac5c Merge "feat(intel): clock manager PLL configuration for Agilex5 platform" into integration 2024-10-25 16:35:21 +02:00
Mark Dykes
94188b590f Merge "fix(intel): update Agilex5 warm reset subroutines" into integration 2024-10-25 16:33:33 +02:00
Sieu Mun Tang
beba20403e fix(intel): refactor SDMMC driver for Altera products
Refactor to be more robust. Removed duplicated and not used functions.
Add in ADMA read.

Change-Id: I1a5a00397ece6f9ccc5916225ab5317010b01b52
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2024-10-25 09:38:51 +08:00
Sieu Mun Tang
e60bedd5e1 feat(intel): clock manager PLL configuration for Agilex5 platform
Read the hand-off data and configure the clock manager main
and peripheral PLL and few other misc updates.

Change-Id: I3c5cbaf7a677a022ef24b0e679860e6ee195f16a
Signed-off-by: Girisha Dengi <girisha.dengi@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2024-10-25 09:29:20 +08:00
Mark Dykes
5d23325e6b Merge "feat(intel): update BL2 platform specific functions" into integration 2024-10-24 22:18:49 +02:00
Sieu Mun Tang
c1253b2445 fix(intel): update Agilex5 warm reset subroutines
Update the 'plat_get_my_entrypoint' assembly routine to
differentiate between cold reset, warm reset and SMP
secondary boot cores request.
Add secondary core boot request markup in BL31.
Perform CACHE flush/clean ops in case of warm reset request also.

Change-Id: I7d33e362a3a513c60c8333e062ce832aa7facf38
Signed-off-by: Girisha Dengi <girisha.dengi@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2024-10-25 00:08:21 +08:00
Sieu Mun Tang
ea906b9bb9 fix(intel): add in JTAG ID for Linux FCS
This is for SMMU and Remapper enabled/disabled for
Linux FCS feature. The JTAG ID is to determine which
Agilex5 model shall be implemented.

Change-Id: Ib10d0062de8f6e27413af3dd271d97b9c2e5c079
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2024-10-24 23:21:09 +08:00
Sieu Mun Tang
fa1e92c636 feat(intel): update BL2 platform specific functions
Update and initialize the BL2 EL3 functions for agilex5
platform.

Change-Id: I673c622dfe4ff71d77edfa0866ebf6cd7163d793
Signed-off-by: Girisha Dengi <girisha.dengi@intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2024-10-24 23:15:18 +08:00
Sieu Mun Tang
ef8b05f559 feat(intel): add build option for boot source
Existing boot source is hardcoded in socfpga_plat_def.h.
To change boot source, user need to update code.
Thus adding this will remove the code update needed when
need to change boot source.

Also, it will have ARM_LINUX_KERNEL_AS_BL33 flag for each
platform in platform.mk. This will be easily to control
based on platform build.

Change-Id: I383beb8cbca5ec0f247221ad42796554adc3daae
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2024-10-24 23:10:48 +08:00
Mark Dykes
57c20e2427 Merge "fix(intel): correct macro naming" into integration 2024-10-24 16:59:57 +02:00
Mark Dykes
fa41430987 Merge "feat(intel): pinmux and power manager config for Agilex5 platform" into integration 2024-10-24 16:51:43 +02:00
Sieu Mun Tang
815245e4de fix(intel): correct macro naming
Correct macro naming to meet define macro standard.

Change-Id: Id0a091d67ef879a0f4c048bd9c2169c603ff4ce9
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2024-10-24 19:43:11 +08:00
Sieu Mun Tang
94a546acc4 feat(intel): pinmux and power manager config for Agilex5 platform
Read the hand-off data and configure the pinmux
select, IO control, IO delay and use FPGA switch.
Configure the power manager PSS SRAM power gate.

Change-Id: I2241018cbf2828182e8af84ddb214ce57e9f242a
Signed-off-by: Girisha Dengi <girisha.dengi@intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2024-10-24 15:23:43 +08:00
Sieu Mun Tang
1838a39a44 fix(intel): update all the platforms hand-off data offset value
Move the hand-off data offset value from the common
platform header file to each socfpga platform specific
header file.

Change-Id: Icfe917f788814c329659c44e298cf05d6e3d0dd9
Signed-off-by: Girisha Dengi <girisha.dengi@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2024-10-24 12:52:18 +08:00
Mark Dykes
1b9795244e Merge "fix(intel): fix CCU for cache maintenance" into integration 2024-10-22 17:33:08 +02:00
Mark Dykes
5dda797f55 Merge "fix(intel): flush L1/L2/L3/Sys cache before HPS cold reset" into integration 2024-10-22 17:30:32 +02:00
Sieu Mun Tang
f06fdb1469 fix(intel): fix CCU for cache maintenance
Fix CCU settings for cache maintenance.

Change-Id: I9af35a6ab7aa9ee20e05ba82d0a042948ac29a93
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
2024-10-22 09:46:18 +08:00
Sieu Mun Tang
f29765fd33 fix(intel): update preloaded_bl33_base for legacy product
Update preloaded_bl33_base for legacy product for Yocto.

The Yocto Jenkins build was initially configured to build products
where the starting of the DDR is from 0x0000 0000. And if there is
no NS_image_offset set, the Jenkins is not able to acquire the correct
address offset to boot up the system. However, in the direct OS boot,
there is no issue as the user shall always include the address offset
during the compilation phase. Otherwise, the code shall execute the
default address offset. Besides that, this also provides the
flexibility to user to customize their SoC design by not restricted
to the default address.

SDMMC block size. It was changed due to the need when boot to Linux.
Kernel.itb size is big thus we have to increase the available reading
block size. Otherwise for normal U-boot and Zephyr it shall not be
reading a big block size to avoid "garbage" data.

Change-Id: I1c2a22db28bf0ada734563e40efd4f5749951273
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2024-10-22 09:32:37 +08:00
Sieu Mun Tang
7ac7dadb55 fix(intel): flush L1/L2/L3/Sys cache before HPS cold reset
This fix is to flush and invalidate the caches before cold reset.
Issue happen where Agilex5 hardware does not support the caches flush.
Thus software workaround is needed.

Change-Id: Ibfeecbc611d238a069ca72f8b833f319e794cd38
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2024-10-22 01:07:19 +08:00
Sieu Mun Tang
b5c3a3fc94 feat(intel): direct boot from TF-A to Linux for Agilex
Enable and update code for TF-A direct boot Linux
for Agilex platform.

Change-Id: Id95986b7015a2a01f0aff80e1c7d8f8bb8fb4637
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
2024-10-22 00:29:00 +08:00
Mark Dykes
6ff74c1bf5 Merge "fix(intel): implement soc and lwsoc bridge control for burst speed" into integration 2024-10-18 00:37:34 +02:00
Sieu Mun Tang
a8d81d61e1 fix(intel): implement soc and lwsoc bridge control for burst speed
Implement burst speed read/write for SOC and LWSOC. Set bridge control
register to enable the register bit

Change-Id: I815b912cb90d79a548163d198eea177d70dfbc0d
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2024-10-17 23:14:55 +02:00
Girisha Dengi
6875d823ed feat(intel): update hand-off data to include agilex5 params
Update hand-off data structure to include agilex5
platform specific parameters.

Change-Id: Ic610e2d8da7488e49462293d13293e26520579e2
Signed-off-by: Girisha Dengi <girisha.dengi@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2024-10-17 23:05:31 +02:00
Mark Dykes
3eab6c920c Merge "fix(intel): update mailbox SDM printout message" into integration 2024-10-17 23:02:41 +02:00
Mark Dykes
84aeae5818 Merge "fix(intel): update the size with addition 0x8000 0000 base" into integration 2024-10-17 22:57:38 +02:00
Mark Dykes
b66f901baf Merge "fix(intel): fix bridge enable and disable function" into integration 2024-10-17 00:46:06 +02:00
Mark Dykes
8de2ae5f16 Merge "fix(intel): update outdated code for Linux direct boot" into integration 2024-10-17 00:45:35 +02:00
Sieu Mun Tang
9978a3fd8b fix(intel): update the size with addition 0x8000 0000 base
The FPGA_CONFIG_SIZE is actually the end address of FPGA_CONFIG_ADDR
Thus, we need to add in the DDR base address which is 0x8000 0000.

Change-Id: I177596243e0616c6eadc2fa388e85e28692dc8f7
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2024-10-16 23:39:09 +02:00
Sieu Mun Tang
90f5283ec0 fix(intel): fix bridge enable and disable function
1. hps reset and reboot spec is missing ack clear status step
2. software workaround for bridge timeout
3. f2sdram bridge quick write thru failed
4. bridge timeout workaround for F2SOC and F2SDRAM


Change-Id: Ide4210ff862531f82e083633af385b559ffbe16b
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2024-10-16 23:38:25 +02:00
Sieu Mun Tang
21a01dac87 fix(intel): update outdated code for Linux direct boot
1. Update emif rsthdshk  macro
2. Update mailbox return status
3. Update bridge return status

Change-Id: I33905508aceb258ac8759c10079b2af977df0e0a
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2024-10-16 23:36:49 +02:00
Sieu Mun Tang
b3d2850842 fix(intel): update Agilex5 BL2 init flow and other misc changes
BL2: Update BL2 init flow, Timer base address, avoid cache
flush of BL2 image descriptors
BL31: Remove re-init of CCU and other misc updates

Change-Id: I5f04901cc455c306209c83aad2377bbf7d8a1789
Signed-off-by: Girisha Dengi <girisha.dengi@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2024-10-09 20:04:16 +02:00
Sieu Mun Tang
ce21a1a909 feat(intel): update Agilex5 DDR and IOSSM driver
DDR and IOSSM driver code for Agilex5 platform,
initialize the DDR/IOSSM in BL2 EL3 early flow.

Change-Id: I3e4205171d9356190b60498cae322318520bb1c2
Signed-off-by: Girisha Dengi <girisha.dengi@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2024-10-07 17:28:30 +02:00
Jit Loon Lim
569a03c711 fix(intel): update mailbox SDM printout message
The printout message is misleading.
Update the message content and mask out the return code.

Change-Id: I08acb73894f8504b2773a19dbb10b42a65fcda5d
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
2024-10-02 20:45:33 +02:00