* [PATCH v1] verdin-am62: add DFU, USB and UUU fastboot support
@ 2024-07-04 15:49 Vitor Soares
2024-07-05 7:56 ` Francesco Dolcini
2024-07-18 13:41 ` Tom Rini
0 siblings, 2 replies; 3+ messages in thread
From: Vitor Soares @ 2024-07-04 15:49 UTC (permalink / raw)
To: Francesco Dolcini, Tom Rini; +Cc: Vitor Soares, u-boot
From: Vitor Soares <vitor.soares@toradex.com>
Enable USB host as well as USB gadget and DFU support for a53 and r5
configs. Also, enable UUU fastboot support to download files with
the UUU tool from a53.
Additionally, configure usb0 to peripheral mode and add extra
environment for DFU use.
Signed-off-by: Vitor Soares <vitor.soares@toradex.com>
---
.../dts/k3-am625-verdin-wifi-dev-u-boot.dtsi | 11 ++++++++
configs/verdin-am62_a53_defconfig | 27 +++++++++++++++++++
configs/verdin-am62_r5_defconfig | 20 +++++++++++++-
include/configs/verdin-am62.h | 9 +++++++
4 files changed, 66 insertions(+), 1 deletion(-)
diff --git a/arch/arm/dts/k3-am625-verdin-wifi-dev-u-boot.dtsi b/arch/arm/dts/k3-am625-verdin-wifi-dev-u-boot.dtsi
index 9ecb30527404..b3d237c86979 100644
--- a/arch/arm/dts/k3-am625-verdin-wifi-dev-u-boot.dtsi
+++ b/arch/arm/dts/k3-am625-verdin-wifi-dev-u-boot.dtsi
@@ -173,6 +173,17 @@
status = "disabled";
};
+&usb0 {
+ dr_mode = "peripheral";
+ /* Since role switching is not supported in U-Boot */
+ /delete-property/ extcon;
+ bootph-pre-ram;
+};
+
+&usbss0 {
+ bootph-pre-ram;
+};
+
/* Verdin UART_2 */
&wkup_uart0 {
bootph-all;
diff --git a/configs/verdin-am62_a53_defconfig b/configs/verdin-am62_a53_defconfig
index 03730b498fd0..464d0bbb159d 100644
--- a/configs/verdin-am62_a53_defconfig
+++ b/configs/verdin-am62_a53_defconfig
@@ -73,12 +73,15 @@ CONFIG_MD5SUM_VERIFY=y
CONFIG_CMD_MEMTEST=y
CONFIG_CMD_BCB=y
CONFIG_CMD_CLK=y
+CONFIG_CMD_DFU=y
CONFIG_CMD_DM=y
CONFIG_CMD_GPIO=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
CONFIG_CMD_READ=y
CONFIG_CMD_REMOTEPROC=y
+CONFIG_CMD_USB=y
+CONFIG_CMD_USB_MASS_STORAGE=y
CONFIG_CMD_BOOTCOUNT=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_TIME=y
@@ -115,8 +118,15 @@ CONFIG_BOOTCOUNT_ENV=y
CONFIG_CLK=y
CONFIG_SPL_CLK=y
CONFIG_CLK_TI_SCI=y
+CONFIG_DFU_RAM=y
+CONFIG_SYS_DFU_DATA_BUF_SIZE=0x5000
+CONFIG_SYS_DFU_MAX_FILE_SIZE=0x800000
CONFIG_DMA_CHANNELS=y
CONFIG_TI_K3_NAVSS_UDMA=y
+CONFIG_USB_FUNCTION_FASTBOOT=y
+CONFIG_FASTBOOT_BUF_ADDR=0xC0000000
+CONFIG_FASTBOOT_BUF_SIZE=0x2F000000
+CONFIG_FASTBOOT_UUU_SUPPORT=y
CONFIG_TI_SCI_PROTOCOL=y
CONFIG_GPIO_HOG=y
CONFIG_SPL_GPIO_HOG=y
@@ -178,5 +188,22 @@ CONFIG_SYSRESET=y
CONFIG_SPL_SYSRESET=y
CONFIG_SYSRESET_TI_SCI=y
CONFIG_DM_THERMAL=y
+CONFIG_USB=y
+CONFIG_DM_USB_GADGET=y
+CONFIG_SPL_DM_USB_GADGET=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GENERIC=y
+CONFIG_SPL_USB_DWC3_GENERIC=y
+CONFIG_SPL_USB_DWC3_AM62=y
+CONFIG_USB_DWC3_AM62=y
+CONFIG_USB_KEYBOARD=y
+CONFIG_USB_HOST_ETHER=y
+CONFIG_USB_GADGET=y
+CONFIG_SPL_USB_GADGET=y
+CONFIG_USB_GADGET_MANUFACTURER="Toradex"
+CONFIG_USB_GADGET_VENDOR_NUM=0x1b67
+CONFIG_USB_GADGET_PRODUCT_NUM=0x4000
+CONFIG_SPL_DFU=y
CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
CONFIG_HEXDUMP=y
diff --git a/configs/verdin-am62_r5_defconfig b/configs/verdin-am62_r5_defconfig
index 8266a7f6e8f1..e39ee2ac6fea 100644
--- a/configs/verdin-am62_r5_defconfig
+++ b/configs/verdin-am62_r5_defconfig
@@ -43,6 +43,7 @@ CONFIG_SPL_SYS_MALLOC_SIZE=0x1000000
CONFIG_SPL_EARLY_BSS=y
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x400
+CONFIG_SPL_ENV_SUPPORT=y
CONFIG_SPL_I2C=y
CONFIG_SPL_DM_MAILBOX=y
CONFIG_SPL_DM_RESET=y
@@ -68,19 +69,22 @@ CONFIG_SPL_DM=y
CONFIG_SPL_DM_SEQ_ALIAS=y
CONFIG_REGMAP=y
CONFIG_SPL_REGMAP=y
+CONFIG_SYSCON=y
+CONFIG_SPL_SYSCON=y
CONFIG_SPL_OF_TRANSLATE=y
CONFIG_CLK=y
CONFIG_SPL_CLK=y
CONFIG_SPL_CLK_CCF=y
CONFIG_SPL_CLK_K3_PLL=y
CONFIG_SPL_CLK_K3=y
+CONFIG_SYS_DFU_DATA_BUF_SIZE=0x5000
CONFIG_TI_SCI_PROTOCOL=y
CONFIG_DA8XX_GPIO=y
CONFIG_DM_I2C=y
CONFIG_SYS_I2C_OMAP24XX=y
CONFIG_DM_MAILBOX=y
CONFIG_K3_SEC_PROXY=y
-CONFIG_SPL_MISC=y
+CONFIG_MISC=y
CONFIG_ESM_K3=y
CONFIG_SPL_MMC_HS200_SUPPORT=y
CONFIG_MMC_SDHCI=y
@@ -105,5 +109,19 @@ CONFIG_SOC_TI=y
CONFIG_TIMER=y
CONFIG_SPL_TIMER=y
CONFIG_OMAP_TIMER=y
+CONFIG_USB=y
+CONFIG_DM_USB_GADGET=y
+CONFIG_SPL_DM_USB_GADGET=y
+CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GENERIC=y
+CONFIG_SPL_USB_DWC3_GENERIC=y
+CONFIG_SPL_USB_DWC3_AM62=y
+CONFIG_USB_GADGET=y
+CONFIG_SPL_USB_GADGET=y
+CONFIG_USB_GADGET_MANUFACTURER="Toradex"
+CONFIG_USB_GADGET_VENDOR_NUM=0x1b67
+CONFIG_USB_GADGET_PRODUCT_NUM=0x4000
+CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_SPL_DFU=y
CONFIG_LIB_RATIONAL=y
CONFIG_SPL_LIB_RATIONAL=y
diff --git a/include/configs/verdin-am62.h b/include/configs/verdin-am62.h
index ac44809fdfa5..e8bc22d4c352 100644
--- a/include/configs/verdin-am62.h
+++ b/include/configs/verdin-am62.h
@@ -35,9 +35,18 @@
""
#endif /* CONFIG_TARGET_VERDIN_AM62_A53 */
+#define EXTRA_ENV_DFUARGS \
+ "dfu_alt_info_ram=" \
+ "tispl.bin ram 0x80080000 0x200000;" \
+ "u-boot.img ram 0x81000000 0x400000;" \
+ "loadaddr ram " __stringify(CONFIG_SYS_LOAD_ADDR) " 0x80000;" \
+ "scriptaddr ram " __stringify(SCRIPTADDR) " 0x80000;" \
+ "ramdisk_addr_r ram " __stringify(RAMDISK_ADDR_R) " 0x8000000\0"
+
/* Incorporate settings into the U-Boot environment */
#define CFG_EXTRA_ENV_SETTINGS \
BOOTENV \
+ EXTRA_ENV_DFUARGS \
MEM_LAYOUT_ENV_SETTINGS \
"boot_script_dhcp=boot.scr\0" \
"console=ttyS2\0" \
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v1] verdin-am62: add DFU, USB and UUU fastboot support
2024-07-04 15:49 [PATCH v1] verdin-am62: add DFU, USB and UUU fastboot support Vitor Soares
@ 2024-07-05 7:56 ` Francesco Dolcini
2024-07-18 13:41 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Francesco Dolcini @ 2024-07-05 7:56 UTC (permalink / raw)
To: Vitor Soares; +Cc: Francesco Dolcini, Tom Rini, Vitor Soares, u-boot
On Thu, Jul 04, 2024 at 04:49:32PM +0100, Vitor Soares wrote:
> From: Vitor Soares <vitor.soares@toradex.com>
>
> Enable USB host as well as USB gadget and DFU support for a53 and r5
> configs. Also, enable UUU fastboot support to download files with
> the UUU tool from a53.
>
> Additionally, configure usb0 to peripheral mode and add extra
> environment for DFU use.
>
> Signed-off-by: Vitor Soares <vitor.soares@toradex.com>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1] verdin-am62: add DFU, USB and UUU fastboot support
2024-07-04 15:49 [PATCH v1] verdin-am62: add DFU, USB and UUU fastboot support Vitor Soares
2024-07-05 7:56 ` Francesco Dolcini
@ 2024-07-18 13:41 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2024-07-18 13:41 UTC (permalink / raw)
To: Francesco Dolcini, Vitor Soares; +Cc: Vitor Soares, u-boot
On Thu, 04 Jul 2024 16:49:32 +0100, Vitor Soares wrote:
> Enable USB host as well as USB gadget and DFU support for a53 and r5
> configs. Also, enable UUU fastboot support to download files with
> the UUU tool from a53.
>
> Additionally, configure usb0 to peripheral mode and add extra
> environment for DFU use.
>
> [...]
Applied to u-boot/master, thanks!
--
Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-07-18 13:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-04 15:49 [PATCH v1] verdin-am62: add DFU, USB and UUU fastboot support Vitor Soares
2024-07-05 7:56 ` Francesco Dolcini
2024-07-18 13:41 ` Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.