RE: Re:[RFC net-next] net: phy: Add basic support for Synopsys XPCS using a PHY driver

From: Jose Abreu
Date: Mon Mar 09 2020 - 05:22:20 EST


From: Chng, Jack Ping <jack.ping.chng@xxxxxxxxxxxxxxx>
Date: Feb/04/2020, 09:41:35 (UTC+00:00)

> Currently our network SoC has something like this:
> XGMAC-> XPCS -> Combo PHY -> PHY
>
> In the xpcs driver probe(), get and calibrate the phy:
>
> priv->phy = devm_phy_get(&pdev->dev, "phy");
> if (IS_ERR(priv->phy)) {
>     dev_warn(dev, "No phy\n");
>     return PTR_ERR(priv->phy);
> }
>
> ret = phy_init(priv->phy);
> if (ret)
>     return ret;
>
> ret = phy_power_on(priv->phy);
> if (ret) {
>     phy_exit(priv->phy);
>     return ret;
> }
> ret = phy_calibrate(priv->phy);
> if (ret) {
>     phy_exit(priv->phy);
>     return ret;
> }
>
> xpcs driver needs to handle phy or phy_device depending on the phy?

Apologies for the delayed answer.

I think XPCS should be agnostic of PHY so this should be handled by stmmac
core and





































































PHYLINK.

I submitted a new series: https://patchwork.ozlabs.org/project/netdev/list/?series=163171

Can you please test it ?

---
Thanks,
Jose Miguel Abreu