espressif/esp-eth-drivers

KSZ8863 - add support of SMI (IDFGH-11859)

kostaond opened this issue · 1 comments

Add support of SMI to access registers on KSZ8863.

After deeper look, I found out that it's not possible to access the KSZ8863 registers via SMI from ESP32 (and that was the reason why it wasn't implemented in past :D).

In terms of KSZ8863 terminology, SMI is non-standard version of IEEE 802.3 MII Management Interface (MIIM), see section 3.3.10 and 3.3.11 of KSZ8863 datasheet. The main differences between these two interfaces are "OP code" numbering and address format. MIIM's read OP code is 10b and write OP code is 01b. While SMI read and write have both OP code 00b. Since the ESP32 EMAC follows the IEEE 802.3 MII Management Interface standard, we are not able to set OP code to 00b, see ESP32 EMACMIIADDR_REG register. There is no such option.

The scope of this issue could be changed to document above observation in the code and so prevent any confusion in the future.