How to configure Ethernet SGMII@MAC2 on LS1043A

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to configure Ethernet SGMII@MAC2 on LS1043A

1,542 Views
lvjingbang
Contributor I

Hello,

   My board connect mac2 to FPGA through sgmii interface directly, no phy. The SGMII interface of FPGA is verified.

but Ping failed.

   I find Protocol Configuration Register 8 (PCCR8) this register value is:

#devmem 0x1ea0220
0x00001011

Is this value abnormal? Is my Mac 2 set to 1000base-x mode? How can I config it to sgmii mode?

And I see that:How to configure Ethernet (SGMII@MAC9) on LS1043A 

I also reset PLL, but it's useless. Ping still fails.

   Here is my configuration

   device trees:

ethernet@e2000 {
   cell-index = <0x1>;
   compatible = "fsl,fman-memac";
   reg = <0xe2000 0x1000>;
   fsl,fman-ports = <0x1a 0x1b>;
   ptp-timer = <0x18>;
   pcsphy-handle = <0x1c>;
   fixed-link = <0x2 0x1 0x3e8 0x0 0x0>;
   phy-connection-type = "sgmii";
   status = "okay";
};

   RCW:

00000000: 08100010 0a000000 00000000 00000000
00000010: 33350002 80004002 40040000 c1002000
00000020: 00000000 00000000 00000000 0003affc
00000030: 20004504 00041002 00000096 00000001

PCCR value:

#devmem 0x1ea0200
0x00001000
#devmem 0x1ea0208
0x08000000
#devmem 0x1ea0220
0x00001011
#devmem 0x1ea0224
0x00000000
#devmem 0x1ea022c
0x00000000

Labels (2)
Tags (1)
0 Kudos
3 Replies

1,340 Views
bpe
NXP Employee
NXP Employee

When you add a 'fixed-link' property, you only instruct Linux not to connect and initialize an external PHY for this Ethernet.

the on-chip PCS still expects the PHY response to autonegotiation type SGMII. Fixed link driver does not "know" anything about it. You need to check if your FPGA supports autonegotiation. If it can send SGMII type, PHY side response, it should work. If it does not support autonegotiation, or supports only 1000Base-X peer autonegotiation, you have to  modify mEMAC  driver to disable autonegotiation or to switch to 1000Base-KX.  See LS1043ARM, Sections 33.7.1.1 and 33.7.1.3 for details. PLL reset is useless in your case.


Have a great day,
Platon

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

1,340 Views
lvjingbang
Contributor I

Dear bpe:

     Thank you for your reply. Our FPGA has no autonegotiation function, the communication mode between ls1043 and FPGA is MAC2MAC. I have disabled autonegotiation(set fixed value) in driver according to the setting method in manual sections 33.7.1.1, but it still not works. 

     I suspect that the SerDes setting is wrong because the value of the SerDes register does not look normal. Do you have any good suggestions for me, so that I can determine where the problem is? 

0 Kudos

1,340 Views
bpe
NXP Employee
NXP Employee

Check SGMII_SR[LINK_STAT] for the presence of the link. If it is not up, inspect the interface with a scope and make sure the SerDes receives a valid clock. If you think some register has an unexpected value, please mention the register and the value you read.

Regards

Platon

0 Kudos