We are developing a product for a SFP(optical fiber) port based on LS1012A processor and test the connection using uboot(2016.01) base on SDK 2.0-1703.
Our product encountered a problem that could not be connected. We use eTsec1(SGMII1) and do some modify:
In ls1021atwr.h
1. undef CONFIG_TSEC2 CONFIG_TSEC3 -> Ony eTESC1
2. undef CONFIG_PHY_ATHEROS --> Use Generic PHY
3. Modify TSEC1_PHY_ADDR to 0x1F
4. SerDes Protocol : 0x20
5. RCW:
00000000: 0608000a 00000000 00000000 00000000
00000010: 20000000 08447900 60040a00 21046000
00000020: 00000000 00000000 00000000 00034700
00000030: 20004100 00049340 00000000 00000000
When we used "ping" command to verify the network connection, we found that the network connection failed.
At this time the value of the TBI PHY register is as follows:
0: 0x1140
1: 0x016D
4: 0x0020
5: 0x4020
6: 0x0006
7: 0x0000
8: 0x0000
F: 0xA000
10: 0x0000
11: 0x0020
It seems not in SGMII Mode. We refer to "SGMII PHYless Example" in document <https://www.nxp.com/files-static/training_pdf/FTF/2012/americas/WBNR_FTF12_NET_F0215.pdf>.
Is the issue depends on Serdes or eTSEC settings?
Regards
Doohan
Hello Doohan Chuang,
Please read TBI memory map/register with mdio command.
mdio read <PHY address> <REGISTER Address>
=> mdio read eTSEC1 1
Reading from bus FSL_MDIO0
PHY at address 2:
1 - 0x796d
The link partner link status bit is in Register #1 on the PHY. The 'Link Status' bit is bit #2 (from the left) of the
last nibble. In the above example the nibble of interest is "d" (d = b'1101'), and therefore the 'Link Status' = 1, which means 'link up'. If the link were down this bit would be a "0," and we would see 0x7969.
Thanks,
Yiping
Hi Yiping,
Thanks for your support.
I test the command as follow:
=> mdio list
FSL_MDIO:
31 - Generic PHY <--> eTSEC1
=> mdio read eTSEC1 1
Reading from bus FSL_MDIO
PHY at address 31:
1 - 0x16d
It seems link up, but when I execute the "ping" command, the response message is as follows:
=> ping 192.168.127.110
Speed: 10, half duplex
Using eTSEC1 device
ARP Retry count exceeded; starting again
ping failed; host 192.168.127.110 is not alive
After execute ping command, the TBI PHY Reg value is as follows:
0: 0x1140
1: 0x016D
4: 0x0020
5: 0x4020
6: 0x0006
7: 0x0000
8: 0x0000
F: 0xA000
10: 0x0000
11: 0x0020
The eTsec1 0x2d106e0 = 0x00000100 & 0x2d106e4 = 0x00000004.
How to verify the settings are correctly? Thanks
Best Regards,
Doohan
Hello Doohan,
On your custom board, if you use SGMII1 to connect to SFP, the interface eTsec1 is a PHY-less device.
In u-boot source code, no need to specify PHY address TSEC1_PHY_ADDR for Tsec1 .
Thanks,
Yiping
Hi Yiping,
Yes, we use SGMII to connect to SFP.
But when I undefined TSEC1_PHY_ADDR, a compile error occurred on SET_STD_TSEC_INFO in function board_eth_init.
Do I need to skip all code related to access PHY?
Best Regards,
Doohan
Hi Doohan,
I am also having issue connecting the SFP directly to SGMII1. I get the link but no data pass through. Were you able to make it work?
Rajan
Hello Doohan,
You need to skip the code for PHY address assignment in SET_STD_TSEC_INFO.
Thanks,
Yiping