[PATCH net-next 5/6] net: dsa: lantiq_gswip: support standard MDIO node name

Daniel Golle posted 6 patches 1 month, 1 week ago
There is a newer version of this series
[PATCH net-next 5/6] net: dsa: lantiq_gswip: support standard MDIO node name
Posted by Daniel Golle 1 month, 1 week ago
Instead of matching against the child node's compatible string also
support locating the node of the device tree node of the MDIO bus
in the standard way by referencing the node name ("mdio").

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
 drivers/net/dsa/lantiq_gswip.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/dsa/lantiq_gswip.c b/drivers/net/dsa/lantiq_gswip.c
index f9b03fb5f57b..23b68047f3c4 100644
--- a/drivers/net/dsa/lantiq_gswip.c
+++ b/drivers/net/dsa/lantiq_gswip.c
@@ -286,6 +286,9 @@ static int gswip_mdio(struct gswip_priv *priv)
 	int err = 0;
 
 	mdio_np = of_get_compatible_child(switch_np, "lantiq,xrx200-mdio");
+	if (!mdio_np)
+		mdio_np = of_get_child_by_name(switch_np, "mdio");
+
 	if (!of_device_is_available(mdio_np))
 		goto out_put_node;
 
-- 
2.50.1
Re: [PATCH net-next 5/6] net: dsa: lantiq_gswip: support standard MDIO node name
Posted by Andrew Lunn 1 month, 1 week ago
On Tue, Aug 26, 2025 at 01:14:30AM +0100, Daniel Golle wrote:
> Instead of matching against the child node's compatible string also
> support locating the node of the device tree node of the MDIO bus
> in the standard way by referencing the node name ("mdio").
> 
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew