
On Wednesday, September 21, 2011 23:12:44 Graeme Russ wrote:
On Thu, Sep 22, 2011 at 11:20 AM, Graeme Russ wrote:
descriptions, mentions MII/GMII and PHY support (but not much on the specifics). Now in U-Boot there appears to be a common set of code relating to PHY and MII. There appears to be a mix of Ethernet drivers that use MII/PHY and drivers that do not, but I cannot seems to quite get me head around it all. One weird thing is that there does not appear to be any granular inclusion of PHY drivers - /include/config_phylib_all_drivers.h defines them all when CONFIG_PHYLIB is defined, but I could not find any boards that defined just one PHY driver. I also cannot find how MII/PHY functions interact with PCI for PCI based cards.
I now see why there is no relationship between MII/PHY and PCI as they are not connected to the PCI bus - Communication with the PHY is done through the MAC. So is it the case that 'PHY Drivers' in U-Boot provide access to the PHY (Transceiver) _through_ the MAC and in order to use the PHY drivers, the MAC driver (i.e. the Ethernet driver) needs to provide hooks to pass PHY requests from U-Boot over the (RG)MII interface?
i believe this is correct. the intention is to be like Linux where you've got a driver for the MAC, and you've got drivers for the PHYs, and the MAC driver provides the hooks for the PHY layer to access what it needs.
not all drivers have been converted to the PHY abstraction, and we don't have a requirement atm for that.
there's also a bit of a mess as we try to move to the Linux phylib code ... another area that needs a bit of TLC. -mike