aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/layerscape/patches-5.4/701-net-0294-staging-fsl_ppfe-eth-Disable-autonegotiation-for-2.5.patch
blob: 3c0abc812dfe346b2e89a812688bb4fffde7064d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From caae8a691922c3702fcb813f5d794f311c0609c6 Mon Sep 17 00:00:00 2001
From: Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>
Date: Wed, 29 Nov 2017 12:21:43 +0530
Subject: [PATCH] staging: fsl_ppfe/eth: Disable autonegotiation for 2.5G SGMII

PCS initialization sequence for 2.5G SGMII interface governs
auto negotiation to be in disabled mode

Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>
---
 drivers/staging/fsl_ppfe/pfe_eth.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

--- a/drivers/staging/fsl_ppfe/pfe_eth.c
+++ b/drivers/staging/fsl_ppfe/pfe_eth.c
@@ -1174,6 +1174,7 @@ static void ls1012a_configure_serdes(str
 	struct pfe_eth_priv_s *priv = pfe->eth.eth_priv[0];
 	int sgmii_2500 = 0;
 	struct mii_bus *bus = priv->mii_bus;
+	u16 value = 0;
 
 	if (priv->einfo->mii_config == PHY_INTERFACE_MODE_2500SGMII)
 		sgmii_2500 = 1;
@@ -1191,14 +1192,16 @@ static void ls1012a_configure_serdes(str
 		pfe_eth_mdio_write(bus, 0, 0x4, 0x4001);
 		pfe_eth_mdio_write(bus, 0, 0x12, 0xa120);
 		pfe_eth_mdio_write(bus, 0, 0x13, 0x7);
+		/* Autonegotiation need to be disabled for 2.5G SGMII mode*/
+		value = 0x0140;
+		pfe_eth_mdio_write(bus, 0, 0x0, value);
 	} else {
 		pfe_eth_mdio_write(bus, 0, 0x14, 0xb);
 		pfe_eth_mdio_write(bus, 0, 0x4, 0x1a1);
 		pfe_eth_mdio_write(bus, 0, 0x12, 0x400);
 		pfe_eth_mdio_write(bus, 0, 0x13, 0x0);
+		pfe_eth_mdio_write(bus, 0, 0x0, 0x1140);
 	}
-
-	pfe_eth_mdio_write(bus, 0, 0x0, 0x1140);
 }
 
 /*