The old array-type fixed-link binding has been deprecated for more than 10 yrs. Switch to the new binding. Signed-off-by: Heiner Kallweit --- v2: - fix "Properties must precede subnodes" error --- arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts b/arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts index e850551b1..645588911 100644 --- a/arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts +++ b/arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts @@ -205,8 +205,11 @@ ethernet@ea000 { }; ethernet@f0000 { /* DTSEC9/10GEC1 */ - fixed-link = <1 1 10000 0 0>; phy-connection-type = "xgmii"; + fixed-link { + speed = <10000>; + full-duplex; + }; }; }; -- 2.51.0 The old array-type fixed-link binding has been deprecated for more than 10 yrs. Switch to the new binding. Signed-off-by: Heiner Kallweit --- v2: - fix "Properties must precede subnodes" error --- arch/arm/boot/dts/nxp/ls/ls1021a-iot.dts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/nxp/ls/ls1021a-iot.dts b/arch/arm/boot/dts/nxp/ls/ls1021a-iot.dts index e13ccae62..6722c54f5 100644 --- a/arch/arm/boot/dts/nxp/ls/ls1021a-iot.dts +++ b/arch/arm/boot/dts/nxp/ls/ls1021a-iot.dts @@ -120,9 +120,12 @@ &enet1 { }; &enet2 { - fixed-link = <0 1 1000 0 0>; phy-connection-type = "rgmii-id"; status = "okay"; + fixed-link { + speed = <1000>; + full-duplex; + }; }; &esdhc { -- 2.51.0 The old array-type fixed-link binding has been deprecated for more than 10 yrs. Switch to the new binding. Signed-off-by: Heiner Kallweit --- arch/arm/boot/dts/st/stih418-b2199.dts | 5 ++++- arch/arm/boot/dts/st/stihxxx-b2120.dtsi | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/st/stih418-b2199.dts b/arch/arm/boot/dts/st/stih418-b2199.dts index 53ac6c2b7..5231222b7 100644 --- a/arch/arm/boot/dts/st/stih418-b2199.dts +++ b/arch/arm/boot/dts/st/stih418-b2199.dts @@ -103,7 +103,10 @@ ethernet0: dwmac@9630000 { st,tx-retime-src = "clkgen"; status = "okay"; phy-mode = "rgmii"; - fixed-link = <0 1 1000 0 0>; + fixed-link { + speed = <1000>; + full-duplex; + }; }; }; }; diff --git a/arch/arm/boot/dts/st/stihxxx-b2120.dtsi b/arch/arm/boot/dts/st/stihxxx-b2120.dtsi index 8d9a2dfa7..f45c65544 100644 --- a/arch/arm/boot/dts/st/stihxxx-b2120.dtsi +++ b/arch/arm/boot/dts/st/stihxxx-b2120.dtsi @@ -147,7 +147,10 @@ ethernet0: dwmac@9630000 { st,tx-retime-src = "clkgen"; status = "okay"; phy-mode = "rgmii"; - fixed-link = <0 1 1000 0 0>; + fixed-link { + speed = <1000>; + full-duplex; + }; }; demux@8a20000 { -- 2.51.0 The old array-type fixed-link binding has been deprecated for more than 10 yrs. So remove support for it. Signed-off-by: Heiner Kallweit --- drivers/net/mdio/of_mdio.c | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/drivers/net/mdio/of_mdio.c b/drivers/net/mdio/of_mdio.c index d8ca63ed8..5df01717a 100644 --- a/drivers/net/mdio/of_mdio.c +++ b/drivers/net/mdio/of_mdio.c @@ -379,21 +379,12 @@ struct phy_device *of_phy_get_and_connect(struct net_device *dev, } EXPORT_SYMBOL(of_phy_get_and_connect); -/* - * of_phy_is_fixed_link() and of_phy_register_fixed_link() must - * support two DT bindings: - * - the old DT binding, where 'fixed-link' was a property with 5 - * cells encoding various information about the fixed PHY - * - the new DT binding, where 'fixed-link' is a sub-node of the - * Ethernet device. - */ bool of_phy_is_fixed_link(struct device_node *np) { struct device_node *dn; int err; const char *managed; - /* New binding */ dn = of_get_child_by_name(np, "fixed-link"); if (dn) { of_node_put(dn); @@ -404,10 +395,6 @@ bool of_phy_is_fixed_link(struct device_node *np) if (err == 0 && strcmp(managed, "auto") != 0) return true; - /* Old binding */ - if (of_property_count_u32_elems(np, "fixed-link") == 5) - return true; - return false; } EXPORT_SYMBOL(of_phy_is_fixed_link); @@ -416,7 +403,6 @@ int of_phy_register_fixed_link(struct device_node *np) { struct fixed_phy_status status = {}; struct device_node *fixed_link_node; - u32 fixed_link_prop[5]; const char *managed; if (of_property_read_string(np, "managed", &managed) == 0 && @@ -425,7 +411,6 @@ int of_phy_register_fixed_link(struct device_node *np) goto register_phy; } - /* New binding */ fixed_link_node = of_get_child_by_name(np, "fixed-link"); if (fixed_link_node) { status.link = 1; @@ -444,17 +429,6 @@ int of_phy_register_fixed_link(struct device_node *np) goto register_phy; } - /* Old binding */ - if (of_property_read_u32_array(np, "fixed-link", fixed_link_prop, - ARRAY_SIZE(fixed_link_prop)) == 0) { - status.link = 1; - status.duplex = fixed_link_prop[1]; - status.speed = fixed_link_prop[2]; - status.pause = fixed_link_prop[3]; - status.asym_pause = fixed_link_prop[4]; - goto register_phy; - } - return -ENODEV; register_phy: -- 2.51.0 The old array-type fixed-link binding has been deprecated for more than 10 yrs. So remove support for it. Signed-off-by: Heiner Kallweit --- drivers/net/phy/phylink.c | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c index c7f867b36..e3e22e013 100644 --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c @@ -690,29 +690,6 @@ static int phylink_parse_fixedlink(struct phylink *pl, if (ret) return ret; - } else { - u32 prop[5]; - - ret = fwnode_property_read_u32_array(fwnode, "fixed-link", - NULL, 0); - if (ret != ARRAY_SIZE(prop)) { - phylink_err(pl, "broken fixed-link?\n"); - return -EINVAL; - } - - ret = fwnode_property_read_u32_array(fwnode, "fixed-link", - prop, ARRAY_SIZE(prop)); - if (!ret) { - pl->link_config.duplex = prop[1] ? - DUPLEX_FULL : DUPLEX_HALF; - pl->link_config.speed = prop[2]; - if (prop[3]) - __set_bit(ETHTOOL_LINK_MODE_Pause_BIT, - pl->link_config.lp_advertising); - if (prop[4]) - __set_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT, - pl->link_config.lp_advertising); - } } if (pl->link_config.speed > SPEED_1000 && @@ -768,7 +745,7 @@ static int phylink_parse_mode(struct phylink *pl, pl->cfg_link_an_mode = MLO_AN_INBAND; dn = fwnode_get_named_child_node(fwnode, "fixed-link"); - if (dn || fwnode_property_present(fwnode, "fixed-link")) + if (dn) pl->cfg_link_an_mode = MLO_AN_FIXED; fwnode_handle_put(dn); -- 2.51.0