1 From 8685c98d45c54346caf005de69988e13c731c533 Mon Sep 17 00:00:00 2001
2 From: Luiz Angelo Daros de Luca <luizluca@gmail.com>
3 Date: Fri, 9 Feb 2024 02:03:43 -0300
4 Subject: net: dsa: realtek: get internal MDIO node by name
6 The binding docs requires for SMI-connected devices that the switch
7 must have a child node named "mdio" and with a compatible string of
8 "realtek,smi-mdio". Meanwile, for MDIO-connected switches, the binding
9 docs only requires a child node named "mdio".
11 This patch changes the driver to use the common denominator for both
12 interfaces, looking for the MDIO node by name, ignoring the compatible
15 Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
16 Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
17 Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
18 Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
19 Signed-off-by: David S. Miller <davem@davemloft.net>
21 drivers/net/dsa/realtek/realtek-smi.c | 2 +-
22 1 file changed, 1 insertion(+), 1 deletion(-)
24 --- a/drivers/net/dsa/realtek/realtek-smi.c
25 +++ b/drivers/net/dsa/realtek/realtek-smi.c
26 @@ -333,7 +333,7 @@ static int realtek_smi_setup_mdio(struct
27 struct device_node *mdio_np;
30 - mdio_np = of_get_compatible_child(priv->dev->of_node, "realtek,smi-mdio");
31 + mdio_np = of_get_child_by_name(priv->dev->of_node, "mdio");
33 dev_err(priv->dev, "no MDIO bus node\n");