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.
This commit is contained in:
robert-hh
2022-12-24 09:37:02 +01:00
committed by Damien George
parent fc745d85fe
commit efb4bd3555
3 changed files with 5 additions and 2 deletions

View File

@@ -125,7 +125,8 @@ STATIC mp_obj_t get_lan(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_ar
}
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 @@ STATIC mp_obj_t get_lan(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_ar
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;