Microchip-MPLAB-Harmony / net

Harmony 3 Network library
https://onlinedocs.microchip.com/v2/keyword-lookup?keyword=MH3_net&redirect=true
29 stars 9 forks source link

SMI (management) for LANxxxx #33

Closed gpmanly closed 1 year ago

gpmanly commented 2 years ago

Is there a plan to support SMI (management) for LANxxxx devices? This would be very helpful in configuring 3-port switches like LAN9303, and LAN9353?

adrian-aur commented 2 years ago

The MIIM driver could be used to talk to the PHY for read/write of the control/status registers. The MAC driver uses it to configure the PHY, etc. What exactly is missing?

gpmanly commented 2 years ago

Thank you for the reply, Adrian. If I remember correctly, MIIM has limited access to the registers of LAN93xx devices while SMI can access all the registers. There is a workaround though, use the MIIM driver to emulate an SMI protocol.

adrian-aur commented 2 years ago

There is a difference between MIIM and SMI at the hardware level and I don't think it's possible to use MIIM for SMI. However, you normally get access to all registers if you use I2C for example. So, a MIIM type driver over I2C is relatively easy to do - the MIIM driver is a virtual one, just need to replace internal operations with I2C ones.

gpmanly commented 1 year ago

Found this article. I think this is the solution. https://microchipsupport.force.com/s/article/Using-Harmony-3-MIIM-Driver-for-SMI