[U-Boot] [PATCH v2 3/7] net: netcp: add support for phy with rgmii ids

Grygorii Strashko grygorii.strashko at ti.com
Tue Feb 19 09:23:58 UTC 2019



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-karicheri2 at 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


More information about the U-Boot mailing list