summaryrefslogtreecommitdiff
path: root/arch/arm/mach-socfpga
AgeCommit message (Collapse)Author
2025-08-08arch: arm: dts: Update Makefile for new platform Agilex7 M-seriesTingting Meng
Update Makefile to support Agilex7 M-series platform enablement. Signed-off-by: Tingting Meng <tingting.meng@altera.com> Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-08-08arch: arm: mach-socfpga: Update kconfig for new platform Agilex7 M-seriesTingting Meng
Update Kconfig for new platform Agilex7 M-series. Signed-off-by: Tingting Meng <tingting.meng@altera.com> Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-08-08ddr: altera: Add DDR driver for Agilex7 M-seriesTingting Meng
This is for new platform enablement for Agilex7 M-series. Add DDR driver for Agilex7 M-series. This driver is designed to support DDR and HBM memory. The official HBM handoff is not ready yet, therefore hardcoded handoff is used for HBM driver validation on mUDV board. Signed-off-by: Tingting Meng <tingting.meng@altera.com> Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-08-08clk: altera: Add clock support for Agilex7 M-seriesTingting Meng
Agilex7 M-series reuse the clock driver from Agilex. Signed-off-by: Tingting Meng <tingting.meng@altera.com> Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-08-08arch: arm: mach-socfpga: Update handoff settings for Agilex7 M-seriesTingting Meng
Handoff settings updated for new platform Agilex7 M-series. Signed-off-by: Tingting Meng <tingting.meng@altera.com> Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-08-08arch: arm: mach-socfpga: Improve help info.Tingting Meng
To improve help info for bridge enable/disable command. Signed-off-by: Tingting Meng <tingting.meng@altera.com> Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-08-08arch: arm: mach-socfpga: Add Agilex7 M-series mach-socfgpa enablementTingting Meng
Add platform related files for new platform Agilex7 M-series. Signed-off-by: Tingting Meng <tingting.meng@altera.com> Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-08-08arm: socfpga: soc64: Perform warm reset after L2 reset in SPLAlif Zakuan Yuslaimi
SPL checks for a magic word in the system manager's scratch register to determine if an L2 reset has occurred. If detected, SPL places all slave CPUs (CPU1–3) into WFI mode. The master CPU (CPU0) then initiates a warm reset by writing to the RMR_EL3 system register and also enters WFI mode. This warm reset flow is handled entirely within the HPS. The function `socfpga_sysreset_request()` triggers the warm reset, and upon SPL re-entry, the updated `lowlevel_init_soc64.S` handles the necessary initialization. Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-08-08arm: socfpga: misc: Exclude Agilex from clock manager base address retrievalAlif Zakuan Yuslaimi
Agilex retrieves its clock manager address via probing its own clock driver model during the SPL initialization. Therefore, excluding Agilex from calling its clock driver in misc driver to retrieve the clock manager address. Once all SoC64 devices has been successfully transition to clock driver model method, this implementation will be cleaned up. Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-08-08ddr: altera: agilex: Get ACF from boot scratch registerAlif Zakuan Yuslaimi
The DDR data rate must be set correctly in the DDRIOCTRL register according to the Actual Clock Frequency (ACF) value. By enabling the reading of ACF value from bit 18 of the boot scratch register during initialization, the DDR data rate is able to be configured accurately. Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-08-08arm: socfpga: Define the usage of boot scratch cold reg 8Alif Zakuan Yuslaimi
The boot scratch cold reg 8 is shared between DBE, DDR init progress update and Linux EDAC. This patch defines how the bits are used by respective features above and their macro names used in U-Boot. Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com> Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-08-08arm: socfpga: agilex: Enable system manager driver for AgilexAlif Zakuan Yuslaimi
The base address of system manager can be retrieved using DT framework through the system manager driver. Enable system manager support for Agilex by probing the system manager driver to initialize during SPL boot up. Signed-off-by: Boon Khai Ng <boon.khai.ng@altera.com> Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-08-08arm: socfpga: agilex5: Refactor system manager driver initializationAlif Zakuan Yuslaimi
Refactor system manager initialization by searching for system manager alias in Agilex5 device tree instead of manually passing node name to the device model calling function Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-08-08drivers: watchdog: Enable watchdog support in SPL for AgilexAlif Zakuan Yuslaimi
Enable watchdog as early as possible after clock initialization which is set at 10 seconds. Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-08-08arm: socfpga: Enable ASYNC interrupts in Agilex SPLTien Fong Chee
Asynchronous aborts were previously masked at SPL entry. To ensure early detection of system errors such as ECC faults or bus errors, asynchronous aborts should be explicitly unmasked by clearing the A-bit in the DAIF register during Agilex SPL initialization. Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com> # Conflicts: # arch/arm/mach-socfpga/spl_agilex.c
2025-08-08arm: socfpga: Update Agilex SPL data save and restore implementationAlif Zakuan Yuslaimi
Enable backup for data section to support warm reset in Agilex SPL as no SPL image would be reloaded in warm reset. Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-08-08arm: socfpga: agilex: Probe DT for firewall setupAlif Zakuan Yuslaimi
Update Agilex SPL code to implement device tree model for firewall registers setup by using DTreg driver to probe from device tree for the firewall settings instead of calling firewall driver function. Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-07-30arch: arm: agilex5: Enable power manager for Agilex5Alif Zakuan Yuslaimi
Agilex5 FSBL is required to disable the power of unused peripheral SRAM blocks to reduce power consumption. Introducing a new power manager driver for Agilex5 which will be called as part of Agilex5 SPL initialization process. This driver will read the peripheral handoff data obtained from the bitstream and will power off the specified peripheral's SRAM from the handoff data values. Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-07-30arm: socfpga: agilex5: Sub-device check enabled for runtime workaroundTingting Meng
Sub-device information is retrieved from the JTAG ID in Boot Scratch Cold 4 Register. This interface is introduced to allow device-specific errata workarounds to be applied in the future, based on the detected sub-device type. Signed-off-by: Tingting Meng <tingting.meng@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@intel.com>
2025-07-30arm: socfpga: agilex5: Coverity issue cleanup in jtag_usercode checkTingting Meng
A redundant comparison (jtag_usercode >= 0) was removed from the condition checking jtag_usercode. Since jtag_usercode is an unsigned integer, the check for non-negativity was always true. The code was simplified to resolve the Coverity warning. Signed-off-by: Tingting Meng <tingting.meng@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@intel.com>
2025-07-30arm: socfpga: n5x: Remove invalid configuration for N5XNaresh Kumar Ravulapalli
This configuration is not valid for N5X; removing it. Signed-off-by: Naresh Kumar Ravulapalli <nareshkumar.ravulapalli@altera.com> Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-07-30arch: arm: socfpga: Include BSD-3-Clause as license identifierNaresh Kumar Ravulapalli
All the source code of secure_vab.c and secure_vab.h are from Intel and Altera. Updating the license to use either GPL-2.0 or BSD-3-Clause because this copy of code may be used for open source and internal project. Signed-off-by: Naresh Kumar Ravulapalli <nareshkumar.ravulapalli@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-07-30arch: arm: socfpga: Fix header file includesNaresh Kumar Ravulapalli
Appropriate header files are included according to U-Boot coding style. Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com> Signed-off-by: Naresh Kumar Ravulapalli <nareshkumar.ravulapalli@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-06-14Merge patch series "Hex value prefix case cleanup"Tom Rini
E Shattow <e@freeshell.de> says: Make consistent use of lowercase hexadecimal prefix '0x' throughout U-Boot. There are a few remaining uses of uppercase 'X' to denote hexadecimal prefix or placeholder in documentation and error messages. External devicetree-rebasing dts/upstream and the generated code of xilinx/zynq are ignored for the series. Link: https://lore.kernel.org/r/20250606224558.1117422-1-e@freeshell.de
2025-06-14arch: use lowercase hex prefix styleE Shattow
Use consistent lowercase hex prefix style in arch/* Signed-off-by: E Shattow <e@freeshell.de>
2025-05-29global: Avoid indirect inclusion of <env.h> from <command.h>Tom Rini
The include file <command.h> does not need anything from <env.h>. Furthermore, include/env.h itself includes other headers which can lead to longer indirect inclusion paths. To prepare to remove <env.h> from <command.h> fix all of the places which had relied on this indirect inclusion to instead include <env.h> directly. Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org> # android, bcb Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> # spawn Signed-off-by: Tom Rini <trini@konsulko.com>
2025-04-22arm: socfpga: socfpga_soc64: Enable LMB_ARCH_MEM_MAPTingting Meng
LMB_ARCH_MEM_MAP is enabled, and lmb_arch_add_memory() is introduced to correctly handle memory reservations for the second and third DDR memory banks. Signed-off-by: Tingting Meng <tingting.meng@altera.com>
2025-04-22arm: socfpga: agilex5: Add MMU mapping regionTingting Meng
MMU mapping regions were added for the second and third DDR memory banks. Signed-off-by: Tingting Meng <tingting.meng@altera.com>
2025-04-22arm: socfpga: soc64: Update SoC64 CPU infoAlif Zakuan Yuslaimi
As of 2025, Altera is now a standalone company prior to being a subsidiary of Intel Corporation. Update CPU info printout naming from Intel to Altera. Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
2025-04-22configs: Enable VAB flow for Agilex5 SoCFPGA boardsNaresh Kumar Ravulapalli
Vendor Authorized Boot flow configurations are enabled for boards based on Agilex5 SoCFPGA. Also, required changes are made to the SoCFPGA make file for building and linking relevant secure source code files. Signed-off-by: Naresh Kumar Ravulapalli <nareshkumar.ravulapalli@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-04-22arm: socfpga: spl: Notify SDM on FSBL executionAlif Zakuan Yuslaimi
Send out "HPS_STAGE_NOTIFY" mailbox command to the Secure Device Manager (SDM) in SPL to inform SDM on FSBL execution. This is necessary for the SDM to recognize that the FSBL stage has begun its execution and should be made as early as possible in the FSBL process. Therefore, the mailbox will initialize and send out the notification right after the completion of timer initialization. Signed-off-by: Mahesh Rao <mahesh.rao@altera.com> Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-04-22arm: socfpga: soc64: Enable F2S bridge reset supportAlif Zakuan Yuslaimi
Enable reset support for FPGA2SDRAM bridge for Stratix10, as well as FPGA2SoC and SoC2FPGA bridges for all SoC64 families. Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-04-22arm: socfpga: soc64: Update reset manager registers for F2S bridgeAlif Zakuan Yuslaimi
Add reset manager registers in preparation for F2S bridge reset support as well as the mask support to enable/disable the bridges. Mask value: BIT0: soc2fpga BIT1: lwhps2fpga BIT2: fpga2soc These bridges are available only in Stratix10: BIT3: f2sdram0 BIT4: f2sdram1 BIT5: f2sdram2 Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-04-22arm: socfpga: mailbox: Notify SDM on HPS code execution stagesAlif Zakuan Yuslaimi
Introducing a new mailbox command "HPS_STAGE_NOTIFY" to notify Secure Device Manager (SDM) on the stage of HPS code execution. Generally, there are three main code execution stages: First Stage Boot Loader (FSBL) which is U-Boot SPL, Second Stage Boot Loader (SSBL) which is U-Boot, and the Operating System (OS) which is Linux. This enables the user to query the SDM for HPS error details. Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-02-25arm: socfpga: soc64: Add support for board_boot_order()Tien Fong Chee
Add board_boot_order() to retrieve the list of boot devices from spl-boot-order property in device tree. This board_boot_order() would be used for all Intel SOC64 devices. Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-02-25arm: armv8: Improve SPL data save and restore implementationAlif Zakuan Yuslaimi
Introduce a new symbol in the beginning of .data section in the common ARMv8 linker script and use that as a reference for data save and restore. Previously, the code would rely on calculating the start of the .data section address via data size, however, we observed that the data size does not really reflect the SPL mapped addresses. In our case, the binman_sym section size was not included in the data size, which will result in a wrong address for the .data start section, which prevents us from properly saving and restoring SPL data. This approach skips the calculation for the starting address of the .data section, and instead just defines the beginning address of the .data section and calling the symbol as needed, in which we think as a simpler and much more robust method. Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com> Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-02-25arm: socfpga: agilex5: Add SPL for Agilex5 SoCFPGATien Fong Chee
Add SPL support for Agilex5 SoCFPGA. Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-02-25ddr: altera: Add DDR driver for Agilex5 seriesTingting Meng
Adding DDR driver support for Agilex5 series. Signed-off-by: Tingting Meng <tingting.meng@altera.com>
2025-02-25arm: socfpga: smc: Add memory coherency support to mailbox commandAlif Zakuan Yuslaimi
As cache is enabled in U-Boot and disabled in ATF(BL31). We need to perform cache flush of buffers that are shared between U-Boot and ATF using secure monitor calls. Signed-off-by: Mahesh Rao <mahesh.rao@altera.com> Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com> Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-02-25arm: socfpga: Export board ID as U-Boot environmentAlif Zakuan Yuslaimi
Board ID is exported as environment variable for use to boot Linux with FIT configuration. Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com> Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-02-25arm: socfpga: agilex5: Update CPU infoAlif Zakuan Yuslaimi
Update the print info per Agilex5 Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com> Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-02-25arm: socfpga: agilex5: Add SMMU initializationTien Fong Chee
Allow non-secure accesses only with SMMU peripherals. This would protect the content in DDR secure region from accidentally modified by SMMU peripherals. Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-02-25arm: socfpga: agilex5: Enable cache flush for system memory cache in CCUTien Fong Chee
set/way instructions "dc cisw" which is used by the "dcache flush" command only flushing CPU data caches from L1 -> L2 -> L3 to system memory cache in cache coherency unit, hence this patch enables data flush from system memory cache of CCU into DDR memory. Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-02-25arm: socfpga: Add handoff data support for SoCFPGA Agilex5 deviceTien Fong Chee
Agilex5 supports both HPS handoff data and DDR handoff data. Existing HPS handoff functions are restructured to support both existing devices and Agilex5 device. Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-02-25arm: socfpga: Disable GIC for Agilex5Alif Zakuan Yuslaimi
Status polling is used instead of using interrupt controller for Agilex5. Disabling GICV3 in Agilex5 target, as well as disabling GICV2 enabled by default for all SoCFPGA devices. All the other SoCFPGA devices uses GICV2, thus enabling GICV2 in each of the devices. Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com> Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-02-25arm: socfpga: agilex5: Add warm reset mask for Agilex5Alif Zakuan Yuslaimi
There are 5 L4 watchdogs and one SDM triggered warm reset bit in Agilex5 reset manager "stat" register where bit 16:20 for L4 watchdogs. Assigning value 1 to these bits in the register address will initiate SDM to trigger warm reset. Introducing new warm reset mask for Agilex5 to trigger warm reset to all five L4 watchdogs. Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com> Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-02-25arm: socfpga: misc: Exclude Agilex5 from clock manager base address retrievalAlif Zakuan Yuslaimi
Agilex5 retrieves its clock manager address via probing its own clock driver model during SPL initialization. Therefore, excluding Agilex5 from calling generic clock driver in misc driver. Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@intel.com>
2025-02-25arm: socfpga: agilex5: Add new driver model for system manager in Agilex5Tien Fong Chee
Initial creation of new system manager driver. Add supports for the SOCFPGA System Manager Register block which aggregates different peripheral function into one area. On 64 bit ARM parts, the system manager only can be accessed during EL3 mode, this driver model provide user the high level access to system register and abstract user from low level access. The base address of system manager can be retrieved using DT framework through the System Manager driver. Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com> Signed-off-by: Boon Khai Ng <boon.khai.ng@altera.com>
2025-01-24fpga: intel_sdm_mb: add support for query SDM config error and statusBoon Khai Ng
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. Signed-off-by: Boon Khai Ng <boon.khai.ng@intel.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@intel.com>
2025-01-24arch: arm: mach-socfpga: Mailbox buffer and SDM doorbell improvementAlif Zakuan Yuslaimi
The current write and notify SDM to read mechanism has a flaw where SDM is not notified enough to be able to read all the data in the buffer. This is caused by SDM doorbell will only be sent out once the command buffer overflow check is satisfied. If the command buffer does not reach overflow status, no SDM doorbell will be sent out, which may cause a timeout as the mailbox driver will be waiting for the SDM to read the buffer to empty even though SDM is not notified to do so. The solution is to remove the command buffer overflow check and set the SDM doorbell to always trigger at the end of the command buffer. This will ensure that the SDM is able to read all of the data. Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>