This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

USB Device Mode on K2E - Current State?

Hi there,

I was wondering what the current state of USB 3.0 support for device mode is for K2E. The latest information I can see is:

So I assume the current SDK and kernel that I'm using (at least I think it's current - the kernel is 3.10.61 with a few config changes and some tweaks to a clock driver) won't be able to act as a USB 3.0 device, is this correct? Is there an update on the plan/schedule for this? Should I be making double-sure I'm using a certain/the latest version of the SDK/kernel?

If USB 3.0 device mode isn't supported, what would we have to do to get to a state where our kernel can do this?  I'm okay with kernel patching/modification, but I have no experience with USB devices at this level, so I can't really see how to go about this, or what's missing/needs to be done. Any pointers in the right direction would be appreciated!

It certainly doesn't seem to just work out-of-the-box, though it could just be that I'm looking at the wrong thing. What I really want to do is get libusb to talk between the target board and my host PC, but libusb_init() fails with return code -99. I can, however, do "modprobe g_serial" and then I see the contents of /sys/kernel/debug/2690000.dwc3/link_state be "SS.Disabled" when I do not have a USB cable connected between target and host and "U0" when I do, so obviously something's happening, but after that stage I'm fumbling in the dark.

I'm happy to provide any more info that's needed, but to be honest I'm not sure what would be most relevant/helpful. Although if there's absolutely no support for device mode at the moment, I guess that's a moot point...

Thanks for any help,

John G

  • Hi,

    Welcome to the TI E2E forum. I hope you will find many good answers here and in the TI.com documents and in the TI Wiki Pages (for processor issues). Be sure to search those for helpful information and to browse for the questions others may have asked on similar topics (e2e.ti.com).

    Peripheral experts will answer your question shortly.

    Thanks,
  • > at least I think it's current - the kernel is 3.10.61 with a few config changes and some tweaks to a clock driver

    Sorry, I've just realized this isn't true at all, I was getting mixed-up with which kernel I was using. The kernel that reacts to a USB link to the host with "U0" in the link_state file has additional modifications, which is some USB 3.0 host code I believe is copied over from your 3.13/3.19 kernels. The 3.10 kernel without these modifications doesn't do anything in this case.

    Another difference is in the kernel console log messages. With the 3.13/3.19-modified kernel, I see the following when I insert the serial module:

    root@keystone-evm:~# modprobe g_serial
    [ 45.939193] g_serial gadget: Gadget Serial v2.4
    [ 45.943711] g_serial gadget: g_serial ready
    [ 46.559588] g_serial gadget: high-speed config #2: CDC ACM config

    With the more-vanilla 3.10 kernel, I don't see any log messages at all in response to this modprobe.

    I hope this is clear, though I'll be happy to submit a patch or such to demonstrate the changes really made to this kernel if that'll help!

    Cheers,

    John G
  • John, I found out someone has marked this post mistakenly as answered.... I have fix it and now our apps team will be able to reply to it properly...
  • Hi,

    K2E USB device mode has not been tested and is being worked on. We don't have a schedule yet, but it is high priority.

    Rex