On Thu, May 12, 2022 at 09:33:09AM +0200, Rasmus Villemoes wrote: > Similar to what was done for the FEC driver in commit > 89b5bd54c1a4 (net: fec: Allow the PHY node to be retrieved), make sure > the PHY is associated with the right device tree node, so that phy > specific DT properties is accessible by the phy driver. > > This is required on a custom iMX8MP board with a ti,dp83867 phy > sitting in front of the eqos interface. > > Signed-off-by: Rasmus Villemoes <rasmus.villem...@prevas.dk> > Reviewed-by: Ramon Fried <rfried....@gmail.com> > --- > drivers/net/dwc_eth_qos.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c > index 27b3f98e0e..af35960b42 100644 > --- a/drivers/net/dwc_eth_qos.c > +++ b/drivers/net/dwc_eth_qos.c > @@ -1078,9 +1078,11 @@ static int eqos_start(struct udevice *dev) > * don't need to reconnect/reconfigure again > */ > if (!eqos->phy) { > + ofnode phy_node = ofnode_null(); > int addr = -1; > + > #ifdef CONFIG_DM_ETH_PHY > - addr = eth_phy_get_addr(dev); > + addr = eth_phy_get_node_and_addr(dev, &phy_node); > #endif > eqos->phy = phy_connect(eqos->mii, addr, dev, > eqos->config->interface(dev)); > @@ -1088,6 +1090,8 @@ static int eqos_start(struct udevice *dev) > pr_err("phy_connect() failed"); > goto err_stop_resets; > } > + if (ofnode_valid(phy_node)) > + eqos->phy->node = phy_node; > > if (eqos->max_speed) { > ret = phy_set_supported(eqos->phy, eqos->max_speed);
I'm deferring 2/3 and now for 3/3, given a6acf95508e2 ("net: eqos: add function to get phy node and address") (which yes, sigh, came after your series but has been applied already, sorry) I don't see the obvious way to migrate the changes in without testing. If needed still, can you please rebase and resend? Thanks. -- Tom
signature.asc
Description: PGP signature