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.

TDA4VM: TDA4VM: USB Ethernet Gadget

Part Number: TDA4VM


Hello,

We are using the Jacinto TDA4 J721E EVM board and we are trying to use the USB Ethernet gadget driver.

In theory this driver allow to create a new network device to load images using the tftp or nfs protocols.

We enabled in the corresponding u-boot config this feature but this is not initializing any new network apart from the one that is already present (eth0).

After to enable this driver, is supposed that u-boot should list a new device named "usb_ether" using the "Net" command. 

Do you know if actually this gadget driver can be used? if yes, could you provide correct configuration to enable this feature? 

Regards,
Oscar

  • HI Oscar,

    Help share all the steps you did to enable the functionality along with the logs.

    Regards
    Diwakar

  • Hello Diwakar,

    Thanks for your reply and support.

    Actually what we did is to edit the default configuration that the uboot provides for the j721e boards. Running the menuconfig we enabled "USB Ethernet Gadget" with the RNDIS protocol, but as you can see at below log there is no new ethernet devices in the list:

    U-Boot SPL 2023.04-00025-g676f578f-dirty (Apr 08 2024 - 18:59:00 +0200)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.2--v09.01.02 (Kool Koala)')
    Trying to boot from MMC2
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Loading Environment from nowhere... OK
    Starting ATF on ARM64 core...

    NOTICE: BL31: v2.9(release):v2.9.0-614-gd7a7135d32-dirty
    NOTICE: BL31: Built : 09:34:15, Aug 24 2023
    I/TC:
    I/TC: OP-TEE version: 4.0.0 (gcc version 11.4.0 (GCC)) #1 Fri Oct 20 18:29:31 UTC 2023 aarch64
    I/TC: WARNING: This OP-TEE configuration might be insecure!
    I/TC: WARNING: Please check optee.readthedocs.io/.../porting_guidelines.html
    I/TC: Primary CPU initializing
    I/TC: SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.2--v09.01.02 (Kool Koala)')
    I/TC: HUK Initialized
    I/TC: Activated SA2UL device
    I/TC: Fixing SA2UL firewall owner for GP device
    I/TC: Enabled firewalls for SA2UL TRNG device
    I/TC: SA2UL TRNG initialized
    I/TC: SA2UL Drivers initialized
    I/TC: Primary CPU switching to normal world boot

    U-Boot SPL 2023.04-00025-g676f578f-dirty (Apr 08 2024 - 18:58:50 +0200)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.2--v09.01.02 (Kool Koala)')
    Detected: J7X-BASE-CPB rev E3
    Detected: J7X-VSC8514-ETH rev E2
    Trying to boot from MMC2
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted


    U-Boot 2023.04-00025-g676f578f-dirty (Apr 08 2024 - 18:58:50 +0200)

    SoC: J721E SR1.0 GP
    Model: Texas Instruments K3 J721E SoC
    Board: J721EX-PM2-SOM rev E7
    DRAM: 4 GiB
    cdns3_bind: unsupported dr_mode
    Core: 125 devices, 34 uclasses, devicetree: separate
    Flash: 0 Bytes
    MMC: mmc@4f80000: 0, mmc@4fb0000: 1
    Loading Environment from FAT... OK
    In: serial@2800000
    Out: serial@2800000
    Err: serial@2800000
    am65_cpsw_nuss ethernet@46000000: K3 CPSW: nuss_ver: 0x6BA00101 cpsw_ver: 0x6BA80100 ale_ver: 0x00293904 Ports:1 mdio_freq:1000000
    Detected: J7X-BASE-CPB rev E3
    Detected: J7X-VSC8514-ETH rev E2
    cdns,sierra serdes@5000000: sierra probed
    Net: eth0: ethernet@46000000port@1
    Hit any key to stop autoboot: 0

    We also saw that in the device tree provided (k3-j721e-common-proc-board.dts), there is one USB3 device that can be used with the OTG/Peripheral mode, and seems to be linked to a Cadence Sierra Phy, how can we use that?

    We tried to enable USB3 port at uboot using the "USB Start" command, but we only can see something configuring it as "host", but never in peripheral or OTG mode.

    Regards,
    Oscar

     

  • HI Oscar

    Why we are not using Ethernet IP for this just want to understand the usecase.

    Regards
    Diwakar

  • Hello Diwakar,

    Reason is because dedicated Ethernet port speed is up to 1 Gb/s, but a USB3 port can reach 5 Gb/s.

    Due to another need where we have to be able to save a large amount of data in a shared folder, we wanted to test this USB Ethernet feature to see if this can reach the desired rate.

    Regards,
    Oscar

  • Hi Oscar 

    Currently it is not supported out of the box in sdk and might need modification to make it work.

    Allow us some time to check on this.

    Due to holiday please expect 1-2 business days delay in response.

    Regards 

    Diwakar 

  • Hi Oscar 

    Can you take a look into this and see if it help you in any case.

    u-boot/doc/README.usb at master · lentinj/u-boot · GitHub

    We also saw that in the device tree provided (k3-j721e-common-proc-board.dts), there is one USB3 device that can be used with the OTG/Peripheral mode, and seems to be linked to a Cadence Sierra Phy, how can we use that?

    this is the serdes used to achieve the USB3.0 functionality.

    If you want to enable the USB3.0 functionality in U-BOOT you can do the below changes 

    diff --git a/arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi b/arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi
    index 194f587b38..76b5f60f1b 100644
    --- a/arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi
    +++ b/arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi
    @@ -143,7 +143,7 @@
     };
     
     &usb0 {
    -       dr_mode = "peripheral";
    +       dr_mode = "host";
            u-boot,dm-spl;
     };
    

    Regards
    Diwakar

  • Hello Diwakar,

    I did the changes at the k3-j721e-common-proc-board-u-boot.dtsi file and the uboot is able to detect a USB mass storage device after the USB Start command. So, this is working, but as a Host. 
    Problem is that this configuration can not be used to emulate a Ethernet port as a client, which is the feature that we wanted to test. I saw this comment in README.usb file:

    Note: USB Host Networking is not the same as making your board act as a USB
    client. In that case your board is pretending to be an Ethernet adapter
    and will appear as a network interface to an attached computer. In that
    case the connection is via a USB cable with the computer acting as the host.

    This is just what we wanted to use, and what we think that USB Ethernet Gadget driver is doing. Do you know how to enable USB3 port for that particular case?

    Regards,
    Oscar

  • Hello Diwakar,

    Could you check this USB Ethernet Gadget driver? Is it finally available for USB3 port?

    Thanks in advance.

    Regards,
    Oscar

  • Hi Oscar 

    This is a new feature requirement which need to be evaluate by our dev team .

    We have tested the USB gadget functionality in the linux but not in the UBOOT as we dont want to bloat the UBOOT with lots of functionality.

    Regards
    Diwakar

  • Hello Diwakar,

    This is very interesting for us, even if you did not used it in UBOOT, we would like to know the config (or device tree changes) that you applied to use the USB3 port with USB Gadget driver.
    According your comments, I understand to you could be able to use it after some kernel changes and initialize the root file system. Could you provide those changes?

    Best regards,
    Oscar

  • Hi Oscar 

    If you want to test the USB gadget functionality in linux it should work out of the box there is no need of extra config.

    Boot up to linux withand try.

    modprobe g_ether.

    Regards
    Diwakar