netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 net-next 0/5] net: phy: remove support for deprecated array-style fixed-link binding
@ 2025-08-30 19:28 Heiner Kallweit
  2025-08-30 19:29 ` [PATCH v2 net-next 1/5] arm64: dts: ls1043a-qds: switch to new " Heiner Kallweit
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Heiner Kallweit @ 2025-08-30 19:28 UTC (permalink / raw)
  To: Shawn Guo, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Patrice Chotard, Andrew Lunn, Andrew Lunn,
	Russell King - ARM Linux, Jakub Kicinski, Paolo Abeni,
	Eric Dumazet, David Miller
  Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	netdev@vger.kernel.org

The array-style fixed-link binding has been marked deprecated for more
than 10 yrs. See e.g. 91c1d980d601 ("Documentation: devicetree: add old
and deprecated 'fixed-link'") from 2014.

So migrate the remaining few in-kernel users of the old binding,
and remove for it.

v2:
- fix "Properties must precede subnodes" error in patches 1 and 2

Heiner Kallweit (5):
  arm64: dts: ls1043a-qds: switch to new fixed-link binding
  ARM: dts: ls1021a: switch to new fixed-link binding
  ARM: dts: st: switch to new fixed-link binding
  net: mdio: remove support for old fixed-link binding
  net: phy: phylink: remove support for deprecated fixed-link binding

 arch/arm/boot/dts/nxp/ls/ls1021a-iot.dts      |  5 +++-
 arch/arm/boot/dts/st/stih418-b2199.dts        |  5 +++-
 arch/arm/boot/dts/st/stihxxx-b2120.dtsi       |  5 +++-
 .../boot/dts/freescale/fsl-ls1043a-qds.dts    |  5 +++-
 drivers/net/mdio/of_mdio.c                    | 26 -------------------
 drivers/net/phy/phylink.c                     | 25 +-----------------
 6 files changed, 17 insertions(+), 54 deletions(-)

-- 
2.51.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2 net-next 1/5] arm64: dts: ls1043a-qds: switch to new fixed-link binding
  2025-08-30 19:28 [PATCH v2 net-next 0/5] net: phy: remove support for deprecated array-style fixed-link binding Heiner Kallweit
@ 2025-08-30 19:29 ` Heiner Kallweit
  2025-08-30 19:30 ` [PATCH v2 net-next 2/5] ARM: dts: ls1021a: " Heiner Kallweit
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Heiner Kallweit @ 2025-08-30 19:29 UTC (permalink / raw)
  To: Shawn Guo, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Patrice Chotard, Andrew Lunn, Andrew Lunn,
	Russell King - ARM Linux, Jakub Kicinski, Paolo Abeni,
	Eric Dumazet, David Miller
  Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	netdev@vger.kernel.org

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 <hkallweit1@gmail.com>
---
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



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 net-next 2/5] ARM: dts: ls1021a: switch to new fixed-link binding
  2025-08-30 19:28 [PATCH v2 net-next 0/5] net: phy: remove support for deprecated array-style fixed-link binding Heiner Kallweit
  2025-08-30 19:29 ` [PATCH v2 net-next 1/5] arm64: dts: ls1043a-qds: switch to new " Heiner Kallweit
@ 2025-08-30 19:30 ` Heiner Kallweit
  2025-08-30 19:31 ` [PATCH v2 net-next 3/5] ARM: dts: st: " Heiner Kallweit
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Heiner Kallweit @ 2025-08-30 19:30 UTC (permalink / raw)
  To: Shawn Guo, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Patrice Chotard, Andrew Lunn, Andrew Lunn,
	Russell King - ARM Linux, Jakub Kicinski, Paolo Abeni,
	Eric Dumazet, David Miller
  Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	netdev@vger.kernel.org

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 <hkallweit1@gmail.com>
---
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



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 net-next 3/5] ARM: dts: st: switch to new fixed-link binding
  2025-08-30 19:28 [PATCH v2 net-next 0/5] net: phy: remove support for deprecated array-style fixed-link binding Heiner Kallweit
  2025-08-30 19:29 ` [PATCH v2 net-next 1/5] arm64: dts: ls1043a-qds: switch to new " Heiner Kallweit
  2025-08-30 19:30 ` [PATCH v2 net-next 2/5] ARM: dts: ls1021a: " Heiner Kallweit
@ 2025-08-30 19:31 ` Heiner Kallweit
  2025-08-30 19:32 ` [PATCH v2 net-next 4/5] net: mdio: remove support for old " Heiner Kallweit
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Heiner Kallweit @ 2025-08-30 19:31 UTC (permalink / raw)
  To: Shawn Guo, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Patrice Chotard, Andrew Lunn, Andrew Lunn,
	Russell King - ARM Linux, Jakub Kicinski, Paolo Abeni,
	Eric Dumazet, David Miller
  Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	netdev@vger.kernel.org

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 <hkallweit1@gmail.com>
---
 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



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 net-next 4/5] net: mdio: remove support for old fixed-link binding
  2025-08-30 19:28 [PATCH v2 net-next 0/5] net: phy: remove support for deprecated array-style fixed-link binding Heiner Kallweit
                   ` (2 preceding siblings ...)
  2025-08-30 19:31 ` [PATCH v2 net-next 3/5] ARM: dts: st: " Heiner Kallweit
@ 2025-08-30 19:32 ` Heiner Kallweit
  2025-08-30 19:32 ` [PATCH v2 net-next 5/5] net: phy: phylink: remove support for deprecated " Heiner Kallweit
  2025-09-01 20:03 ` [PATCH v2 net-next 0/5] net: phy: remove support for deprecated array-style " Heiner Kallweit
  5 siblings, 0 replies; 7+ messages in thread
From: Heiner Kallweit @ 2025-08-30 19:32 UTC (permalink / raw)
  To: Shawn Guo, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Patrice Chotard, Andrew Lunn, Andrew Lunn,
	Russell King - ARM Linux, Jakub Kicinski, Paolo Abeni,
	Eric Dumazet, David Miller
  Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	netdev@vger.kernel.org

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 <hkallweit1@gmail.com>
---
 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



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 net-next 5/5] net: phy: phylink: remove support for deprecated fixed-link binding
  2025-08-30 19:28 [PATCH v2 net-next 0/5] net: phy: remove support for deprecated array-style fixed-link binding Heiner Kallweit
                   ` (3 preceding siblings ...)
  2025-08-30 19:32 ` [PATCH v2 net-next 4/5] net: mdio: remove support for old " Heiner Kallweit
@ 2025-08-30 19:32 ` Heiner Kallweit
  2025-09-01 20:03 ` [PATCH v2 net-next 0/5] net: phy: remove support for deprecated array-style " Heiner Kallweit
  5 siblings, 0 replies; 7+ messages in thread
From: Heiner Kallweit @ 2025-08-30 19:32 UTC (permalink / raw)
  To: Shawn Guo, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Patrice Chotard, Andrew Lunn, Andrew Lunn,
	Russell King - ARM Linux, Jakub Kicinski, Paolo Abeni,
	Eric Dumazet, David Miller
  Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	netdev@vger.kernel.org

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 <hkallweit1@gmail.com>
---
 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



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 net-next 0/5] net: phy: remove support for deprecated array-style fixed-link binding
  2025-08-30 19:28 [PATCH v2 net-next 0/5] net: phy: remove support for deprecated array-style fixed-link binding Heiner Kallweit
                   ` (4 preceding siblings ...)
  2025-08-30 19:32 ` [PATCH v2 net-next 5/5] net: phy: phylink: remove support for deprecated " Heiner Kallweit
@ 2025-09-01 20:03 ` Heiner Kallweit
  5 siblings, 0 replies; 7+ messages in thread
From: Heiner Kallweit @ 2025-09-01 20:03 UTC (permalink / raw)
  To: netdev@vger.kernel.org

On 8/30/2025 9:28 PM, Heiner Kallweit wrote:
> The array-style fixed-link binding has been marked deprecated for more
> than 10 yrs. See e.g. 91c1d980d601 ("Documentation: devicetree: add old
> and deprecated 'fixed-link'") from 2014.
> 
> So migrate the remaining few in-kernel users of the old binding,
> and remove for it.
> 
> v2:
> - fix "Properties must precede subnodes" error in patches 1 and 2
> 
> Heiner Kallweit (5):
>   arm64: dts: ls1043a-qds: switch to new fixed-link binding
>   ARM: dts: ls1021a: switch to new fixed-link binding
>   ARM: dts: st: switch to new fixed-link binding
>   net: mdio: remove support for old fixed-link binding
>   net: phy: phylink: remove support for deprecated fixed-link binding
> 
>  arch/arm/boot/dts/nxp/ls/ls1021a-iot.dts      |  5 +++-
>  arch/arm/boot/dts/st/stih418-b2199.dts        |  5 +++-
>  arch/arm/boot/dts/st/stihxxx-b2120.dtsi       |  5 +++-
>  .../boot/dts/freescale/fsl-ls1043a-qds.dts    |  5 +++-
>  drivers/net/mdio/of_mdio.c                    | 26 -------------------
>  drivers/net/phy/phylink.c                     | 25 +-----------------
>  6 files changed, 17 insertions(+), 54 deletions(-)
> 
--
pw-bot: cr

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-09-01 20:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-30 19:28 [PATCH v2 net-next 0/5] net: phy: remove support for deprecated array-style fixed-link binding Heiner Kallweit
2025-08-30 19:29 ` [PATCH v2 net-next 1/5] arm64: dts: ls1043a-qds: switch to new " Heiner Kallweit
2025-08-30 19:30 ` [PATCH v2 net-next 2/5] ARM: dts: ls1021a: " Heiner Kallweit
2025-08-30 19:31 ` [PATCH v2 net-next 3/5] ARM: dts: st: " Heiner Kallweit
2025-08-30 19:32 ` [PATCH v2 net-next 4/5] net: mdio: remove support for old " Heiner Kallweit
2025-08-30 19:32 ` [PATCH v2 net-next 5/5] net: phy: phylink: remove support for deprecated " Heiner Kallweit
2025-09-01 20:03 ` [PATCH v2 net-next 0/5] net: phy: remove support for deprecated array-style " Heiner Kallweit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).