Ethernet Gadget in U-Boot

Forums Devices OSD335x-SM Ethernet Gadget in U-Boot

Viewing 3 reply threads
  • Author
    Posts
    • #9147
      Stephan Reberssrebers
      Participant

        Hello Forum,

        I’m having some trouble getting the USB RNDIS getting to work in U-Boot with (custom) boards that have the OSD335x-SM device. I created a SD card with MLO and U-Boot image and I configured a static ip. On the host I created network interface with the corresponding host address.

        This works fine for a stock Beagle Bone Black but not for our proto board (stripped SM-RED). I suspected the difference in EEPROM could be an issue, so I cloned the contents from the BBB in the proto board but no effect. I tried two versions of U-Boot but both fail on a time out. I also tried on a Pocket Beagle and the OSD3358-SM-RED with same bootloaders, they also fail.

        The RNDIS works without problems when the kernel runs with both Linux and Windows hosts. I cannot figure out what the difference in hardware/software can explain this behavior. Any help is much appreciated.

        U-Boot 2018.09-00002-g0b54a51eee (Sep 10 2018 - 19:41:39 -0500), Build: jenkins-github_Bootloader-Builder-65
        
        CPU  : AM335X-GP rev 2.1
        I2C:   ready
        DRAM:  512 MiB
        No match for driver 'omap_hsmmc'
        No match for driver 'omap_hsmmc'
        Some drivers were not found
        Reset Source: Power-on reset has occurred.
        RTC 32KCLK Source: External.
        MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
        Loading Environment from EXT4...
        ** Unable to use mmc 0:1 for loading the env **
        Board: BeagleBone Black
         not set. Validating first E-fuse MAC BeagleBone Black:
        Timed out in wait_for_event: status=0000 Check if pads/pull-ups of bus are properly configured
        BeagleBone: cape eeprom: i2c_probe: 0x54:
        Timed out in wait_for_event: status=0000 Check if pads/pull-ups of bus are properly configured
        BeagleBone: cape eeprom: i2c_probe: 0x55:
        Timed out in wait_for_event: status=0000 Check if pads/pull-ups of bus are properly configured
        BeagleBone: cape eeprom: i2c_probe: 0x56:
        Timed out in wait_for_event: status=0000 Check if pads/pull-ups of bus are properly configured
        BeagleBone: cape eeprom: i2c_probe: 0x57:
        Net:   eth0: MII MODE
        cpsw, usb_ether
        Press SPACE to abort autoboot in 2 seconds 
        => env default -f -a 
        ## Resetting to default environment 
        => setenv ipaddr 192.168.0.100 
        => setenv serverip 192.168.0.1 
        => setenv ethact usb_ether 
        => setenv usbnet_devaddr f8:dc:7a:00:00:02 
        => setenv usbnet_hostaddr f8:dc:7a:00:00:01 
        => tftp 0x81000000 test.txt 
        using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in MAC f8:dc:7a:00:00:02 HOST MAC f8:dc:7a:00:00:01 RNDIS ready 
        The remote end did not respond in time.cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
        U-Boot 2019.10-rc3-00183-g448f11f750 (Sep 05 2019 - 11:47:58 +0200)
        
        CPU  : AM335X-GP rev 2.1
        Model: TI AM335x BeagleBone Black
        DRAM:  512 MiB
        WDT:   Started with servicing (60s timeout)
        NAND:  0 MiB
        MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
        Loading Environment from FAT...  not set. Validating first E-fuse MAC
        Net:   eth0: ethernet@4a100000
        Warning: usb_ether MAC addresses don't match:
        Address in ROM is          de:ad:be:ef:00:01
        Address in environment is  38:d2:69:52:3e:b3 , eth1: usb_ether Hit any key to stop autoboot:  0 
        => env default -f -a 
        ## Resetting to default environment 
        => setenv ipaddr 192.168.0.100 
        => setenv serverip 192.168.0.1 
        => setenv ethact usb_ether 
        => setenv usbnet_devaddr f8:dc:7a:00:00:02 
        => setenv usbnet_hostaddr f8:dc:7a:00:00:01 
        => tftp 0x81000000 test.txt 
        using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in MAC f8:dc:7a:00:00:02 HOST MAC f8:dc:7a:00:00:01 RNDIS ready
        ethernet@4a100000 Waiting for PHY auto negotiation to complete......... TIMEOUT !

         

      • #9156
        Neeraj Dantu
        Moderator

          srebers,

          From the logs(last lines), it looks like the board is trying to use CPSW(ethernet PHY) as the communication interface. The RED board uses a different PHY than the Beaglebone Black. Can you verify that the USB RNDIS is being used by using “printenv ethact”?

          Addition info in this thread: https://stackoverflow.com/questions/32747239/can-u-boot-support-more-than-one-ethernet-port

          Also note that we demonstrated TFTP boot over USB interface on the RED board in this app note: https://octavosystems.com/app_notes/programming-emmc-with-usb/

          Please follow up here.

          Best,

          Neeraj

        • #9165
          Stephan Reberssrebers
          Participant

            Hi Neeraj,

            I finally figured this one out. It turned out that that the hardware designer decided to put a 10k pull down on the usb0_id line. Strangely enough this did not have an effect, at least not noticeable, during Linux operation, only in U-Boot.
            I also thought that U-Boot was trying the CPSW in MII mode and was giving a timeout because our board uses RGMII. It doesn’t matter how the board is identified, Beagle Bone Black or Pocketbeagle, with the resistor removed and “setenv ethact usb_ether” it will use the USB RNDIS and work correctly.
            My statement that it didn’t work on a Pocketbeagle/OSD3358-SM-RED board was incorrect. I think during all the testing some confusion occurred.

            Thanks a lot for your input.

            Regards,
            Stephan

          • #9168
            Neeraj Dantu
            Moderator

              Thanks for the update!

              Neeraj

          Viewing 3 reply threads
          • You must be logged in to reply to this topic.