[PATCH 1/4 v2] powerpc: document max-speed and interface-type properties
afleming at freescale.com
Tue Apr 17 04:40:09 EST 2007
On Apr 16, 2007, at 10:47, Segher Boessenkool wrote:
>> I believe the question is about where the information should truly
>> It would seem to be more of a property of the phy than of the enet
> Yep. The whole reason why any property is wanted here is
> to say what type the PHY is, as the enet controller can
> be attached to several kinds. And what type the PHY is
> belongs in the PHY node, obviously. In its "compatible"
> property to be exact.
It's not saying what type the PHY is, though. It's describing the
connection. The PHY is just as flexible wrt connection type as the
ethernet controller. This is actually a property of the board. In
some cases its a fixed property of the board. In some cases it's
changeable through dip switches, or even through software.
Ethernet controllers need to know what the connection is so they can
establish a data connection with the PHYs
PHYs need to know what the connection is so they can establish a data
connection with the ethernet controllers.
There is equal flexibility on both sides, and I think the choice of
where to put this information is fairly arbitrary. The reason for
choosing the ethernet controller in this case has to do with the flow
1) The driver tells the PHY what interface to use
2) The ethernet controller is the endpoint of this connection which
is accessible by everyone else. IE data is not sent through PHYs by
any means but through the ethernet controller, and data is not
received from PHYs by any means but through the ethernet controller.
3) The UCC needs to be told the connection type, because it does not
have logic to detect it on its own.
The truth is, this is a somewhat intractable problem because of the
myriad possibilities for how board designers can hook up ethernet
controllers to PHYs. One can envision scenarios where controllers
can hook up to multiple PHYs, each of one fixed type. One can
envision scenarios where multiple controllers are hooked up to one
PHY, and each of the controllers can use different connections. If
we put the information in the PHY node, we allow for the first
scenario, but not the second. If we put it in the ethernet node, we
reverse that situation. In either case, we'd currently have to
modify our dts to specify which PHY we want to use.
More information about the Linuxppc-dev