element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Blog Insight into lan78xx driver support for Pi
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
GPIO Pinout
Raspberry Pi Wishlist
Comparison Chart
Quiz
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: colporteur
  • Date Created: 20 Jun 2021 5:59 PM Date Created
  • Views 6751 views
  • Likes 2 likes
  • Comments 13 comments
Related
Recommended

Insight into lan78xx driver support for Pi

colporteur
colporteur
20 Jun 2021

Does anyone have any insight into lan78xx usb driver support for the Raspberry Pi?

 

I am attempting to use a Microchip PoE USB-C device to enabling networking to a Raspberry Pi4B. The work is part of a RoadTest for Microchip PoE to USB-CRegistered Power and Data Adapter .

 

A quick check with a command line lsmod shows no lan78xx driver. There is no /lib/modules/5.10.17-v7l+/kernel/net/usb to support the lan78xx as suggested in some posts I have found.

 

I did find this post https://wiki.seeedstudio.com/Dual-Gigabit-Ethernet-Carrier-Board-for-Raspberry-Pi-CM4/   and successfully completed the procedure for an Ethernet Port configuration.

image

 

A lan7800 module reference does appear for a command line lsmod after the install. The Microchip PoE USB-C lan7800 port is not detected when connected to the Pi. Still no reference to a lan78xx module appears in the directory structure.

 

The vendors site https://www.microchip.com/wwwproducts/en/LAN7800  indicates there has been support in the Linux kernel. My searches for Pi driver support has been limited. My understanding is lan78xx is a modules in the usb subdirectory when installed. I'm not seeing that for this kludge.

 

I'm thinking maybe I need a a dtsoverlay in the config.txt directory. Really not sure. I have gone as far as to load Ubuntu for the Pi to see if it is O/S related. That didn't prove fruitful.

 

I welcome any insight community members may have regarding network driver installs for the Pi. I will continue to hunt and peck to see if there is anything I have missed.

  • Sign in to reply

Top Comments

  • Gough Lui
    Gough Lui over 4 years ago in reply to colporteur +3
    I actually got inspired to put it in based on this post: https://www.raspberrypi.org/forums/viewtopic.php?t=246348#p1504603 - Gough
  • Gough Lui
    Gough Lui over 4 years ago +2
    I have the unit working on my Raspberry Pi 4 (but needing a USB-C to A OTG adapter + USB-A to USB-C cable because mine is the version with the CC pin issue , so using the included captive USB-C to USB…
  • colporteur
    colporteur over 4 years ago in reply to skruglewicz +2
    Yes.
  • colporteur
    colporteur over 4 years ago in reply to Gough Lui

    Yes, the PiZero power is through Microchip PoE. The cable for the zero connection is a USB mini to USB-C. I have a USB mini adapater to make that end a USB-C that I can then connect to Pi4B. Same cable other than adapter works on Pi4B and not PizeroW ( it appears I gave away by PiZero:().

     

    I will give the config a try and report back. Currently trying to establish bandwidth tests.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Gough Lui
    Gough Lui over 4 years ago in reply to colporteur

    Are you powering the PiZeroW via the Microchip PoE-USB-C adapter? What adapters/cables are you using? Perhaps they do not connect or somehow mangle the D+/D- lines?

     

    Unfortunately, I gave away my PiZeroW, so I don't have the hardware to test with. Perhaps you should try adding just dtoverlay=dwc2 to config.txt in case the Pi Zero W's older SoC's OTG controller isn't supported by the xHCI driver. Perhaps test without any overlays, then with the dtoverlay=dwc2 and then otg_mode=1, looking at the lsusb and dmesg output on each.

     

    - Gough

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • colporteur
    colporteur over 4 years ago

    image

     

    Both Pi's support the OTG configuration (shown below) that enables IP over the USB connection.

    filename: /boot/config.txt

    add

    dtoverlay=dwc2

    filename:/boot/cmdline.txt

    add after rootwait

    modules-load=dwc2,g_ether

     

    The PiZeroW doesn't appear to support the OTG configuration (shown below) that detected the Ethernet.

    filename: /boot/config.txt

    add

    otg_mode=1

     

    GL Gough Lui do you have any insight you can share?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • colporteur
    colporteur over 4 years ago in reply to Gough Lui

    Your post gave me some inspiration to add to the  Microchip PoE to USB-CRegistered Power and Data Adapter RoadTest Review Data Success blog post.

     

    I went an redid my install process again, paying particular attention to command outputs. Hopefully someday the learning gets me below 10 minute troubleshooting time you indicated.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Gough Lui
    Gough Lui over 4 years ago in reply to colporteur

    In fact, it wasn't as hard as you think for me to discover the solution. It really only took me 10 minutes from start to finish to get my Pi 4 up and running on the Microchip PoE USB-C adapter. It's probably down to my way of breaking down the problem into steps and the fact I am somewhat familiar with Linux and device driver issues (eugh).

     

    My methodology was:

    • Get it powered. Plug in the PoE adapter, get the orange power light to come up - that was no difficulty at all as it should just work. Plug in the USB-C to USB-C cable, get the Pi to start booting. I hit a snag here precisely because my version of Raspberry Pi 4 (being an earlier unit) has a CC pin issue which means the PoE adapter cannot sense what sort of device it is connected to, so will not supply power. You were successful in getting yours to work because it is likely to be a later unit that corrected this error. For me, using a USB-C OTG to USB-A adapter provided the PoE adapter with the right CC resistances to start sourcing power, then using a regular USB-A cable to USB-C to hook up the Pi to the adapter provided the path for the power and data, overcoming the issue.
    • Get it detected. Because my Pi 4 was "dual-connected", I could still reach it via WLAN/onboard Ethernet while the PoE adapter hadn't come up. I suspect the PoE adapter was not detected purely because the green DATA LED on the adapter was not lit or blinking - this is a "feature" of the unit to tell you if the USB connection is established. This was verified with a quick lsusb to determine USB devices connected - remember, even if there are no drivers, lsusb will show connected device details. This pointed at no USB connection existing - so I looked up how to enable the USB-OTG port on the Pi 4. Similarly to you, I came across many articles about USB gadgets and the dwc2 driver, but I ignored them because all those articles are about turning the Pi into a "device" pretending to be a USB to Ethernet adapter. What we needed was to turn the Pi into a "host" so a device (the PoE adapter) could connect. That post was part of a thread that was first or second in my search results list and mentioned xHCI (where HCI stands for HOST Controller Interface), yet another hint. I made the change and it came up.
    • Check for drivers. Now that it is detected, does it function? Thankfully, yes - so I didn't have to go any further, but I suspected it would be. The reason is that the LAN7800 in this product is a descendant of the LAN7500 and the LAN9500, both previously used on-board the Raspberry Pi. The release notes for the Windows drivers support ARM as well and mention that their drivers were derived from the LAN7500/9500 drivers, suggesting there is a lot of similarity in the code, so I suspected that drivers would already have been readied and in the distribution.

     

    It is important to note that because the USB-C OTG functionality of the Pi 4 uses the USB 2.0 hardware, the throughput on the Pi 4 when attached to a network in this way is about 340-380Mbit/s just like older Raspberry Pis with Gigabit USB Ethernet soldered onboard (e.g. Pi 3B+). The throughput using the physical on-board port is higher, as it has a dedicated Gigabit MAC on the Pi 4.

     

    Also important to note that I am not implying that using the dwc2_otg driver won't work - but having used a few devices that use the DesignWave drivers, I've found odd device support quirks and performance issues that I would rather avoid it whenever possible, hence the preference for the xHCI option even though at the time the forum post was published, was still relatively a "work in progress". Whichever works, I suppose.

     

    - Gough

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube