summaryrefslogtreecommitdiff
path: root/arch/arm/mach-socfpga/misc_soc64.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2025-07-31 08:42:06 -0600
committerTom Rini <trini@konsulko.com>2025-07-31 08:42:06 -0600
commiteef444c38994aee9cd3c6e4df5791b5f7209c8d8 (patch)
treecea1d9071449690a92258961ca876a42ca0bc739 /arch/arm/mach-socfpga/misc_soc64.c
parent79f3e77133bd7248e4579827effc13f97a32a8a8 (diff)
parent4064e7c9fc42c1c376bd919a80b451273472f3df (diff)
Merge tag 'u-boot-socfpga-next-20250731' of https://source.denx.de/u-boot/custodians/u-boot-socfpga
This pull request includes updates for the SoCFPGA platform intended for the 2025.10 release cycle. The highlights focus on enabling the Power Manager for Agilex5, NAND boot support enhancements, and various bug fixes and cleanups across SoCFPGA components. CI: * https://source.denx.de/u-boot/custodians/u-boot-socfpga/-/pipelines/27221 Summary of changes: Agilex5 Power Manager: * Initial driver support and DT bindings are added for the Agilex5 Power Manager, enabling better power domain control. NAND Boot Support for Agilex5: * SPL support for NAND boot is enabled. * UBI/UBIFS support is configured in defconfigs. * Memory layout updates (malloc and BSS relocation) ensure proper boot behavior. Code Quality Improvements: * Coverity and runtime bug fixes (e.g., jtag_usercode check, sub-device conditionals). * Several cleanup patches addressing formatting, logic, and initialization issues. General Maintenance: * SPDX license tags and header include fixes. * Device tree updates to limit SPI clock frequency and other minor adjustments. These contributions come from Alif Zakuan Yuslaimi, Andrew Goodbody, Dinesh Maniyam, Naresh Kumar Ravulapalli, and Tingting Meng. This patch set has been tested on Agilex 5 devkit.
Diffstat (limited to 'arch/arm/mach-socfpga/misc_soc64.c')
-rw-r--r--arch/arm/mach-socfpga/misc_soc64.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm/mach-socfpga/misc_soc64.c b/arch/arm/mach-socfpga/misc_soc64.c
index 4f080f4f0b3..5222b384434 100644
--- a/arch/arm/mach-socfpga/misc_soc64.c
+++ b/arch/arm/mach-socfpga/misc_soc64.c
@@ -22,6 +22,22 @@
DECLARE_GLOBAL_DATA_PTR;
+/* Agilex5 Sub Device Jtag ID List */
+#define A3690_JTAG_ID 0x036090DD
+#define A3694_JTAG_ID 0x436090DD
+#define A36C0_JTAG_ID 0x0360C0DD
+#define A36C4_JTAG_ID 0x4360C0DD
+#define A36D0_JTAG_ID 0x0360D0DD
+#define A36D4_JTAG_ID 0x4360D0DD
+#define A36F0_JTAG_ID 0x0360F0DD
+#define A36F4_JTAG_ID 0x4360F0DD
+#define A3610_JTAG_ID 0x036010DD
+#define A3614_JTAG_ID 0x436010DD
+#define A3630_JTAG_ID 0x036030DD
+#define A3634_JTAG_ID 0x436030DD
+
+#define JTAG_ID_MASK 0xCFF0FFFF
+
/*
* FPGA programming support for SoC FPGA Stratix 10
*/
@@ -42,6 +58,22 @@ static Altera_desc altera_fpga[] = {
},
};
+u32 socfpga_get_jtag_id(void)
+{
+ u32 jtag_id;
+
+ jtag_id = readl(socfpga_get_sysmgr_addr() + SYSMGR_SOC64_BOOT_SCRATCH_COLD4);
+
+ if (!jtag_id) {
+ debug("Failed to read JTAG ID. Default JTAG ID to A36F4_JTAG_ID.\n");
+ jtag_id = A36F4_JTAG_ID;
+ }
+
+ debug("%s: jtag_id: 0x%x\n", __func__, jtag_id);
+
+ return jtag_id;
+}
+
/*
* The Agilex5 platform has enabled the bloblist feature, and the bloblist
* address and size are initialized based on the defconfig settings.