net: macb: add support for 1000BASE-X autonegotiation to PCS

The current PCS code unconditionally uses SGMII autonegotiation, though
the hardware supports both SGMII and 1000BASE-X modes. Decouple the
choice of PCS enablement from use of the SGMII mode when running at
gigabit rates and announce to phylink that 1000BASE-X is a supported
operating mode. This enables direct attachment of the PCS to e.g. an
SFP.

The 1000BASE-X code in phylink also sometimes calls the autonegotiation
restart method, so add an implementation of autonegotiation restart and
make sure that pcs_config() signals to phylink when the AN advertisement
has changed.

Signed-off-by: Nathan Whitehorn <nwhitehorn@pa.msu.edu>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20260922151429.23272-3-nwhitehorn@pa.msu.edu
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Nathan Whitehorn 2026-09-22 11:09:25 -04:00 • committed by Jakub Kicinski
commit f342b1208f