Re: [PATCH 1/9] net: ethernet: mtk_eth_soc: add support for MT7981 SoC

From: Vladimir Oltean
Date: Fri Feb 03 2023 - 09:19:21 EST


On Fri, Feb 03, 2023 at 07:00:21AM +0000, Daniel Golle wrote:
> The MediaTek MT7981 SoC comes two 1G/2.5G SGMII, just like MT7986.
>
> In addition MT7981 comes with a built-in 1000Base-T PHY which can be
> used with GMAC1.
>
> As many MT7981 boards make use of swapping SGMII phase and neutral, add
> new device-tree attribute 'mediatek,pn_swap' to support them.
>
> Signed-off-by: Daniel Golle <daniel@xxxxxxxxxxxxxx>
> ---

Phase and neutral? What is this, a power plug?
Since SGMII uses differential signaling, I wonder if this isn't about
the polarity of the TX lane (which pin carries the Positive signal and
which the Negative one).

I think there is room for a more general device tree property name than
"mediatek,pn_swap". The Designware XPCS also supports this, see
DW_VR_MII_DIG_CTRL2_TX_POL_INV and the comments in
nxp_sja1105_sgmii_pma_config().