On Tue, 26 Nov 2024 17:33:17 +0530, Siddharth Vadapalli wrote: > This series adds support for USB DFU boot on TI's AM62A SoC which has > two instances of DWC3 USB Controllers namely USB0 and USB1. The USB0 > instance of the USB Controller supports USB DFU boot: > ROM => tiboot3.bin => tispl.bin => u-boot.img > > USB DFU Boot requires the USB Controller to be configured for Gadget > mode of operation. Since the USB0 instance of the DWC3 USB Controller > supports both Host and Gadget modes of operation via the Type-C interface > on the AM62A7-SK board, the device-tree specifies the "dr_mode" as "OTG". > However, there is currently no support for dynamically switching the "mode" > from Host to Gadget and vice-versa with the help of a state-machine. > The OTG mode is treated as a separate mode in itself rather than being > treated as an intermediate stage before assuming the Host/Gadget mode. > Due to this, USB DFU boot via the Type-C interface doesn't work as the > USB Controller hasn't been appropriately configured for Device/Gadget > mode of operation. One option is to change the device-tree to specify > "dr_mode" as "peripheral" and force the controller to assume the Device > role. This will imply that the U-Boot device-tree for AM62A diverges > from its Linux counterpart. Therefore, with the intent of keeping the > device-tree uniform across Linux and U-Boot, and at the same time, in > order to enable USB DFU boot in "OTG" mode with the DWC3 Controller, > the first patch in this series sets the "mode" on the basis of the > caller function, rather than using the "dr_mode" property in the > device-tree. There are only two callers of "dwc3_generic_probe()", > each of which clearly specify the expected mode of configuration. > This will enable both Host and Device mode of operation based on the > command executed by the user, thereby truly supporting "OTG" > functionality when the USB Controller supports it. > > [...]
Applied to u-boot/next, thanks! -- Tom