Re: [PATCH net 2/2] net: stmmac: qcom-ethqos: advertise supported SerDes interfaces
From: Maxime Chevallier
Date: Thu Sep 17 2026 - 01:37:04 EST
Hi Thomas,
+Coia
On 9/17/26 06:29, Thomas Karpiniec wrote:
>> Can you test settung the STMMAC_FLAG_SERDES_SUPPORTS_2500M flag in
>> dwmac-qcom-ethqos ?
>
> I can confirm that dma_cap.pcs = Y.
Thanks for looking up :) This is a good start
>
> I tested setting STMMAC_FLAG_SERDES_SUPPORTS_2500M on hardware and unfortunately the flag alone doesn't solve the problem.
Yeah, but it's still the right first move. Russell planned to do that as well :
https://lore.kernel.org/netdev/E1vvDJi-0000000ArhH-3ipf@xxxxxxxxxxxxxxxxxxxxxx/#t
>
> I think there are a couple of things missing. stmmac_phylink_setup doesn't use the integrated PCS bitmap to populate config->supported_interfaces, so SGMII is still not advertised to phylink as a usable host interface. Also stmmac_integrated_pcs_init is adding 1000BASE-X unconditionally, which wouldn't be appropriate here.
Ok so, the missing bit seems to be that priv->integrated_pcs isn't taken
into account in stmmac_phylink_setup(). This needs to be added then :)
Looks like there's also the inband support that needs addressing, that was
part of his RFC here :
https://lore.kernel.org/netdev/E1vvDJi-0000000ArhH-3ipf@xxxxxxxxxxxxxxxxxxxxxx/#t
> I did a proof-of-concept fixing those things and the end result looks a little messy: config->supported_interfaces could come from either get_interfaces _or_ the integrated PCS with unclear (to me) responsibility.
There's only dwmac-intel, dwmac-spacemit and dwmac-rk that use the
.get_interfaces() API. Let me add Coia in CC, as they're working
on better PCS support specifically for Rockchip :
https://lore.kernel.org/netdev/20260915123802.1561724-1-coiaprant@xxxxxxxxx/
For spacemit, looks like it's not really a problem as there's no PCS
involved. For intel though, heh... Intel platforms with dwmac AND PCS
are hard to come by, but I think at that point let's roll with the
bitwise or'int of get_interfaces + pcs interfaces.
> This POC did show that STMMAC_FLAG_SERDES_SUPPORTS_2500M enabled phylink to configure the integrated PCS for 2500BASE-X and a 2.5 Gbps link came up with no apparent issues.
Maybe the blind spot is inband aneg. Mohd, you were quite involved in
this, do you remember where we stand on that front ?
Thanks,
Maxime