* [PATCH v2 3/8] configs: socfpga: n5x: enable CMD_MTD and SPL SDRAM support
2026-04-28 6:49 [PATCH v2 0/8] socfpga: n5x: Update Boot Support for N5X Chen Huei Lok
@ 2026-04-28 6:49 ` Chen Huei Lok
0 siblings, 0 replies; 13+ messages in thread
From: Chen Huei Lok @ 2026-04-28 6:49 UTC (permalink / raw)
To: u-boot
Cc: Tien Fong Chee, Tom Rini, Marek Vasut, Simon Goldschmidt,
Chen Huei Lok, Alif Zakuan Yuslaimi, Dinesh Maniyam, Boon Khai Ng,
Kok Kiang Hea
Enable MTD command support and SPL SDRAM driver for the N5X platform.
- Enable CONFIG_CMD_MTD to allow MTD operations from the U-Boot shell
- Enable CONFIG_SPL_ALTERA_SDRAM to initialize SDRAM in SPL
These options align N5X configuration with other SoCFPGA platforms
that use the same SDRAM controller and MTD framework.
Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com>
Signed-off-by: Chen Huei Lok <chen.huei.lok@altera.com>
---
configs/socfpga_n5x_defconfig | 2 ++
1 file changed, 2 insertions(+)
diff --git a/configs/socfpga_n5x_defconfig b/configs/socfpga_n5x_defconfig
index aeeaa1636ae..b6df9946ef3 100644
--- a/configs/socfpga_n5x_defconfig
+++ b/configs/socfpga_n5x_defconfig
@@ -55,6 +55,7 @@ CONFIG_CMD_MMC=y
CONFIG_CMD_SPI=y
CONFIG_CMD_USB=y
CONFIG_CMD_WDT=y
+CONFIG_CMD_MTD=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
@@ -68,6 +69,7 @@ CONFIG_SPL_DM_SEQ_ALIAS=y
CONFIG_DWAPB_GPIO=y
CONFIG_DM_I2C=y
CONFIG_SYS_I2C_DW=y
+CONFIG_SPL_ALTERA_SDRAM=y
CONFIG_SYS_MMC_MAX_BLK_COUNT=256
CONFIG_MMC_DW=y
CONFIG_SPI_FLASH_SPANSION=y
--
2.43.7
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 0/8] socfpga: n5x: Update Boot Support for N5X
@ 2026-04-28 7:00 Chen Huei Lok
2026-04-28 7:00 ` [PATCH v2 1/8] configs: socfpga: n5x: replace defconfig with ATF variant and simplify VAB Chen Huei Lok
` (7 more replies)
0 siblings, 8 replies; 13+ messages in thread
From: Chen Huei Lok @ 2026-04-28 7:00 UTC (permalink / raw)
To: u-boot
Cc: Tien Fong Chee, Tom Rini, Marek Vasut, Simon Goldschmidt,
Chen Huei Lok, Alif Zakuan Yuslaimi, Dinesh Maniyam, Boon Khai Ng,
Kok Kiang Hea
This patch series updates the N5X platform support:
- Replace defconfig with ATF variant
- Switch to upstream Linux DT
- Convert firewall setup to driver model
- Add ISSI QSPI support
- Enable DDR retention and SPL SDRAM support
- Update SPL data save and restore implementation
Tested-on: Intel SoCFPGA N5X SoCDK hardware.
Detailed changelog can be found in the commit messages.
v1->v2:
--------
- Fix patch series submission.
- Clean up redundant DTS override.
History:
--------
[v1] https://patchwork.ozlabs.org/project/uboot/cover/20260318030034.25889-1-chen.huei.lok@altera.com/
Chen Huei Lok (8):
configs: socfpga: n5x: replace defconfig with ATF variant and simplify
VAB
arm: dts: socfpga: n5x: enable DT register settings and update GMAC
nodes
configs: socfpga: n5x: enable CMD_MTD and SPL SDRAM support
configs: socfpga: n5x: enable required configs for DDR retention
configs: socfpga: n5x: enable ISSI QSPI
arm: socfpga: n5x: switch firewall setup to driver model
arch: arm: dts: n5x: switch to using upstream Linux DT config
arm: socfpga: n5x: update SPL data save and restore implementation
arch/arm/dts/Makefile | 1 -
arch/arm/dts/socfpga_n5x-u-boot.dtsi | 55 ++++++++++++-
arch/arm/dts/socfpga_n5x_socdk-u-boot.dtsi | 18 +++--
arch/arm/mach-socfpga/spl_n5x.c | 30 +++++++-
configs/socfpga_n5x_atf_defconfig | 89 ---------------------
configs/socfpga_n5x_defconfig | 31 +++++---
configs/socfpga_n5x_vab_defconfig | 90 +---------------------
7 files changed, 116 insertions(+), 198 deletions(-)
delete mode 100644 configs/socfpga_n5x_atf_defconfig
--
2.43.7
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 1/8] configs: socfpga: n5x: replace defconfig with ATF variant and simplify VAB
2026-04-28 7:00 [PATCH v2 0/8] socfpga: n5x: Update Boot Support for N5X Chen Huei Lok
@ 2026-04-28 7:00 ` Chen Huei Lok
2026-04-28 7:00 ` [PATCH v2 2/8] arm: dts: socfpga: n5x: enable DT register settings and update GMAC nodes Chen Huei Lok
` (6 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Chen Huei Lok @ 2026-04-28 7:00 UTC (permalink / raw)
To: u-boot
Cc: Tien Fong Chee, Tom Rini, Marek Vasut, Simon Goldschmidt,
Chen Huei Lok, Alif Zakuan Yuslaimi, Dinesh Maniyam, Boon Khai Ng,
Kok Kiang Hea
Replace socfpga_n5x_defconfig with the configuration from
socfpga_n5x_atf_defconfig and remove the latter, making the
ATF-based configuration the default for N5X.
Add # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set to disable raw image
support in SPL.
Add # CONFIG_TOOLS_MKEFICAPSULE is not set to disable building the
mkeficapsule tool and prevent build errors on hosts without GnuTLS.
Also update socfpga_n5x_vab_defconfig to align with the new ATF-based
socfpga_n5x_defconfig baseline. CONFIG_SOCFPGA_SECURE_VAB_AUTH is the
only VAB-variant-specific addition; all other settings are shared with
socfpga_n5x_defconfig.
Signed-off-by: Chen Huei Lok <chen.huei.lok@altera.com>
---
configs/socfpga_n5x_atf_defconfig | 89 ------------------------------
configs/socfpga_n5x_defconfig | 20 ++++---
configs/socfpga_n5x_vab_defconfig | 90 +------------------------------
3 files changed, 14 insertions(+), 185 deletions(-)
delete mode 100644 configs/socfpga_n5x_atf_defconfig
diff --git a/configs/socfpga_n5x_atf_defconfig b/configs/socfpga_n5x_atf_defconfig
deleted file mode 100644
index bb8f1eb7264..00000000000
--- a/configs/socfpga_n5x_atf_defconfig
+++ /dev/null
@@ -1,89 +0,0 @@
-CONFIG_ARM=y
-CONFIG_COUNTER_FREQUENCY=400000000
-CONFIG_ARCH_SOCFPGA=y
-CONFIG_TEXT_BASE=0x200000
-CONFIG_SYS_MALLOC_LEN=0x500000
-CONFIG_NR_DRAM_BANKS=2
-CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
-CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x300000
-CONFIG_SF_DEFAULT_MODE=0x2003
-CONFIG_ENV_SIZE=0x1000
-CONFIG_ENV_OFFSET=0x200
-CONFIG_DM_GPIO=y
-CONFIG_DEFAULT_DEVICE_TREE="socfpga_n5x_socdk"
-CONFIG_DM_RESET=y
-CONFIG_SPL_STACK=0xffe3f000
-CONFIG_SPL_TEXT_BASE=0xFFE00000
-CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
-CONFIG_SPL_BSS_START_ADDR=0x3ff00000
-CONFIG_SPL_BSS_MAX_SIZE=0x100000
-CONFIG_SYS_BOOTM_LEN=0x2000000
-CONFIG_TARGET_SOCFPGA_N5X_SOCDK=y
-CONFIG_IDENT_STRING="socfpga_n5x"
-CONFIG_SPL_FS_FAT=y
-CONFIG_REMAKE_ELF=y
-CONFIG_FIT=y
-CONFIG_SPL_FIT_SIGNATURE=y
-CONFIG_SPL_LOAD_FIT=y
-CONFIG_SPL_LOAD_FIT_ADDRESS=0x02000000
-CONFIG_BOOTDELAY=5
-CONFIG_USE_BOOTARGS=y
-CONFIG_BOOTARGS="earlycon panic=-1 earlyprintk=ttyS0,115200"
-CONFIG_USE_BOOTCOMMAND=y
-CONFIG_BOOTCOMMAND="run fatscript; run mmcfitload; run mmcfitboot"
-CONFIG_SYS_PBSIZE=2079
-CONFIG_SPL_MAX_SIZE=0x40000
-# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
-CONFIG_SPL_HAVE_INIT_STACK=y
-CONFIG_SPL_SYS_MALLOC=y
-CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y
-CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x3fa00000
-CONFIG_SPL_SYS_MALLOC_SIZE=0x500000
-CONFIG_SPL_CACHE=y
-CONFIG_SPL_SPI_LOAD=y
-CONFIG_SYS_SPI_U_BOOT_OFFS=0x02000000
-CONFIG_SPL_ATF=y
-CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y
-CONFIG_SPL_TARGET="spl/u-boot-spl-dtb.hex"
-CONFIG_HUSH_PARSER=y
-CONFIG_SYS_PROMPT="SOCFPGA_N5X # "
-CONFIG_CMD_MEMTEST=y
-CONFIG_CMD_GPIO=y
-CONFIG_CMD_I2C=y
-CONFIG_CMD_MMC=y
-CONFIG_CMD_SPI=y
-CONFIG_CMD_USB=y
-CONFIG_CMD_WDT=y
-CONFIG_CMD_DHCP=y
-CONFIG_CMD_MII=y
-CONFIG_CMD_PING=y
-CONFIG_CMD_CACHE=y
-CONFIG_CMD_EXT4=y
-CONFIG_CMD_FAT=y
-CONFIG_CMD_FS_GENERIC=y
-CONFIG_ENV_IS_IN_MMC=y
-CONFIG_NET_RANDOM_ETHADDR=y
-CONFIG_SPL_DM_SEQ_ALIAS=y
-CONFIG_DWAPB_GPIO=y
-CONFIG_DM_I2C=y
-CONFIG_SYS_I2C_DW=y
-CONFIG_SYS_MMC_MAX_BLK_COUNT=256
-CONFIG_MMC_DW=y
-CONFIG_SPI_FLASH_SPANSION=y
-CONFIG_SPI_FLASH_STMICRO=y
-CONFIG_PHY_MICREL=y
-CONFIG_PHY_MICREL_KSZ90X1=y
-CONFIG_ETH_DESIGNWARE=y
-CONFIG_MII=y
-CONFIG_SYS_NS16550_MEM32=y
-CONFIG_SPI=y
-CONFIG_CADENCE_QSPI=y
-CONFIG_DESIGNWARE_SPI=y
-CONFIG_USB=y
-CONFIG_USB_DWC2=y
-CONFIG_USB_STORAGE=y
-CONFIG_DESIGNWARE_WATCHDOG=y
-CONFIG_WDT=y
-# CONFIG_SPL_USE_TINY_PRINTF is not set
-CONFIG_PANIC_HANG=y
-CONFIG_SPL_CRC32=y
diff --git a/configs/socfpga_n5x_defconfig b/configs/socfpga_n5x_defconfig
index c9fa50b3aa9..aeeaa1636ae 100644
--- a/configs/socfpga_n5x_defconfig
+++ b/configs/socfpga_n5x_defconfig
@@ -1,11 +1,11 @@
CONFIG_ARM=y
CONFIG_COUNTER_FREQUENCY=400000000
CONFIG_ARCH_SOCFPGA=y
-CONFIG_TEXT_BASE=0x1000
+CONFIG_TEXT_BASE=0x200000
CONFIG_SYS_MALLOC_LEN=0x500000
CONFIG_NR_DRAM_BANKS=2
CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
-CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x101000
+CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x300000
CONFIG_SF_DEFAULT_MODE=0x2003
CONFIG_ENV_SIZE=0x1000
CONFIG_ENV_OFFSET=0x200
@@ -21,15 +21,19 @@ CONFIG_SYS_BOOTM_LEN=0x2000000
CONFIG_TARGET_SOCFPGA_N5X_SOCDK=y
CONFIG_IDENT_STRING="socfpga_n5x"
CONFIG_SPL_FS_FAT=y
-# CONFIG_PSCI_RESET is not set
CONFIG_REMAKE_ELF=y
+CONFIG_FIT=y
+CONFIG_SPL_FIT_SIGNATURE=y
+CONFIG_SPL_LOAD_FIT=y
+CONFIG_SPL_LOAD_FIT_ADDRESS=0x02000000
CONFIG_BOOTDELAY=5
CONFIG_USE_BOOTARGS=y
CONFIG_BOOTARGS="earlycon panic=-1 earlyprintk=ttyS0,115200"
CONFIG_USE_BOOTCOMMAND=y
-CONFIG_BOOTCOMMAND="run fatscript; run mmcload; run linux_qspi_enable; run mmcboot"
+CONFIG_BOOTCOMMAND="run fatscript; run mmcfitload; run mmcfitboot"
CONFIG_SYS_PBSIZE=2079
CONFIG_SPL_MAX_SIZE=0x40000
+# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
CONFIG_SPL_HAVE_INIT_STACK=y
CONFIG_SPL_SYS_MALLOC=y
@@ -38,7 +42,9 @@ CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x3fa00000
CONFIG_SPL_SYS_MALLOC_SIZE=0x500000
CONFIG_SPL_CACHE=y
CONFIG_SPL_SPI_LOAD=y
-CONFIG_SYS_SPI_U_BOOT_OFFS=0x3c00000
+CONFIG_SYS_SPI_U_BOOT_OFFS=0x02000000
+CONFIG_SPL_ATF=y
+CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y
CONFIG_SPL_TARGET="spl/u-boot-spl-dtb.hex"
CONFIG_HUSH_PARSER=y
CONFIG_SYS_PROMPT="SOCFPGA_N5X # "
@@ -56,10 +62,7 @@ CONFIG_CMD_CACHE=y
CONFIG_CMD_EXT4=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
-# CONFIG_CMD_MTDPARTS is not set
CONFIG_ENV_IS_IN_MMC=y
-CONFIG_USE_BOOTFILE=y
-CONFIG_BOOTFILE="Image"
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_SPL_DM_SEQ_ALIAS=y
CONFIG_DWAPB_GPIO=y
@@ -85,3 +88,4 @@ CONFIG_WDT=y
# CONFIG_SPL_USE_TINY_PRINTF is not set
CONFIG_PANIC_HANG=y
CONFIG_SPL_CRC32=y
+# CONFIG_TOOLS_MKEFICAPSULE is not set
diff --git a/configs/socfpga_n5x_vab_defconfig b/configs/socfpga_n5x_vab_defconfig
index 78fe42e107c..3fe74846d01 100644
--- a/configs/socfpga_n5x_vab_defconfig
+++ b/configs/socfpga_n5x_vab_defconfig
@@ -1,89 +1,3 @@
-CONFIG_ARM=y
-CONFIG_COUNTER_FREQUENCY=400000000
-CONFIG_ARCH_SOCFPGA=y
-CONFIG_TEXT_BASE=0x200000
-CONFIG_SYS_MALLOC_LEN=0x500000
-CONFIG_NR_DRAM_BANKS=2
-CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
-CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x300000
-CONFIG_SF_DEFAULT_MODE=0x2003
-CONFIG_ENV_SIZE=0x1000
-CONFIG_ENV_OFFSET=0x200
-CONFIG_DM_GPIO=y
-CONFIG_DEFAULT_DEVICE_TREE="socfpga_n5x_socdk"
-CONFIG_DM_RESET=y
-CONFIG_SPL_STACK=0xffe3f000
-CONFIG_SPL_TEXT_BASE=0xFFE00000
-CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
-CONFIG_SPL_BSS_START_ADDR=0x3ff00000
-CONFIG_SPL_BSS_MAX_SIZE=0x100000
+#include <configs/socfpga_n5x_defconfig>
+
CONFIG_SOCFPGA_SECURE_VAB_AUTH=y
-CONFIG_TARGET_SOCFPGA_N5X_SOCDK=y
-CONFIG_IDENT_STRING="socfpga_n5x"
-CONFIG_SPL_FS_FAT=y
-CONFIG_REMAKE_ELF=y
-CONFIG_FIT=y
-CONFIG_SPL_FIT_SIGNATURE=y
-CONFIG_SPL_LOAD_FIT=y
-CONFIG_SPL_LOAD_FIT_ADDRESS=0x02000000
-CONFIG_BOOTDELAY=5
-CONFIG_USE_BOOTARGS=y
-CONFIG_BOOTARGS="earlycon panic=-1 earlyprintk=ttyS0,115200"
-CONFIG_USE_BOOTCOMMAND=y
-CONFIG_BOOTCOMMAND="run fatscript; run mmcfitload; run mmcfitboot"
-CONFIG_SYS_PBSIZE=2079
-CONFIG_SPL_MAX_SIZE=0x40000
-# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
-CONFIG_SPL_HAVE_INIT_STACK=y
-CONFIG_SPL_SYS_MALLOC=y
-CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y
-CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x3fa00000
-CONFIG_SPL_SYS_MALLOC_SIZE=0x500000
-CONFIG_SPL_CACHE=y
-CONFIG_SPL_SPI_LOAD=y
-CONFIG_SYS_SPI_U_BOOT_OFFS=0x02000000
-CONFIG_SPL_ATF=y
-CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y
-CONFIG_SPL_TARGET="spl/u-boot-spl-dtb.hex"
-CONFIG_HUSH_PARSER=y
-CONFIG_SYS_PROMPT="SOCFPGA_N5X # "
-CONFIG_CMD_MEMTEST=y
-CONFIG_CMD_GPIO=y
-CONFIG_CMD_I2C=y
-CONFIG_CMD_MMC=y
-CONFIG_CMD_SPI=y
-CONFIG_CMD_USB=y
-CONFIG_CMD_WDT=y
-CONFIG_CMD_DHCP=y
-CONFIG_CMD_MII=y
-CONFIG_CMD_PING=y
-CONFIG_CMD_CACHE=y
-CONFIG_CMD_EXT4=y
-CONFIG_CMD_FAT=y
-CONFIG_CMD_FS_GENERIC=y
-CONFIG_ENV_IS_IN_MMC=y
-CONFIG_NET_RANDOM_ETHADDR=y
-CONFIG_SPL_DM_SEQ_ALIAS=y
-CONFIG_DWAPB_GPIO=y
-CONFIG_DM_I2C=y
-CONFIG_SYS_I2C_DW=y
-CONFIG_SYS_MMC_MAX_BLK_COUNT=256
-CONFIG_MMC_DW=y
-CONFIG_SPI_FLASH_SPANSION=y
-CONFIG_SPI_FLASH_STMICRO=y
-CONFIG_PHY_MICREL=y
-CONFIG_PHY_MICREL_KSZ90X1=y
-CONFIG_ETH_DESIGNWARE=y
-CONFIG_MII=y
-CONFIG_SYS_NS16550_MEM32=y
-CONFIG_SPI=y
-CONFIG_CADENCE_QSPI=y
-CONFIG_DESIGNWARE_SPI=y
-CONFIG_USB=y
-CONFIG_USB_DWC2=y
-CONFIG_USB_STORAGE=y
-CONFIG_DESIGNWARE_WATCHDOG=y
-CONFIG_WDT=y
-# CONFIG_SPL_USE_TINY_PRINTF is not set
-CONFIG_PANIC_HANG=y
-CONFIG_SPL_CRC32=y
--
2.43.7
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 2/8] arm: dts: socfpga: n5x: enable DT register settings and update GMAC nodes
2026-04-28 7:00 [PATCH v2 0/8] socfpga: n5x: Update Boot Support for N5X Chen Huei Lok
2026-04-28 7:00 ` [PATCH v2 1/8] configs: socfpga: n5x: replace defconfig with ATF variant and simplify VAB Chen Huei Lok
@ 2026-04-28 7:00 ` Chen Huei Lok
2026-04-28 7:00 ` [PATCH v2 3/8] configs: socfpga: n5x: enable CMD_MTD and SPL SDRAM support Chen Huei Lok
` (5 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Chen Huei Lok @ 2026-04-28 7:00 UTC (permalink / raw)
To: u-boot
Cc: Tien Fong Chee, Tom Rini, Marek Vasut, Simon Goldschmidt,
Chen Huei Lok, Alif Zakuan Yuslaimi, Dinesh Maniyam, Boon Khai Ng,
Kok Kiang Hea
Enable register settings in the N5X U-Boot device tree by adding
firewall configuration nodes under the L3 interconnect firewall.
These settings disable OCRAM security at the CCU and relax MPFE
firewall restrictions required during early boot.
Update the GMAC nodes to include proper compatible,
reset-names, and clock-names properties, explicitly setting
their status.
Remove the clocks property from the QSPI node in
socfpga_n5x_socdk-u-boot.dtsi. The QSPI controller clock is obtained
via cm_get_qspi_controller_clk_hz(), so the device tree clock
reference is unnecessary.
Additionally, include socfpga_soc64_u-boot.dtsi and rename the
soc node to soc@0 in socfpga_n5x-u-boot.dtsi to align with
the common SoCFPGA DT layout.
Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com>
Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Signed-off-by: Chen Huei Lok <chen.huei.lok@altera.com>
---
arch/arm/dts/socfpga_n5x-u-boot.dtsi | 38 +++++++++++++++++++++-
arch/arm/dts/socfpga_n5x_socdk-u-boot.dtsi | 5 +++
2 files changed, 42 insertions(+), 1 deletion(-)
diff --git a/arch/arm/dts/socfpga_n5x-u-boot.dtsi b/arch/arm/dts/socfpga_n5x-u-boot.dtsi
index e27a64651e1..dbfd2abfd59 100644
--- a/arch/arm/dts/socfpga_n5x-u-boot.dtsi
+++ b/arch/arm/dts/socfpga_n5x-u-boot.dtsi
@@ -5,6 +5,7 @@
* Copyright (C) 2020-2021 Intel Corporation <www.intel.com>
*/
+#include "socfpga_soc64_u-boot.dtsi"
#include "socfpga_soc64_fit-u-boot.dtsi"
#include <dt-bindings/clock/n5x-clock.h>
@@ -15,7 +16,7 @@
bootph-all;
};
- soc {
+ soc@0 {
bootph-all;
ccu: cache-controller@f7000000 {
@@ -46,17 +47,29 @@
};
&gmac0 {
+ compatible = "altr,socfpga-stmmac", "snps,dwmac-3.74a", "snps,dwmac";
+ reset-names = "stmmaceth", "stmmaceth-ocp";
clocks = <&clkmgr N5X_EMAC0_CLK>;
+ clock-names = "stmmaceth";
+ status = "disabled";
};
&gmac1 {
+ compatible = "altr,socfpga-stmmac", "snps,dwmac-3.74a", "snps,dwmac";
+ reset-names = "stmmaceth", "stmmaceth-ocp";
altr,sysmgr-syscon = <&sysmgr 0x48 0>;
clocks = <&clkmgr N5X_EMAC1_CLK>;
+ clock-names = "stmmaceth";
+ status = "disabled";
};
&gmac2 {
+ compatible = "altr,socfpga-stmmac", "snps,dwmac-3.74a", "snps,dwmac";
+ reset-names = "stmmaceth", "stmmaceth-ocp";
altr,sysmgr-syscon = <&sysmgr 0x4c 0>;
clocks = <&clkmgr N5X_EMAC2_CLK>;
+ clock-names = "stmmaceth";
+ status = "disabled";
};
&i2c0 {
@@ -132,6 +145,29 @@
clocks = <&clkmgr N5X_L4_MAIN_CLK>;
};
+&socfpga_l3interconnect_firewall {
+ ocram-firewall@f7100200 {
+ reg = <0xf7100200 0x00000014>;
+ intel,offset-settings =
+ /* Disable ocram security at CCU for non secure access */
+ <0x00000004 0x8000ffff 0xe007ffff>,
+ <0x00000008 0x8000ffff 0xe007ffff>,
+ <0x0000000c 0x8000ffff 0xe007ffff>,
+ <0x00000010 0x8000ffff 0xe007ffff>;
+ bootph-all;
+ };
+
+ mpfe-firewall@f8020000 {
+ reg = <0xf8020000 0x0000001c>;
+ intel,offset-settings =
+ /* Disable MPFE firewall for SMMU */
+ <0x00000000 0x00010101 0x00010101>,
+ /* Disable MPFE firewall for HMC adapter */
+ <0x00000004 0x00000001 0x00010101>;
+ bootph-all;
+ };
+};
+
&sysmgr {
compatible = "altr,sys-mgr", "syscon";
bootph-all;
diff --git a/arch/arm/dts/socfpga_n5x_socdk-u-boot.dtsi b/arch/arm/dts/socfpga_n5x_socdk-u-boot.dtsi
index 840537c9d0b..1f7e31bcae3 100644
--- a/arch/arm/dts/socfpga_n5x_socdk-u-boot.dtsi
+++ b/arch/arm/dts/socfpga_n5x_socdk-u-boot.dtsi
@@ -44,6 +44,10 @@
bootph-all;
};
+&gmac0 {
+ status = "okay";
+};
+
&i2c1 {
status = "okay";
};
@@ -55,6 +59,7 @@
};
&qspi {
+ /delete-property/ clocks;
status = "okay";
};
--
2.43.7
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 3/8] configs: socfpga: n5x: enable CMD_MTD and SPL SDRAM support
2026-04-28 7:00 [PATCH v2 0/8] socfpga: n5x: Update Boot Support for N5X Chen Huei Lok
2026-04-28 7:00 ` [PATCH v2 1/8] configs: socfpga: n5x: replace defconfig with ATF variant and simplify VAB Chen Huei Lok
2026-04-28 7:00 ` [PATCH v2 2/8] arm: dts: socfpga: n5x: enable DT register settings and update GMAC nodes Chen Huei Lok
@ 2026-04-28 7:00 ` Chen Huei Lok
2026-05-14 3:00 ` Chee, Tien Fong
2026-04-28 7:00 ` [PATCH v2 4/8] configs: socfpga: n5x: enable required configs for DDR retention Chen Huei Lok
` (4 subsequent siblings)
7 siblings, 1 reply; 13+ messages in thread
From: Chen Huei Lok @ 2026-04-28 7:00 UTC (permalink / raw)
To: u-boot
Cc: Tien Fong Chee, Tom Rini, Marek Vasut, Simon Goldschmidt,
Chen Huei Lok, Alif Zakuan Yuslaimi, Dinesh Maniyam, Boon Khai Ng,
Kok Kiang Hea
Enable MTD command support and SPL SDRAM driver for the N5X platform.
- Enable CONFIG_CMD_MTD to allow MTD operations from the U-Boot shell
- Enable CONFIG_SPL_ALTERA_SDRAM to initialize SDRAM in SPL
These options align N5X configuration with other SoCFPGA platforms
that use the same SDRAM controller and MTD framework.
Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com>
Signed-off-by: Chen Huei Lok <chen.huei.lok@altera.com>
---
configs/socfpga_n5x_defconfig | 2 ++
1 file changed, 2 insertions(+)
diff --git a/configs/socfpga_n5x_defconfig b/configs/socfpga_n5x_defconfig
index aeeaa1636ae..b6df9946ef3 100644
--- a/configs/socfpga_n5x_defconfig
+++ b/configs/socfpga_n5x_defconfig
@@ -55,6 +55,7 @@ CONFIG_CMD_MMC=y
CONFIG_CMD_SPI=y
CONFIG_CMD_USB=y
CONFIG_CMD_WDT=y
+CONFIG_CMD_MTD=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
@@ -68,6 +69,7 @@ CONFIG_SPL_DM_SEQ_ALIAS=y
CONFIG_DWAPB_GPIO=y
CONFIG_DM_I2C=y
CONFIG_SYS_I2C_DW=y
+CONFIG_SPL_ALTERA_SDRAM=y
CONFIG_SYS_MMC_MAX_BLK_COUNT=256
CONFIG_MMC_DW=y
CONFIG_SPI_FLASH_SPANSION=y
--
2.43.7
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 4/8] configs: socfpga: n5x: enable required configs for DDR retention
2026-04-28 7:00 [PATCH v2 0/8] socfpga: n5x: Update Boot Support for N5X Chen Huei Lok
` (2 preceding siblings ...)
2026-04-28 7:00 ` [PATCH v2 3/8] configs: socfpga: n5x: enable CMD_MTD and SPL SDRAM support Chen Huei Lok
@ 2026-04-28 7:00 ` Chen Huei Lok
2026-05-14 3:22 ` Chee, Tien Fong
2026-04-28 7:00 ` [PATCH v2 5/8] configs: socfpga: n5x: enable ISSI QSPI Chen Huei Lok
` (3 subsequent siblings)
7 siblings, 1 reply; 13+ messages in thread
From: Chen Huei Lok @ 2026-04-28 7:00 UTC (permalink / raw)
To: u-boot
Cc: Tien Fong Chee, Tom Rini, Marek Vasut, Simon Goldschmidt,
Chen Huei Lok, Alif Zakuan Yuslaimi, Dinesh Maniyam, Boon Khai Ng,
Kok Kiang Hea
Enable required configs to support DDR retention. Including generic
firmware loader for loading backup calibration data, and SHA384/512
checking.
Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com>
Signed-off-by: Chen Huei Lok <chen.huei.lok@altera.com>
---
configs/socfpga_n5x_defconfig | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/configs/socfpga_n5x_defconfig b/configs/socfpga_n5x_defconfig
index b6df9946ef3..273e74c6499 100644
--- a/configs/socfpga_n5x_defconfig
+++ b/configs/socfpga_n5x_defconfig
@@ -90,4 +90,8 @@ CONFIG_WDT=y
# CONFIG_SPL_USE_TINY_PRINTF is not set
CONFIG_PANIC_HANG=y
CONFIG_SPL_CRC32=y
+CONFIG_SHA512_ALGO=y
+CONFIG_SHA384=y
+CONFIG_FS_LOADER=y
+CONFIG_SPL_ENV_SUPPORT=y
# CONFIG_TOOLS_MKEFICAPSULE is not set
--
2.43.7
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 5/8] configs: socfpga: n5x: enable ISSI QSPI
2026-04-28 7:00 [PATCH v2 0/8] socfpga: n5x: Update Boot Support for N5X Chen Huei Lok
` (3 preceding siblings ...)
2026-04-28 7:00 ` [PATCH v2 4/8] configs: socfpga: n5x: enable required configs for DDR retention Chen Huei Lok
@ 2026-04-28 7:00 ` Chen Huei Lok
2026-04-28 7:00 ` [PATCH v2 6/8] arm: socfpga: n5x: switch firewall setup to driver model Chen Huei Lok
` (2 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Chen Huei Lok @ 2026-04-28 7:00 UTC (permalink / raw)
To: u-boot
Cc: Tien Fong Chee, Tom Rini, Marek Vasut, Simon Goldschmidt,
Chen Huei Lok, Alif Zakuan Yuslaimi, Dinesh Maniyam, Boon Khai Ng,
Kok Kiang Hea, Abdul Rahim Ahmad Syazili
Enable ISSI SPI flash support in the N5X device.
Signed-off-by: Abdul Rahim Ahmad Syazili <ahmad.syazili.abdul.rahim@altera.com>
Signed-off-by: Chen Huei Lok <chen.huei.lok@altera.com>
---
configs/socfpga_n5x_defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/configs/socfpga_n5x_defconfig b/configs/socfpga_n5x_defconfig
index 273e74c6499..17dc55aa41a 100644
--- a/configs/socfpga_n5x_defconfig
+++ b/configs/socfpga_n5x_defconfig
@@ -74,6 +74,7 @@ CONFIG_SYS_MMC_MAX_BLK_COUNT=256
CONFIG_MMC_DW=y
CONFIG_SPI_FLASH_SPANSION=y
CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_SPI_FLASH_ISSI=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_ETH_DESIGNWARE=y
--
2.43.7
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 6/8] arm: socfpga: n5x: switch firewall setup to driver model
2026-04-28 7:00 [PATCH v2 0/8] socfpga: n5x: Update Boot Support for N5X Chen Huei Lok
` (4 preceding siblings ...)
2026-04-28 7:00 ` [PATCH v2 5/8] configs: socfpga: n5x: enable ISSI QSPI Chen Huei Lok
@ 2026-04-28 7:00 ` Chen Huei Lok
2026-05-14 3:36 ` Chee, Tien Fong
2026-04-28 7:00 ` [PATCH v2 7/8] arch: arm: dts: n5x: switch to using upstream Linux DT config Chen Huei Lok
2026-04-28 7:00 ` [PATCH v2 8/8] arm: socfpga: n5x: update SPL data save and restore implementation Chen Huei Lok
7 siblings, 1 reply; 13+ messages in thread
From: Chen Huei Lok @ 2026-04-28 7:00 UTC (permalink / raw)
To: u-boot
Cc: Tien Fong Chee, Tom Rini, Marek Vasut, Simon Goldschmidt,
Chen Huei Lok, Alif Zakuan Yuslaimi, Dinesh Maniyam, Boon Khai Ng,
Kok Kiang Hea
Move the system manager and L3 interconnect firewall configuration
from a dedicated firewall_setup() function to using the driver model
(uclass_get_device_by_name()). This removes the hardcoded firewall
setup in SPL and relies on the driver model, making the code more
maintainable and aligned with upstream practices.
Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com>
Signed-off-by: Chen Huei Lok <chen.huei.lok@altera.com>
---
arch/arm/mach-socfpga/spl_n5x.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-socfpga/spl_n5x.c b/arch/arm/mach-socfpga/spl_n5x.c
index a49be837921..f776d0c0327 100644
--- a/arch/arm/mach-socfpga/spl_n5x.c
+++ b/arch/arm/mach-socfpga/spl_n5x.c
@@ -69,7 +69,17 @@ void board_init_f(ulong dummy)
print_reset_info();
cm_print_clock_quick_summary();
- firewall_setup();
+ ret = uclass_get_device_by_name(UCLASS_NOP, "socfpga-system-mgr-firewall", &dev);
+ if (ret) {
+ printf("System manager firewall configuration failed: %d\n", ret);
+ hang();
+ }
+
+ ret = uclass_get_device_by_name(UCLASS_NOP, "socfpga-l3interconnect-firewall", &dev);
+ if (ret) {
+ printf("L3 interconnect firewall configuration failed: %d\n", ret);
+ hang();
+ }
ret = uclass_get_device(UCLASS_CACHE, 0, &dev);
if (ret) {
--
2.43.7
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 7/8] arch: arm: dts: n5x: switch to using upstream Linux DT config
2026-04-28 7:00 [PATCH v2 0/8] socfpga: n5x: Update Boot Support for N5X Chen Huei Lok
` (5 preceding siblings ...)
2026-04-28 7:00 ` [PATCH v2 6/8] arm: socfpga: n5x: switch firewall setup to driver model Chen Huei Lok
@ 2026-04-28 7:00 ` Chen Huei Lok
2026-04-28 7:00 ` [PATCH v2 8/8] arm: socfpga: n5x: update SPL data save and restore implementation Chen Huei Lok
7 siblings, 0 replies; 13+ messages in thread
From: Chen Huei Lok @ 2026-04-28 7:00 UTC (permalink / raw)
To: u-boot
Cc: Tien Fong Chee, Tom Rini, Marek Vasut, Simon Goldschmidt,
Chen Huei Lok, Alif Zakuan Yuslaimi, Dinesh Maniyam, Boon Khai Ng,
Kok Kiang Hea
Migrate the legacy n5x platform to use the upstream Linux device tree
configuration. This helps reduce maintenance overhead and aligns U-Boot
with the Linux kernel's DTS hierarchy and naming conventions.
This change improves consistency between U-Boot and Linux by removing
custom/legacy DTS handling and instead relying on the standardized
definitions provided by the upstream Linux DTS.
Signed-off-by: Chen Huei Lok <chen.huei.lok@altera.com>
---
arch/arm/dts/Makefile | 1 -
arch/arm/dts/socfpga_n5x-u-boot.dtsi | 17 +++++++++++++++--
arch/arm/dts/socfpga_n5x_socdk-u-boot.dtsi | 13 ++++++-------
configs/socfpga_n5x_defconfig | 3 ++-
4 files changed, 23 insertions(+), 11 deletions(-)
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index e79cfb4b633..86c6b4f465e 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -460,7 +460,6 @@ dtb-$(CONFIG_ARCH_SOCFPGA) += \
socfpga_cyclone5_vining_fpga.dtb \
socfpga_cyclone5_ac501soc.dtb \
socfpga_cyclone5_ac550soc.dtb \
- socfpga_n5x_socdk.dtb \
socfpga_stratix10_socdk.dtb
dtb-$(CONFIG_TARGET_DRA7XX_EVM) += dra72-evm.dtb dra7-evm.dtb \
diff --git a/arch/arm/dts/socfpga_n5x-u-boot.dtsi b/arch/arm/dts/socfpga_n5x-u-boot.dtsi
index dbfd2abfd59..16b92ef48f4 100644
--- a/arch/arm/dts/socfpga_n5x-u-boot.dtsi
+++ b/arch/arm/dts/socfpga_n5x-u-boot.dtsi
@@ -10,7 +10,13 @@
#include <dt-bindings/clock/n5x-clock.h>
/{
- memory {
+ aliases {
+ spi0 = &qspi;
+ i2c0 = &i2c1;
+ };
+
+ memory@0 {
+ device_type = "memory";
#address-cells = <2>;
#size-cells = <2>;
bootph-all;
@@ -121,6 +127,14 @@
&qspi {
bootph-all;
+ compatible = "cdns,qspi-nor";
+ flash0: flash@0 {
+ };
+};
+
+&flash0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
};
&rst {
@@ -200,7 +214,6 @@
&usb0 {
clocks = <&clkmgr N5X_USB_CLK>;
- disable-over-current;
bootph-all;
};
diff --git a/arch/arm/dts/socfpga_n5x_socdk-u-boot.dtsi b/arch/arm/dts/socfpga_n5x_socdk-u-boot.dtsi
index 1f7e31bcae3..1bed87c1231 100644
--- a/arch/arm/dts/socfpga_n5x_socdk-u-boot.dtsi
+++ b/arch/arm/dts/socfpga_n5x_socdk-u-boot.dtsi
@@ -8,12 +8,11 @@
#include "socfpga_n5x-u-boot.dtsi"
/{
- aliases {
- spi0 = &qspi;
- i2c0 = &i2c1;
+ chosen {
+ u-boot,spl-boot-order = &mmc;
};
- memory {
+ memory@0 {
/*
* Memory type: DDR4 (non-interleaving mode)
* 16GB
@@ -38,10 +37,10 @@
};
&flash0 {
- compatible = "jedec,spi-nor";
- spi-tx-bus-width = <4>;
- spi-rx-bus-width = <4>;
bootph-all;
+ cdns,page-size = <256>;
+ cdns,block-size = <16>;
+ /delete-property/ cdns,read-delay;
};
&gmac0 {
diff --git a/configs/socfpga_n5x_defconfig b/configs/socfpga_n5x_defconfig
index 17dc55aa41a..8ad6316bce4 100644
--- a/configs/socfpga_n5x_defconfig
+++ b/configs/socfpga_n5x_defconfig
@@ -10,7 +10,8 @@ CONFIG_SF_DEFAULT_MODE=0x2003
CONFIG_ENV_SIZE=0x1000
CONFIG_ENV_OFFSET=0x200
CONFIG_DM_GPIO=y
-CONFIG_DEFAULT_DEVICE_TREE="socfpga_n5x_socdk"
+CONFIG_DEFAULT_DEVICE_TREE="intel/socfpga_n5x_socdk"
+CONFIG_OF_UPSTREAM=y
CONFIG_DM_RESET=y
CONFIG_SPL_STACK=0xffe3f000
CONFIG_SPL_TEXT_BASE=0xFFE00000
--
2.43.7
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 8/8] arm: socfpga: n5x: update SPL data save and restore implementation
2026-04-28 7:00 [PATCH v2 0/8] socfpga: n5x: Update Boot Support for N5X Chen Huei Lok
` (6 preceding siblings ...)
2026-04-28 7:00 ` [PATCH v2 7/8] arch: arm: dts: n5x: switch to using upstream Linux DT config Chen Huei Lok
@ 2026-04-28 7:00 ` Chen Huei Lok
7 siblings, 0 replies; 13+ messages in thread
From: Chen Huei Lok @ 2026-04-28 7:00 UTC (permalink / raw)
To: u-boot
Cc: Tien Fong Chee, Tom Rini, Marek Vasut, Simon Goldschmidt,
Chen Huei Lok, Alif Zakuan Yuslaimi, Dinesh Maniyam, Boon Khai Ng,
Kok Kiang Hea
Enable backup for data section to support warm reset as no SPL image
would be reloaded in warm reset.
Signed-off-by: Chen Huei Lok <chen.huei.lok@altera.com>
---
arch/arm/mach-socfpga/spl_n5x.c | 18 ++++++++++++++++++
configs/socfpga_n5x_defconfig | 1 +
2 files changed, 19 insertions(+)
diff --git a/arch/arm/mach-socfpga/spl_n5x.c b/arch/arm/mach-socfpga/spl_n5x.c
index f776d0c0327..8933811a7ec 100644
--- a/arch/arm/mach-socfpga/spl_n5x.c
+++ b/arch/arm/mach-socfpga/spl_n5x.c
@@ -19,11 +19,29 @@
#include <spl.h>
#include <watchdog.h>
+u32 reset_flag(u32 flag)
+{
+ /* Check rstmgr.stat for warm reset status */
+ u32 status = readl(SOCFPGA_RSTMGR_ADDRESS);
+
+ /* Check whether any L4 watchdogs or SDM had triggered warm reset */
+ u32 warm_reset_mask = RSTMGR_L4WD_MPU_WARMRESET_MASK;
+
+ if (status & warm_reset_mask)
+ return 0;
+
+ return 1;
+}
+
void board_init_f(ulong dummy)
{
int ret;
struct udevice *dev;
+#if defined(CONFIG_XPL_BUILD) && defined(CONFIG_SPL_RECOVER_DATA_SECTION)
+ spl_save_restore_data();
+#endif
+
ret = spl_early_init();
if (ret)
hang();
diff --git a/configs/socfpga_n5x_defconfig b/configs/socfpga_n5x_defconfig
index 8ad6316bce4..27e15a13659 100644
--- a/configs/socfpga_n5x_defconfig
+++ b/configs/socfpga_n5x_defconfig
@@ -22,6 +22,7 @@ CONFIG_SYS_BOOTM_LEN=0x2000000
CONFIG_TARGET_SOCFPGA_N5X_SOCDK=y
CONFIG_IDENT_STRING="socfpga_n5x"
CONFIG_SPL_FS_FAT=y
+CONFIG_SPL_RECOVER_DATA_SECTION=y
CONFIG_REMAKE_ELF=y
CONFIG_FIT=y
CONFIG_SPL_FIT_SIGNATURE=y
--
2.43.7
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH v2 3/8] configs: socfpga: n5x: enable CMD_MTD and SPL SDRAM support
2026-04-28 7:00 ` [PATCH v2 3/8] configs: socfpga: n5x: enable CMD_MTD and SPL SDRAM support Chen Huei Lok
@ 2026-05-14 3:00 ` Chee, Tien Fong
0 siblings, 0 replies; 13+ messages in thread
From: Chee, Tien Fong @ 2026-05-14 3:00 UTC (permalink / raw)
To: Chen Huei Lok, u-boot
Cc: Tom Rini, Marek Vasut, Simon Goldschmidt, Alif Zakuan Yuslaimi,
Dinesh Maniyam, Boon Khai Ng, Kok Kiang Hea
Hi Lok,
On 28/4/2026 3:00 pm, Chen Huei Lok wrote:
> Enable MTD command support and SPL SDRAM driver for the N5X platform.
> - Enable CONFIG_CMD_MTD to allow MTD operations from the U-Boot shell
> - Enable CONFIG_SPL_ALTERA_SDRAM to initialize SDRAM in SPL
>
> These options align N5X configuration with other SoCFPGA platforms
> that use the same SDRAM controller and MTD framework.
>
> Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com>
> Signed-off-by: Chen Huei Lok <chen.huei.lok@altera.com>
> ---
> configs/socfpga_n5x_defconfig | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/configs/socfpga_n5x_defconfig b/configs/socfpga_n5x_defconfig
> index aeeaa1636ae..b6df9946ef3 100644
> --- a/configs/socfpga_n5x_defconfig
> +++ b/configs/socfpga_n5x_defconfig
> @@ -55,6 +55,7 @@ CONFIG_CMD_MMC=y
> CONFIG_CMD_SPI=y
> CONFIG_CMD_USB=y
> CONFIG_CMD_WDT=y
> +CONFIG_CMD_MTD=y
I suspect the sequence may not correct.
Did you run `make socfpga_n5x_vab_defconfig && make savedefconfig && cp
defconfig configs/socfpga_n5x_vab_defconfig ?
Best regards,
Tien Fong
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 4/8] configs: socfpga: n5x: enable required configs for DDR retention
2026-04-28 7:00 ` [PATCH v2 4/8] configs: socfpga: n5x: enable required configs for DDR retention Chen Huei Lok
@ 2026-05-14 3:22 ` Chee, Tien Fong
0 siblings, 0 replies; 13+ messages in thread
From: Chee, Tien Fong @ 2026-05-14 3:22 UTC (permalink / raw)
To: Chen Huei Lok, u-boot
Cc: Tom Rini, Marek Vasut, Simon Goldschmidt, Alif Zakuan Yuslaimi,
Dinesh Maniyam, Boon Khai Ng, Kok Kiang Hea
Hi Lok,
On 28/4/2026 3:00 pm, Chen Huei Lok wrote:
> Enable required configs to support DDR retention. Including generic
> firmware loader for loading backup calibration data, and SHA384/512
> checking.
>
> Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com>
> Signed-off-by: Chen Huei Lok <chen.huei.lok@altera.com>
> ---
> configs/socfpga_n5x_defconfig | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/configs/socfpga_n5x_defconfig b/configs/socfpga_n5x_defconfig
> index b6df9946ef3..273e74c6499 100644
> --- a/configs/socfpga_n5x_defconfig
> +++ b/configs/socfpga_n5x_defconfig
> @@ -90,4 +90,8 @@ CONFIG_WDT=y
> # CONFIG_SPL_USE_TINY_PRINTF is not set
> CONFIG_PANIC_HANG=y
> CONFIG_SPL_CRC32=y
> +CONFIG_SHA512_ALGO=y
> +CONFIG_SHA384=y
> +CONFIG_FS_LOADER=y
> +CONFIG_SPL_ENV_SUPPORT=y
> # CONFIG_TOOLS_MKEFICAPSULE is not set
Please document the rationale for introducing DDR retention and describe
how HA384/SHA512, FS_LOADER, and CONFIG_SPL_ENV_SUPPORT are adapted to
support DDR retention (e.g., required init/order changes, state handoff,
buffer placement, and
failure modes).
It appears FS_LOADER may be missing pieces needed for DDR retention
(such as handling retained memory regions or re-init sequencing).
Consider restructuring this as a series that first enables DDR retention
for N5X, then adds the required support in FS_LOADER and SPL env
handling in follow-up patches.
Best regards,
Tien Fong
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 6/8] arm: socfpga: n5x: switch firewall setup to driver model
2026-04-28 7:00 ` [PATCH v2 6/8] arm: socfpga: n5x: switch firewall setup to driver model Chen Huei Lok
@ 2026-05-14 3:36 ` Chee, Tien Fong
0 siblings, 0 replies; 13+ messages in thread
From: Chee, Tien Fong @ 2026-05-14 3:36 UTC (permalink / raw)
To: Chen Huei Lok, u-boot
Cc: Tom Rini, Marek Vasut, Simon Goldschmidt, Alif Zakuan Yuslaimi,
Dinesh Maniyam, Boon Khai Ng, Kok Kiang Hea
Hi Lok,
On 28/4/2026 3:00 pm, Chen Huei Lok wrote:
> Move the system manager and L3 interconnect firewall configuration
> from a dedicated firewall_setup() function to using the driver model
> (uclass_get_device_by_name()). This removes the hardcoded firewall
> setup in SPL and relies on the driver model, making the code more
> maintainable and aligned with upstream practices.
>
> Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com>
> Signed-off-by: Chen Huei Lok <chen.huei.lok@altera.com>
> ---
> arch/arm/mach-socfpga/spl_n5x.c | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-socfpga/spl_n5x.c b/arch/arm/mach-socfpga/spl_n5x.c
> index a49be837921..f776d0c0327 100644
> --- a/arch/arm/mach-socfpga/spl_n5x.c
> +++ b/arch/arm/mach-socfpga/spl_n5x.c
> @@ -69,7 +69,17 @@ void board_init_f(ulong dummy)
> print_reset_info();
> cm_print_clock_quick_summary();
>
> - firewall_setup();
If firewall_setup() is defined in a separate source file (which is
implied by the function call existing before this patch),
removing its only call site should prompt deletion of the function
definition too
Without that, the linker may still include the dead code.
The diff should include the removal of the firewall_setup() implementation
Best regards,
Tien Fong
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2026-05-14 3:36 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-28 7:00 [PATCH v2 0/8] socfpga: n5x: Update Boot Support for N5X Chen Huei Lok
2026-04-28 7:00 ` [PATCH v2 1/8] configs: socfpga: n5x: replace defconfig with ATF variant and simplify VAB Chen Huei Lok
2026-04-28 7:00 ` [PATCH v2 2/8] arm: dts: socfpga: n5x: enable DT register settings and update GMAC nodes Chen Huei Lok
2026-04-28 7:00 ` [PATCH v2 3/8] configs: socfpga: n5x: enable CMD_MTD and SPL SDRAM support Chen Huei Lok
2026-05-14 3:00 ` Chee, Tien Fong
2026-04-28 7:00 ` [PATCH v2 4/8] configs: socfpga: n5x: enable required configs for DDR retention Chen Huei Lok
2026-05-14 3:22 ` Chee, Tien Fong
2026-04-28 7:00 ` [PATCH v2 5/8] configs: socfpga: n5x: enable ISSI QSPI Chen Huei Lok
2026-04-28 7:00 ` [PATCH v2 6/8] arm: socfpga: n5x: switch firewall setup to driver model Chen Huei Lok
2026-05-14 3:36 ` Chee, Tien Fong
2026-04-28 7:00 ` [PATCH v2 7/8] arch: arm: dts: n5x: switch to using upstream Linux DT config Chen Huei Lok
2026-04-28 7:00 ` [PATCH v2 8/8] arm: socfpga: n5x: update SPL data save and restore implementation Chen Huei Lok
-- strict thread matches above, loose matches on Subject: below --
2026-04-28 6:49 [PATCH v2 0/8] socfpga: n5x: Update Boot Support for N5X Chen Huei Lok
2026-04-28 6:49 ` [PATCH v2 3/8] configs: socfpga: n5x: enable CMD_MTD and SPL SDRAM support Chen Huei Lok
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.