mirror-linux/drivers/net/pcs
Frank Wunderlich 422b5233b6 net: pcs: pcs-mtk-lynxi: fix bpi-r3 serdes configuration
Commit 8871389da1 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: 8871389da1 ("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>
Link: https://patch.msgid.link/20260526153239.30194-1-linux@fw-web.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-05-28 18:09:03 -07:00
..
Kconfig net: pcs: pcs-mtk-lynxi: deprecate "mediatek,pnswap" 2026-01-21 19:46:59 -08:00
Makefile net: pcs: xpcs: Add Synopsys DW xPCS platform device driver 2024-07-05 09:35:50 +01:00
pcs-lynx.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
pcs-mtk-lynxi.c net: pcs: pcs-mtk-lynxi: fix bpi-r3 serdes configuration 2026-05-28 18:09:03 -07:00
pcs-rzn1-miic.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
pcs-xpcs-nxp.c net: pcs: xpcs: add _modify() accessors 2024-10-09 12:13:11 +01:00
pcs-xpcs-plat.c net: mdio: remove redundant fwnode cleanup 2025-11-25 18:45:37 -08:00
pcs-xpcs-wx.c net: pcs: xpcs: add _modify() accessors 2024-10-09 12:13:11 +01:00
pcs-xpcs.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
pcs-xpcs.h net: xpcs: rearrange register definitions 2025-02-17 15:37:27 -08:00