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 <m-kariche...@ti.com>
---
  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
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to