-
Notifications
You must be signed in to change notification settings - Fork 26
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
Add support for Davicom DM9051 SPI Ethernet Controller #2427
Comments
Additionally: |
Support for DM9051 was added to Arduino ESP32 Core version 3.0.0 |
I bought 5 eth01-evo units on Aliexpress that mount this chip thinking they were compatible with esphome but I wasn't able to make them work, does anyone have a solution thanks |
The EVO work perfectly, EXCEPT the physical ETH01 port. All other functionalities work fine. I suppose you have them working by WiFi? |
+1 for this requests, as the eth01-evo ist by far the cheapest solution for PoE enabled ESP32. |
I have added an issue to the eth01-evo repo with full documentation and an example to get wired ethernet working. |
With the W5500 support added which is also based on an SPI implementation, should this be too hard to add now? |
Any update? |
I purchased a bunch of these boards, just to realize that it's not supported. It would be great if this board could be added to ESPHome. |
I started looking at this, with partial success. WiP code (expect lots of force-pushing and buggy commits!) is here: Not sure I like the current ethernet SPI solution. Will probably try to change that into using the spi bus component. Doesn't seem impossible. I had to drop the only W5500 specific part (SPI framing) anyway, since the DM9051 uses different framing. Both drivers will auto-configure the format anyway as long as it's unset, so why bother? Letting the driver DTRT looks much better than moving that knowlegde into esphome. But first task is to make RX more stable. It's pretty unusable as-is. EDIT: very happy to admit I was completely wrong. Reducing SPI clock to 8 MHz seems to stabilize this completely. Will move focus to cleaning up the SPI bus config and submit this. EDIT2: reconsidering. Guess it's best to add this feature using the current scheme, and then modify the scheme later in a separate PR. |
Fixes esphome/feature-requests#2427 Tested on an ETH01-Evo board using ethernet: type: DM9051 clk_pin: GPIO07 mosi_pin: GPIO10 miso_pin: GPIO03 cs_pin: GPIO09 interrupt_pin: GPIO08 reset_pin: GPIO06 clock_speed: 20MHz A number of read errors was observed with 26 MHz (default) or higher clock speeds. This might be a board specific problem. Signed-off-by: Bjørn Mork <bjorn@mork.no>
Fixes esphome/feature-requests#2427 Tested on an ETH01-Evo board using ethernet: type: DM9051 clk_pin: GPIO07 mosi_pin: GPIO10 miso_pin: GPIO03 cs_pin: GPIO09 interrupt_pin: GPIO08 reset_pin: GPIO06 clock_speed: 20MHz A number of read errors was observed with 26 MHz (default) or higher clock speeds. This might be a board specific problem. Signed-off-by: Bjørn Mork <bjorn@mork.no>
Fixes esphome/feature-requests#2427 Tested on an ETH01-Evo board using ethernet: type: DM9051 clk_pin: GPIO07 mosi_pin: GPIO10 miso_pin: GPIO03 cs_pin: GPIO09 interrupt_pin: GPIO08 reset_pin: GPIO06 clock_speed: 20MHz A number of read errors was observed with 26 MHz (default) or higher clock speeds. This might be a board specific problem. Signed-off-by: Bjørn Mork <bjorn@mork.no>
Fixes esphome/feature-requests#2427 Tested on an ETH01-Evo board using ethernet: type: DM9051 clk_pin: GPIO07 mosi_pin: GPIO10 miso_pin: GPIO03 cs_pin: GPIO09 interrupt_pin: GPIO08 reset_pin: GPIO06 clock_speed: 20MHz A number of read errors was observed with 26 MHz (default) or higher clock speeds. This might be a board specific problem. Signed-off-by: Bjørn Mork <bjorn@mork.no>
Fixes esphome/feature-requests#2427 Tested on an ETH01-Evo board using ethernet: type: DM9051 clk_pin: GPIO07 mosi_pin: GPIO10 miso_pin: GPIO03 cs_pin: GPIO09 interrupt_pin: GPIO08 reset_pin: GPIO06 clock_speed: 20MHz A number of read errors was observed with 26 MHz (default) or higher clock speeds. This might be a board specific problem. Signed-off-by: Bjørn Mork <bjorn@mork.no>
Fixes esphome/feature-requests#2427 Tested on an ETH01-Evo board using ethernet: type: DM9051 clk_pin: GPIO07 mosi_pin: GPIO10 miso_pin: GPIO03 cs_pin: GPIO09 interrupt_pin: GPIO08 reset_pin: GPIO06 clock_speed: 20MHz A number of read errors was observed with 26 MHz (default) or higher clock speeds. This might be a board specific problem. Signed-off-by: Bjørn Mork <bjorn@mork.no>
So I realized why the current code didn't use the esphome spi component: We need commit ecd1759a0ba6 ("feat(esp_eth): abstraction of SPI driver for SPI Ethernet modules") in esp-idf for that, and it was added as recently as v5.2 I did a quick hack, but it is not exactly ready to merge... It boots and sort of works. But it's easy to make it fall over with an
error by simply flood pinging the device. I will leave it there until we both have a use case and esp-idf v5.2 or higher is recommended. The current PR is fine. My experimental hack is here if anyone is interested: https://github.com/bmork/esphome/tree/dm9051-spidev-experimental |
Fixes esphome/feature-requests#2427 Tested on an ETH01-Evo board using ethernet: type: DM9051 clk_pin: GPIO07 mosi_pin: GPIO10 miso_pin: GPIO03 cs_pin: GPIO09 interrupt_pin: GPIO08 reset_pin: GPIO06 clock_speed: 20MHz A number of read errors was observed with 26 MHz (default) or higher clock speeds. This might be a board specific problem. Signed-off-by: Bjørn Mork <bjorn@mork.no>
Fixes esphome/feature-requests#2427 Tested on an ETH01-Evo board using ethernet: type: DM9051 clk_pin: GPIO07 mosi_pin: GPIO10 miso_pin: GPIO03 cs_pin: GPIO09 interrupt_pin: GPIO08 reset_pin: GPIO06 clock_speed: 20MHz A number of read errors was observed with 26 MHz (default) or higher clock speeds. This might be a board specific problem. Signed-off-by: Bjørn Mork <bjorn@mork.no>
@Imanol82 It was not merged yet, this is the reason why it is not working. The PR was linked, but here is a direct link to the config esphome/esphome#6861 (comment) |
Well, I'll have to wait for it to come out officially (because that doesn't work for me). Thank you! |
You are missing the external component part - which will pull the component from that PR. |
Sorry. Thank you very much!!! |
This part :) external_components:
- source: github://pr#6861
components:
- ethernet |
Yes, now it is compiling Thank you very much! |
hahahaha now I'm not able to flash... |
I win hahahaha. Online :) Thank you very much @randybb |
Fixes esphome/feature-requests#2427 Tested on an ETH01-Evo board using ethernet: type: DM9051 clk_pin: GPIO07 mosi_pin: GPIO10 miso_pin: GPIO03 cs_pin: GPIO09 interrupt_pin: GPIO08 reset_pin: GPIO06 clock_speed: 20MHz A number of read errors was observed with 26 MHz (default) or higher clock speeds. This might be a board specific problem. Signed-off-by: Bjørn Mork <bjorn@mork.no>
Fixes esphome/feature-requests#2427 Tested on an ETH01-Evo board using ethernet: type: DM9051 clk_pin: GPIO07 mosi_pin: GPIO10 miso_pin: GPIO03 cs_pin: GPIO09 interrupt_pin: GPIO08 reset_pin: GPIO06 clock_speed: 20MHz A number of read errors was observed with 26 MHz (default) or higher clock speeds. This might be a board specific problem. Signed-off-by: Bjørn Mork <bjorn@mork.no>
@Imanol82 - the PR was updated to apply on top of You might be able to use the previous version at Or use the esphome dev branch instead of 2024.10.2 |
If it is a problem that you already have under control and I just have to wait, I will wait. As it is, the ESP32 now works fine for me, it just won't let me update it. Thanks for your help! |
Describe the problem you have/What new integration you would like
Introduce support for the Davicom DM9051 SPI Ethernet Controller
Please describe your use case for this integration and alternatives you've tried:
The ETH01 Evo modules are equipped with this "new" ETH chip, enabling POE usage, however device not currently supported in ESPHome.
Additional context
Davicom Website - Product Page
Espreff Description on how to implement
Unfortunately I am not a programmer, will be able to test, but not to make pull requests in this topic, therefore asking for implementation to this community.
The text was updated successfully, but these errors were encountered: