]> git.baikalelectronics.ru Git - kernel.git/commit
of: mdio: Support fixed links in of_phy_get_and_connect()
authorLinus Walleij <linus.walleij@linaro.org>
Wed, 11 Jul 2018 17:45:11 +0000 (19:45 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 14 Jul 2018 01:25:14 +0000 (18:25 -0700)
commit51c21d849addac0750bdf0e19ff362b73066bf92
tree10a337487910709daaf09ceef4dd863dcbb350a2
parent1b01bde0f5c06672f920550b2c191c3a919512c5
of: mdio: Support fixed links in of_phy_get_and_connect()

By a simple extension of of_phy_get_and_connect() drivers
that have a fixed link on e.g. RGMII can support also
fixed links, so in addition to:

ethernet-port {
phy-mode = "rgmii";
phy-handle = <&foo>;
};

This setup with a fixed-link node and no phy-handle will
now also work just fine:

ethernet-port {
phy-mode = "rgmii";
fixed-link {
speed = <1000>;
full-duplex;
pause;
};
};

This is very helpful for connecting random ethernet ports
to e.g. DSA switches that typically reside on fixed links.

The phy-mode is still there as the fixes link in this case
is still an RGMII link.

Tested on the Cortina Gemini driver with the Vitesse DSA
router chip on a fixed 1Gbit link.

Suggested-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/of/of_mdio.c