esp32/network_lan: Add support for LAN8710 PHY.
LAN8710 uses the same drivers as LAN8720, so this commit just adds the
names. Alternatively, both could be summarised under LAN87xx, like the
esp-idf does.
diff --git a/ports/esp32/network_lan.c b/ports/esp32/network_lan.c
index c57d781..3cd1efc 100644
--- a/ports/esp32/network_lan.c
+++ b/ports/esp32/network_lan.c
@@ -125,7 +125,8 @@
}
self->phy_addr = args[ARG_phy_addr].u_int;
- if (args[ARG_phy_type].u_int != PHY_LAN8720 &&
+ if (args[ARG_phy_type].u_int != PHY_LAN8710 &&
+ args[ARG_phy_type].u_int != PHY_LAN8720 &&
args[ARG_phy_type].u_int != PHY_IP101 &&
args[ARG_phy_type].u_int != PHY_RTL8201 &&
#if ESP_IDF_VERSION_MINOR >= 3 // KSZ8041 is new in ESP-IDF v4.3
@@ -146,6 +147,7 @@
self->phy = NULL;
switch (args[ARG_phy_type].u_int) {
+ case PHY_LAN8710:
case PHY_LAN8720:
self->phy = esp_eth_phy_new_lan8720(&phy_config);
break;