-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
of: provide a binding for fixed link PHYs
Some Ethernet MACs have a "fixed link", and are not connected to a normal MDIO-managed PHY device. For those situations, a Device Tree binding allows to describe a "fixed link" using a special PHY node. This patch adds: * A documentation for the fixed PHY Device Tree binding. * An of_phy_is_fixed_link() function that an Ethernet driver can call on its PHY phandle to find out whether it's a fixed link PHY or not. It should typically be used to know if of_phy_register_fixed_link() should be called. * An of_phy_register_fixed_link() function that instantiates the fixed PHY into the PHY subsystem, so that when the driver calls of_phy_connect(), the PHY device associated to the OF node will be found. These two additional functions also support the old fixed-link Device Tree binding used on PowerPC platforms, so that ultimately, the network device drivers for those platforms could be converted to use of_phy_is_fixed_link() and of_phy_register_fixed_link() instead of of_phy_connect_fixed_link(), while keeping compatibility with their respective Device Tree bindings. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Tested-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
- Loading branch information
Thomas Petazzoni
authored and
David S. Miller
committed
May 16, 2014
1 parent
a759512
commit 3be2a49
Showing
3 changed files
with
112 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Fixed link Device Tree binding | ||
------------------------------ | ||
|
||
Some Ethernet MACs have a "fixed link", and are not connected to a | ||
normal MDIO-managed PHY device. For those situations, a Device Tree | ||
binding allows to describe a "fixed link". | ||
|
||
Such a fixed link situation is described by creating a 'fixed-link' | ||
sub-node of the Ethernet MAC device node, with the following | ||
properties: | ||
|
||
* 'speed' (integer, mandatory), to indicate the link speed. Accepted | ||
values are 10, 100 and 1000 | ||
* 'full-duplex' (boolean, optional), to indicate that full duplex is | ||
used. When absent, half duplex is assumed. | ||
* 'pause' (boolean, optional), to indicate that pause should be | ||
enabled. | ||
* 'asym-pause' (boolean, optional), to indicate that asym_pause should | ||
be enabled. | ||
|
||
Example: | ||
|
||
ethernet@0 { | ||
... | ||
fixed-link { | ||
speed = <1000>; | ||
full-duplex; | ||
}; | ||
... | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters