Subject: Re: [PATCH 1/4 v2] powerpc: document max-speed and interface-type properties

From: Segher Boessenkool <[email-masked]>
Date: Sat, 21 Apr 2007 19:22:05 +0200

>> Sure there's an argument for describing what type of
>> interface the PHY is connected on, if it supports more
>> than one -- but that should be a property in the PHY
>> node, not the controller node, since you can have multiple
>> PHYs connected to the same controller, possibly on
>> different interfaces each.
>
> I just want to reiterate that I disagree strongly with this statement. 
>  If you have multiple PHYs hooked up to one ethernet controller, 
> you're going to need to change the device tree to use a different PHY, 
> anyway.  That, or have Linux ignore the phandle that points to the 
> connected PHY.

On some configurations, what PHY to use is a runtime
decision, not a static thing.  No device tree change
is necessary then.

> And if you put it in the PHY node, you haven't really helped out the 
> people who can change the interface type by flipping a dip switch.  I 
> can think of two or three boards off the top of my head that do that 
> (though I know of very few people who actually use this 
> functionality).

Either the firmware can detect the switch setting
and create a proper device tree, or the user will
need to create the right static device tree.

> My point, again, is that the interface type is not strongly tied to 
> the PHY.  It is strongly tied to the board configuration.  We *could* 
> put the interface type in the PHY node, but I want to disabuse you of 
> the notion that it would be any better there.

I still think it's the best place for this information.

Segher