I'm trying to reconfigure the SerDes lane protocol at runtime, and I've almost got it working. Loopback (XGLP) works, i.e. the MAC sees the packets that I transmit, but it cannot send the packets over the SGMII/XFI line to the Ethernet PHY.
Is it at all possible to change SerDes protocol at runtime? Even a No would be helpful as I could then close the case.
The user stadium_aquino had the same problem.
There have been a couple of related posts in this forum, but none of them have been answered by NXP yet:
Solved! Go to Solution.
Summary for the future reader:
My conclusion is: No, protocol switching at runtime is not possible. We need to change the RCW for protocol switching.
This is officially supported and documented for MC firmwares on the NXP public MC-binary github repo - there you can find the required MC firmwares for the ls1088a, ls2080a, ls2088a, and lx216xa families. Here is the official support document stating these runtime switches are possible via the kernel driver dpmac_set_protocol() method for 10G-1G switching, as well as 25G-10G. You may need to use a newer BSP that has the appropriate methods added to phylink.c, pcs-lynx.c, phy-fsl-lynx-28g.c dpaa(2)-mac.c, phy-core.c, etc.
It seems there is some confusion on the support of this, as it is relatively new for these platforms. Good luck!
https://github.com/nxp-qoriq/qoriq-mc-binary/blob/mc_release_10.37.0/CHANGELOG.md
As far as I can tell, support for runtime speed/protocol switching only works with the LX2160A which has the newer (Lynx28G) Serdes PHY.
It _might_ be possible to do this on the older Layerscape and QorIQ SoCs but it's not 100% certain yet. It may also depend on your board being able to do the required configuration changes at runtime (like changing the SerDes PLL reference clock speed).
This recent kernel thread provides some details: https://patchwork.kernel.org/project/linux-phy/cover/20230413160607.4128315-1-sean.anderson@seco.com...
It would be nice if runtime switching was possible to support use cases like using both 1G and 10G SFPs in the same slot.
Summary for the future reader:
My conclusion is: No, protocol switching at runtime is not possible. We need to change the RCW for protocol switching.
to reconfigure the SerDes lane protocol at strict runtime it is not possible, because that configuration must be write in the RCW and you can't rewrite the RCW at runtime.
the section 31.8.4 is intended for Soft Reset
No, it is not possible to switch SerDes protocol at runtime.
Well, so I got different answers by now. I have some other experts involved, let's see what they say.
Nevertheless, thank you for caring!
Meanwhile I got an email from NXP, via a distributor. It says:
It is possible to switch Serdes protocol at runtime but it is important to follow the correct procedure as described in LS1046a reference manual section 31.8.4 Soft Reset and Reconfiguring Procedures. Please confirm that the correct procedure is followed or let us know if anything in the reference manual is unclear.
So the answer to my question is: Yes, it is possible (although I don't know yet how).