diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2014-05-16 10:14:05 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-05-16 17:19:22 -0400 |
commit | 3be2a49e5c08d268f8af0dd4fe89a24ea8cdc339 (patch) | |
tree | 83d32019dd08257b68821bafa59bbcd4e089ce76 /Documentation | |
parent | a75951217472c522c324adb0a4de3ba69d656ef5 (diff) |
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>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/devicetree/bindings/net/fixed-link.txt | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/net/fixed-link.txt b/Documentation/devicetree/bindings/net/fixed-link.txt new file mode 100644 index 000000000000..e956de1be935 --- /dev/null +++ b/Documentation/devicetree/bindings/net/fixed-link.txt | |||
@@ -0,0 +1,30 @@ | |||
1 | Fixed link Device Tree binding | ||
2 | ------------------------------ | ||
3 | |||
4 | Some Ethernet MACs have a "fixed link", and are not connected to a | ||
5 | normal MDIO-managed PHY device. For those situations, a Device Tree | ||
6 | binding allows to describe a "fixed link". | ||
7 | |||
8 | Such a fixed link situation is described by creating a 'fixed-link' | ||
9 | sub-node of the Ethernet MAC device node, with the following | ||
10 | properties: | ||
11 | |||
12 | * 'speed' (integer, mandatory), to indicate the link speed. Accepted | ||
13 | values are 10, 100 and 1000 | ||
14 | * 'full-duplex' (boolean, optional), to indicate that full duplex is | ||
15 | used. When absent, half duplex is assumed. | ||
16 | * 'pause' (boolean, optional), to indicate that pause should be | ||
17 | enabled. | ||
18 | * 'asym-pause' (boolean, optional), to indicate that asym_pause should | ||
19 | be enabled. | ||
20 | |||
21 | Example: | ||
22 | |||
23 | ethernet@0 { | ||
24 | ... | ||
25 | fixed-link { | ||
26 | speed = <1000>; | ||
27 | full-duplex; | ||
28 | }; | ||
29 | ... | ||
30 | }; | ||