net: macb: add support for reporting SGMII inband link status

This makes it possible to use in-band autonegotiation with
SGMII.

If using a device tree, this can be done by adding the managed =
"in-band-status" property to the gem node.

Signed-off-by: Charles Perry <charles.perry@microchip.com>
Link: https://patch.msgid.link/20260224202854.112813-3-charles.perry@microchip.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Charles Perry 2026-02-24 12:28:53 -08:00 committed by Jakub Kicinski
parent 1338cfef1f
commit 7f44b2acc5

View File

@ -560,7 +560,12 @@ static int macb_usx_pcs_config(struct phylink_pcs *pcs,
static void macb_pcs_get_state(struct phylink_pcs *pcs, unsigned int neg_mode,
struct phylink_link_state *state)
{
state->link = 0;
struct macb *bp = container_of(pcs, struct macb, phylink_sgmii_pcs);
u16 bmsr, lpa;
bmsr = gem_readl(bp, PCSSTS);
lpa = gem_readl(bp, PCSANLPBASE);
phylink_mii_c22_pcs_decode_state(state, neg_mode, bmsr, lpa);
}
static void macb_pcs_an_restart(struct phylink_pcs *pcs)