[PATCH] net: fec: Add support for multiple phys on mdiobus

Florian Fainelli florian at openwrt.org
Tue Jan 22 09:47:45 EST 2013


On 01/22/2013 08:22 AM, Wolfgang Grandegger wrote:
>> Well this could be done when the fixed phy driver could be registered
>> with the devicetree, maybe like this:
>>
>> 	fixed-phy: mdiophy {
>> 		compatible = "mdio-fixed-phy";
>> 		link = "100FD";
>> 	};
>
> I find that confusing. There is *no* phy but just a fixed link to the
> switch...
>
>> The good thing about this would be that every ethernet driver could just
>> use such a fixed phy, any external mdio phy (like on Marvell Armada) or
>> just a phy connected to the internal mdio interface provided by the ethernet
>> core.
>
> What is wrong with the existing "fixed-link" property of the *ethernet*
> node. The fixed-link handling should/could be done in the phy layer, and
> not in the driver as it currently is implemented. Maybe that's the
> reason why the current code is regarded as hack!

As far as I have used it with the CPMAC driver, the fixed PHY is a 
specific PHY device and there is no specific handling to be done by the 
Ethernet MAC driver but eventually changing its MII bus id so that it is 
named "fixed-0" to allow the fixed PHY driver to bind. Put differently, 
using the fixed PHY driver is a kind of "last" resort thing to cope with 
situations like:

- switch not providing a consistent PHY-like interface on the MDC/MDIO bus
- switches not connected to the MDC/MDIO bus of the Ethernet MAC they 
forward to

What exactly do you mean by "as it currently is implemented"? that you 
do not like?
--
Florian



More information about the linux-arm-kernel mailing list