summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2021-06-08 11:36:34 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2021-06-09 13:35:14 +0200
commited8c7bdf8592c8fce058b3a8dbf8dec8f00a0b28 (patch)
treeb30868a4976a831e009e55f25bcf11088be89427
parent9d24d749da6fc85995501f66e83a5a1c6c40ecf2 (diff)
downloadbarebox-ed8c7bdf8592c8fce058b3a8dbf8dec8f00a0b28.tar.gz
barebox-ed8c7bdf8592c8fce058b3a8dbf8dec8f00a0b28.tar.xz
net: designware: eqos: set mdio bus device node
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@pengutronix.de> Link: https://lore.barebox.org/20210608093635.5749-4-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--drivers/net/designware_eqos.c1
1 files changed, 1 insertions, 0 deletions
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)