]> git.dujemihanovic.xyz Git - u-boot.git/commit
net: freescale: replace usage of phy-mode = "sgmii-2500" with "2500base-x"
authorVladimir Oltean <vladimir.oltean@nxp.com>
Sat, 18 Sep 2021 12:32:35 +0000 (15:32 +0300)
committerRamon Fried <rfried.dev@gmail.com>
Tue, 28 Sep 2021 15:50:56 +0000 (18:50 +0300)
commit7c2d5d1642cb561f4135c0be7568d6ee51c56726
treee94f9f497eb56b8afcf54553495b25c5b90ae7c3
parent77b11f7604162886f46e56011e790b7700f8cadd
net: freescale: replace usage of phy-mode = "sgmii-2500" with "2500base-x"

After the discussion here:
https://lore.kernel.org/netdev/20210603143453.if7hgifupx5k433b@pali/

which resulted in this patch:
https://patchwork.kernel.org/project/netdevbpf/patch/20210704134325.24842-1-pali@kernel.org/

and many other discussions before it, notably:
https://patchwork.kernel.org/project/linux-arm-kernel/patch/1512016235-15909-1-git-send-email-Bhaskar.Upadhaya@nxp.com/

it became apparent that nobody really knows what "SGMII 2500" is.
Certainly, Freescale/NXP hardware engineers name this protocol
"SGMII 2500" in the reference manuals, but the PCS devices do not
support any "SGMII" specific features when operating at the speed of
2500 Mbps, no in-band autoneg and no speed change via symbol replication
. So that leaves a fixed speed of 2500 Mbps using a coding of 8b/10b
with a SERDES lane frequency of 3.125 GHz. In fact, "SGMII 2500 without
in-band autoneg and at a fixed speed" is indistinguishable from
"2500base-x without in-band autoneg", which is precisely what these NXP
devices support.

So it just appears that "SGMII 2500" is an unclear name with no clear
definition that stuck.

As such, in the Linux kernel, the drivers which use this SERDES protocol
use the 2500base-x phy-mode.

This patch converts U-Boot to use 2500base-x too, or at least, as much
as it can.

Note that I would have really liked to delete PHY_INTERFACE_MODE_SGMII_2500
completely, but the mvpp2 driver seems to even distinguish between SGMII
2500 and 2500base-X. Namely, it enables in-band autoneg for one but not
the other, and forces flow control for one but not the other. This goes
back to the idea that maybe 2500base-X is a fiber protocol and SGMII-2500
is an MII protocol (connects a MAC to a PHY such as Aquantia), but the
two are practically indistinguishable through everything except use case.

NXP devices can support both use cases through an identical configuration,
for example RX flow control can be unconditionally enabled in order to
support rate adaptation performed by an Aquantia PHY. At least I can
find no indication in online documents published by Cisco which would
point towards "SGMII-2500" being an actual standard with an actual
definition, so I cannot say "yes, NXP devices support it".

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
23 files changed:
arch/arm/dts/fsl-ls1028a-qds-6xxx-sch-30842.dtsi
arch/arm/dts/fsl-ls1028a-qds-7777-sch-30841.dtsi
arch/arm/dts/fsl-ls1028a-qds-7xx7-sch-30841R.dtsi
arch/arm/dts/fsl-ls1028a-qds-x7xx-sch-30842.dtsi
arch/arm/dts/fsl-ls1028a-qds-xx7x-sch-30842.dtsi
arch/arm/dts/fsl-sch-30841.dtsi
arch/arm/dts/fsl-sch-30842.dtsi
board/freescale/ls1012aqds/eth.c
board/freescale/ls1012aqds/ls1012aqds.c
board/freescale/ls1012aqds/ls1012aqds_pfe.h
board/freescale/ls1012ardb/eth.c
board/freescale/ls1043aqds/eth.c
board/freescale/ls1046aqds/eth.c
board/freescale/t102xrdb/eth_t102xrdb.c
drivers/net/fm/eth.c
drivers/net/fm/ls1043.c
drivers/net/fm/ls1046.c
drivers/net/fm/memac.c
drivers/net/fm/t1024.c
drivers/net/fsl_enetc.c
drivers/net/mscc_eswitch/felix_switch.c
drivers/net/pfe_eth/pfe_mdio.c
drivers/net/phy/aquantia.c