LS1012A U-Boot PHY auto-negotiation issue with LSDKv21.08

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

LS1012A U-Boot PHY auto-negotiation issue with LSDKv21.08

跳至解决方案
2,671 次查看
kkrambo
Contributor III

I'm experiencing a problem where U-Boot cannot ping because the PHY auto-negotiation has not occurred and/or times-out.  This problem started when I created a new build based upon LSDKv21.08.  My previous build based on LSDKv20.04 still works fine.

My board is a custom board modeled after the LS1012A-FRWY and LS1012A-RDB.  My board has MAC0 using an SGMII interface to the Atheros PHY for pfe_eth0.  I also have MAC1 using an RGMII interface, phy-less/fixed to another microcontroller but I'm not even trying to use this pfe_eth1 interface from U-Boot yet.  The ping problem is with pfe_eth0.

I have added some printf statements to the code to show how LSDKv21.08 behaves differently from LSDKv20.04.  The ethaddr, ipaddr, and ethact environment variables are set appropriately.

When I ping from LSDKv20.04 U-Boot 2019.10, I get this successful output:

Hit any key to stop autoboot:  0
=> ping 192.168.2.10
genphy_update_link() mii_reg = 0x0000796d
genphy_update_link() phydev->link = 0
genphy_update_link() phydev->autoneg = 1
genphy_update_link() autoneg already complete, reading link second time
Speed detected 3e8
Using pfe_eth0 device
host 192.168.2.10 is alive
=> ping 192.168.2.2
genphy_update_link() mii_reg = 0x0000796d
genphy_update_link() phydev->link = 1
genphy_update_link() phydev->autoneg = 1
genphy_update_link() return success because link up and BMSR_LSTATUS set
Speed detected 3e8
Using pfe_eth0 device
host 192.168.2.2 is alive

When I ping from LSDKv21.08 U-Boot 2021.04, I get this failed output:

Hit any key to stop autoboot:  0
=> ping 192.168.2.2
genphy_update_link() mii_reg = 0x0000794d
genphy_update_link() phydev->link = 0
genphy_update_link() phydev->autoneg = 1
pfe_eth0 Waiting for PHY auto negotiation to complete......... TIMEOUT !
Could not initialize PHY pfe_eth0
ping failed; host 192.168.2.2 is not alive
=> ping 192.168.2.10
genphy_update_link() mii_reg = 0x0000794d
genphy_update_link() phydev->link = 0
genphy_update_link() phydev->autoneg = 1
pfe_eth0 Waiting for PHY auto negotiation to complete......... TIMEOUT !
Could not initialize PHY pfe_eth0
ping failed; host 192.168.2.10 is not alive

Notice that with the LSDKv20.04 build, that the BMSR_ANEGCOMPLETE bit is set during initialization and auto-negotiation doesn't need to be performed for the ping.  But with the LSDKv21.08 build BMSR_ANEGCOMPLETE does not get set during initialization so auto-negotiation is attempted but times-out.

How do I fix this problem where PHY auto-negotiation is failing on my LSDKv21.08 U-Boot build?

 

标记 (2)
0 项奖励
1 解答
2,635 次查看
yipingwang
NXP TechSupport
NXP TechSupport
0 项奖励
3 回复数
2,665 次查看
yipingwang
NXP TechSupport
NXP TechSupport

This is a know issue addressed in LSDK 21.08 user manual, please refer to the following.

yipingwang_0-1645083375984.png

The development team has not provided fix so far.

I will discuss this problem with SE team, will provide feedback later.

0 项奖励
2,636 次查看
yipingwang
NXP TechSupport
NXP TechSupport
0 项奖励
2,590 次查看
kkrambo
Contributor III

I applied this patch and this fix works for me.  U-Boot can ping successfully now.  Thank you.

0 项奖励