arm64: versal: Extend distro boot
cover arm64: versal: Extend distro boot
Hi,
these patches are extending current distribution boot for Xilinx Versal. USB DFU and jtag with one change for spi boot mode.
Thanks,
Michal
Siva Durga Prasad Paladugu (2):
arm64: versal: Define configs related to USB DFU functionality
arm64: versal: Add new jtag distro boot command
T Karthik Reddy (2):
arm64: versal: Add new dfu usb distro boot command
arm64: versal: Change boot script offset address in versal
board/xilinx/versal/board.c | 6 +++- include/configs/xilinx_versal.h | 49 +++++++++++++++++++++++++++++++-- 2 files changed, 51 insertions(+), 4 deletions(-)
Signature · 1 line
2.17.1
PATCH 1/4 arm64: versal: Define configs related to USB DFU functionality
From: Siva Durga Prasad Paladugu <[email protected]>
This patch defines macros required for DFU functionality for Xilinx Versal platform.
---
include/configs/xilinx_versal.h | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-)
include/configs/xilinx_versal.h +24 -1
@@ -52,6 +52,26 @@#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE#define CONFIG_SYS_MAXARGS 64 +#if defined(CONFIG_CMD_DFU ) +#define CONFIG_SYS_DFU_DATA_BUF_SIZE 0x1800000 +#define DFU_DEFAULT_POLL_TIMEOUT 300 +#define CONFIG_THOR_RESET_OFF +#define DFU_ALT_INFO_RAM \ + "dfu_ram_info=" \ + "setenv dfu_alt_info " \ + "Image ram $kernel_addr_r $kernel_size_r\\\\;" \ + "system.dtb ram $fdt_addr_r $fdt_size_r\0" \ + "dfu_ram=run dfu_ram_info && dfu 0 ram 0\0" \ + "thor_ram=run dfu_ram_info && thordown 0 ram 0\0" + +#define DFU_ALT_INFO \ + DFU_ALT_INFO_RAM +#endif + +#if !defined(DFU_ALT_INFO ) +# define DFU_ALT_INFO +#endif +/* Ethernet driver */ #if defined(CONFIG_ZYNQ_GEM )# define CONFIG_NET_MULTI
@@ -66,8 +86,10 @@#define ENV_MEM_LAYOUT_SETTINGS \ "fdt_high=10000000\0" \ "fdt_addr_r=0x40000000\0" \ + "fdt_size_r=0x400000\0" \ "pxefile_addr_r=0x10000000\0" \ "kernel_addr_r=0x18000000\0" \ + "kernel_size_r=0x10000000\0" \ "scriptaddr=0x02000000\0" \ "ramdisk_addr_r=0x02100000\0" \ "script_offset_f=0x3f80000\0" \
@@ -105,7 +127,8 @@#ifndef CONFIG_EXTRA_ENV_SETTINGS #define CONFIG_EXTRA_ENV_SETTINGS \ ENV_MEM_LAYOUT_SETTINGS \ - BOOTENV + BOOTENV \ + DFU_ALT_INFO#endif #endif /* __XILINX_VERSAL_H */
Signature · 1 line
2.17.1
PATCH 2/4 arm64: versal: Add new jtag distro boot command
In reply to Michal SimekFrom: Siva Durga Prasad Paladugu <[email protected]>
This patch adds new jtag distro boot command to look for bootscript file in DDR and execute it first incase of jtag bootmode.
This patch also updates scriptaddr to 512MB as there is high of script corruption incase of bigger kernel image.
---
board/xilinx/versal/board.c | 2 +- include/configs/xilinx_versal.h | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-)
board/xilinx/versal/board.c +1 -1
@@ -108,7 +108,7 @@ int board_late_init(void)switch (bootmode) {case JTAG_MODE :puts ("JTAG_MODE\n" ); - mode ="pxe dhcp" ; + mode ="jtag pxe dhcp" ;break ;case QSPI_MODE_24BIT :puts ("QSPI_MODE_24\n" );
include/configs/xilinx_versal.h +10 -1
@@ -90,7 +90,7 @@"pxefile_addr_r=0x10000000\0" \"kernel_addr_r=0x18000000\0" \"kernel_size_r=0x10000000\0" \ -"scriptaddr=0x02000000\0" \ +"scriptaddr=0x20000000\0" \"ramdisk_addr_r=0x02100000\0" \"script_offset_f=0x3f80000\0" \"script_size_f=0x80000\0"
@@ -115,7 +115,16 @@#define BOOTENV_DEV_NAME_XSPI (devtypeu, devtypel, instance) \ "xspi " +#define BOOT_TARGET_DEVICES_JTAG (func) func(JTAG, jtag, na) + +#define BOOTENV_DEV_JTAG (devtypeu, devtypel, instance) \ + "bootcmd_jtag=source $scriptaddr; echo SCRIPT FAILED: continuing...;\0" + +#define BOOTENV_DEV_NAME_JTAG (devtypeu, devtypel, instance) \ + "jtag " +#define BOOT_TARGET_DEVICES (func) \ + BOOT_TARGET_DEVICES_JTAG(func) \ BOOT_TARGET_DEVICES_MMC(func) \ BOOT_TARGET_DEVICES_XSPI(func) \ func(PXE, pxe, na) \
Signature · 1 line
2.17.1
PATCH 3/4 arm64: versal: Add new dfu usb distro boot command
In reply to Michal SimekFrom: T Karthik Reddy <[email protected]>
This patch adds new dfu usb distro boot command to look for bootscript from dfu-util and runs it.
---
board/xilinx/versal/board.c | 4 ++++ include/configs/xilinx_versal.h | 11 +++++++++++ 2 files changed, 15 insertions(+)
board/xilinx/versal/board.c +4 -0
@@ -106,6 +106,10 @@ int board_late_init(void)puts ("Bootmode: " );switch (bootmode) { +case USB_MODE : +puts ("USB_MODE\n" ); + mode ="dfu_usb" ; +break ;case JTAG_MODE :puts ("JTAG_MODE\n" ); mode ="jtag pxe dhcp" ;
include/configs/xilinx_versal.h +11 -0
@@ -123,10 +123,21 @@#define BOOTENV_DEV_NAME_JTAG (devtypeu, devtypel, instance) \ "jtag " +#define BOOT_TARGET_DEVICES_DFU_USB (func) func(DFU_USB, dfu_usb, 0) + +#define BOOTENV_DEV_DFU_USB (devtypeu, devtypel, instance) \ + "bootcmd_dfu_usb=setenv dfu_alt_info boot.scr ram $scriptaddr " \ + "$script_size_f; dfu 0 ram 0 && source $scriptaddr; " \ + "echo SCRIPT FAILED: continuing...;\0" + +#define BOOTENV_DEV_NAME_DFU_USB (devtypeu, devtypel, instance) \ + "dfu_usb " +#define BOOT_TARGET_DEVICES (func) \ BOOT_TARGET_DEVICES_JTAG(func) \ BOOT_TARGET_DEVICES_MMC(func) \ BOOT_TARGET_DEVICES_XSPI(func) \ + BOOT_TARGET_DEVICES_DFU_USB(func) \ func(PXE, pxe, na) \ func(DHCP, dhcp, na)
Signature · 1 line
2.17.1
PATCH 4/4 arm64: versal: Change boot script offset address in versal
In reply to Michal SimekFrom: T Karthik Reddy <[email protected]>
With the current boot script offset address in qspi is being overlaped by BOOT.BIN as it is over 90MB with fpga included. So moving the script offset address to end of flash after "bootenv" mtd partition. Here we are considering qspi flash size >= 128Mbytes on versal and left 512Kbytes space to save boot.scr script.
---
include/configs/xilinx_versal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/configs/xilinx_versal.h +1 -1
@@ -92,7 +92,7 @@"kernel_size_r=0x10000000\0" \"scriptaddr=0x20000000\0" \"ramdisk_addr_r=0x02100000\0" \ -"script_offset_f=0x3f80000\0" \ +"script_offset_f=0x7F80000\0" \ "script_size_f=0x80000\0"#if defined(CONFIG_MMC_SDHCI_ZYNQ )
Signature · 1 line
2.17.1
Michal Simek
Appliedcover arm64: versal: Extend distro boot
In reply to Michal Simekst 11. 9. 2019 v 9:56 odesÃlatel Michal Simek <[email protected]> napsal:
Quoted 18 lines
Hi,
these patches are extending current distribution boot for Xilinx Versal. USB DFU and jtag with one change for spi boot mode.
Thanks,
MichalSiva Durga Prasad Paladugu (2):
arm64: versal: Define configs related to USB DFU functionality
arm64: versal: Add new jtag distro boot commandT Karthik Reddy (2):
arm64: versal: Add new dfu usb distro boot command
arm64: versal: Change boot script offset address in versal
Quoted 7 lines
board/xilinx/versal/board.c | 6 +++- include/configs/xilinx_versal.h | 49 +++++++++++++++++++++++++++++++-- 2 files changed, 51 insertions(+), 4 deletions(-)--
2.17.1
Applied.
M
Signature · 5 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Xilinx Microblaze Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs