1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-28 21:53:48 +00:00

[ethernet] Add LAN8670 PHY support (#10874)

Co-authored-by: J. Nick Koston <nick@home-assistant.io>
This commit is contained in:
Patrick Van Oosterwijck
2025-09-25 15:45:07 -06:00
committed by GitHub
parent cef9cf49bf
commit 460eb219ba
7 changed files with 59 additions and 1 deletions

View File

@@ -9,6 +9,10 @@
#include <cinttypes>
#include "esp_event.h"
#ifdef USE_ETHERNET_LAN8670
#include "esp_eth_phy_lan867x.h"
#endif
#ifdef USE_ETHERNET_SPI
#include <driver/gpio.h>
#include <driver/spi_master.h>
@@ -200,6 +204,12 @@ void EthernetComponent::setup() {
this->phy_ = esp_eth_phy_new_ksz80xx(&phy_config);
break;
}
#ifdef USE_ETHERNET_LAN8670
case ETHERNET_TYPE_LAN8670: {
this->phy_ = esp_eth_phy_new_lan867x(&phy_config);
break;
}
#endif
#endif
#ifdef USE_ETHERNET_SPI
#if CONFIG_ETH_SPI_ETHERNET_W5500
@@ -353,6 +363,12 @@ void EthernetComponent::dump_config() {
eth_type = "DM9051";
break;
#ifdef USE_ETHERNET_LAN8670
case ETHERNET_TYPE_LAN8670:
eth_type = "LAN8670";
break;
#endif
default:
eth_type = "Unknown";
break;