diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2019-12-02 14:11:18 +0300 |
---|---|---|
committer | Matthias Brugger <mbrugger@suse.com> | 2020-01-29 20:30:33 +0300 |
commit | f29002fc73c71c3dcb6a1495c95cd49e98fbce19 (patch) | |
tree | 751f992b5e0fce95a7cb88d77449ffe561c813fa /include/configs/rpi.h | |
parent | c4d08cb9b157e391bd1015871ea0950159aaf88e (diff) | |
download | u-boot-f29002fc73c71c3dcb6a1495c95cd49e98fbce19.tar.xz |
config: enable DFU over USB on Raspberry Pi4 boards
Enable support for DFU over USB. This requires to enable USB gadget,
DWC2 UDC OTG driver and DFU command. DFU entities are defined for the
following firmware objects: u-boot.bin, uboot.env, config.txt, and
zImage/Image.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Diffstat (limited to 'include/configs/rpi.h')
-rw-r--r-- | include/configs/rpi.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/configs/rpi.h b/include/configs/rpi.h index 83e258a6b9..b53a4b65d0 100644 --- a/include/configs/rpi.h +++ b/include/configs/rpi.h @@ -74,6 +74,25 @@ #define CONFIG_TFTP_TSIZE #endif +/* DFU over USB/UDC */ +#ifdef CONFIG_CMD_DFU +#define CONFIG_SYS_DFU_DATA_BUF_SIZE SZ_1M +#define CONFIG_SYS_DFU_MAX_FILE_SIZE SZ_2M + +#ifdef CONFIG_ARM64 +#define KERNEL_FILENAME "Image" +#else +#define KERNEL_FILENAME "zImage" +#endif + +#define ENV_DFU_SETTINGS \ + "dfu_alt_info=u-boot.bin fat 0 1;uboot.env fat 0 1;" \ + "config.txt fat 0 1;" \ + KERNEL_FILENAME " fat 0 1\0" +#else +#define ENV_DFU_SETTINGS "" +#endif + /* Console configuration */ #define CONFIG_SYS_CBSIZE 1024 @@ -188,6 +207,7 @@ #define CONFIG_EXTRA_ENV_SETTINGS \ "dhcpuboot=usb start; dhcp u-boot.uimg; bootm\0" \ ENV_DEVICE_SETTINGS \ + ENV_DFU_SETTINGS \ ENV_MEM_LAYOUT_SETTINGS \ BOOTENV |