Open gillesdesjardin opened 2 years ago
Some switches simulate PHY by providing PHY register access through MDIO bus. KSZ9477 does not have this function. The primary switch register access is SPI, I2C, or IBA. MDIO bus is provided by the MAC and the MAC driver creates a MDIO bus device that can be used by outside devices. This software structure can also be created by a switch driver as the MAC driver generally connects the PHY or switch through this construct. The MDIO bus created by the switch driver is called sw.0 and there are sw.0:00, sw.0:01 for the simulated PHYs in the bus. This bus is primarily used for PHY register accesses and they are all simulated inside the switch driver as the PHYs are accessed directly through either SPI or I2C.
I have used the i2c-ksz9477 driver but i have 3 questions 1)question1: i am wondering what is the intention of the MDIO bus mainlyi in the case i want to use the I2C driver (i2c-ksz9477.c).
2)queston2: If i want to have an ethernet controler on this MDIO bus, how shall i configure and use it? There is no reg attached to the MDIO bus in the i2c-ksz9477.c source, is it normal?
3)Question3 (hardware confilcts): As you know, the MDIO and I2C share the same pins on the ksz9477 chip. Is there any mdio-ksz9477 driver?