3c0abc812dfe346b2e89a812688bb4fffde7064d
[openwrt/staging/ldir.git] /
1 From caae8a691922c3702fcb813f5d794f311c0609c6 Mon Sep 17 00:00:00 2001
2 From: Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>
3 Date: Wed, 29 Nov 2017 12:21:43 +0530
4 Subject: [PATCH] staging: fsl_ppfe/eth: Disable autonegotiation for 2.5G SGMII
5
6 PCS initialization sequence for 2.5G SGMII interface governs
7 auto negotiation to be in disabled mode
8
9 Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>
10 ---
11 drivers/staging/fsl_ppfe/pfe_eth.c | 7 +++++--
12 1 file changed, 5 insertions(+), 2 deletions(-)
13
14 --- a/drivers/staging/fsl_ppfe/pfe_eth.c
15 +++ b/drivers/staging/fsl_ppfe/pfe_eth.c
16 @@ -1174,6 +1174,7 @@ static void ls1012a_configure_serdes(str
17 struct pfe_eth_priv_s *priv = pfe->eth.eth_priv[0];
18 int sgmii_2500 = 0;
19 struct mii_bus *bus = priv->mii_bus;
20 + u16 value = 0;
21
22 if (priv->einfo->mii_config == PHY_INTERFACE_MODE_2500SGMII)
23 sgmii_2500 = 1;
24 @@ -1191,14 +1192,16 @@ static void ls1012a_configure_serdes(str
25 pfe_eth_mdio_write(bus, 0, 0x4, 0x4001);
26 pfe_eth_mdio_write(bus, 0, 0x12, 0xa120);
27 pfe_eth_mdio_write(bus, 0, 0x13, 0x7);
28 + /* Autonegotiation need to be disabled for 2.5G SGMII mode*/
29 + value = 0x0140;
30 + pfe_eth_mdio_write(bus, 0, 0x0, value);
31 } else {
32 pfe_eth_mdio_write(bus, 0, 0x14, 0xb);
33 pfe_eth_mdio_write(bus, 0, 0x4, 0x1a1);
34 pfe_eth_mdio_write(bus, 0, 0x12, 0x400);
35 pfe_eth_mdio_write(bus, 0, 0x13, 0x0);
36 + pfe_eth_mdio_write(bus, 0, 0x0, 0x1140);
37 }
38 -
39 - pfe_eth_mdio_write(bus, 0, 0x0, 0x1140);
40 }
41
42 /*