From: Grygorii Strashko Date: Thu, 26 Jul 2018 18:06:30 -0500 Subject: [U-Boot] [PATCH v2 08/11] drivers: net: designware: Add reading of DT phy-handle node In-Reply-To: <1531903608-29695-9-git-send-email-j.hagemann@phytec.de> References: <1531903608-29695-1-git-send-email-j.hagemann@phytec.de> <1531903608-29695-9-git-send-email-j.hagemann@phytec.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 07/18/2018 03:46 AM, Janine Hagemann wrote: > Add the ability to read the phy-handle node of the > gmac. Upon reading this handle the phy-id > can be stored based on the reg node in the DT. > > The phy-handle also needs to be stored and passed > to the phy to access any phy data that is available. > > Signed-off-by: Janine Hagemann > --- > v2: No changes > --- > drivers/net/designware.c | 11 ++++++++++- > drivers/net/designware.h | 1 + > 2 files changed, 11 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/designware.c b/drivers/net/designware.c > index cf12521..8cc7fb9 100644 > --- a/drivers/net/designware.c > +++ b/drivers/net/designware.c > @@ -467,7 +467,7 @@ static int dw_phy_init(struct dw_eth_dev *priv, void *dev) > { > struct phy_device *phydev; > int mask = 0xffffffff, ret; > - > + struct dw_eth_pdata *dw_pdata = dev_get_platdata(dev); > #ifdef CONFIG_PHY_ADDR > mask = 1 << CONFIG_PHY_ADDR; > #endif > @@ -486,6 +486,11 @@ static int dw_phy_init(struct dw_eth_dev *priv, void *dev) > } > phydev->advertising = phydev->supported; > > +#ifdef CONFIG_DM_ETH > + if (dw_pdata->phy_of_handle) > + dev_set_of_offset(phydev->dev, dw_pdata->phy_of_handle); > +#endif hence https://patchwork.ozlabs.org/cover/936380/ is merged you can't do this any more. Instead you need to setup phydev->node. [...] -- regards, -grygorii