summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/xilinx/zynqmp/zynqmp.c2
-rw-r--r--configs/xilinx_zynqmp_virt_defconfig1
-rw-r--r--include/configs/xilinx_zynqmp.h30
3 files changed, 32 insertions, 1 deletions
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index 23c12f45ea..d05f0b2e12 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -571,7 +571,7 @@ int board_late_init(void)
switch (bootmode) {
case USB_MODE:
puts("USB_MODE\n");
- mode = "usb";
+ mode = "usb_dfu0 usb_dfu1";
env_set("modeboot", "usb_dfu_spl");
break;
case JTAG_MODE:
diff --git a/configs/xilinx_zynqmp_virt_defconfig b/configs/xilinx_zynqmp_virt_defconfig
index db7d3824d7..810bbdb022 100644
--- a/configs/xilinx_zynqmp_virt_defconfig
+++ b/configs/xilinx_zynqmp_virt_defconfig
@@ -81,6 +81,7 @@ CONFIG_SCSI_AHCI=y
CONFIG_SATA_CEVA=y
CONFIG_CLK_ZYNQMP=y
CONFIG_DFU_TFTP=y
+CONFIG_DFU_TIMEOUT=y
CONFIG_DFU_RAM=y
CONFIG_USB_FUNCTION_FASTBOOT=y
CONFIG_FASTBOOT_FLASH=y
diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h
index 15ad4198a6..87704ff630 100644
--- a/include/configs/xilinx_zynqmp.h
+++ b/include/configs/xilinx_zynqmp.h
@@ -179,11 +179,41 @@
#define BOOTENV_DEV_NAME_JTAG(devtypeu, devtypel, instance) \
"jtag "
+#define BOOT_TARGET_DEVICES_USB_DFU(func) \
+ func(USB_DFU, usb_dfu, 0) func(USB_DFU, usb_dfu, 1)
+
+#define BOOTENV_DEV_USB_DFU(devtypeu, devtypel, instance) \
+ "bootcmd_" #devtypel #instance "=setenv dfu_alt_info boot.scr ram " \
+ "$scriptaddr $script_size_f && " \
+ "dfu " #instance " ram " #instance " 60 && " \
+ "echo DFU" #instance ": Trying to boot script at ${scriptaddr} && " \
+ "source ${scriptaddr}; " \
+ "echo DFU" #instance ": SCRIPT FAILED: continuing...;\0"
+
+#define BOOTENV_DEV_NAME_USB_DFU(devtypeu, devtypel, instance) \
+ ""
+
+#define BOOT_TARGET_DEVICES_USB_THOR(func) \
+ func(USB_THOR, usb_thor, 0) func(USB_THOR, usb_thor, 1)
+
+#define BOOTENV_DEV_USB_THOR(devtypeu, devtypel, instance) \
+ "bootcmd_" #devtypel #instance "=setenv dfu_alt_info boot.scr ram " \
+ "$scriptaddr $script_size_f && " \
+ "thordown " #instance " ram " #instance " && " \
+ "echo THOR" #instance ": Trying to boot script at ${scriptaddr} && " \
+ "source ${scriptaddr}; " \
+ "echo THOR" #instance ": SCRIPT FAILED: continuing...;\0"
+
+#define BOOTENV_DEV_NAME_USB_THOR(devtypeu, devtypel, instance) \
+ ""
+
#define BOOT_TARGET_DEVICES(func) \
BOOT_TARGET_DEVICES_JTAG(func) \
BOOT_TARGET_DEVICES_MMC(func) \
BOOT_TARGET_DEVICES_QSPI(func) \
BOOT_TARGET_DEVICES_NAND(func) \
+ BOOT_TARGET_DEVICES_USB_DFU(func) \
+ BOOT_TARGET_DEVICES_USB_THOR(func) \
BOOT_TARGET_DEVICES_USB(func) \
BOOT_TARGET_DEVICES_SCSI(func) \
BOOT_TARGET_DEVICES_PXE(func) \