Commit 7f44b2ac authored by Charles Perry's avatar Charles Perry Committed by Jakub Kicinski
Browse files

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: default avatarCharles Perry <charles.perry@microchip.com>
Link: https://patch.msgid.link/20260224202854.112813-3-charles.perry@microchip.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 1338cfef
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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)