From: Grygorii Strashko Date: Tue, 19 Feb 2019 11:23:58 +0200 Subject: [U-Boot] [PATCH v2 3/7] net: netcp: add support for phy with rgmii ids In-Reply-To: <20190218162804.26470-4-m-karicheri2@ti.com> References: <20190218162804.26470-1-m-karicheri2@ti.com> <20190218162804.26470-4-m-karicheri2@ti.com> 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 18.02.19 18:28, Murali Karicheri wrote: > Enhance the netcp driver to support phys that can be configured > for internal delay (rgmii-id, rgmii-rxid, rgmii-txid) > > Signed-off-by: Murali Karicheri > --- > drivers/net/ti/keystone_net.c | 22 +++++++++++++++++++++- > 1 file changed, 21 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/ti/keystone_net.c b/drivers/net/ti/keystone_net.c > index a3ba91cc3f..defc57b29f 100644 > --- a/drivers/net/ti/keystone_net.c > +++ b/drivers/net/ti/keystone_net.c > @@ -88,6 +88,7 @@ struct ks2_eth_priv { > struct mii_dev *mdio_bus; > int phy_addr; > phy_interface_t phy_if; > + int phy_of_handle; > int sgmii_link_type; > void *mdio_base; > struct rx_buff_desc net_rx_buffs; > @@ -588,6 +589,10 @@ static int ks2_eth_probe(struct udevice *dev) > if (priv->has_mdio) { > priv->phydev = phy_connect(priv->mdio_bus, priv->phy_addr, > dev, priv->phy_if); > +#ifdef CONFIG_DM_ETH > + if (priv->phy_of_handle) > + dev_set_of_offset(priv->phydev->dev, priv->phy_of_handle); > +#endif Above is not correct, it has to be smth. like #ifdef CONFIG_DM_ETH if (priv->phy_of_handle) phydev->node = offset_to_ofnode(priv->phy_of_handle); #endif see commit d4bb98170006e "drivers: net: cpsw: fix phy dt node setting" > phy_config(priv->phydev); > } > -- Best regards, grygorii