U-Boot PHY_MSCC vs PHY_VITESSE
Hey all,
As part of working on "allyesconfig" support I ran into the following problem. Both drivers/net/phy/mscc.c and drivers/net/phy/vitesse.c implement support for the VSC8584 PHY. The vitesse.c driver is much older and only had VSC8584 support added for a specific Freescale Layerscape platform whereas mscc.c is modern and been updated with newer PHYs as well. And we need one driver to support this phy, not two. I am inclined to remove support from vitesse.c. However, only 4 platforms use the PHY_MSCC driver and everyone else uses PHY_VITESSE.
I'm cc'ing all of the board maintainers (other than PowerPC platforms) that use PHY_VITESEE today to see what their feedback is on which way to go here. I'm ignoring PowerPC because that can just stay on the PHY_VITESSE driver based on timing of changes in git log.
Signature · 1 line
Tom
Hi Tom,
Quoted 11 lines · Tom Rini
Hey all,
As part of working on "allyesconfig" support I ran into the following problem. Both
drivers/net/phy/mscc.canddrivers/net/phy/vitesse.cimplement support for the VSC8584 PHY. Thevitesse.cdriver is much older and only had VSC8584 support added for a specific Freescale Layerscape platform whereasmscc.cis modern and been updated with newer PHYs as well. And we need one driver to support this phy, not two. I am inclined to remove support fromvitesse.c. However, only 4 platforms use thePHY_MSCCdriver and everyone else usesPHY_VITESSE.
At the moment mscc.c in U-Boot does not implement the particular PHY model (VSC8514) that we use. This Quad GbE PHY was on a number on Freescale/NXP QorIQ (PPC & Arm) dev boards. Until 2019 Freescale/NXP was selling a licensed version of this chip ("F104S8A").
The Linux version of mscc.c does support these PHYs, so we can bring across from that driver. However, many PHYs in this family have complicated errata workarounds, and the VSC8514 is no exception.
I have made some attempts to "port" the mscc.c support for VSC8514 (erratas included) before, but it's errata workaround method does not seem to work as reliably in U-Boot as it does under Linux.
(I also have my own version of vitesse.c which implements the errata workaround for VSC8514, derived directly from Microchips own SDK sources. Unfortunately it's too messy to submit to U-Boot, but it has worked reliably for many years)
Quoted 5 lines
I'm cc'ing all of the board maintainers (other than PowerPC platforms) that use
PHY_VITESEEtoday to see what their feedback is on which way to go here. I'm ignoring PowerPC because that can just stay on thePHY_VITESSEdriver based on timing of changes in git log.
I'm in favor (as far as board/traverse/ten64 goes) of migrating to mscc.c, it is just a matter of finding the time to sit down and implement support for the PHY I need (VSC8514).
Best Regards,
Matt
Quoted 6 lines
Signature · 5 lines
Tom *Attachments:* • signature.asc
Quoted 22 lines · Mathew McBride
Hi Tom,
Quoted 11 lines · Tom Rini
Hey all,
As part of working on "allyesconfig" support I ran into the following problem. Both
drivers/net/phy/mscc.canddrivers/net/phy/vitesse.cimplement support for the VSC8584 PHY. Thevitesse.cdriver is much older and only had VSC8584 support added for a specific Freescale Layerscape platform whereasmscc.cis modern and been updated with newer PHYs as well. And we need one driver to support this phy, not two. I am inclined to remove support fromvitesse.c. However, only 4 platforms use thePHY_MSCCdriver and everyone else usesPHY_VITESSE.At the moment
mscc.cin U-Boot does not implement the particular PHY model (VSC8514) that we use. This Quad GbE PHY was on a number on Freescale/NXP QorIQ (PPC & Arm) dev boards. Until 2019 Freescale/NXP was selling a licensed version of this chip ("F104S8A").The Linux version of
mscc.cdoes support these PHYs, so we can bring across from that driver. However, many PHYs in this family have complicated errata workarounds, and the VSC8514 is no exception.I have made some attempts to "port" the
mscc.csupport for VSC8514 (erratas included) before, but it's errata workaround method does not seem to work as reliably in U-Boot as it does under Linux.
Quoted 8 lines
(I also have my own version of
vitesse.cwhich implements the errata workaround for VSC8514, derived directly from Microchips own SDK sources. Unfortunately it's too messy to submit to U-Boot, but it has worked reliably for many years)Quoted 5 lines
I'm cc'ing all of the board maintainers (other than PowerPC platforms) that use
PHY_VITESEEtoday to see what their feedback is on which way to go here. I'm ignoring PowerPC because that can just stay on thePHY_VITESSEdriver based on timing of changes in git log.I'm in favor (as far as board/traverse/ten64 goes) of migrating to
mscc.c, it is just a matter of finding the time to sit down and implement support for the PHY I need (VSC8514).
Thanks for the detailed explanation. One thing that could be good enough is just picking one driver to handle the PHY that both have (ideally PHY_MSCC) and then improving the situation on top of that as time and complexity permits.
Signature · 1 line
Tom
Hi,
Quoted 11 lines · Tom Rini
Hey all,
As part of working on "allyesconfig" support I ran into the following problem. Both
drivers/net/phy/mscc.canddrivers/net/phy/vitesse.cimplement support for the VSC8584 PHY. Thevitesse.cdriver is much older and only had VSC8584 support added for a specific Freescale Layerscape platform whereasmscc.cis modern and been updated with newer PHYs as well. And we need one driver to support this phy, not two. I am inclined to remove support fromvitesse.c. However, only 4 platforms use thePHY_MSCCdriver and everyone else usesPHY_VITESSE.
Quoted 5 lines
I'm cc'ing all of the board maintainers (other than PowerPC platforms) that use
PHY_VITESEEtoday to see what their feedback is on which way to go here. I'm ignoring PowerPC because that can just stay on thePHY_VITESSEdriver based on timing of changes in git log.
We have VSC8531 on one Versal board which is the part of mscc.c driver already.
Because we do create one config for all boards with the same SOC to have something to start with enabling ethernet phy is just in case.
I sent the patch to switch to MSCC driver.
Thanks,
Michal
Hi Tom,
Quoted 11 lines · Tom Rini
Hey all,
As part of working on "allyesconfig" support I ran into the following problem. Both
drivers/net/phy/mscc.canddrivers/net/phy/vitesse.cimplement support for the VSC8584 PHY. Thevitesse.cdriver is much older and only had VSC8584 support added for a specific Freescale Layerscape platform whereasmscc.cis modern and been updated with newer PHYs as well. And we need one driver to support this phy, not two. I am inclined to remove support fromvitesse.c. However, only 4 platforms use thePHY_MSCCdriver and everyone else usesPHY_VITESSE.
Quoted 4 lines
I'm cc'ing all of the board maintainers (other than PowerPC platforms) that use
PHY_VITESEEtoday to see what their feedback is on which way to go here. I'm ignoring PowerPC because that can just stay on thePHY_VITESSEdriver based on timing of changes in git log.
There are many Layerscape boards that we need to support are still using PHY_VITESEE. I need to check internal to ask for resources to help on the migration. BTW, to support allyesconfig, is it feasible to make the two configs exclusive, saying "depends on !X".
Thanks
Peng
Quoted 3 lines
Signature · 2 lines
-- Tom
Quoted 19 lines · Peng Fan
Hi Tom,
Quoted 11 lines · Tom Rini
Hey all,
As part of working on "allyesconfig" support I ran into the following problem. Both
drivers/net/phy/mscc.canddrivers/net/phy/vitesse.cimplement support for the VSC8584 PHY. Thevitesse.cdriver is much older and only had VSC8584 support added for a specific Freescale Layerscape platform whereasmscc.cis modern and been updated with newer PHYs as well. And we need one driver to support this phy, not two. I am inclined to remove support fromvitesse.c. However, only 4 platforms use thePHY_MSCCdriver and everyone else usesPHY_VITESSE.Quoted 4 lines
I'm cc'ing all of the board maintainers (other than PowerPC platforms) that use
PHY_VITESEEtoday to see what their feedback is on which way to go here. I'm ignoring PowerPC because that can just stay on thePHY_VITESSEdriver based on timing of changes in git log.
Quoted 4 lines
There are many Layerscape boards that we need to support are still using
PHY_VITESEE. I need to check internal to ask for resources to help on the migration. BTW, to support allyesconfig, is it feasible to make the two configs exclusive, saying "depends on !X".
There are Kconfig workarounds available, but there's enough work to be done still that I'd rather see about fixing the root causes, or as a worst case here, remove the duplicate code from PHY_VITESSE and enable PHY_MSCC as well on the boards that need something from each driver still, if we can't switch them to the newer driver outright.
Signature · 1 line
Tom
Quoted 11 lines · Tom Rini
Hey all,
As part of working on "allyesconfig" support I ran into the following problem. Both
drivers/net/phy/mscc.canddrivers/net/phy/vitesse.cimplement support for the VSC8584 PHY. Thevitesse.cdriver is much older and only had VSC8584 support added for a specific Freescale Layerscape platform whereasmscc.cis modern and been updated with newer PHYs as well. And we need one driver to support this phy, not two. I am inclined to remove support fromvitesse.c. However, only 4 platforms use thePHY_MSCCdriver and everyone else usesPHY_VITESSE.
Quoted 4 lines
I'm cc'ing all of the board maintainers (other than PowerPC platforms) that use
PHY_VITESEEtoday to see what their feedback is on which way to go here. I'm ignoring PowerPC because that can just stay on thePHY_VITESSEdriver based on timing of changes in git log.
The mpfs icicle board is using PHY_VITESSE because the phy it has (vsc8662) is only supported by that driver. Same in Linux for that phy. We've got no users of the model you're talking about.
FWIW, I checked our "in house" linux config and it uses the generic phy driver, rather than the vitesse one. I wonder if we can get away with that in U-Boot too?
Quoted 17 lines · Conor Dooley
Quoted 11 lines · Tom Rini
Hey all,
As part of working on "allyesconfig" support I ran into the following problem. Both
drivers/net/phy/mscc.canddrivers/net/phy/vitesse.cimplement support for the VSC8584 PHY. Thevitesse.cdriver is much older and only had VSC8584 support added for a specific Freescale Layerscape platform whereasmscc.cis modern and been updated with newer PHYs as well. And we need one driver to support this phy, not two. I am inclined to remove support fromvitesse.c. However, only 4 platforms use thePHY_MSCCdriver and everyone else usesPHY_VITESSE.Quoted 4 lines
I'm cc'ing all of the board maintainers (other than PowerPC platforms) that use
PHY_VITESEEtoday to see what their feedback is on which way to go here. I'm ignoring PowerPC because that can just stay on thePHY_VITESSEdriver based on timing of changes in git log.
Quoted 7 lines
The mpfs icicle board is using
PHY_VITESSEbecause the phy it has (vsc8662) is only supported by that driver. Same in Linux for that phy. We've got no users of the model you're talking about.FWIW, I checked our "in house" linux config and it uses the generic phy driver, rather than the vitesse one. I wonder if we can get away with that in U-Boot too?
I was a little unclear in my wording of the problem, sorry. So just staying on PHY_VITESSE is fine (it's not being removed) or switching to the generic phy driver (likely smaller binary in the end?) is fine.
Signature · 1 line
Tom
Quoted 22 lines · Tom Rini
Quoted 21 lines · Conor Dooley
Quoted 11 lines · Tom Rini
Hey all,
As part of working on "allyesconfig" support I ran into the following problem. Both
drivers/net/phy/mscc.canddrivers/net/phy/vitesse.cimplement support for the VSC8584 PHY. Thevitesse.cdriver is much older and only had VSC8584 support added for a specific Freescale Layerscape platform whereasmscc.cis modern and been updated with newer PHYs as well. And we need one driver to support this phy, not two. I am inclined to remove support fromvitesse.c. However, only 4 platforms use thePHY_MSCCdriver and everyone else usesPHY_VITESSE.Quoted 4 lines
I'm cc'ing all of the board maintainers (other than PowerPC platforms) that use
PHY_VITESEEtoday to see what their feedback is on which way to go here. I'm ignoring PowerPC because that can just stay on thePHY_VITESSEdriver based on timing of changes in git log.The mpfs icicle board is using
PHY_VITESSEbecause the phy it has (vsc8662) is only supported by that driver. Same in Linux for that phy. We've got no users of the model you're talking about.
Quoted 7 lines
Quoted 3 lines
FWIW, I checked our "in house" linux config and it uses the generic phy driver, rather than the vitesse one. I wonder if we can get away with that in U-Boot too?
I was a little unclear in my wording of the problem, sorry. So just staying on
PHY_VITESSEis fine (it's not being removed) or switching to the generic phy driver (likely smaller binary in the end?) is fine.
No no, I got what you were saying. Was just also wondering if the "imply PHY_VITESSE" that we have on the board could be removed. I'd never paid attention to that before and implying it seems a bit unneeded if the generic driver works fine.