[PATCH 3/4] net: designware: eqos: set mdio bus device node

Sascha Hauer s.hauer at pengutronix.de
Tue Jun 8 02:36:34 PDT 2021

When the device node of the ethernet device has a mdio subnode then
attach it to the registered mdio bus. This allows the mdio driver
to handle the reset-gpios propertie in the phy nodes.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
 drivers/net/designware_eqos.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/designware_eqos.c b/drivers/net/designware_eqos.c
index e6248d408e..f83ec12714 100644
--- a/drivers/net/designware_eqos.c
+++ b/drivers/net/designware_eqos.c
@@ -862,6 +862,7 @@ int eqos_probe(struct device_d *dev, const struct eqos_ops *ops, void *priv)
 	miibus->read = eqos_mdio_read;
 	miibus->write = eqos_mdio_write;
 	miibus->priv = eqos;
+	miibus->dev.device_node = of_get_child_by_name(dev->device_node, "mdio");
 	ret = eqos_init(dev, eqos);
 	if (ret)

More information about the barebox mailing list