Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Software MAC support #11722

Open
ryao opened this issue Feb 20, 2024 · 2 comments
Open

Feature request: Software MAC support #11722

ryao opened this issue Feb 20, 2024 · 2 comments

Comments

@ryao
Copy link

ryao commented Feb 20, 2024

Adding support for software MACs such as the following would be a nice way of reducing component costs for less demanding applications:

https://github.com/essele/rp2040-rmii

For example, a ENC424J600 that combines both a PHY and a MAC costs $5 and change while the LAN8720A PHY costs $1.29:

https://www.microchip.com/en-us/product/ENC424J600
https://www.microchip.com/en-us/product/LAN8720A

Meanwhile a RP2040 only costs $0.70:

https://www.digikey.com/en/products/detail/raspberry-pi/SC0914-13/14306010?s=N4IgTCBcDaIEoAUwAYAsyQF0C%2BQ

Having support for a software MAC would bring down the costs of projects that need Ethernet nicely, without resorting to the limitations of the TCP offload engine in the not much cheaper W5500 (Edit: I learned after posting this that the W5500’s TCP Offload Engine is not used by Nuttx):

https://www.digikey.com/en/products/detail/wiznet/W5500/4425702

The main downside of the software MAC in the linked GitHub project is that the controller needs to run at a multiple of 50MHz, and must run at 100MHz or higher, when the RP2040’s stock clock speed is documented as being 133MHz, but is 125MHz at boot. The downside of running it at either 100MHz or 150MHz (or higher) is probably more than worth the reduction in BOM costs.

@xiaoxiang781216
Copy link
Contributor

Nice idea, it will be more useful if software MAC can work with other chips.

@ryao
Copy link
Author

ryao commented Feb 27, 2024

Nice idea, it will be more useful if software MAC can work with other chips.

The RP2040 is somewhat special, although I imagine if there was a way to use the following with others it could be possible:

https://github.com/lawrie/fpga_pio

Interestingly, the RP2040’s PIO is powerful enough to output a DVI signal needed for 720p HDMI:

https://github.com/Wren6991/picodvi

Note that I am writing from my superficial understanding. I only did preliminary research and then decided to use the ENC424J600 for my application as the volume is too low to justify developing this right now. I will send patches based on what I have done with the RP2040 + ENC424J600 in the near future after things are closer to a production ready state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants