Tool/software: Linux
Hi,
we have been viewing the DFU support video for AM57xx, which Bin Liu did a great job on.
Additionally we have been reviewing the u-boot user guide, and validated the DFU support on a DRA7xx EVM using the latest SDK 4.03.
We understand that the AM57xx EVM has a Hub chip on USB1 port, therefore the EVM cannot be used for DFU.
However we wanted to see if we could get the DFU support to work with an AM5728 IDK, which connects the USB1 directly to a connector. The thinking is that as long as we connect the USB cable with the right adapter, that the AM5728 will enumerate as device with an external Host PC.
The result is that the Boot ROM actually is able to enumerate with the external Host PC correctly.
Then we tested whether whether we can make the SPL work, building it with the AM57xx defconfig with the DFU support as prescribed by the UG. But when loading via DFU, we are getting the following error:
U-Boot SPL 2017.01-00458-g32d3fcd-dirty (Jun 20 2018 - 10:25:23)
DRA752-GP ES2.0
Trying to boot from DFU
Using default environment
port 0 can't be used as device
ERROR: board usb init failed
at common/dfu.c:29/run_usb_dnl_gadget()
Looking at the board files in u-boot of AM57xx vs DRA7xx, I think we need to change the function board_usb_init to force the AM57xx to setup its USB1 as device.
~/ti-processor-sdk-linux-am57xx-evm-04.03.00.05/board-support/u-boot-2017.01+gitAUTOINC+c68ed086bd-gc68ed086bd/board/ti$ diff -Nurp am57xx/board.c dra7xx/evm.c
...
The original code in the AM57xx board.c was written such that if one wants to configure the port 0 (USB1) as Device, that it will not allow that. This makes sense given that the AM57xx EVM has a Hub chip on USB1, thereby forcing Host mode.
Could you let me know your thoughts and whether there is anything else we are missing?
Thanks,
--Gunter