On Tue, Dec 03, 2024 at 04:29:02PM +0100, Enric Balletbo i Serra wrote: > Hi, > > On Thu, Nov 28, 2024 at 10:58 AM s-vadapalli <s-vadapalli@xxxxxx> wrote: > > > > On Thu, Nov 28, 2024 at 10:47:42AM +0100, Enric Balletbo i Serra wrote: > > > Hi, > > > > [...] > > > > > So I changed the dr_mode to otg instead of host and tried to configure > > > a usb mass storage gadget but unfortunately didn't work, but this > > > could be a driver problem, I got the following error > > > > > > UDC core: g1: couldn't find an available UDC > > > > > > As the devicetree should describe the hardware, and as far as I can > > > see it should support the type-c port act as a gadget, I'm fine with > > > changing the dr_mode, unless anyone have more information about this, > > > the thing that makes me think a bit more is that, in the TI kernel > > > this is set to host, so I'm wondering if I'm missing something or is > > > just that was never tested. > > > > Are all interfaces (Type-A and Type-C) functional as Host when the > > dr_mode is set to "otg"? (Do USB devices connected to the interfaces > > enumerate on AM69-SK?) If yes, then it could be a DIP Switch setting > > that is related to OTG mode of operation or a USB-C Mux that needs to be > > configured. > > > > Yes, all interfaces (Type-A and Type-C) are functional as host when > the dr_mode is set to "otg". Looking at SK-AM69 Processor Start Kit > User's Guide (Rev. A) [1] I don't see any DIP Switch related to the > OTG mode. Looks like the type-c connector connects directly to the > SoC through a USB HUB (TUSB4041). > > [1] https://www.ti.com/lit/ug/spruj70a/spruj70a.pdf?ts=1733215039014 In that case, please post the patch setting "dr_mode" to "otg". As to why "peripheral"/"gadget" operation doesn't work could be addressed separately and seems to be independent of the device-tree. The reason for suggesting "otg" instead of "host" is to ensure that the device-tree describes the Hardware. Since "host" mode is still functional with "dr_mode" set to "otg", at-least for the use-cases that you have in mind, I believe that "otg" should be acceptable. Regards, Siddharth.