[PATCH v4 0/7] Add DFU and usb boot for TI am62x SK and beagleplay

Mattijs Korpershoek mkorpershoek at baylibre.com
Tue Jan 16 11:09:58 CET 2024


Hi Sjoerd,

Thank you for the series.

On ven., janv. 12, 2024 at 09:52, Sjoerd Simons <sjoerd at collabora.com> wrote:

> This series adds DFU support for TI AM62 SK board and new since this
> version also for beagleplay.
>
> Since the last revision, apart from beagleplay support the main changes
> are:
> * Documentation was added on how to use this functionality on both boards
> * the R5 configuration is now done via a config fragment rather
>   then a full configuraiton
> * A new patch was added for dwc3 to work in device mode even if dr_mode is
>   configured as otg. Avoiding the need for an explicit switch to
>   periphal in the u-boot dts

I've tested on Beagle Play that I could load/recover the board via
snagboot:

U-Boot SPL 2023.04 (Sep 27 2023 - 11:19:48 +0200)
SYSFW ABI: 3.1 (firmware rev 0x0009 '9.0.5--v09.00.05 (Kool Koala)')
SPL initial stack usage: 13392 bytes
Trying to boot from DFU
##########################################DOWNLOAD ... OK
Ctrl+C to exit ...
##########################################DOWNLOAD ... OK
Ctrl+C to exit ...
Loading Environment from nowhere... OK
init_env from device 10 not supported!
Starting ATF on ARM64 core...

NOTICE:  BL3'.9(release):d7a7135d32a8
NOTICE:  BL31: Built : 10:53:52, Jan 16 2024

U-Boot SPL 2024.01-14350-g416e52ada83a (Jan 16 2024 - 10:54:58 +0100)
SYSFW ABI: 3.1 (firmware rev 0x0009 '9.0.5--v09.00.05 (Kool Koala)')
SPL initial stack usage: 1888 bytes
Trying to boot from DFU


U-Boot 2024.01-14350-g416e52ada83a (Jan 16 2024 - 10:54:58 +0100)

SoC:   AM62X SR1.0 GP
Model: BeagleBoard.org BeaglePlay
DRAM:  2 GiB
Core:  104 devices, 29 uclasses, devicetree: separate
MMC:   mmc at fa10000: 0, mmc at fa00000: 1, mmc at fa20000: 2
Loading Environment from nowhere... OK
In:    serial at 2800000
Out:   serial at 2800000
Err:   serial at 2800000
Net:   No ethernet found.

Press SPACE to abort autoboot in 2 seconds


I've also tested (from the DFU'd U-Boot) that I could scan for usb keys:
=> usb start
[..]
1 USB Device(s) found

So for the series:
Tested-by: Mattijs Korpershoek <mkorpershoek at baylibre.com> # on beagle play

>
> I will also submit the dts changes to linux so that those can be dropped
> again in the near future (hopefully)
>
> Changes in v4:
> - Add config dependency on SYSCON
> - Move defines and constants outside out of function scope
> - Don't force usb0 into peripheral mode
> - Move R5 dfu config to a config fragment rather then a full defconfig
> - Don't enable XHCI for the R5 SPL, unneeded
>
> Change in v3:
> - Add dfu via environment rather then config headers
> - Enable usb nodes in all boot phases
> - Run savedefconfig to adjust to more recent u-boot
>
> Changes in v2:
> - Switch dwc3 glue to a seperate driver rather then in dwc-generic
> - Minimize config changes to just DFU configuration
> - Only enable usb port 0 DFU in SPL
> - Create a seperate defconfig for R5
>
> Sjoerd Simons (7):
>   usb: dwc3: Add dwc3 glue driver for am62
>   usb: dwc3: Switch to device mode on gadget start
>   board: ti: am62x: am62x: include env for DFU
>   arm: dts: k3-am625-sk: Enable usb port in u-boot
>   configs: am62x_evm_*: Enable USB and DFU support
>   beagleplay: Add DFU support
>   doc: board: Add document for DFU boot on am62x SoCs
>
>  arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi |   8 ++
>  arch/arm/dts/k3-am625-sk-u-boot.dtsi         |   8 ++
>  board/beagle/beagleplay/beagleplay.env       |   1 +
>  board/ti/am62x/am62x.env                     |   1 +
>  configs/am62x_beagleplay_a53_defconfig       |  30 +++++
>  configs/am62x_evm_a53_defconfig              |  30 +++++
>  configs/am62x_r5_usbdfu.config               |  28 +++++
>  doc/board/beagle/am62x_beagleplay.rst        |  12 ++
>  doc/board/ti/am62x_sk.rst                    |  37 ++++++
>  drivers/usb/dwc3/Kconfig                     |  14 +++
>  drivers/usb/dwc3/Makefile                    |   1 +
>  drivers/usb/dwc3/core.c                      |  10 +-
>  drivers/usb/dwc3/core.h                      |   1 +
>  drivers/usb/dwc3/dwc3-am62.c                 | 125 +++++++++++++++++++
>  drivers/usb/dwc3/gadget.c                    |   6 +
>  15 files changed, 307 insertions(+), 5 deletions(-)
>  create mode 100644 configs/am62x_r5_usbdfu.config
>  create mode 100644 drivers/usb/dwc3/dwc3-am62.c
>
> -- 
> 2.43.0


More information about the U-Boot mailing list