arch/risc-v: Support the ethernet driver on ESP32-P4#18827
Open
tmedicci wants to merge 4 commits intoapache:masterfrom
Open
arch/risc-v: Support the ethernet driver on ESP32-P4#18827tmedicci wants to merge 4 commits intoapache:masterfrom
tmedicci wants to merge 4 commits intoapache:masterfrom
Conversation
This commit enables the ethernet driver support on ESP32-P4 based on a common-source implementation. This required a set of changes regargind the event handler for the Wi-Fi driver (which is now shared with the ethernet driver). Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
After recent changes on the event handler for the RISC-V-based Espressif SoCs, the same set of changes were ported back to xtensa devices. Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
This commit simply enables the ethernet support for the ESP32-P4's Function EV board. Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
This commit describes ethernet support on ESP32-P4 SoC and its ESP32-P4-Function-EV-Board v1.5.2. Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
linguini1
approved these changes
Apr 30, 2026
simbit18
approved these changes
May 1, 2026
|
|
||
| struct esp_emac_s | ||
| { | ||
| struct net_driver_s dev; |
Contributor
There was a problem hiding this comment.
should we use the common upperhalf to avoid the code duplication
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.
Summary
Enables the ethernet driver support on ESP32-P4 based on a common-source implementation. This required a set of changes regarding the event handler for the Wi-Fi driver (which is now shared with the ethernet driver).
Impact
Impact on user: Yes. Users can now use Ethernet on ESP32-P4.
Impact on build: No.
Impact on hardware: Yes. Mostly ESP32-P4, but all the supported SoCs from Espressif required small changes and optimization.
Impact on documentation: Yes. Documentation for the Ethernet network was properly added to ESP32-P4 chip its Functio EV board.
Impact on security: No.
Impact on compatibility: No.
Testing
esp32p4-function-ev-board:ethernetdefconfig can be used to test Ethernet on ESP32-P4.iperftesting is also possible. Please note that for v1.5.2 of the board, it's easier to flash using the USB-Serial/JTAG port (usually/dev/ttyACM) and use an externally connected USB-to-serial converter attached to UART0.Building
Running
Checking
eth0with DHCP client enabled:Attach the ethernet cable to the board and check the interface status and its IP address (please ensure that the cable is connected to a network with a DHCP server enabled):
iperftesting:Both UDP and TCP modes can be tested.
UDP
On the host PC, run the
iperfserver:On the device, run the
iperfclient:TCP
On the host PC, run the
iperfserver:On the device, run the
iperfclient:Results
For
ifconfig, the network's status should beRUNNINGand it should acquire a valid IP address.iperf's results are the following. Both are closed to the port's bandwidth limit of 100Mbits/sec.UDP
TCP