summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2026-06-04 12:24:50 -0600
committerTom Rini <[email protected]>2026-06-04 13:04:11 -0600
commit397a14dd7142f381bbd316a13cd7e82c88c7287c (patch)
tree2a2f5cdf64f7cd3e3a738e6ed75148fb75ba97c2 /include
parentcceccea3a99483fa6c78a9526246057374313a80 (diff)
parente8c00a5e2834b5c80930b1f3dc0d65380b927ec2 (diff)
Merge patch series "sc5xx Environment Cleanup and Fixes"
Caleb Ethridge <[email protected]> says: This series performs a general cleanup of the default U-boot environment for sc5xx boards, stemming from the decision to no longer store the environment in the SPI flash. The environments for each board have been edited to contain the minimum number of commands needed for all supported boot modes to avoid confusion, and the default boot command synced to spi for all boards that support it. The filesystem for the SPI flash has also been changed from jffs2 to ubifs. A bug with the Ethernet reset line on the sc594 has been fixed, and the sc573 has been renamed from the EZKIT to the EZLITE to match the name of the publically available board. EZKIT was only used internally before release. Preliminary binman support for sc5xx boards has been removed as it was unused and full support never added. Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'include')
-rw-r--r--include/configs/sc573-ezlite.h (renamed from include/configs/sc573-ezkit.h)4
-rw-r--r--include/env/adi/adi_boot.env103
2 files changed, 31 insertions, 76 deletions
diff --git a/include/configs/sc573-ezkit.h b/include/configs/sc573-ezlite.h
index 42e42f8150b..590a8f06fb5 100644
--- a/include/configs/sc573-ezkit.h
+++ b/include/configs/sc573-ezlite.h
@@ -3,8 +3,8 @@
* (C) Copyright 2024 - Analog Devices, Inc.
*/
-#ifndef __CONFIG_SC573_EZKIT_H
-#define __CONFIG_SC573_EZKIT_H
+#ifndef __CONFIG_SC573_EZLITE_H
+#define __CONFIG_SC573_EZLITE_H
/*
* Memory Settings
diff --git a/include/env/adi/adi_boot.env b/include/env/adi/adi_boot.env
index db4148b1af9..3c83826cf9a 100644
--- a/include/env/adi/adi_boot.env
+++ b/include/env/adi/adi_boot.env
@@ -1,13 +1,3 @@
-/*
- * A target board needs to set these variables for the commands below to work:
- *
- * - adi_stage2_offset, the location of stage2-boot.ldr on the SPI flash
- * - adi_image_offset, location of the fitImage on the SPI flash
- * - adi_rfs_offset, location of the RFS on the SPI flash
- * - loadaddr, where you want to load things
- * - jffs2file, name of the jffs2 file for update, ex adsp-sc5xx-tiny-adsp-sc573.jffs2
- */
-
#ifdef CONFIG_SC59X_64
#define EARLY_PRINTK earlycon=adi_uart,0x31003000
#else
@@ -15,106 +5,71 @@
#endif
/* Config options */
-imagefile=fitImage
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
#else
initrd_high=0xffffffff
#endif
-
-/* Helper routines */
-init_ethernet=mii info;
- dhcp;
- setenv serverip ${tftpserverip}
+#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
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;
- bootm ${loadaddr}
+ wget ${loadaddr} ${serverip}:/fitImage;
+ bootm
#endif
#if defined(USE_MMC)
-mmcargs=setenv bootargs root=/dev/mmcblk0p1 rw rootfstype=ext4 rootwait ${adi_bootargs}
+mmcargs=setenv bootargs root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait ${adi_bootargs}
mmcboot=mmc rescan;
- ext4load mmc 0:1 ${loadaddr} /boot/${imagefile};
+ ext4load mmc 0:1 ${loadaddr} /fitImage;
run mmcargs;
- bootm ${loadaddr}
+ bootm
#endif
-#if defined(USE_SPI) || defined(USE_OSPI)
-spiargs=setenv bootargs root=/dev/mtdblock4 rw rootfstype=jffs2 ${adi_bootargs}
+#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 ${loadaddr} ${adi_image_offset} ${imagesize};
+ sf read ${loadaddr} ${adi_image_offset} 0xf00000;
bootm ${loadaddr}
#endif
#if defined(USE_OSPI)
-ospiboot=run spiboot
+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 ${loadaddr} ${adi_image_offset} 0xf00000;
+ bootm ${loadaddr}
#endif
#if defined(USE_RAM)
-ramboot=run init_ethernet;
- tftp ${loadaddr} ${tfpt_dir_prefix}${imagefile};
+ramboot=wget ${loadaddr} ${serverip}:/fitImage;
run ramargs;
- bootm ${loadaddr}
+ bootm
#endif
-/* Update commands */
-stage1file=stage1-boot.ldr
-stage2file=stage2-boot.ldr
-
-#if defined(USE_SPI) || defined(USE_OSPI)
-update_spi_uboot_stage1=tftp ${loadaddr} ${tftp_dir_prefix}${stage1file};
- sf probe ${sfdev};
- sf update ${loadaddr} 0x0 ${filesize}
-update_spi_uboot_stage2=tftp ${loadaddr} ${tftp_dir_prefix}${stage2file};
- sf probe ${sfdev};
- sf update ${loadaddr} ${adi_stage2_offset} ${filesize}
-update_spi_uboot=run update_spi_uboot_stage1;
- run update_spi_uboot_stage2;
-update_spi_fit=tftp ${loadaddr} ${tftp_dir_prefix}${imagefile};
- sf probe ${sfdev};
- sf update ${loadaddr} ${adi_image_offset} ${filesize};
- setenv imagesize ${filesize}
-update_spi_rfs=tftp ${loadaddr} ${tftp_dir_prefix}${jffs2file};
- sf probe ${sfdev};
- sf update ${loadaddr} ${adi_rfs_offset} ${filesize}
-
-start_update_spi=run init_ethernet;
- run update_spi_uboot;
- run update_spi_fit;
- run update_spi_rfs;
-start_update_spi_uboot_only=run init_ethernet;
- run update_spi_uboot;
-#endif
-
-#if defined(USE_SPI)
-update_spi=setenv sfdev CONFIG_SC_BOOT_SPI_BUS:CONFIG_SC_BOOT_SPI_SSEL;
- setenv bootcmd run spiboot;
- setenv argscmd spiargs;
- run start_update_spi;
- saveenv
-#endif
-
-#if defined(USE_OSPI)
-update_ospi=setenv sfdev CONFIG_SC_BOOT_OSPI_BUS:CONFIG_SC_BOOT_OSPI_SSEL;
- setenv bootcmd run ospiboot;
- setenv argscmd spiargs;
- run start_update_spi;
- saveenv
+#if defined(USE_USB)
+usbargs=setenv bootargs root=/dev/sda2 rw rootfstype=ext4 rootwait ${adi_bootargs}
+usbboot=usb start;
+ run usbargs;
+ ext4load usb 0:1 ${loadaddr} /fitImage;
+ bootm ${loadaddr}
#endif