Skip to contentSkip to conversation

net: phy: marvell: Allow targets to skip MII RX/TX errata

PATCH In review Timothy Pearson 3 participants 9 messages Mar 21, 2025 – Mar 24, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/4 net: phy: marvell: Allow targets to skip MII RX/TX errata

application

Upstream-Status: Pending

---
 drivers/net/phy/Kconfig   |  8 ++++++++
 drivers/net/phy/marvell.c | 10 ++++++++++
 2 files changed, 18 insertions(+)
drivers/net/phy/Kconfig +8 -0
index f6dde8af1ce..c79883e4172 100644
@@ -112,6 +112,14 @@ config PHY_LXT
 config PHY_MARVELL
 	bool "Marvell Ethernet PHYs support"
 
+if PHY_MARVELL
+
+config PHY_MARVELL_APPLY_MII_RXTX_ERRATA
+	bool
+	default n
+
+endif # PHY_MARVELL
+
 config PHY_MESON_GXL
 	bool "Amlogic Meson GXL Internal PHY support"
 
drivers/net/phy/marvell.c +10 -0
index efbbd31ff71..345d3a65104 100644
@@ -379,7 +379,15 @@ static int m88e1518_config(struct phy_device *phydev)
 		phy_write(phydev, MDIO_DEVAD_NONE, MII_MARVELL_PHY_PAGE, 2);
 
 		reg = phy_read(phydev, MDIO_DEVAD_NONE, MIIM_88E151x_PHY_MSCR);
+
 		reg &= ~MIIM_88E151x_RGMII_RXTX_DELAY;
+
+		/* Per the vendor, certain Marvell devices will not function if
+		 * the RGMII TX/RX delay registers are modified.  If an
+		 * affected design has been selected, do not write the
+		 * RX/TX delay registers.
+		 */
+#if !defined(CONFIG_PHY_MARVELL_APPLY_MII_RXTX_ERRATA)
 		if (phydev->interface == PHY_INTERFACE_MODE_RGMII ||
 		    phydev->interface == PHY_INTERFACE_MODE_RGMII_ID)
 			reg |= MIIM_88E151x_RGMII_RXTX_DELAY;
@@ -387,6 +395,8 @@ static int m88e1518_config(struct phy_device *phydev)
 			reg |= MIIM_88E151x_RGMII_RX_DELAY;
 		else if (phydev->interface == PHY_INTERFACE_MODE_RGMII_TXID)
 			reg |= MIIM_88E151x_RGMII_TX_DELAY;
+#endif
+
 		phy_write(phydev, MDIO_DEVAD_NONE, MIIM_88E151x_PHY_MSCR, reg);
 
 		phy_write(phydev, MDIO_DEVAD_NONE, MII_MARVELL_PHY_PAGE, 0);
Signature · 1 line
2.39.5
#1 lore raw
Quoted 1 line · Timothy Pearson

application

A rather uninformative commit message again.

Quoted 1 line

Upstream-Status: Pending

Pending what exactly and why? I guess you're supposed to send your series upstream (to Linux devs) first, then after they're accepted you can ask for backporting them to OpenBMC tree. There're exceptions but you need to provide a rather convincing reason for that I guess. I'm not saying that in any official capacity, just as a sidenote, Joel will clarify if I'm wrong.

drivers/net/phy/Kconfig config PHY_LXT · line 121

Quoted 7 lines
drivers/net/phy/Kconfig +7 -0
+if PHY_MARVELL
+
+config PHY_MARVELL_APPLY_MII_RXTX_ERRATA
+	bool
+	default n
+
+endif # PHY_MARVELL

This doesn't seem to be the right approach at all. If it needs to be specified per board, you need to add it to Device Tree schema and those Device Tree board files that are affected.

drivers/net/phy/marvell.c static int m88e1518_config(struct phy_device *phydev) · line 389

Quoted 5 lines
drivers/net/phy/marvell.c +5 -0
+		/* Per the vendor, certain Marvell devices will not function if
+		 * the RGMII TX/RX delay registers are modified.  If an
+		 * affected design has been selected, do not write the
+		 * RX/TX delay registers.
+		 */

This doesn't say much. Please reference the actual errata document number or cite its text or find some other way to explain which devices are affected how. Proper implementation depends a lot on those details.

#2 lore raw

----- Original Message -----

Quoted 32 lines

From: "Paul Fertser" <[email protected]>
To: "Timothy Pearson" <[email protected]>
Cc: "openbmc" <[email protected]>
Sent: Friday, March 21, 2025 12:43:12 PM
Subject: Re: [PATCH 2/4] net: phy: marvell: Allow targets to skip MII RX/TX errata

Quoted 1 line · Timothy Pearson

application

A rather uninformative commit message again.

Quoted 1 line

Upstream-Status: Pending

Pending what exactly and why? I guess you're supposed to send your series upstream (to Linux devs) first, then after they're accepted you can ask for backporting them to OpenBMC tree. There're exceptions but you need to provide a rather convincing reason for that I guess. I'm not saying that in any official capacity, just as a sidenote, Joel will clarify if I'm wrong.

drivers/net/phy/Kconfig config PHY_LXT · line 121

Quoted 7 lines
drivers/net/phy/Kconfig +7 -0
+if PHY_MARVELL
+
+config PHY_MARVELL_APPLY_MII_RXTX_ERRATA
+	bool
+	default n
+
+endif # PHY_MARVELL

This doesn't seem to be the right approach at all. If it needs to be specified per board, you need to add it to Device Tree schema and those Device Tree board files that are affected.

Quoted 10 lines

drivers/net/phy/marvell.c static int m88e1518_config(struct phy_device *phydev) · line 389

Quoted 5 lines
drivers/net/phy/marvell.c +5 -0
+		/* Per the vendor, certain Marvell devices will not function if
+		 * the RGMII TX/RX delay registers are modified.  If an
+		 * affected design has been selected, do not write the
+		 * RX/TX delay registers.
+		 */

This doesn't say much. Please reference the actual errata document number or cite its text or find some other way to explain which devices are affected how. Proper implementation depends a lot on those details.

Understood. I am navigating a bit of a sea of NDA restricted / proprietary components here, apologies for the lack of detail.

Let me see if I can get that information and get approval for public disclosure. These patches are in support of the SIE Cronos board, which unfortunately was designed by a third party without proper U-boot / OpenBMC integration in mind. As a result, there are unique hardware decisions that were made, and the DT is not authoritative on these platforms.

#3 lore raw
Quoted 11 lines · Timothy Pearson
Quoted 10 lines

drivers/net/phy/marvell.c static int m88e1518_config(struct phy_device *phydev) · line 389

Quoted 5 lines
drivers/net/phy/marvell.c +5 -0
+		/* Per the vendor, certain Marvell devices will not function if
+		 * the RGMII TX/RX delay registers are modified.  If an
+		 * affected design has been selected, do not write the
+		 * RX/TX delay registers.
+		 */

This doesn't say much. Please reference the actual errata document number or cite its text or find some other way to explain which devices are affected how. Proper implementation depends a lot on those details.

Quoted 8 lines

Understood. I am navigating a bit of a sea of NDA restricted / proprietary components here, apologies for the lack of detail.

Let me see if I can get that information and get approval for public disclosure. These patches are in support of the SIE Cronos board, which unfortunately was designed by a third party without proper U-boot / OpenBMC integration in mind. As a result, there are unique hardware decisions that were made, and the DT is not authoritative on these platforms.

DT should be capable of describing any hardware, that's what it's made for. If some particular property is missing it can be added upstream and then added to the board's DT. It's not yet clear from this patch and its commit message what specifically is unique about this board.

#4 lore raw

----- Original Message -----

Quoted 28 lines

From: "Paul Fertser" <[email protected]>
To: "Timothy Pearson" <[email protected]>
Cc: "openbmc" <[email protected]>
Sent: Friday, March 21, 2025 1:02:11 PM
Subject: Re: [PATCH 2/4] net: phy: marvell: Allow targets to skip MII RX/TX errata

Quoted 14 lines · Timothy Pearson
Quoted 10 lines

drivers/net/phy/marvell.c static int m88e1518_config(struct phy_device *phydev) · line 389

Quoted 5 lines
drivers/net/phy/marvell.c +5 -0
+		/* Per the vendor, certain Marvell devices will not function if
+		 * the RGMII TX/RX delay registers are modified.  If an
+		 * affected design has been selected, do not write the
+		 * RX/TX delay registers.
+		 */

This doesn't say much. Please reference the actual errata document number or cite its text or find some other way to explain which devices are affected how. Proper implementation depends a lot on those details.

Understood. I am navigating a bit of a sea of NDA restricted / proprietary components here, apologies for the lack of detail.

Quoted 6 lines

Let me see if I can get that information and get approval for public disclosure. These patches are in support of the SIE Cronos board, which unfortunately was designed by a third party without proper U-boot / OpenBMC integration in mind. As a result, there are unique hardware decisions that were made, and the DT is not authoritative on these platforms.

Quoted 4 lines

DT should be capable of describing any hardware, that's what it's made for. If some particular property is missing it can be added upstream and then added to the board's DT. It's not yet clear from this patch and its commit message what specifically is unique about this board.

Understood. I will attempt to get authorization to describe publicly in more detail.

#5 lore raw
In reply to Paul Fertser
Quoted 9 lines · Paul Fertser
Quoted 1 line · Timothy Pearson

Upstream-Status: Pending

Pending what exactly and why? I guess you're supposed to send your series upstream (to Linux devs) first, then after they're accepted you can ask for backporting them to OpenBMC tree. There're exceptions but you need to provide a rather convincing reason for that I guess. I'm not saying that in any official capacity, just as a sidenote, Joel will clarify if I'm wrong.

Huh, it wasn't at all obvious to me that your patches were meant for U-boot, not Linux, sorry (and you didn't specify that in the subject). There slightly different rules apply, but in general my comments should all be still relevant. Overall impression I got is that you're adding a bunch of hacks and that most things about them would need to be heavily reworked to become digestible for upstream. I hope more experienced developers will correct me if I'm wrong here.

#6 lore raw

----- Original Message -----

Quoted 17 lines

From: "Paul Fertser" <[email protected]>
To: "Timothy Pearson" <[email protected]>
Cc: "openbmc" <[email protected]>
Sent: Friday, March 21, 2025 6:21:30 PM
Subject: Re: [PATCH 2/4] net: phy: marvell: Allow targets to skip MII RX/TX errata

Quoted 9 lines · Paul Fertser
Quoted 1 line · Timothy Pearson

Upstream-Status: Pending

Pending what exactly and why? I guess you're supposed to send your series upstream (to Linux devs) first, then after they're accepted you can ask for backporting them to OpenBMC tree. There're exceptions but you need to provide a rather convincing reason for that I guess. I'm not saying that in any official capacity, just as a sidenote, Joel will clarify if I'm wrong.

Quoted 7 lines

Huh, it wasn't at all obvious to me that your patches were meant for U-boot, not Linux, sorry (and you didn't specify that in the subject). There slightly different rules apply, but in general my comments should all be still relevant. Overall impression I got is that you're adding a bunch of hacks and that most things about them would need to be heavily reworked to become digestible for upstream. I hope more experienced developers will correct me if I'm wrong here.

No problem, I understand. We're working with the customer to get to a point where these three patches will be dropped from the series, and only a v2 of the final Cronos board addition patch will be retained. This platform was not designed by us, and that is where some of the constraints are coming from, but I will make sure the future patch set doesn't touch common U-boot code.

I am assuming that new OpenBMC platforms can be merged into the U-boot tree here vs. upstream U-boot, as upstream doesn't fully support the ASpeed device? When I attempted to apply and test to upstream, there was a lot of missing code and it wasn't clear at all that the result would ever be bootable on typical OpenBMC hardware designs.

Thanks!

#7 lore raw
Quoted 18 lines · Timothy Pearson
Quoted 18 lines · Paul Fertser
Quoted 9 lines · Timothy Pearson
Quoted 1 line

Upstream-Status: Pending

Pending what exactly and why? I guess you're supposed to send your series upstream (to Linux devs) first, then after they're accepted you can ask for backporting them to OpenBMC tree. There're exceptions but you need to provide a rather convincing reason for that I guess. I'm not saying that in any official capacity, just as a sidenote, Joel will clarify if I'm wrong.

Huh, it wasn't at all obvious to me that your patches were meant for U-boot, not Linux, sorry (and you didn't specify that in the subject). There slightly different rules apply, but in general my comments should all be still relevant. Overall impression I got is that you're adding a bunch of hacks and that most things about them would need to be heavily reworked to become digestible for upstream. I hope more experienced developers will correct me if I'm wrong here.

...

Quoted 7 lines

I am assuming that new OpenBMC platforms can be merged into the U-boot tree here vs. upstream U-boot, as upstream doesn't fully support the ASpeed device? When I attempted to apply and test to upstream, there was a lot of missing code and it wasn't clear at all that the result would ever be bootable on typical OpenBMC hardware designs.

It looks like like the current state is that people send patches like
[0] and [1] (notice the subject line, recepients, informative commit messages etc), then it gets synced to OpenBMC by changes like [2], then probably it used to propogate to Aspeed [3] (interesting how they have a much newer branch but everybody is still stuck at v2019 one).

To get a general feel how U-Boot is dealt with in OpenBMC community you can check [4].

[0] https://lore.kernel.org/all/[email protected]/
[1] https://lore.kernel.org/all/[email protected]/
[2] https://gerrit.openbmc.org/c/openbmc/openbmc/+/73075
[3] https://github.com/AspeedTech-BMC/u-boot/pulls?q=is%3Aopen+is%3Apr
[4] https://gerrit.openbmc.org/q/message:u-boot

HTH

#8 lore raw
Quoted 28 lines · Paul Fertser
Quoted 18 lines · Timothy Pearson
Quoted 18 lines · Paul Fertser
Quoted 9 lines · Timothy Pearson
Quoted 1 line

Upstream-Status: Pending

Pending what exactly and why? I guess you're supposed to send your series upstream (to Linux devs) first, then after they're accepted you can ask for backporting them to OpenBMC tree. There're exceptions but you need to provide a rather convincing reason for that I guess. I'm not saying that in any official capacity, just as a sidenote, Joel will clarify if I'm wrong.

Huh, it wasn't at all obvious to me that your patches were meant for U-boot, not Linux, sorry (and you didn't specify that in the subject). There slightly different rules apply, but in general my comments should all be still relevant. Overall impression I got is that you're adding a bunch of hacks and that most things about them would need to be heavily reworked to become digestible for upstream. I hope more experienced developers will correct me if I'm wrong here.

...

Quoted 7 lines

I am assuming that new OpenBMC platforms can be merged into the U-boot tree here vs. upstream U-boot, as upstream doesn't fully support the ASpeed device?  When I attempted to apply and test to upstream, there was a lot of missing code and it wasn't clear at all that the result would ever be bootable on typical OpenBMC hardware designs.

Quoted 4 lines

It looks like like the current state is that people send patches like
[0] and [1] (notice the subject line, recepients, informative commit messages etc),

Timothy: Yes, please put some effort into conforming to community expectations such as those outlined by Paul, as well as producing a properly threaded series of patches under a cover letter.

Quoted 3 lines

then it gets synced to OpenBMC by changes like [2],
then probably it used to propogate to Aspeed [3] (interesting how they have a much newer branch but everybody is still stuck at v2019 one).

I'm short of time for the most part, but if people would like more recent trees then maybe we can start to identify where the work is and coordinate on making progress.

Andrew