* [net v2] net: pcs: pcs-mtk-lynxi: fix bpi-r3 serdes configuration
@ 2026-05-26 15:32 Frank Wunderlich
2026-05-29 1:20 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Frank Wunderlich @ 2026-05-26 15:32 UTC (permalink / raw)
To: Alexander Couzens, Daniel Golle, Andrew Lunn, Heiner Kallweit,
Russell King, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Matthias Brugger, AngeloGioacchino Del Regno
Cc: Frank Wunderlich, Vladimir Oltean, netdev, linux-kernel,
linux-arm-kernel, linux-mediatek
From: Frank Wunderlich <frank-w@public-files.de>
Commit 8871389da151 introduces common pcs dts properties which writes
rx=normal,tx=normal polarity to register SGMSYS_QPHY_WRAP_CTRL of switch.
This is initialized with tx-bit set and so change inverts polarity
compared to before.
It looks like mt7531 has tx polarity inverted in hardware and set tx-bit
by default to restore the normal polarity.
The MT7531 datasheet quite clearly states:
Register 000050EC QPHY_WRAP_CTRL -- QPHY wrapper control
Reset value: 0x00000501
BIT 1 RX_BIT_POLARITY -- RX bit polarity control
1'b0: normal
1'b1: inverted
BIT 0 TX_BIT_POLARITY -- TX bit polarity control (TX default inversed
in MT7531)
1'b0: normal
1'b1: inverted
Till this patch the register write was only called when mediatek,pnswap
property was set which cannot be done for switch because the fw-node param
was always NULL from switch driver in the mtk_pcs_lynxi_create call.
Do not configure switch side like it's done before.
Fixes: 8871389da151 ("net: pcs: pcs-mtk-lynxi: deprecate "mediatek,pnswap"")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
v2:
- send as non-RFC
- add datasheet information from Daniel
---
drivers/net/pcs/pcs-mtk-lynxi.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/pcs/pcs-mtk-lynxi.c b/drivers/net/pcs/pcs-mtk-lynxi.c
index c12f8087af9b..a753bd88cbc2 100644
--- a/drivers/net/pcs/pcs-mtk-lynxi.c
+++ b/drivers/net/pcs/pcs-mtk-lynxi.c
@@ -129,6 +129,9 @@ static int mtk_pcs_config_polarity(struct mtk_pcs_lynxi *mpcs,
unsigned int val = 0;
int ret;
+ if (!fwnode)
+ return 0;
+
if (fwnode_property_read_bool(fwnode, "mediatek,pnswap"))
default_pol = PHY_POL_INVERT;
--
2.53.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [net v2] net: pcs: pcs-mtk-lynxi: fix bpi-r3 serdes configuration
2026-05-26 15:32 [net v2] net: pcs: pcs-mtk-lynxi: fix bpi-r3 serdes configuration Frank Wunderlich
@ 2026-05-29 1:20 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-05-29 1:20 UTC (permalink / raw)
To: Frank Wunderlich
Cc: lynxis, daniel, andrew, hkallweit1, linux, davem, edumazet, kuba,
pabeni, matthias.bgg, angelogioacchino.delregno, frank-w,
vladimir.oltean, netdev, linux-kernel, linux-arm-kernel,
linux-mediatek
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 26 May 2026 17:32:38 +0200 you wrote:
> From: Frank Wunderlich <frank-w@public-files.de>
>
> Commit 8871389da151 introduces common pcs dts properties which writes
> rx=normal,tx=normal polarity to register SGMSYS_QPHY_WRAP_CTRL of switch.
> This is initialized with tx-bit set and so change inverts polarity
> compared to before.
>
> [...]
Here is the summary with links:
- [net,v2] net: pcs: pcs-mtk-lynxi: fix bpi-r3 serdes configuration
https://git.kernel.org/netdev/net/c/422b5233b607
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-29 1:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-26 15:32 [net v2] net: pcs: pcs-mtk-lynxi: fix bpi-r3 serdes configuration Frank Wunderlich
2026-05-29 1:20 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox