cpu/efm32: add ethernet driver#22306
Open
basilfx wants to merge 9 commits into
Open
Conversation
Although the ethernet peripheral isn't a common peripheral, it is best placed under the peripheral configuration in the Kconfig menu.
This commit adds a driver for the ethernet peripheral. It is split into a low-level peripheral driver, and a higher-level netdev driver. Two pseudo-modules are introduced for link state monitoring and auto negotiation. Kconfig support has been added too.
0c09c87 to
42ecd8b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution description
Note
Development of this PR happens in parallel to the LPC1768 ethernet driver in #22305. Any feedback on this one is likely applicable to the other one as well. I will try to keep both PRs in sync where it matters.
This PR adds an ethernet driver for the EFM32. While working on the LPC1768 version, I decided to also add support for the EFM32.
What is provided:
efm32_eth_link_up,efm32_eth_auto) like the STM32.Testing procedure
The only EFM32 board with ethernet in RIOT's code base, is the SLSTK3701a.
Like the LPC1768 ethernet driver, I would rather receive feedback on the general structure and adoption. I will then do my best to collect as much evidence as possible.
Testing has been performed as follows:
tests/drivers/efm32_ethBased on this, I believe it is in a working state.
With
efm32_eth_autoenabled, the link speed is ~7.5-10 MBit/sec (measured using lwIP iPerf).Compile test
Issues/PRs references
None
Declaration of AI-Tools / LLMs usage:
AI-Tools / LLMs that were used are:
cpu/efm32. I then refined, reworked and tested it myself. I did ask Claude Code to analyze bugs I encountered during testing. The final PR review was also done with Claude Code, but changes were applied manually. The test application, auto-init adoption and several other parts are simply copy-paste of existing drivers.