On Tue, Apr 20, 2021 at 3:35 AM Andrew Lunn <and...@lunn.ch> wrote: > > + phy_np = of_parse_phandle(np, "phy-handle", 0); > > + if (phy_np) { > > + ret = of_property_read_u32(phy_np, "reg", &val); > > + if (ret) { > > + dev_err(dev, "cannot find phy reg\n"); > > + return NULL; > > + } > > + of_node_put(phy_np); > > + } else { > > + dev_err(dev, "cannot find phy instance\n"); > > + val = 0; > > + } > > + plat->phy = val; > > phy-handle can point to a PHY on any bus. You should not assume it is > the devices own bus. Once you have phy_np call of_phy_find_device() > which gives you the actual phy device. Please don't let the > limitations of the current platform data limit you from implementing > this correctly.
In patch 3/3 I migrate to of_phy_get_and_connect() which I assume fixes this, I just wanted to split up the work, but do you prefer that I simply squash patches 2 & 3 into one? Yours, Linus Walleij