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/DRA74: How to configure CDC/RNDIS gadget in J6 EVM?

Part Number: DRA74


Tool/software: Linux

Hi,

As before link discribed, I want to configure CDC/RNDIS gadget in J6 EVM, could you guide me to configure this?

Best Regards,

Fredy

  • I want to use usb transmit data below J6EVM and Ubuntu PC.
  • Fredy,

    Were you able to follow the wiki link you shared above? The steps for the enablement of the RNDIS gadget is similar for DRA7x Linux kernel.

    Do give us more details on where you are currently blocked and we can give help you to get you going from there.

    -Praveen
  • Hi, Praveen,

    I tried this, but this is different with dra7xx.

    I do as the wiki link, I still can not find the usb device.
    For dra7xx , we have the guide as below:
    processors.wiki.ti.com/.../Linux_Core_DWC3_User's_Guide


    Best Regards,
    Fredy
  • Hi Fredy,

    Can you tell which PSDKLA release you are referring for this activity?

    Also can you tell us which USB instance is being used for the above? Please note that with the default kernel, USB3 port (usb1: usb@48890000) is configured as OTG and USB2 port (usb2: usb@488d0000) is configured as HOST in the dt files. Hence we would need to use the USB3 port for your testing ( unless you are modifying the dt files).

    Please note that in the latest release provided targetfs, the RNDIS gadget is already present and is built as module as found in the /lib/module/drivers/usb/gadget/

    Since the default mode OTG mode, to switch to DEVICE mode, at least one gadget must be loaded.

    So suggest you to try calling: modprobe g_ether

    After this you can verify if the module got load properly by checking by calling: lsmod

    To check if the mode has switched to device, call: cat /sys/kernel/debug/48890000.usb/mode

    With the above you must have the gadget loaded and ethernet device by the name usb0 must be created. Now you assign an IP address to the device and bring up the device as needed.

    -Praveen

  • Hi,Praveen

    the log as below:

    root@dra7xx-evm:~# modprobe g_ether
    [   58.807048] using random self ethernet address
    [   58.811525] using random host ethernet address
    [   58.819732] usb0: HOST MAC fa:06:60:12:b1:83
    [   58.842167] usb0: MAC ca:5a:05:9a:c5:90
    [   58.858046] using random self ethernet address
    [   58.870228] using random host ethernet address
    [   58.875817] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
    [   58.883278] g_ether gadget: g_ether ready
    [   58.888482] dwc3 48890000.usb: otg: gadget gadget registered
    [   58.898646] IPv6: ADDRCONF(NETDEV_UP): usb0: link is not ready
    [   58.905792] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
    root@dra7xx-evm:~# [   58.911634] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 3
    [   58.923832] xhci-hcd xhci-hcd.1.auto: hcc params 0x0220f04c hci version 0x100 quirks 0x00210010
    [   58.932620] xhci-hcd xhci-hcd.1.auto: irq 510, io mem 0x48890000
    [   58.943664] hub 3-0:1.0: USB hub found
    [   58.947489] hub 3-0:1.0: 1 port detected
    [   58.951852] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
    [   58.951899] tvp5158 1-0058: Unable to of_probe
    [   58.952111] tvp5158 1-0058: Unable to of_probe
    [   58.973295] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 4
    [   58.981304] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
    [   58.992072] hub 4-0:1.0: USB hub found
    [   58.995989] hub 4-0:1.0: 1 port detected
    [   59.000407] tvp5158 1-0058: Unable to of_probe
    [   59.007270] tvp5158 1-0058: Unable to of_probe
    
    root@dra7xx-evm:~# cat /sys/kernel/debug/48890000.usb/mode
    host

    the log show the usb mode is host, could you guide me to solve this?

    Br,Fredy

  • Fredy,

    Firstly, Can you tell me what PSDKLA release are you using? and which TI EVM are you using? Is it DRA74X EVM?
    What is being connected to the USB3 port?
    Also, Can you remove the any usb cable or any otg adapter connect to the USB port and try checking the mode on a fresh boot?
    If it not showing OTG, did you make any modification to to the device tree (dts file)?
    Also, can you share the complete kernel log and detail all the steps you did from beginning of boot?

    -Praveen
  • Praveen,
    PSDK0304, DRA74X EVM.
    Yes, USB3.
    Now I have solved this. thanks Praveen.

    root@dra7xx-evm:~# cat /sys/kernel/debug/48890000.usb/mode
    device

    Thanks for support. Now I need to test the USB transmition performance( Data rate and CPU loading).
    Could you give some suggestions ?

    -Fredy
  • Fredy,

    Good to know that your rndis gadget is properly get configured and the usb is set to device mode.

    > Now I need to test the USB transmission performance( Data rate and CPU loading).
    For testing the rndis over usb bandwidth/transmission performance, there a lot of information available online if you google for it.

    -Praveen
  • Thanks for support.
    I use iperf tools have test this.

    Big thanks.
    Fredy