Associate PHY device with its device node specified by phy-handle
property. This makes it possible for PHY drivers to read dedicated
information to configure the PHY device.
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
bool pn_swap;
struct phy_device *phydev;
+ ofnode phy_node;
int phy_interface;
int phy_addr;
if (!phydev)
return -ENODEV;
+ phydev->node = priv->phy_node;
phydev->supported &= PHY_GBIT_FEATURES;
phydev->advertising = phydev->supported;
return ret;
}
+ priv->phy_node = args.node;
+
priv->phy_addr = ofnode_read_s32_default(args.node, "reg", -1);
if (priv->phy_addr < 0) {
printf("error: phy address is not specified\n");