6629547eef318a82bd86586d7b049e0e1785924c
[openwrt/staging/rmilecki.git] / target / linux / mvebu / patches-4.19 / 537-net-mvneta-add-2500baset-support.patch
1 From eda3d1b0228484fb52b7244a68fd4cc8a985ed10 Mon Sep 17 00:00:00 2001
2 From: Maxime Chevallier <maxime.chevallier@bootlin.com>
3 Date: Wed, 27 Mar 2019 17:31:06 +0100
4 Subject: [PATCH] net: mvneta: Add 2500BaseT support
5
6 Some PHYs will use the 2500BaseX PHY_INTERFACE_MODE when being linked
7 with a partner using 2.5GBaseT.
8
9 Since we can't autonegotiate this speed between the MAC and the PHY, we
10 need to have the proper comphy support enabled, to make sure we can
11 safely advertise 2.5G and 1G in BaseT and be able to switch between both
12 corresponding PHY interface modes. This is now possible since comphy
13 support was added to this driver.
14
15 This commit adds the 2500BaseT mode to the list of supported modes when
16 using 2500BaseX, and was tested on a setup with an Armada385 and a
17 88E2010 PHY, both with and without the comphy node in the DT.
18
19 Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
20 Signed-off-by: David S. Miller <davem@davemloft.net>
21 ---
22 drivers/net/ethernet/marvell/mvneta.c | 1 +
23 1 file changed, 1 insertion(+)
24
25 --- a/drivers/net/ethernet/marvell/mvneta.c
26 +++ b/drivers/net/ethernet/marvell/mvneta.c
27 @@ -3387,6 +3387,7 @@ static void mvneta_validate(struct net_d
28 phylink_set(mask, 1000baseX_Full);
29 }
30 if (pp->comphy || state->interface == PHY_INTERFACE_MODE_2500BASEX) {
31 + phylink_set(mask, 2500baseT_Full);
32 phylink_set(mask, 2500baseX_Full);
33 }
34