[PATCH 0/3] phy: lynx: add support for downstream retimer PHYs
Ioana Ciornei
ioana.ciornei at nxp.com
Thu Nov 19 08:15:48 PST 2026
On Thu, Nov 19, 2026 at 11:25:01AM +0200, Vladimir Oltean wrote:
> On Wed, Nov 18, 2026 at 06:31:31PM +0200, Ioana Ciornei wrote:
> > One thing to note here is that the forwarding code is kept rather
> > grouped in phy-fsl-lynx-core.c rather than in the individual Lynx10G and
> > Lynx28G drivers so that in the future, if necessary, it can be moved
> > internally into the Generic PHY framework. This leads to the consequence
> > that the actual phy_ops with which the PHY is created cannot be const
> > since the .owner field needs to be copied from the structure received
> > from the actual PHY driver.
>
> Have you evaluated the possibility to land retimer support in the core
> PHY framework directly? What would the obstacles be?
I did evaluate the possibility to add retimer support in the core PHY
framework but there is a lot of preparatory work to be done in order for
the core to be ready to receive this kind of feature and actually use
it in its current drivers. On top of this, I am not really sure there is
enough interest in the community to do it.
Everything stems from the fact that there is no actual enforced
guideline of how the PHY consumer and PHY provider drivers should
interact with one another through the phy_ops.
I will list below some of the identified issues:
- How to interpret a missing callback. A missing callback returns 0 for
most of the ops but .configure() and .validate() which return
-EOPNOTSUPP.
For example, any PHY consumer can now call phy_set_mode_ext(phy,
PHY_MODE_ETHERNET, PHY_INTERFACE_MODE_25GBASER) on a PHY which does
not implement the .set_mode() callback and get no error, even though
the SerDes could be very well unable to sustain that mode. The
question is what to do when this happens.
In my view, .validate should always be defined by a PHY provider which
wants to expose .set_mode and .configure since without .validate the
consumer cannot check what modes the PHY supports nor what
configurations it accepts. Since this is not the norm currently in the
core PHY framework I would be taking on responsability that is backed
by no authoritative source.
- Which ops to forward and in what order.
Today each driver that uses this kind of "chained PHY" schema
forwards a different subset by hand - some forward .init() / .exit() /
.set_mode(), others only .init().
At the same time, there is no uniform order in which the phy_ops are
called on the SerDes PHY and its downstream PHYs. Some drivers go
through the downstream PHYs first and then their own callback, others
the other way around.
Ioana
More information about the linux-phy
mailing list