On Wed, Aug 20, 2025 at 02:11:57PM +0200, Andrew Lunn wrote: > > > The doc in patch 1 says : > > > > > > > + * Link-wide mode: > > > > + * - Some PHYs only expose a link-wide aggregate MSE, or cannot map their > > > > + * measurement to a specific channel/pair (e.g. 100BASE-TX when MDI/MDI-X > > > > + * resolution is unknown). In that case, callers must use the LINK selector. > > > > > > The way I understand that is that PHYs will report either channel-specific values or > > > link-wide values. Is that correct or are both valid ? In BaseT1 this is the same thing, > > > but maybe for consistency, we should report either channel values or link-wide values ? > > > > for 100Base-T1 the LINK and channel-A selectors are effectively the > > same, since the PHY only has a single channel. In this case both are > > valid, and the driver will return the same answer for either request. > > > > I decided to expose both for consistency: > > - on one side, the driver already reports pair_A information for the > > cable test, so it makes sense to allow channel-A here as well; > > - on the other side, if a caller such as a generic link-status/health > > request asks for LINK, we can also provide that without special > > casing. > > > > So the driver just answers what it can. For this PHY, LINK and > > channel-A map to the same hardware register, and all other selectors > > return -EOPNOTSUPP. > > The document you referenced explicitly says it is for 100BASE-T1. Are > there other Open Alliance documents which extend the concept to -T2 > and -T4 links? Do you have access to -T2 or -T4 PHYs which implement > the concept for multiple pairs? So far I know, following T2/T4 PHYs support MSE: LAN8830, KSZ9131, LAN8831, LAN8840, LAN8841 DP83826*, DP83640, DP83867*, DP83869HM I have access at least to LAN8841. > I think it is good you are thinking about the API, how it could work > with -T2 and -T4, but do we need this complexity now? Hm.. I just fear to make same mistake as I did with SQI. So, I analyzed as many datasheets as possible. -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |