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.

Linux/PROCESSOR-SDK-DRA7X: EVM board(PSDK 3.02) USB device mode is not working

Part Number: PROCESSOR-SDK-DRA7X

Tool/software: Linux

Hi,

I posted usb device mode problem of custom board. ("https://e2e.ti.com/support/embedded/linux/f/354/t/594377")

I could not find the root cause.

So,I tested usb device mode of EVM board(VAYU EVM XC577X).

Target image is based on Processor SDK 3.02. (There is no modification)

First, I changed the "dr_mod" setting on device tree file.

&usb1 { dr_mode = "otg"; };

--> &usb1 { dr_mode = "peripheral"; };

After applying new device tree file , I executed next commands.

root@dra7xx-evm:~# mount -t debugfs debugfs /mnt

root@dra7xx-evm:~# cat /mnt/48890000.usb/mode

device

root@dra7xx-evm:~# modprobe g_multi file=/dev/mmcblk0p1
[  315.099163] using random self ethernet address
[  315.103797] using random host ethernet address
[  315.108697] using random self ethernet address
[  315.113252] using random host ethernet address
[  315.120585] usb0: HOST MAC 32:d5:dd:2a:ee:e1
[  315.125550] usb0: MAC 12:2f:f0:91:7a:a9
[  315.143142] Mass Storage Function, version: 2009/09/11
[  315.149836] LUN: removable file: (no medium)
[  315.154512] IPv6: ADDRCONF(NETDEV_UP): usb0: link is not ready
[  315.161572] LUN: file: /dev/mmcblk0p1
[  315.165530] Number of LUNs=1
[  315.169156] g_multi gadget: Multifunction Composite Gadget
[  315.183144] g_multi gadget: userspace failed to provide iSerialNumber
[  315.191476] g_multi gadget: g_multi ready

but there is no external usb storage on  connected host linux pc.

Any help would be greatly appreciated.

  • Hi JeHun,

    JeHun Kim said:
    Target image is based on Processor SDK 3.02. (There is no modification)

    Do you use Processor SDK Linux Automotive 3.02.00.03 (which comes with kernel 4.4.45)?

    Did you check the below wiki pages?

    http://processors.wiki.ti.com/index.php/Linux_Core_DWC3_User's_Guide

    Note also that we have use USB1 in peripheral mode for flashing through DFU, please check the below link also:

    Regards,
    Pavel

  • Do you use Processor SDK Linux Automotive 3.02.00.03 (which comes with kernel 4.4.45)?
    > yes. (processors.wiki.ti.com/.../Processor_SDK_Linux_Automotive_Software_Developers_Guide)

    Did you check the below wiki pages?
    > yes. I checked the the Processor SDK Linux DWC3 wiki page and all of the kernel config settings.
  • JeHun,

    USB1 is by default configured in dual-role mode. Can you provide me your settings to configure it in device/peripheral/gadget mode?

    Regards,

    Pavel

  • Hi Pavel,

    I already referenced that above.
    I changed the "dr_mode" setting on device tree file.
    &usb1 { dr_mode = "peripheral"; };

    Is there any configuration to check?

    Thank you.

    Best Regards,
    JeHun
  • JeHun,

    What cable you are using? In gadget mode standard USB cables with micro plug should be used.

    From what I understand you are using g_multi (Multifunction Composite Gadget) in Mass storage mode (can be also Ethernet and serial). If this is true, can you first test with g_mass_storage?

    processors.wiki.ti.com/.../Linux_Core_DWC3_User's_Guide

    What is your host machine, Linux, Windows?

    See also if the below pointers will be in help:

    linux-kernel/Documentation/usb/gadget_multi.txt
    linux-kernel/Documentation/usb/mass-storage.txt

    kwantam.github.io/BBKNotes1.html

    e2e.ti.com/.../1577098

    Regards,
    Pavel
  • Hi Pavel,

    What cable you are using? In gadget mode standard USB cables with micro plug should be used.

    Left connector is connected to VAYU EVM board, the other to linux host pc

    Can you first test with g_mass_storage?

    I didn't reference that but I actually also tested it to execute "modprobe g_mass_storage file=/dev/mmcblk0p1" and "modprobe g_ether"

    What is your host machine, Linux, Windows?

    My host pc OS is ubuntu 16.04 based linux.

    This pc works with the same EVM board of glsdk 7.04. (only device tree dr_mode value is modified.)

    Best Regards,

    JeHun Kim

  • JeHun,

    JeHun Kim said:
    I didn't reference that but I actually also tested it to execute "modprobe g_mass_storage file=/dev/mmcblk0p1" and "modprobe g_ether"

    Does g_mass_storage works fine for you in both GLSDK 7.04 and PSDKLA 3.02?

    JeHun Kim said:
    This pc works with the same EVM board of glsdk 7.04. (only device tree dr_mode value is modified.)

    Do you mean that g_multi works fine for you in GLSDK 7.04? What modifications exactly (if any) you made in GLSDK 7.04 to make g_multi to work?

    Regards,
    Pavel

  • Hi Pavel,

    1. Pavel : Does g_mass_storage works fine for you in both GLSDK 7.04 and PSDKLA 3.02?

    g_mass_storage works fine in GLSDK 7.04.
    EVM board USB1 Device mode Based on GLSDK 7.04 is working fine. (g_multi, g_mass_storage and g_ether)
    USB1 Device mode is not working only in PSDK 3.02. (g_multi, g_mass_storage and g_ether is not working)

    2. Pavel : What modifications exactly (if any) you made in GLSDK 7.04 to make g_multi to work?

    I made only one modification of device tree file.
    &usb1 { dr_mode = "peripheral"; };

    Best Regards,
    JeHun Kim

  • JeHun Kim said:
    First, I changed the "dr_mod" setting on device tree file.

    We have dr_mode in PSDK 3.02 dra7-evm.dts, dra7.dtsi and dra74x.dtsi. Please check all these 3 files.

    JeHun Kim said:
    root@dra7xx-evm:~# cat /mnt/48890000.usb/mode

    Do you have /mnt/48890000-dwc3/mode entry? If yes, can you try "# cat /mnt/48890000-dwc3/mode"?

    Before modprobe g_multi and/or g_mass_storage, try with libcomposite.ko

      # insmod /lib/modules/4.4-xxx/kernel/drivers/usb/gadget/libcomposite.ko