From 6ae62353067e0ef542528527a7d58ff59a60c65a Mon Sep 17 00:00:00 2001 From: Caleb Ethridge Date: Tue, 7 Apr 2026 10:35:51 -0400 Subject: [PATCH 1/8] Revert "arm: sc5xx: remove LOADADDR and use kernel_addr_r" This reverts commit 450abd8 --- arch/arm/mach-sc5xx/Kconfig | 6 ++++ board/adi/sc573-ezlite/sc573-ezlite.env | 4 +++ board/adi/sc584-ezkit/sc584-ezkit.env | 4 +++ board/adi/sc589-ezkit/sc589-ezkit.env | 4 +++ board/adi/sc589-mini/sc589-mini.env | 4 +++ board/adi/sc594-som-ezkit/sc594-som-ezkit.env | 4 +++ .../adi/sc594-som-ezlite/sc594-som-ezlite.env | 4 +++ board/adi/sc598-som-ezkit/sc598-som-ezkit.env | 4 +++ .../adi/sc598-som-ezlite/sc598-som-ezlite.env | 3 ++ configs/sc573-ezlite_defconfig | 2 +- configs/sc584-ezkit_defconfig | 2 +- configs/sc589-ezkit_defconfig | 2 +- configs/sc589-mini_defconfig | 2 +- configs/sc594-som-ezkit-spl_defconfig | 2 +- configs/sc594-som-ezlite-spl_defconfig | 2 +- configs/sc598-som-ezkit-spl_defconfig | 2 +- configs/sc598-som-ezlite-spl_defconfig | 2 +- include/env/adi/adi_boot.env | 32 ++++++++----------- 18 files changed, 58 insertions(+), 27 deletions(-) diff --git a/arch/arm/mach-sc5xx/Kconfig b/arch/arm/mach-sc5xx/Kconfig index 44402b2568d9..e311a8adf9ab 100644 --- a/arch/arm/mach-sc5xx/Kconfig +++ b/arch/arm/mach-sc5xx/Kconfig @@ -140,6 +140,12 @@ config SC5XX_ROOTFS_OFFSET help The default offset where the rootfs is located. +config SC5XX_LOADADDR + hex "Load address" + default 0x90000000 + help + The default load address for u-boot. + config ADI_IMAGE string "ADI fitImage type" help diff --git a/board/adi/sc573-ezlite/sc573-ezlite.env b/board/adi/sc573-ezlite/sc573-ezlite.env index 942978e55711..2ba58d05e0f7 100644 --- a/board/adi/sc573-ezlite/sc573-ezlite.env +++ b/board/adi/sc573-ezlite/sc573-ezlite.env @@ -4,6 +4,10 @@ * (C) Copyright 2024 - Analog Devices, Inc. */ +jffs2file=adsp-sc5xx-__stringify(CONFIG_ADI_IMAGE)-adsp-sc573-ezkit.jffs2 +adi_image_offset=0xd0000 +loadaddr=CONFIG_SC5XX_LOADADDR + #define USE_NFS #define USE_SPI #define USE_RAM diff --git a/board/adi/sc584-ezkit/sc584-ezkit.env b/board/adi/sc584-ezkit/sc584-ezkit.env index 059b4ebfb1d1..26edc67651a7 100644 --- a/board/adi/sc584-ezkit/sc584-ezkit.env +++ b/board/adi/sc584-ezkit/sc584-ezkit.env @@ -4,6 +4,10 @@ * (C) Copyright 2024 - Analog Devices, Inc. */ +jffs2file=adsp-sc5xx-__stringify(CONFIG_ADI_IMAGE)-adsp-sc584-ezkit.jffs2 +adi_image_offset=0xd0000 +loadaddr=CONFIG_SC5XX_LOADADDR + #define USE_NFS #define USE_SPI #define USE_RAM diff --git a/board/adi/sc589-ezkit/sc589-ezkit.env b/board/adi/sc589-ezkit/sc589-ezkit.env index 197df99cadf3..181140adf53a 100644 --- a/board/adi/sc589-ezkit/sc589-ezkit.env +++ b/board/adi/sc589-ezkit/sc589-ezkit.env @@ -4,6 +4,10 @@ * (C) Copyright 2024 - Analog Devices, Inc. */ +jffs2file=adsp-sc5xx-__stringify(CONFIG_ADI_IMAGE)-adsp-sc589-ezkit.jffs2 +adi_image_offset=0xd0000 +loadaddr=CONFIG_SC5XX_LOADADDR + #define USE_NFS #define USE_RAM #define USE_MMC diff --git a/board/adi/sc589-mini/sc589-mini.env b/board/adi/sc589-mini/sc589-mini.env index 3acc51fc2060..68d6e2c15678 100644 --- a/board/adi/sc589-mini/sc589-mini.env +++ b/board/adi/sc589-mini/sc589-mini.env @@ -4,6 +4,10 @@ * (C) Copyright 2024 - Analog Devices, Inc. */ +jffs2file=adsp-sc5xx-__stringify(CONFIG_ADI_IMAGE)-adsp-sc589-mini.jffs2 +adi_image_offset=0xd0000 +loadaddr=CONFIG_SC5XX_LOADADDR + #define USE_NFS #define USE_RAM #define USE_SPI diff --git a/board/adi/sc594-som-ezkit/sc594-som-ezkit.env b/board/adi/sc594-som-ezkit/sc594-som-ezkit.env index e98a346e9c08..5dc82b46ddfd 100644 --- a/board/adi/sc594-som-ezkit/sc594-som-ezkit.env +++ b/board/adi/sc594-som-ezkit/sc594-som-ezkit.env @@ -4,6 +4,10 @@ * (C) Copyright 2024 - Analog Devices, Inc. */ +jffs2file=adsp-sc5xx-__stringify(CONFIG_ADI_IMAGE)-adsp-sc594-som-ezkit.jffs2 +adi_image_offset=0x100000 +loadaddr=CONFIG_SC5XX_LOADADDR + #define USE_NFS #define USE_SPI #define USE_OSPI diff --git a/board/adi/sc594-som-ezlite/sc594-som-ezlite.env b/board/adi/sc594-som-ezlite/sc594-som-ezlite.env index 6507b6916b77..e983d9e40a64 100644 --- a/board/adi/sc594-som-ezlite/sc594-som-ezlite.env +++ b/board/adi/sc594-som-ezlite/sc594-som-ezlite.env @@ -4,6 +4,10 @@ * (C) Copyright 2024 - Analog Devices, Inc. */ +jffs2file=adsp-sc5xx-__stringify(CONFIG_ADI_IMAGE)-adsp-sc594-som-ezlite.jffs2 +adi_image_offset=0x100000 +loadaddr=CONFIG_SC5XX_LOADADDR + #define USE_NFS #define USE_SPI #define USE_OSPI diff --git a/board/adi/sc598-som-ezkit/sc598-som-ezkit.env b/board/adi/sc598-som-ezkit/sc598-som-ezkit.env index e98a346e9c08..c935d91a210a 100644 --- a/board/adi/sc598-som-ezkit/sc598-som-ezkit.env +++ b/board/adi/sc598-som-ezkit/sc598-som-ezkit.env @@ -4,6 +4,10 @@ * (C) Copyright 2024 - Analog Devices, Inc. */ +jffs2file=adsp-sc5xx-__stringify(CONFIG_ADI_IMAGE)-adsp-sc598-som-ezkit.jffs2 +adi_image_offset=0x100000 +loadaddr=CONFIG_SC5XX_LOADADDR + #define USE_NFS #define USE_SPI #define USE_OSPI diff --git a/board/adi/sc598-som-ezlite/sc598-som-ezlite.env b/board/adi/sc598-som-ezlite/sc598-som-ezlite.env index 942978e55711..ef3e29d1b5a7 100644 --- a/board/adi/sc598-som-ezlite/sc598-som-ezlite.env +++ b/board/adi/sc598-som-ezlite/sc598-som-ezlite.env @@ -4,6 +4,9 @@ * (C) Copyright 2024 - Analog Devices, Inc. */ +adi_image_offset=0x100000 +loadaddr=CONFIG_SC5XX_LOADADDR + #define USE_NFS #define USE_SPI #define USE_RAM diff --git a/configs/sc573-ezlite_defconfig b/configs/sc573-ezlite_defconfig index 802f0e524008..28dbc7df2a5d 100644 --- a/configs/sc573-ezlite_defconfig +++ b/configs/sc573-ezlite_defconfig @@ -6,7 +6,7 @@ CONFIG_SPL_GPIO=y CONFIG_DM_GPIO=y CONFIG_SPL_SERIAL=y CONFIG_SPL_SYS_MALLOC_F_LEN=0x10000 -CONFIG_SYS_LOAD_ADDR=0x83000000 +CONFIG_SC5XX_LOADADDR=0x83000000 CONFIG_WATCHDOG_TIMEOUT_MSECS=60000 CONFIG_CGU0_CLKOUTSEL=7 # CONFIG_EFI_LOADER is not set diff --git a/configs/sc584-ezkit_defconfig b/configs/sc584-ezkit_defconfig index 471f38fbb707..7c9ddb3b47eb 100644 --- a/configs/sc584-ezkit_defconfig +++ b/configs/sc584-ezkit_defconfig @@ -10,7 +10,7 @@ CONFIG_SPL_SYS_MALLOC_F_LEN=0x8000 CONFIG_SPL_BSS_START_ADDR=0x200A0000 CONFIG_SPL_BSS_MAX_SIZE=0x8000 CONFIG_SC58X=y -CONFIG_SYS_LOAD_ADDR=0x89300000 +CONFIG_SC5XX_LOADADDR=0x89300000 CONFIG_WATCHDOG_TIMEOUT_MSECS=60000 CONFIG_ADI_BUG_EZKHW21=y CONFIG_CGU0_CLKOUTSEL=7 diff --git a/configs/sc589-ezkit_defconfig b/configs/sc589-ezkit_defconfig index f5e3c7e28b32..f42ee15fbed9 100644 --- a/configs/sc589-ezkit_defconfig +++ b/configs/sc589-ezkit_defconfig @@ -13,7 +13,7 @@ CONFIG_SPL_BSS_START_ADDR=0x200A0000 CONFIG_SPL_BSS_MAX_SIZE=0x8000 CONFIG_SC58X=y CONFIG_TARGET_SC589_EZKIT=y -CONFIG_SYS_LOAD_ADDR=0xC3000000 +CONFIG_SC5XX_LOADADDR=0xC3000000 CONFIG_WATCHDOG_TIMEOUT_MSECS=60000 CONFIG_ADI_USE_DMC1=y CONFIG_CGU0_CLKOUTSEL=7 diff --git a/configs/sc589-mini_defconfig b/configs/sc589-mini_defconfig index 3ecdee918924..b2249ac14d82 100644 --- a/configs/sc589-mini_defconfig +++ b/configs/sc589-mini_defconfig @@ -12,7 +12,7 @@ CONFIG_SPL_BSS_START_ADDR=0x200A0000 CONFIG_SPL_BSS_MAX_SIZE=0x8000 CONFIG_SC58X=y CONFIG_TARGET_SC589_MINI=y -CONFIG_SYS_LOAD_ADDR=0xC3000000 +CONFIG_SC5XX_LOADADDR=0xC3000000 CONFIG_WATCHDOG_TIMEOUT_MSECS=60000 CONFIG_ADI_USE_DMC1=y # CONFIG_EFI_LOADER is not set diff --git a/configs/sc594-som-ezkit-spl_defconfig b/configs/sc594-som-ezkit-spl_defconfig index 0cbce440e014..4aaace6ad395 100644 --- a/configs/sc594-som-ezkit-spl_defconfig +++ b/configs/sc594-som-ezkit-spl_defconfig @@ -10,7 +10,6 @@ CONFIG_SPL_SERIAL=y CONFIG_SPL_SYS_MALLOC_F_LEN=0x10000 CONFIG_SC59X=y CONFIG_TARGET_SC594_SOM_EZKIT=y -CONFIG_SYS_LOAD_ADDR=0xA2000000 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_FIT=y CONFIG_FIT_SIGNATURE=y @@ -75,3 +74,4 @@ CONFIG_SPL_TIMER=y CONFIG_USB=y CONFIG_USB_DWC2=y CONFIG_USB_STORAGE=y +CONFIG_SC5XX_LOADADDR=0xA2000000 diff --git a/configs/sc594-som-ezlite-spl_defconfig b/configs/sc594-som-ezlite-spl_defconfig index 34f9c65ebe08..e1842089588e 100644 --- a/configs/sc594-som-ezlite-spl_defconfig +++ b/configs/sc594-som-ezlite-spl_defconfig @@ -9,7 +9,6 @@ CONFIG_SPL_SERIAL=y CONFIG_SPL_STACK=0x200E4000 CONFIG_SPL_SYS_MALLOC_F_LEN=0x10000 CONFIG_SC59X=y -CONFIG_SYS_LOAD_ADDR=0xA2000000 CONFIG_CGU1_DIV_S1SELEX=16 CONFIG_CDU0_CLKO10=5 CONFIG_SF_DEFAULT_BUS=0 @@ -84,3 +83,4 @@ CONFIG_USB_DWC2=y CONFIG_USB_STORAGE=y # CONFIG_SPL_CRC8 is not set # CONFIG_TOOLS_MKEFICAPSULE is not set +CONFIG_SC5XX_LOADADDR=0xA2000000 diff --git a/configs/sc598-som-ezkit-spl_defconfig b/configs/sc598-som-ezkit-spl_defconfig index a1a200092a16..d71ea76a2421 100644 --- a/configs/sc598-som-ezkit-spl_defconfig +++ b/configs/sc598-som-ezkit-spl_defconfig @@ -11,7 +11,6 @@ CONFIG_SPL_SYS_MALLOC_F_LEN=0x10000 CONFIG_SC59X_64=y CONFIG_TARGET_SC598_SOM_EZKIT=y CONFIG_SYS_BOOTM_LEN=0x4000000 -CONFIG_SYS_LOAD_ADDR=0x90000000 CONFIG_CGU1_PLL3_DDRCLK=y CONFIG_CGU1_PLL3_VCO_MSEL=64 CONFIG_CGU1_PLL3_DCLK_DIV=2 @@ -109,3 +108,4 @@ CONFIG_USB_DWC2=y CONFIG_USB_STORAGE=y # CONFIG_SPL_CRC8 is not set # CONFIG_TOOLS_MKEFICAPSULE is not set +CONFIG_SC5XX_LOADADDR=0x90000000 diff --git a/configs/sc598-som-ezlite-spl_defconfig b/configs/sc598-som-ezlite-spl_defconfig index b96ae6d33fcc..101b86d5a690 100644 --- a/configs/sc598-som-ezlite-spl_defconfig +++ b/configs/sc598-som-ezlite-spl_defconfig @@ -11,7 +11,6 @@ CONFIG_SPL_STACK=0x200E4000 CONFIG_SPL_SYS_MALLOC_F_LEN=0x10000 CONFIG_SC59X_64=y CONFIG_SYS_BOOTM_LEN=0x4000000 -CONFIG_SYS_LOAD_ADDR=0x90000000 CONFIG_CGU1_PLL3_DDRCLK=y CONFIG_CGU1_PLL3_VCO_MSEL=64 CONFIG_CGU1_PLL3_DCLK_DIV=2 @@ -107,3 +106,4 @@ CONFIG_USB_DWC2=y CONFIG_USB_STORAGE=y # CONFIG_SPL_CRC8 is not set # CONFIG_TOOLS_MKEFICAPSULE is not set +CONFIG_SC5XX_LOADADDR=0x90000000 diff --git a/include/env/adi/adi_boot.env b/include/env/adi/adi_boot.env index 76e4d30a242c..046f4f8a4100 100644 --- a/include/env/adi/adi_boot.env +++ b/include/env/adi/adi_boot.env @@ -2,7 +2,7 @@ * A target board needs to set these variables for the commands below to work: * * - adi_image_offset, location of the fitImage on the SPI flash - * - kernel_addr_r, where you want to load things + * - loadaddr, where you want to load things */ #ifdef CONFIG_SC59X_64 @@ -12,7 +12,6 @@ #endif /* Config options */ -kernel_addr_r=CONFIG_SYS_LOAD_ADDR ethaddr=02:80:ad:20:31:e8 eth1addr=02:80:ad:20:31:e9 httpdstp=8000 @@ -22,11 +21,6 @@ initrd_high=0xffffffffffffffff #else initrd_high=0xffffffff #endif -#if defined(CONFIG_SC59X) || defined(CONFIG_SC59X_64) -adi_image_offset=0x100000 -#else -adi_image_offset=0xd0000 -#endif /* Args for each boot mode */ adi_bootargs=EARLY_PRINTK console=ttySC0,CONFIG_BAUDRATE vmalloc=512M @@ -40,43 +34,43 @@ rootpath=/romfs nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath},tcp,nfsvers=3 ${adi_bootargs} nfsboot= run nfsargs; run addip; - wget ${kernel_addr_r} ${serverip}:/fitImage; - bootm + wget ${loadaddr} ${serverip}:/fitImage; + bootm ${loadaddr} #endif #if defined(USE_MMC) mmcargs=setenv bootargs root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait ${adi_bootargs} mmcboot=mmc rescan; - ext4load mmc 0:1 ${kernel_addr_r} /fitImage; + ext4load mmc 0:1 ${loadaddr} /fitImage; run mmcargs; - bootm + bootm ${loadaddr} #endif #if defined(USE_SPI) spiargs=setenv bootargs rootfstype=ubifs root=ubi0:rootfs ubi.mtd=3 rw ${adi_bootargs}; setenv sfdev CONFIG_SC_BOOT_SPI_BUS:CONFIG_SC_BOOT_SPI_SSEL spiboot=run spiargs; sf probe ${sfdev}; - sf read ${kernel_addr_r} ${adi_image_offset} 0xF00000; - bootm + sf read ${loadaddr} ${adi_image_offset} 0xF00000; + bootm ${loadaddr} #endif #if defined(USE_OSPI) ospiargs=setenv bootargs rootfstype=ubifs root=ubi0:rootfs ubi.mtd=3 rw ${adi_bootargs}; setenv sfdev CONFIG_SC_BOOT_OSPI_BUS:CONFIG_SC_BOOT_OSPI_SSEL ospiboot=run ospiargs; sf probe ${sfdev}; - sf read ${kernel_addr_r} ${adi_image_offset} 0xF00000; - bootm + sf read ${loadaddr} ${adi_image_offset} 0xF00000; + bootm ${loadaddr} #endif #if defined(USE_RAM) -ramboot= wget ${kernel_addr_r} ${serverip}:/fitImage; +ramboot= wget ${loadaddr} ${serverip}:/fitImage; run ramargs; - bootm + bootm ${loadaddr} #endif #if defined(USE_USB) usbargs=setenv bootargs root=/dev/sda2 rw rootfstype=ext4 rootwait ${adi_bootargs} usbboot=usb start; - ext4load usb 0:1 ${kernel_addr_r} /fitImage; run usbargs; - bootm + ext4load usb 0:1 ${loadaddr} /fitImage; run usbargs; + bootm ${loadaddr} #endif From de56900d68bf0ece916a40ddf5430bb1c755db2c Mon Sep 17 00:00:00 2001 From: Caleb Ethridge Date: Tue, 21 Apr 2026 09:21:06 -0400 Subject: [PATCH 2/8] Revert "mach-sc5xx: Switch from tftp to wget" This reverts commit 482c6861ab438bec5bdfc85836cafc38e36cf6e9. --- include/env/adi/adi_boot.env | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/include/env/adi/adi_boot.env b/include/env/adi/adi_boot.env index 046f4f8a4100..60bfd2231bea 100644 --- a/include/env/adi/adi_boot.env +++ b/include/env/adi/adi_boot.env @@ -14,7 +14,6 @@ /* Config options */ ethaddr=02:80:ad:20:31:e8 eth1addr=02:80:ad:20:31:e9 -httpdstp=8000 uart_console=CONFIG_UART_CONSOLE #ifdef CONFIG_SC59X_64 initrd_high=0xffffffffffffffff @@ -27,14 +26,15 @@ adi_bootargs=EARLY_PRINTK console=ttySC0,CONFIG_BAUDRATE vmalloc=512M ramargs=setenv bootargs ${adi_bootargs} addip=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:eth0:off -rootpath=/romfs /* Boot modes are selectable and should be defined in the board env before including */ #if defined(USE_NFS) +// rootpath is set by CONFIG_ROOTPATH nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath},tcp,nfsvers=3 ${adi_bootargs} -nfsboot= run nfsargs; +nfsboot=run init_ethernet; + tftp ${loadaddr} ${tftp_dir_prefix}${imagefile}; + run nfsargs; run addip; - wget ${loadaddr} ${serverip}:/fitImage; bootm ${loadaddr} #endif @@ -63,7 +63,8 @@ ospiboot=run ospiargs; #endif #if defined(USE_RAM) -ramboot= wget ${loadaddr} ${serverip}:/fitImage; +ramboot=run init_ethernet; + tftp ${loadaddr} ${tfpt_dir_prefix}${imagefile}; run ramargs; bootm ${loadaddr} #endif From c2b5e75448190b5a5b92b8d36b3dd9c845348378 Mon Sep 17 00:00:00 2001 From: Caleb Ethridge Date: Tue, 21 Apr 2026 08:53:30 -0400 Subject: [PATCH 3/8] Revert "mach-sc5xx: Add USB boot command" This reverts commit 1efdd5ed6e757395d0470d4b1ecf7b8d4e94e9b7. --- board/adi/sc573-ezlite/sc573-ezlite.env | 1 - board/adi/sc589-ezkit/sc589-ezkit.env | 1 - board/adi/sc589-mini/sc589-mini.env | 1 - board/adi/sc594-som-ezkit/sc594-som-ezkit.env | 1 - board/adi/sc598-som-ezkit/sc598-som-ezkit.env | 1 - include/env/adi/adi_boot.env | 7 ------- 6 files changed, 12 deletions(-) diff --git a/board/adi/sc573-ezlite/sc573-ezlite.env b/board/adi/sc573-ezlite/sc573-ezlite.env index 2ba58d05e0f7..ef5273a70700 100644 --- a/board/adi/sc573-ezlite/sc573-ezlite.env +++ b/board/adi/sc573-ezlite/sc573-ezlite.env @@ -12,6 +12,5 @@ loadaddr=CONFIG_SC5XX_LOADADDR #define USE_SPI #define USE_RAM #define USE_MMC -#define USE_USB #include diff --git a/board/adi/sc589-ezkit/sc589-ezkit.env b/board/adi/sc589-ezkit/sc589-ezkit.env index 181140adf53a..0c6c7b8119f8 100644 --- a/board/adi/sc589-ezkit/sc589-ezkit.env +++ b/board/adi/sc589-ezkit/sc589-ezkit.env @@ -12,6 +12,5 @@ loadaddr=CONFIG_SC5XX_LOADADDR #define USE_RAM #define USE_MMC #define USE_SPI -#define USE_USB #include diff --git a/board/adi/sc589-mini/sc589-mini.env b/board/adi/sc589-mini/sc589-mini.env index 68d6e2c15678..1a104179588e 100644 --- a/board/adi/sc589-mini/sc589-mini.env +++ b/board/adi/sc589-mini/sc589-mini.env @@ -12,6 +12,5 @@ loadaddr=CONFIG_SC5XX_LOADADDR #define USE_RAM #define USE_SPI #define USE_MMC -#define USE_USB #include diff --git a/board/adi/sc594-som-ezkit/sc594-som-ezkit.env b/board/adi/sc594-som-ezkit/sc594-som-ezkit.env index 5dc82b46ddfd..bfda355c8c05 100644 --- a/board/adi/sc594-som-ezkit/sc594-som-ezkit.env +++ b/board/adi/sc594-som-ezkit/sc594-som-ezkit.env @@ -13,6 +13,5 @@ loadaddr=CONFIG_SC5XX_LOADADDR #define USE_OSPI #define USE_RAM #define USE_MMC -#define USE_USB #include diff --git a/board/adi/sc598-som-ezkit/sc598-som-ezkit.env b/board/adi/sc598-som-ezkit/sc598-som-ezkit.env index c935d91a210a..63dc580df56e 100644 --- a/board/adi/sc598-som-ezkit/sc598-som-ezkit.env +++ b/board/adi/sc598-som-ezkit/sc598-som-ezkit.env @@ -13,6 +13,5 @@ loadaddr=CONFIG_SC5XX_LOADADDR #define USE_OSPI #define USE_RAM #define USE_MMC -#define USE_USB #include diff --git a/include/env/adi/adi_boot.env b/include/env/adi/adi_boot.env index 60bfd2231bea..c9807d3d6a51 100644 --- a/include/env/adi/adi_boot.env +++ b/include/env/adi/adi_boot.env @@ -68,10 +68,3 @@ ramboot=run init_ethernet; run ramargs; bootm ${loadaddr} #endif - -#if defined(USE_USB) -usbargs=setenv bootargs root=/dev/sda2 rw rootfstype=ext4 rootwait ${adi_bootargs} -usbboot=usb start; - ext4load usb 0:1 ${loadaddr} /fitImage; run usbargs; - bootm ${loadaddr} -#endif From 67db65e452d0d049b5751a3fc3b762921a131259 Mon Sep 17 00:00:00 2001 From: Caleb Ethridge Date: Tue, 21 Apr 2026 09:22:41 -0400 Subject: [PATCH 4/8] mach-sc5xx: Switch from tftp to wget Switch the nfsboot and other relevant commands to use wget instead of tftp. This also includes the addition of the httpdstp variable for selecting the wget port. The default port is set to 8000 instead of the usual 80 to allow for use with an unprivileged web server. Signed-off-by: Caleb Ethridge --- include/env/adi/adi_boot.env | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/include/env/adi/adi_boot.env b/include/env/adi/adi_boot.env index c9807d3d6a51..27b5f1ddb91e 100644 --- a/include/env/adi/adi_boot.env +++ b/include/env/adi/adi_boot.env @@ -14,6 +14,7 @@ /* Config options */ ethaddr=02:80:ad:20:31:e8 eth1addr=02:80:ad:20:31:e9 +httpdstp=8000 uart_console=CONFIG_UART_CONSOLE #ifdef CONFIG_SC59X_64 initrd_high=0xffffffffffffffff @@ -26,15 +27,14 @@ adi_bootargs=EARLY_PRINTK console=ttySC0,CONFIG_BAUDRATE vmalloc=512M ramargs=setenv bootargs ${adi_bootargs} addip=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:eth0:off +rootpath=/romfs /* Boot modes are selectable and should be defined in the board env before including */ #if defined(USE_NFS) -// rootpath is set by CONFIG_ROOTPATH nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath},tcp,nfsvers=3 ${adi_bootargs} -nfsboot=run init_ethernet; - tftp ${loadaddr} ${tftp_dir_prefix}${imagefile}; - run nfsargs; +nfsboot= run nfsargs; run addip; + wget ${loadaddr} ${serverip}:/fitImage; bootm ${loadaddr} #endif @@ -63,8 +63,7 @@ ospiboot=run ospiargs; #endif #if defined(USE_RAM) -ramboot=run init_ethernet; - tftp ${loadaddr} ${tfpt_dir_prefix}${imagefile}; +ramboot= wget ${loadaddr} ${serverip}:/fitImage; run ramargs; bootm ${loadaddr} #endif From c09d161341427b25ee1b230ee8b3ce67a23ab4c3 Mon Sep 17 00:00:00 2001 From: Caleb Ethridge Date: Thu, 23 Apr 2026 09:43:48 -0400 Subject: [PATCH 5/8] mach-sc5xx: Add USB boot command Add the USB boot command to the environments of the boards that support it. Signed-off-by: Caleb Ethridge --- board/adi/sc573-ezlite/sc573-ezlite.env | 1 + board/adi/sc584-ezkit/sc584-ezkit.env | 1 + board/adi/sc589-ezkit/sc589-ezkit.env | 1 + board/adi/sc589-mini/sc589-mini.env | 1 + board/adi/sc594-som-ezkit/sc594-som-ezkit.env | 1 + board/adi/sc594-som-ezlite/sc594-som-ezlite.env | 1 + board/adi/sc598-som-ezkit/sc598-som-ezkit.env | 1 + include/env/adi/adi_boot.env | 7 +++++++ 8 files changed, 14 insertions(+) diff --git a/board/adi/sc573-ezlite/sc573-ezlite.env b/board/adi/sc573-ezlite/sc573-ezlite.env index ef5273a70700..2ba58d05e0f7 100644 --- a/board/adi/sc573-ezlite/sc573-ezlite.env +++ b/board/adi/sc573-ezlite/sc573-ezlite.env @@ -12,5 +12,6 @@ loadaddr=CONFIG_SC5XX_LOADADDR #define USE_SPI #define USE_RAM #define USE_MMC +#define USE_USB #include diff --git a/board/adi/sc584-ezkit/sc584-ezkit.env b/board/adi/sc584-ezkit/sc584-ezkit.env index 26edc67651a7..2b7365142e0c 100644 --- a/board/adi/sc584-ezkit/sc584-ezkit.env +++ b/board/adi/sc584-ezkit/sc584-ezkit.env @@ -11,5 +11,6 @@ loadaddr=CONFIG_SC5XX_LOADADDR #define USE_NFS #define USE_SPI #define USE_RAM +#define USE_USB #include diff --git a/board/adi/sc589-ezkit/sc589-ezkit.env b/board/adi/sc589-ezkit/sc589-ezkit.env index 0c6c7b8119f8..181140adf53a 100644 --- a/board/adi/sc589-ezkit/sc589-ezkit.env +++ b/board/adi/sc589-ezkit/sc589-ezkit.env @@ -12,5 +12,6 @@ loadaddr=CONFIG_SC5XX_LOADADDR #define USE_RAM #define USE_MMC #define USE_SPI +#define USE_USB #include diff --git a/board/adi/sc589-mini/sc589-mini.env b/board/adi/sc589-mini/sc589-mini.env index 1a104179588e..68d6e2c15678 100644 --- a/board/adi/sc589-mini/sc589-mini.env +++ b/board/adi/sc589-mini/sc589-mini.env @@ -12,5 +12,6 @@ loadaddr=CONFIG_SC5XX_LOADADDR #define USE_RAM #define USE_SPI #define USE_MMC +#define USE_USB #include diff --git a/board/adi/sc594-som-ezkit/sc594-som-ezkit.env b/board/adi/sc594-som-ezkit/sc594-som-ezkit.env index bfda355c8c05..5dc82b46ddfd 100644 --- a/board/adi/sc594-som-ezkit/sc594-som-ezkit.env +++ b/board/adi/sc594-som-ezkit/sc594-som-ezkit.env @@ -13,5 +13,6 @@ loadaddr=CONFIG_SC5XX_LOADADDR #define USE_OSPI #define USE_RAM #define USE_MMC +#define USE_USB #include diff --git a/board/adi/sc594-som-ezlite/sc594-som-ezlite.env b/board/adi/sc594-som-ezlite/sc594-som-ezlite.env index e983d9e40a64..5bb3e7c017b3 100644 --- a/board/adi/sc594-som-ezlite/sc594-som-ezlite.env +++ b/board/adi/sc594-som-ezlite/sc594-som-ezlite.env @@ -13,5 +13,6 @@ loadaddr=CONFIG_SC5XX_LOADADDR #define USE_OSPI #define USE_RAM #define USE_MMC +#define USE_USB #include diff --git a/board/adi/sc598-som-ezkit/sc598-som-ezkit.env b/board/adi/sc598-som-ezkit/sc598-som-ezkit.env index 63dc580df56e..c935d91a210a 100644 --- a/board/adi/sc598-som-ezkit/sc598-som-ezkit.env +++ b/board/adi/sc598-som-ezkit/sc598-som-ezkit.env @@ -13,5 +13,6 @@ loadaddr=CONFIG_SC5XX_LOADADDR #define USE_OSPI #define USE_RAM #define USE_MMC +#define USE_USB #include diff --git a/include/env/adi/adi_boot.env b/include/env/adi/adi_boot.env index 27b5f1ddb91e..046f4f8a4100 100644 --- a/include/env/adi/adi_boot.env +++ b/include/env/adi/adi_boot.env @@ -67,3 +67,10 @@ ramboot= wget ${loadaddr} ${serverip}:/fitImage; run ramargs; bootm ${loadaddr} #endif + +#if defined(USE_USB) +usbargs=setenv bootargs root=/dev/sda2 rw rootfstype=ext4 rootwait ${adi_bootargs} +usbboot=usb start; + ext4load usb 0:1 ${loadaddr} /fitImage; run usbargs; + bootm ${loadaddr} +#endif From 2c2045fa11cac14c61ca8eef6e201301ddc1020e Mon Sep 17 00:00:00 2001 From: Caleb Ethridge Date: Tue, 7 Apr 2026 11:37:48 -0400 Subject: [PATCH 6/8] arm: sc5xx: Remove SC5XX_LOADADDR Remove the SC5XX_LOADADDR Kconfig option, replace its users with CONFIG_SYS_LOAD_ADDR, and update the ADI boot environment to use `loadaddr`. SC5XX_LOADADDR was an ADI-specific duplicate of standard U-Boot load address handling. U-Boot already uses CONFIG_SYS_LOAD_ADDR for the default load address and `loadaddr` for boot commands, so keeping separate SC5XX-specific names is redundant. Signed-off-by: Ozan Durgut Signed-off-by: Caleb Ethridge --- arch/arm/mach-sc5xx/Kconfig | 6 ----- board/adi/sc573-ezlite/sc573-ezlite.env | 4 ---- board/adi/sc584-ezkit/sc584-ezkit.env | 4 ---- board/adi/sc589-ezkit/sc589-ezkit.env | 4 ---- board/adi/sc589-mini/sc589-mini.env | 4 ---- board/adi/sc594-som-ezkit/sc594-som-ezkit.env | 4 ---- .../adi/sc594-som-ezlite/sc594-som-ezlite.env | 4 ---- board/adi/sc598-som-ezkit/sc598-som-ezkit.env | 4 ---- .../adi/sc598-som-ezlite/sc598-som-ezlite.env | 3 --- configs/sc573-ezlite_defconfig | 2 +- configs/sc584-ezkit_defconfig | 2 +- configs/sc589-ezkit_defconfig | 2 +- configs/sc589-mini_defconfig | 2 +- configs/sc594-som-ezkit-spl_defconfig | 2 +- configs/sc594-som-ezlite-spl_defconfig | 2 +- configs/sc598-som-ezkit-spl_defconfig | 2 +- configs/sc598-som-ezlite-spl_defconfig | 2 +- include/env/adi/adi_boot.env | 24 +++++++++---------- 18 files changed, 19 insertions(+), 58 deletions(-) diff --git a/arch/arm/mach-sc5xx/Kconfig b/arch/arm/mach-sc5xx/Kconfig index e311a8adf9ab..44402b2568d9 100644 --- a/arch/arm/mach-sc5xx/Kconfig +++ b/arch/arm/mach-sc5xx/Kconfig @@ -140,12 +140,6 @@ config SC5XX_ROOTFS_OFFSET help The default offset where the rootfs is located. -config SC5XX_LOADADDR - hex "Load address" - default 0x90000000 - help - The default load address for u-boot. - config ADI_IMAGE string "ADI fitImage type" help diff --git a/board/adi/sc573-ezlite/sc573-ezlite.env b/board/adi/sc573-ezlite/sc573-ezlite.env index 2ba58d05e0f7..942978e55711 100644 --- a/board/adi/sc573-ezlite/sc573-ezlite.env +++ b/board/adi/sc573-ezlite/sc573-ezlite.env @@ -4,10 +4,6 @@ * (C) Copyright 2024 - Analog Devices, Inc. */ -jffs2file=adsp-sc5xx-__stringify(CONFIG_ADI_IMAGE)-adsp-sc573-ezkit.jffs2 -adi_image_offset=0xd0000 -loadaddr=CONFIG_SC5XX_LOADADDR - #define USE_NFS #define USE_SPI #define USE_RAM diff --git a/board/adi/sc584-ezkit/sc584-ezkit.env b/board/adi/sc584-ezkit/sc584-ezkit.env index 2b7365142e0c..1a0578064f0c 100644 --- a/board/adi/sc584-ezkit/sc584-ezkit.env +++ b/board/adi/sc584-ezkit/sc584-ezkit.env @@ -4,10 +4,6 @@ * (C) Copyright 2024 - Analog Devices, Inc. */ -jffs2file=adsp-sc5xx-__stringify(CONFIG_ADI_IMAGE)-adsp-sc584-ezkit.jffs2 -adi_image_offset=0xd0000 -loadaddr=CONFIG_SC5XX_LOADADDR - #define USE_NFS #define USE_SPI #define USE_RAM diff --git a/board/adi/sc589-ezkit/sc589-ezkit.env b/board/adi/sc589-ezkit/sc589-ezkit.env index 181140adf53a..197df99cadf3 100644 --- a/board/adi/sc589-ezkit/sc589-ezkit.env +++ b/board/adi/sc589-ezkit/sc589-ezkit.env @@ -4,10 +4,6 @@ * (C) Copyright 2024 - Analog Devices, Inc. */ -jffs2file=adsp-sc5xx-__stringify(CONFIG_ADI_IMAGE)-adsp-sc589-ezkit.jffs2 -adi_image_offset=0xd0000 -loadaddr=CONFIG_SC5XX_LOADADDR - #define USE_NFS #define USE_RAM #define USE_MMC diff --git a/board/adi/sc589-mini/sc589-mini.env b/board/adi/sc589-mini/sc589-mini.env index 68d6e2c15678..3acc51fc2060 100644 --- a/board/adi/sc589-mini/sc589-mini.env +++ b/board/adi/sc589-mini/sc589-mini.env @@ -4,10 +4,6 @@ * (C) Copyright 2024 - Analog Devices, Inc. */ -jffs2file=adsp-sc5xx-__stringify(CONFIG_ADI_IMAGE)-adsp-sc589-mini.jffs2 -adi_image_offset=0xd0000 -loadaddr=CONFIG_SC5XX_LOADADDR - #define USE_NFS #define USE_RAM #define USE_SPI diff --git a/board/adi/sc594-som-ezkit/sc594-som-ezkit.env b/board/adi/sc594-som-ezkit/sc594-som-ezkit.env index 5dc82b46ddfd..e98a346e9c08 100644 --- a/board/adi/sc594-som-ezkit/sc594-som-ezkit.env +++ b/board/adi/sc594-som-ezkit/sc594-som-ezkit.env @@ -4,10 +4,6 @@ * (C) Copyright 2024 - Analog Devices, Inc. */ -jffs2file=adsp-sc5xx-__stringify(CONFIG_ADI_IMAGE)-adsp-sc594-som-ezkit.jffs2 -adi_image_offset=0x100000 -loadaddr=CONFIG_SC5XX_LOADADDR - #define USE_NFS #define USE_SPI #define USE_OSPI diff --git a/board/adi/sc594-som-ezlite/sc594-som-ezlite.env b/board/adi/sc594-som-ezlite/sc594-som-ezlite.env index 5bb3e7c017b3..e98a346e9c08 100644 --- a/board/adi/sc594-som-ezlite/sc594-som-ezlite.env +++ b/board/adi/sc594-som-ezlite/sc594-som-ezlite.env @@ -4,10 +4,6 @@ * (C) Copyright 2024 - Analog Devices, Inc. */ -jffs2file=adsp-sc5xx-__stringify(CONFIG_ADI_IMAGE)-adsp-sc594-som-ezlite.jffs2 -adi_image_offset=0x100000 -loadaddr=CONFIG_SC5XX_LOADADDR - #define USE_NFS #define USE_SPI #define USE_OSPI diff --git a/board/adi/sc598-som-ezkit/sc598-som-ezkit.env b/board/adi/sc598-som-ezkit/sc598-som-ezkit.env index c935d91a210a..e98a346e9c08 100644 --- a/board/adi/sc598-som-ezkit/sc598-som-ezkit.env +++ b/board/adi/sc598-som-ezkit/sc598-som-ezkit.env @@ -4,10 +4,6 @@ * (C) Copyright 2024 - Analog Devices, Inc. */ -jffs2file=adsp-sc5xx-__stringify(CONFIG_ADI_IMAGE)-adsp-sc598-som-ezkit.jffs2 -adi_image_offset=0x100000 -loadaddr=CONFIG_SC5XX_LOADADDR - #define USE_NFS #define USE_SPI #define USE_OSPI diff --git a/board/adi/sc598-som-ezlite/sc598-som-ezlite.env b/board/adi/sc598-som-ezlite/sc598-som-ezlite.env index ef3e29d1b5a7..942978e55711 100644 --- a/board/adi/sc598-som-ezlite/sc598-som-ezlite.env +++ b/board/adi/sc598-som-ezlite/sc598-som-ezlite.env @@ -4,9 +4,6 @@ * (C) Copyright 2024 - Analog Devices, Inc. */ -adi_image_offset=0x100000 -loadaddr=CONFIG_SC5XX_LOADADDR - #define USE_NFS #define USE_SPI #define USE_RAM diff --git a/configs/sc573-ezlite_defconfig b/configs/sc573-ezlite_defconfig index 28dbc7df2a5d..802f0e524008 100644 --- a/configs/sc573-ezlite_defconfig +++ b/configs/sc573-ezlite_defconfig @@ -6,7 +6,7 @@ CONFIG_SPL_GPIO=y CONFIG_DM_GPIO=y CONFIG_SPL_SERIAL=y CONFIG_SPL_SYS_MALLOC_F_LEN=0x10000 -CONFIG_SC5XX_LOADADDR=0x83000000 +CONFIG_SYS_LOAD_ADDR=0x83000000 CONFIG_WATCHDOG_TIMEOUT_MSECS=60000 CONFIG_CGU0_CLKOUTSEL=7 # CONFIG_EFI_LOADER is not set diff --git a/configs/sc584-ezkit_defconfig b/configs/sc584-ezkit_defconfig index 7c9ddb3b47eb..471f38fbb707 100644 --- a/configs/sc584-ezkit_defconfig +++ b/configs/sc584-ezkit_defconfig @@ -10,7 +10,7 @@ CONFIG_SPL_SYS_MALLOC_F_LEN=0x8000 CONFIG_SPL_BSS_START_ADDR=0x200A0000 CONFIG_SPL_BSS_MAX_SIZE=0x8000 CONFIG_SC58X=y -CONFIG_SC5XX_LOADADDR=0x89300000 +CONFIG_SYS_LOAD_ADDR=0x89300000 CONFIG_WATCHDOG_TIMEOUT_MSECS=60000 CONFIG_ADI_BUG_EZKHW21=y CONFIG_CGU0_CLKOUTSEL=7 diff --git a/configs/sc589-ezkit_defconfig b/configs/sc589-ezkit_defconfig index f42ee15fbed9..f5e3c7e28b32 100644 --- a/configs/sc589-ezkit_defconfig +++ b/configs/sc589-ezkit_defconfig @@ -13,7 +13,7 @@ CONFIG_SPL_BSS_START_ADDR=0x200A0000 CONFIG_SPL_BSS_MAX_SIZE=0x8000 CONFIG_SC58X=y CONFIG_TARGET_SC589_EZKIT=y -CONFIG_SC5XX_LOADADDR=0xC3000000 +CONFIG_SYS_LOAD_ADDR=0xC3000000 CONFIG_WATCHDOG_TIMEOUT_MSECS=60000 CONFIG_ADI_USE_DMC1=y CONFIG_CGU0_CLKOUTSEL=7 diff --git a/configs/sc589-mini_defconfig b/configs/sc589-mini_defconfig index b2249ac14d82..3ecdee918924 100644 --- a/configs/sc589-mini_defconfig +++ b/configs/sc589-mini_defconfig @@ -12,7 +12,7 @@ CONFIG_SPL_BSS_START_ADDR=0x200A0000 CONFIG_SPL_BSS_MAX_SIZE=0x8000 CONFIG_SC58X=y CONFIG_TARGET_SC589_MINI=y -CONFIG_SC5XX_LOADADDR=0xC3000000 +CONFIG_SYS_LOAD_ADDR=0xC3000000 CONFIG_WATCHDOG_TIMEOUT_MSECS=60000 CONFIG_ADI_USE_DMC1=y # CONFIG_EFI_LOADER is not set diff --git a/configs/sc594-som-ezkit-spl_defconfig b/configs/sc594-som-ezkit-spl_defconfig index 4aaace6ad395..0cbce440e014 100644 --- a/configs/sc594-som-ezkit-spl_defconfig +++ b/configs/sc594-som-ezkit-spl_defconfig @@ -10,6 +10,7 @@ CONFIG_SPL_SERIAL=y CONFIG_SPL_SYS_MALLOC_F_LEN=0x10000 CONFIG_SC59X=y CONFIG_TARGET_SC594_SOM_EZKIT=y +CONFIG_SYS_LOAD_ADDR=0xA2000000 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_FIT=y CONFIG_FIT_SIGNATURE=y @@ -74,4 +75,3 @@ CONFIG_SPL_TIMER=y CONFIG_USB=y CONFIG_USB_DWC2=y CONFIG_USB_STORAGE=y -CONFIG_SC5XX_LOADADDR=0xA2000000 diff --git a/configs/sc594-som-ezlite-spl_defconfig b/configs/sc594-som-ezlite-spl_defconfig index e1842089588e..34f9c65ebe08 100644 --- a/configs/sc594-som-ezlite-spl_defconfig +++ b/configs/sc594-som-ezlite-spl_defconfig @@ -9,6 +9,7 @@ CONFIG_SPL_SERIAL=y CONFIG_SPL_STACK=0x200E4000 CONFIG_SPL_SYS_MALLOC_F_LEN=0x10000 CONFIG_SC59X=y +CONFIG_SYS_LOAD_ADDR=0xA2000000 CONFIG_CGU1_DIV_S1SELEX=16 CONFIG_CDU0_CLKO10=5 CONFIG_SF_DEFAULT_BUS=0 @@ -83,4 +84,3 @@ CONFIG_USB_DWC2=y CONFIG_USB_STORAGE=y # CONFIG_SPL_CRC8 is not set # CONFIG_TOOLS_MKEFICAPSULE is not set -CONFIG_SC5XX_LOADADDR=0xA2000000 diff --git a/configs/sc598-som-ezkit-spl_defconfig b/configs/sc598-som-ezkit-spl_defconfig index d71ea76a2421..a1a200092a16 100644 --- a/configs/sc598-som-ezkit-spl_defconfig +++ b/configs/sc598-som-ezkit-spl_defconfig @@ -11,6 +11,7 @@ CONFIG_SPL_SYS_MALLOC_F_LEN=0x10000 CONFIG_SC59X_64=y CONFIG_TARGET_SC598_SOM_EZKIT=y CONFIG_SYS_BOOTM_LEN=0x4000000 +CONFIG_SYS_LOAD_ADDR=0x90000000 CONFIG_CGU1_PLL3_DDRCLK=y CONFIG_CGU1_PLL3_VCO_MSEL=64 CONFIG_CGU1_PLL3_DCLK_DIV=2 @@ -108,4 +109,3 @@ CONFIG_USB_DWC2=y CONFIG_USB_STORAGE=y # CONFIG_SPL_CRC8 is not set # CONFIG_TOOLS_MKEFICAPSULE is not set -CONFIG_SC5XX_LOADADDR=0x90000000 diff --git a/configs/sc598-som-ezlite-spl_defconfig b/configs/sc598-som-ezlite-spl_defconfig index 101b86d5a690..b96ae6d33fcc 100644 --- a/configs/sc598-som-ezlite-spl_defconfig +++ b/configs/sc598-som-ezlite-spl_defconfig @@ -11,6 +11,7 @@ CONFIG_SPL_STACK=0x200E4000 CONFIG_SPL_SYS_MALLOC_F_LEN=0x10000 CONFIG_SC59X_64=y CONFIG_SYS_BOOTM_LEN=0x4000000 +CONFIG_SYS_LOAD_ADDR=0x90000000 CONFIG_CGU1_PLL3_DDRCLK=y CONFIG_CGU1_PLL3_VCO_MSEL=64 CONFIG_CGU1_PLL3_DCLK_DIV=2 @@ -106,4 +107,3 @@ CONFIG_USB_DWC2=y CONFIG_USB_STORAGE=y # CONFIG_SPL_CRC8 is not set # CONFIG_TOOLS_MKEFICAPSULE is not set -CONFIG_SC5XX_LOADADDR=0x90000000 diff --git a/include/env/adi/adi_boot.env b/include/env/adi/adi_boot.env index 046f4f8a4100..783bbe4b41c6 100644 --- a/include/env/adi/adi_boot.env +++ b/include/env/adi/adi_boot.env @@ -1,10 +1,3 @@ -/* - * A target board needs to set these variables for the commands below to work: - * - * - adi_image_offset, location of the fitImage on the SPI flash - * - loadaddr, where you want to load things - */ - #ifdef CONFIG_SC59X_64 #define EARLY_PRINTK earlycon=adi_uart,0x31003000 #else @@ -21,6 +14,11 @@ initrd_high=0xffffffffffffffff #else initrd_high=0xffffffff #endif +#if defined(CONFIG_SC59X) || defined(CONFIG_SC59X_64) +adi_image_offset=0x100000 +#else +adi_image_offset=0xd0000 +#endif /* Args for each boot mode */ adi_bootargs=EARLY_PRINTK console=ttySC0,CONFIG_BAUDRATE vmalloc=512M @@ -35,7 +33,7 @@ nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath},tcp,nfs nfsboot= run nfsargs; run addip; wget ${loadaddr} ${serverip}:/fitImage; - bootm ${loadaddr} + bootm #endif #if defined(USE_MMC) @@ -43,7 +41,7 @@ mmcargs=setenv bootargs root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait ${adi_bo mmcboot=mmc rescan; ext4load mmc 0:1 ${loadaddr} /fitImage; run mmcargs; - bootm ${loadaddr} + bootm #endif #if defined(USE_SPI) @@ -51,7 +49,7 @@ spiargs=setenv bootargs rootfstype=ubifs root=ubi0:rootfs ubi.mtd=3 rw ${adi_boo spiboot=run spiargs; sf probe ${sfdev}; sf read ${loadaddr} ${adi_image_offset} 0xF00000; - bootm ${loadaddr} + bootm #endif #if defined(USE_OSPI) @@ -59,18 +57,18 @@ ospiargs=setenv bootargs rootfstype=ubifs root=ubi0:rootfs ubi.mtd=3 rw ${adi_bo ospiboot=run ospiargs; sf probe ${sfdev}; sf read ${loadaddr} ${adi_image_offset} 0xF00000; - bootm ${loadaddr} + bootm #endif #if defined(USE_RAM) ramboot= wget ${loadaddr} ${serverip}:/fitImage; run ramargs; - bootm ${loadaddr} + bootm #endif #if defined(USE_USB) usbargs=setenv bootargs root=/dev/sda2 rw rootfstype=ext4 rootwait ${adi_bootargs} usbboot=usb start; ext4load usb 0:1 ${loadaddr} /fitImage; run usbargs; - bootm ${loadaddr} + bootm #endif From d7f52005b8aa915b8e784a4cf34abfde4c56e796 Mon Sep 17 00:00:00 2001 From: Caleb Ethridge Date: Tue, 7 Apr 2026 10:23:09 -0400 Subject: [PATCH 7/8] arm: sc5xx: Add fdt_addr_r, kernel_addr_r, and ramdisk_addr_r Add fdt_addr_r, kernel_addr_r, and ramdisk_addr_r to the SC5xx boards. These variables are currently unused in the environment but will be used in the future once support for booti commands is added to the SC5xx boards. Signed-off-by: Caleb Ethridge --- board/adi/sc573-ezlite/sc573-ezlite.env | 4 ++++ board/adi/sc584-ezkit/sc584-ezkit.env | 4 ++++ board/adi/sc589-ezkit/sc589-ezkit.env | 4 ++++ board/adi/sc589-mini/sc589-mini.env | 4 ++++ board/adi/sc594-som-ezkit/sc594-som-ezkit.env | 4 ++++ board/adi/sc594-som-ezlite/sc594-som-ezlite.env | 4 ++++ board/adi/sc598-som-ezkit/sc598-som-ezkit.env | 4 ++++ board/adi/sc598-som-ezlite/sc598-som-ezlite.env | 4 ++++ 8 files changed, 32 insertions(+) diff --git a/board/adi/sc573-ezlite/sc573-ezlite.env b/board/adi/sc573-ezlite/sc573-ezlite.env index 942978e55711..d6825450b670 100644 --- a/board/adi/sc573-ezlite/sc573-ezlite.env +++ b/board/adi/sc573-ezlite/sc573-ezlite.env @@ -4,6 +4,10 @@ * (C) Copyright 2024 - Analog Devices, Inc. */ +fdt_addr_r=CONFIG_SYS_LOAD_ADDR +kernel_addr_r=0x84008000 +ramdisk_addr_r=0x85000000 + #define USE_NFS #define USE_SPI #define USE_RAM diff --git a/board/adi/sc584-ezkit/sc584-ezkit.env b/board/adi/sc584-ezkit/sc584-ezkit.env index 1a0578064f0c..beb343db62a7 100644 --- a/board/adi/sc584-ezkit/sc584-ezkit.env +++ b/board/adi/sc584-ezkit/sc584-ezkit.env @@ -4,6 +4,10 @@ * (C) Copyright 2024 - Analog Devices, Inc. */ +fdt_addr_r=CONFIG_SYS_LOAD_ADDR +kernel_addr_r=0x8A308000 +ramdisk_addr_r=0x8A800000 + #define USE_NFS #define USE_SPI #define USE_RAM diff --git a/board/adi/sc589-ezkit/sc589-ezkit.env b/board/adi/sc589-ezkit/sc589-ezkit.env index 197df99cadf3..76a5b05a1ae2 100644 --- a/board/adi/sc589-ezkit/sc589-ezkit.env +++ b/board/adi/sc589-ezkit/sc589-ezkit.env @@ -4,6 +4,10 @@ * (C) Copyright 2024 - Analog Devices, Inc. */ +fdt_addr_r=CONFIG_SYS_LOAD_ADDR +kernel_addr_r=0xC4008000 +ramdisk_addr_r=0xC5000000 + #define USE_NFS #define USE_RAM #define USE_MMC diff --git a/board/adi/sc589-mini/sc589-mini.env b/board/adi/sc589-mini/sc589-mini.env index 3acc51fc2060..24ad57dde4f5 100644 --- a/board/adi/sc589-mini/sc589-mini.env +++ b/board/adi/sc589-mini/sc589-mini.env @@ -4,6 +4,10 @@ * (C) Copyright 2024 - Analog Devices, Inc. */ +fdt_addr_r=CONFIG_SYS_LOAD_ADDR +kernel_addr_r=0xC4008000 +ramdisk_addr_r=0xC5000000 + #define USE_NFS #define USE_RAM #define USE_SPI diff --git a/board/adi/sc594-som-ezkit/sc594-som-ezkit.env b/board/adi/sc594-som-ezkit/sc594-som-ezkit.env index e98a346e9c08..342a484302ed 100644 --- a/board/adi/sc594-som-ezkit/sc594-som-ezkit.env +++ b/board/adi/sc594-som-ezkit/sc594-som-ezkit.env @@ -4,6 +4,10 @@ * (C) Copyright 2024 - Analog Devices, Inc. */ +fdt_addr_r=CONFIG_SYS_LOAD_ADDR +kernel_addr_r=0xA3008000 +ramdisk_addr_r=0xA8000000 + #define USE_NFS #define USE_SPI #define USE_OSPI diff --git a/board/adi/sc594-som-ezlite/sc594-som-ezlite.env b/board/adi/sc594-som-ezlite/sc594-som-ezlite.env index e98a346e9c08..342a484302ed 100644 --- a/board/adi/sc594-som-ezlite/sc594-som-ezlite.env +++ b/board/adi/sc594-som-ezlite/sc594-som-ezlite.env @@ -4,6 +4,10 @@ * (C) Copyright 2024 - Analog Devices, Inc. */ +fdt_addr_r=CONFIG_SYS_LOAD_ADDR +kernel_addr_r=0xA3008000 +ramdisk_addr_r=0xA8000000 + #define USE_NFS #define USE_SPI #define USE_OSPI diff --git a/board/adi/sc598-som-ezkit/sc598-som-ezkit.env b/board/adi/sc598-som-ezkit/sc598-som-ezkit.env index e98a346e9c08..4195b93823b1 100644 --- a/board/adi/sc598-som-ezkit/sc598-som-ezkit.env +++ b/board/adi/sc598-som-ezkit/sc598-som-ezkit.env @@ -4,6 +4,10 @@ * (C) Copyright 2024 - Analog Devices, Inc. */ +fdt_addr_r=CONFIG_SYS_LOAD_ADDR +kernel_addr_r=0x9a200000 +ramdisk_addr_r=0x9c000000 + #define USE_NFS #define USE_SPI #define USE_OSPI diff --git a/board/adi/sc598-som-ezlite/sc598-som-ezlite.env b/board/adi/sc598-som-ezlite/sc598-som-ezlite.env index 942978e55711..c7fdc2a10128 100644 --- a/board/adi/sc598-som-ezlite/sc598-som-ezlite.env +++ b/board/adi/sc598-som-ezlite/sc598-som-ezlite.env @@ -4,6 +4,10 @@ * (C) Copyright 2024 - Analog Devices, Inc. */ +fdt_addr_r=CONFIG_SYS_LOAD_ADDR +kernel_addr_r=0x9a200000 +ramdisk_addr_r=0x9c000000 + #define USE_NFS #define USE_SPI #define USE_RAM From 9fa9f3de44df3e4200f047a52f90c4619cfcf544 Mon Sep 17 00:00:00 2001 From: Caleb Ethridge Date: Tue, 21 Apr 2026 08:58:45 -0400 Subject: [PATCH 8/8] mach-sc5xx: Remove unused image offset Kconfig options Remove SC5XX_UBOOT_SPL_OFFSET, SC5XX_UBOOT_OFFSET, SC5XX_FITIMAGE_OFFSET and SC5XX_ROOTFS_OFFSET as they are no longer needed in the Kconfig. Signed-off-by: Caleb Ethridge --- arch/arm/mach-sc5xx/Kconfig | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/arch/arm/mach-sc5xx/Kconfig b/arch/arm/mach-sc5xx/Kconfig index 44402b2568d9..0f4e63a355e2 100644 --- a/arch/arm/mach-sc5xx/Kconfig +++ b/arch/arm/mach-sc5xx/Kconfig @@ -116,30 +116,6 @@ endchoice endif -config SC5XX_UBOOT_SPL_OFFSET - hex "SPL offset" - default 0x0 - help - The default offset where the SPL is located. - -config SC5XX_UBOOT_OFFSET - hex "U-Boot offset" - default 0x40000 - help - The default offset where u-boot is located. - -config SC5XX_FITIMAGE_OFFSET - hex "FitImage offset" - default 0x1a0000 - help - The default offset where the fitImage is located. - -config SC5XX_ROOTFS_OFFSET - hex "RootFS offset" - default 0x102000 - help - The default offset where the rootfs is located. - config ADI_IMAGE string "ADI fitImage type" help