Adding support for LAN9303 PHY to IDF
Posted: Sun Oct 25, 2020 7:06 pm
Hi,
I would like to add support for the PHY LAN9303 because it would add 2 LAN Ports to the ESP32 (bridged or separated) beside V-LAN etc...
So first question is there already development ongoing into this direction?
In the docs I found the already supported PHYs which does not include the LAN9303 but the sentence other support can be added by the users. Is there a example / documentation how to add new PHYs? Just clone the IDF an add a new source code file to esp-eth?
or is there a components approach too?
I had a look at the source of esp-eth and the handling of the phy and the mac is completely separated. This shoud work fine for the most PHYs as they are just forwarding the data to the MAC. If I understood the datasheet of the LAN9303 right, it's connected as PHY but there is also MAC functionality in it. At least I would need to add the MAC address of the ESP to the integrated switch to make communication work. But the SMI communication is done by the phy part and MAC address etc is stored in the mac part.
Due to the structure of eth_hanlde_t is not public to pass it to an separate util to configure the switch. What would be the best way to archive this without patching around in the whole IDF?
Thx
I would like to add support for the PHY LAN9303 because it would add 2 LAN Ports to the ESP32 (bridged or separated) beside V-LAN etc...
So first question is there already development ongoing into this direction?
In the docs I found the already supported PHYs which does not include the LAN9303 but the sentence other support can be added by the users. Is there a example / documentation how to add new PHYs? Just clone the IDF an add a new source code file to esp-eth?
or is there a components approach too?
I had a look at the source of esp-eth and the handling of the phy and the mac is completely separated. This shoud work fine for the most PHYs as they are just forwarding the data to the MAC. If I understood the datasheet of the LAN9303 right, it's connected as PHY but there is also MAC functionality in it. At least I would need to add the MAC address of the ESP to the integrated switch to make communication work. But the SMI communication is done by the phy part and MAC address etc is stored in the mac part.
Due to the structure of eth_hanlde_t is not public to pass it to an separate util to configure the switch. What would be the best way to archive this without patching around in the whole IDF?
Thx