On Fri, 2024-01-12 at 06:37 -0600, Nishanth Menon wrote: > On 09:52-20240112, Sjoerd Simons wrote: > > Enable USB host as well as USB gadget and DFU support for a53; For > > the > > r5 due to the smaller available size create a config fragment for > > DFU > > supports which disables support for persistent storage to free up > > space > > for USB support > > > > Signed-off-by: Sjoerd Simons <sjo...@collabora.com> > > > > --- > > > > Changes in v4: > > - Move R5 dfu config to a config fragment rather then a full > > defconfig > > - Don't enable XHCI for the R5 SPL, unneeded > > > > Changes in v3: > > - Run savedefconfig to adjust to more recent u-boot > > > > Changes in v2: > > - Create a seperate defconfig for R5 > > > > configs/am62x_evm_a53_defconfig | 30 > > ++++++++++++++++++++++++++++++ > > configs/am62x_r5_usbdfu.config | 28 ++++++++++++++++++++++++++++ > > 2 files changed, 58 insertions(+) > > create mode 100644 configs/am62x_r5_usbdfu.config > > > > diff --git a/configs/am62x_evm_a53_defconfig > > b/configs/am62x_evm_a53_defconfig > > index aa96c1b3125..f335eb11e63 100644 > > --- a/configs/am62x_evm_a53_defconfig > > +++ b/configs/am62x_evm_a53_defconfig > > Should we make the a53 also a defconfig fragment allowing reuse > across > multiple boards?
Pros and cons. having all the various options (USB boot, ETH boot, misc other) as fragments would allow easier re-use but make it more complicated for the end-user to get a "full-featured" u-boot. My personal preference, as i'm coming with a distribution background, is to always enable as much as possible in a default build to allow maximum flexibility for end-users; Those that need space/performance/whatever optimisation can always do custom builds. It would be great if we could have a level of indirection here where by default a set of fragments get included such that it's invisible to the end-user that the underlying config is actually quite modular. But I don't think that's currently possible, hence preferring a fat defconfig such that the user/distro can just do `make am62x_evm_a53_defconfig` (and similar for beagleplay) Regards, Sjoerd > > @@ -1,5 +1,6 @@ > > CONFIG_ARM=y > > CONFIG_ARCH_K3=y > > +CONFIG_SYS_MALLOC_LEN=0x2000000 > > CONFIG_SYS_MALLOC_F_LEN=0x8000 > > CONFIG_SPL_LIBCOMMON_SUPPORT=y > > CONFIG_SPL_LIBGENERIC_SUPPORT=y > > @@ -41,16 +42,23 @@ CONFIG_SPL_SYS_MALLOC_SIMPLE=y > > CONFIG_SPL_STACK_R=y > > CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y > > CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1400 > > +CONFIG_SPL_ENV_SUPPORT=y > > CONFIG_SPL_FS_LOAD_PAYLOAD_NAME="u-boot.img" > > CONFIG_SPL_DM_MAILBOX=y > > CONFIG_SPL_DM_SPI_FLASH=y > > CONFIG_SPL_POWER_DOMAIN=y > > +CONFIG_SPL_RAM_SUPPORT=y > > +CONFIG_SPL_RAM_DEVICE=y > > # CONFIG_SPL_SPI_FLASH_TINY is not set > > CONFIG_SPL_SPI_FLASH_SFDP_SUPPORT=y > > CONFIG_SPL_SPI_LOAD=y > > CONFIG_SYS_SPI_U_BOOT_OFFS=0x280000 > > +CONFIG_SPL_USB_GADGET=y > > +CONFIG_SPL_DFU=y > > CONFIG_SPL_YMODEM_SUPPORT=y > > +CONFIG_CMD_DFU=y > > CONFIG_CMD_MMC=y > > +CONFIG_CMD_USB=y > > CONFIG_OF_CONTROL=y > > CONFIG_SPL_OF_CONTROL=y > > CONFIG_MULTI_DTB_FIT=y > > @@ -61,10 +69,17 @@ 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_CLK_TI_SCI=y > > +CONFIG_DFU_MMC=y > > +CONFIG_DFU_RAM=y > > +CONFIG_DFU_SF=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_TI_SCI_PROTOCOL=y > > @@ -103,4 +118,19 @@ CONFIG_CADENCE_QSPI=y > > CONFIG_SYSRESET=y > > CONFIG_SPL_SYSRESET=y > > CONFIG_SYSRESET_TI_SCI=y > > +CONFIG_USB=y > > +CONFIG_DM_USB_GADGET=y > > +CONFIG_SPL_DM_USB_GADGET=y > > +CONFIG_USB_XHCI_HCD=y > > +CONFIG_USB_XHCI_DWC3=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_GADGET=y > > +CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments" > > +CONFIG_USB_GADGET_VENDOR_NUM=0x0451 > > +CONFIG_USB_GADGET_PRODUCT_NUM=0x6165 > > +CONFIG_USB_GADGET_DOWNLOAD=y > > CONFIG_FS_FAT_MAX_CLUSTSIZE=16384 > > diff --git a/configs/am62x_r5_usbdfu.config > > b/configs/am62x_r5_usbdfu.config > > new file mode 100644 > > index 00000000000..772bb2ab935 > > --- /dev/null > > +++ b/configs/am62x_r5_usbdfu.config > > @@ -0,0 +1,28 @@ > > +CONFIG_SPL_ENV_SUPPORT=y > > +CONFIG_SYSCON=y > > +CONFIG_SPL_SYSCON=y > > +CONFIG_SYS_DFU_DATA_BUF_SIZE=0x5000 > > +CONFIG_MISC=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="Texas Instruments" > > +CONFIG_USB_GADGET_VENDOR_NUM=0x0451 > > +CONFIG_USB_GADGET_PRODUCT_NUM=0x6165 > > +CONFIG_USB_GADGET_DOWNLOAD=y > > +CONFIG_SPL_DFU=y > > +# CONFIG_SPL_MMC is not set > > +# CONFIG_SPL_FS_FAT is not set > > +# CONFIG_SPL_LIBDISK_SUPPORT is not set > > +# CONFIG_SPL_SPI is not set > > +# CONFIG_SPL_SYS_MALLOC is not set > > +# CONFIG_CMD_GPT is not set > > +# CONFIG_CMD_MMC is not set > > +# CONFIG_CMD_FAT is not set > > +# CONFIG_MMC_SDHCI is not set > > -- > > 2.43.0 > > > -- Sjoerd Simons Collabora Ltd.