【FAQ】全志R329出现以太网使能报No phy found或Initialize hardware error怎么解决?
-
1.【问题现象】
执行ifconfig eth0 up命令,出现"No phy found"或"Initialize hardware error"异常log,有如下类似打印:
root@TinaLinux:/# ifconfig eth0 up [ 130.363159] libphy: gmac0: probed [ 130.366897] sunxi-gmac gmac0 eth0: No PHY found! ifconfig: SIOCSIFFLAGS: Invalid argument
root@TinaLinux:/# ifconfig eth0 up [ 30.109456] libphy: gmac0: probed [ 30.113921] sunxi-gmac gmac0 eth0: eth0: Type(7) PHY ID 0000ffff at 0 IRQ poll (gmac0-0:00) [ 30.133308] sunxi-gmac gmac0 eth0: Initialize hardware error
2.【问题分析】
- 出现"No phy found",常见原因是供给phy使用的25M时钟异常,导致phy工作不正常,gmac驱动通过mdio接口也读不到phy的设备信息;
- 出现"Initialize hardware error",一般是由于phy没有输出rx clk至mac控制器,导致mac控制器内部soft reset失败,常见原因是phy供电异常或25M时钟异常;
3.【排查步骤】
- 检查phy供电是否正常;
- 检查phy使用的25M时钟(Soc ephy25M或外部晶振)是否正常;
- 检查phy-mode是否按板级实际情况配置(mii/rmii/rgmii);
- 检查phy-rst引脚配置是否正确;
- 检查phy芯片的rx clk和tx clk引脚信号是否正常,若出现异常,需检查phy外围电路是否符合规范;
-
-
-
-
-
-
root@TinaLinux:/# ifconfig eth0 up [ 80.396133] libphy: 4500000.eth: probed [ 80.437613] sunxi-gmac 4500000.eth eth0: eth0: Type(7) PHY ID 001cc816 at 0 IRQ poll (4500000.eth-0:00) [ 80.508656] sunxi-gmac 4500000.eth eth0: Initialize hardware error root@TinaLinux:/#
-
root@TinaLinux:/# root@TinaLinux:/# root@TinaLinux:/# ifconfig eth0 up [ 13.062114] libphy: 4500000.eth: probed [ 13.092260] sunxi-gmac 4500000.eth eth0: eth0: Type(7) PHY ID 001cc816 at 0 IRQ poll (4500000.eth-0:00) root@TinaLinux:/# root@TinaLinux:/# root@TinaLinux:/# udhcpc -i eth0 udhcpc: started, v1.27.2 udhcpc: sending discover [ 16.296790] sunxi-gmac 4500000.eth eth0: Link is Up - 100Mbps/Full - flow control off [ 16.305630] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready udhcpc: sending discover udhcpc: sending select for 192.168.141.169 udhcpc: lease of 192.168.141.169 obtained, lease time 3599 udhcpc: ifconfig eth0 192.168.141.169 netmask 255.255.255.0 broadcast 192.168.141.255 udhcpc: setting default routers: 192.168.141.72 root@TinaLinux:/#
拖焊一下D1s搞定了.
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号