Commit graph

71 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
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
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
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
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
84aeae5818 Merge "fix(intel): update the size with addition 0x8000 0000 base" into integration 2024-10-17 22:57:38 +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
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
Tanmay Kathpalia
3c640c124e fix(intel): add cache invalidation during BL31 initialization
During warm boot, the data cache is invalidated before
enabling them in u-boot proper, this cache
invalidation (+ cleaning) leads to the sync-up of stale
values in the cache to be synced with the main memory.
So, before the cache cleaning is done in u-boot proper,
it is invalidated in BL31 so that the cache data gets in
sync with u-boot proper memory address space and when
u-boot proper does its initialization which in turn clears
its BSS and heap section.

Change-Id: Ic8d8672f1e371868be7f54f5a1fae9229ab15164
Signed-off-by: Tanmay Kathpalia <tanmay.kathpalia@intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
2024-09-23 20:11:21 +02:00
Jit Loon Lim
4683946015 fix(intel): add in missing ECC register
This patch is to add in missing ECC register (INITSTAT)

Change-Id: Iecf03dc9597ec2884901c132fb9cef7e90ab06a0
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
2024-08-23 13:41:25 +02:00
Mark Dykes
44c5f8e582 Merge changes I23bdbbe1,Ic22ab741 into integration
* changes:
  feat(intel): enable VAB support for Intel products
  feat(intel): add in SHA384 authentication
2024-08-22 17:15:53 +02:00
Sieu Mun Tang
3eb5640a7d feat(intel): enable VAB support for Intel products
This patch is to implement Vendor Authorize Bootloader
support for Intel Agilex, Agilex5 and N5X.

Change-Id: I23bdbbe15b3732775cea028665e2efcbd04b3aff
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2024-07-21 10:35:17 +08:00
Jit Loon Lim
7c72dfac96 fix(intel): update sip smc config addr for agilex5
Agilex5 DDR base address started from 0x8000 0000.
Thus the SIP_SMC_FPGA_CONFIG_ADDR shall be offset to
0x8040 0000.

Change-Id: I33a840cb8ebbe02bc7ff9b1f5d452641af11e576
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2024-07-20 00:01:04 +08:00
Harrison Mutai
998da640fa refactor: fix common misspelling of init*
Change-Id: I3fc95e8e53ef487fd5a559cda739aaea33d765a9
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
2024-03-20 11:44:00 +00:00
Girisha Dengi
a773f4121b fix(intel): update nand driver to match GHRD design
Update nand driver to match GHRD design, fix row
address calculation method and other misc updates.

Signed-off-by: Girisha Dengi <girisha.dengi@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Change-Id: I1cb3dda43e767ba243fbe89bfa18818db321c5c2
2024-01-23 00:05:11 +08:00
Sandrine Bailleux
51ff56e447 Merge "feat(intel): enable SDMMC frontdoor load for ATF->Linux" into integration 2024-01-19 11:08:14 +01:00
Mahesh Rao
6cbe2c5d19 feat(intel): enable query of fip offset on RSU
Enable query of fip offset from QSPI on RSU boot for
Intel agilex and intel agilex5 platform

Change-Id: Iaa189c54723a8656b9691da5849fd86b9986cfa1
Signed-off-by: Mahesh Rao <mahesh.rao@intel.com>
2024-01-16 13:26:35 +08:00
Sandrine Bailleux (on vacation)
5551264910 Merge changes I548e3034,I65c7fd1b,I1cdacc0f,If9ac35af into integration
* changes:
  feat(intel): support QSPI ECC Linux for Agilex
  feat(intel): support QSPI ECC Linux for N5X
  feat(intel): support QSPI ECC Linux for Stratix10
  feat(intel): add in QSPI ECC for Linux
2023-12-27 11:21:09 +01:00
Jit Loon Lim
4d122e5f19 feat(intel): add in QSPI ECC for Linux
Add QSPI ECC new opcodes for Linux to access to SDM register

Change-Id: If9ac35afdddb91db6bad6b474060cd001f6d89e6
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
2023-12-22 00:39:55 +08:00
Sieu Mun Tang
b727664e0d fix(intel): add HPS remapper to remap base address for SDM
Remap base address for SDM to access DRAM.

Change-Id: If064bd1ff4571d3217b136d9b5ebbfdecb68231e
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2023-12-22 00:26:42 +08:00