STM 32 157 主板网卡1无法识别

STM 32 157 主板网卡1无法识别;如图;网卡2可以识别;

ifconfig eth0 192.168.5.19

[ 269.956770] stm32-dwmac 5800a000.ethernet eth0: no phy at addr -1
[ 269.961558] stm32-dwmac 5800a000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
SIOCSIFFLAGS: No such device
怎么都识别不了;eth1 到时都可以识别;
请问是什么问题导致

按这个帖子的描述,使用自己编译的系统,并烧录即可解决该问题;

你的也不能识别吗

1.092133] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[ 1.092939] fuse: init (API version 7.31)
[ 1.151872] NET: Registered protocol family 38
[ 1.151905] Key type asymmetric registered
[ 1.151918] Asymmetric key parser ‘x509’ registered
[ 1.152014] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[ 1.152031] io scheduler mq-deadline registered
[ 1.152043] io scheduler kyber registered
[ 1.162550] STM32 USART driver initialized
[ 1.164171] ar8035 phy init
[ 1.164646] the phy gpio failed
[ 1.186444] brd: module loaded
[ 1.201055] loop: module loaded
[ 1.207507] libphy: Fixed MDIO Bus: probed
[ 1.209458] CAN device driver interface
[ 1.212385] PPP generic driver version 2.4.2
[ 1.212747] PPP BSD Compression module registered

16.479472] [dhd-wlan0] wl_android_wifi_off : out
[ 16.484232] [dhd] dhd_stop: Exit wlan0
[ 16.487995] [dhd] dhd_open : the lock is released.
[ 16.492727] [dhd] dhd_open: Exit wlan0 ret=-1
[ 16.497181] [dhd] Failed to open primary dev ret -1
[ 16.503470] r8152 2-1.2:1.0 eth1: v1.10.11
[ OK ] Started Wait for Network to be Configured.

Eth1 可以识别

ifconfig -a 截图下呢,看看是不是有两个网卡。
有的话再ifconfig -eth0/1 up

1 个赞

后来通过usb 重新烧录 img 文件后,又可以读到eth0了,奇怪;

还没有来及测试这个命令,重新烧录img 文件,好了;

[root@100ask:~]# ifconfig eth0 192.168.5.23
[ 50.657854] stm32-dwmac 5800a000.ethernet eth0: no phy at addr -1
[ 50.662799] stm32-dwmac 5800a000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
SIOCSIFFLAGS: No such device
有出现 eth0不能识别了,啥原因哈,测试 ifconfig -eth0/1 up 都不行
[root@100ask:~]# ifconfig eth1 up
[root@100ask:~]# ifconfig eth0 up
[ 179.607097] stm32-dwmac 5800a000.ethernet eth0: no phy at addr -1
[ 179.611901] stm32-dwmac 5800a000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
SIOCSIFFLAGS: No such device
这么奇怪
而且在 uboot 里一次也不能ping 通过;有没有配置这个的文档?比如uboot 里的;
STM32MP> ping 192.168.5.15
Could not get PHY for ethernet@5800a000: addr 6
phy_connect() failedFAILED: 0Using ethernet@5800a000 device
我怀疑是不是 uboot 哪个文件没有配置好,导致,引脚不对?
主要这个eth0 默认是uboot 的网络测试口,eth0工作不正常,我不能在uboot里测试网络

steveszhang

[root@100ask:~]# ifconfig eth0 192.168.5.23
[ 50.657854] stm32-dwmac 5800a000.ethernet eth0: no phy at addr -1
[ 50.662799] stm32-dwmac 5800a000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
SIOCSIFFLAGS: No such device
有出现 eth0不能识别了,啥原因哈,测试 ifconfig -eth0/1 up 都不行
[root@100ask:~]# ifconfig eth1 up
[root@100ask:~]# ifconfig eth0 up
[ 179.607097] stm32-dwmac 5800a000.ethernet eth0: no phy at addr -1
[ 179.611901] stm32-dwmac 5800a000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
SIOCSIFFLAGS: No such device
这么奇怪
而且在 uboot 里一次也不能ping 通过;有没有配置这个的文档?比如uboot 里的;
STM32MP> ping 192.168.5.15
Could not get PHY for ethernet@5800a000: addr 6
phy_connect() failedFAILED: 0Using ethernet@5800a000 device
我怀疑是不是 uboot 哪个文件没有配置好,导致,引脚不对?

steveszhang

100ask_huang

1 天

还没有来及测试这个命令,重新烧录img 文件,好了;

回复

steveszhang

2

steveszhang

4 分钟

[root@100ask:~]# ifconfig eth0 192.168.5.23
[ 50.657854] stm32-dwmac 5800a000.ethernet eth0: no phy at addr -1
[ 50.662799] stm32-dwmac 5800a000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
SIOCSIFFLAGS: No such device
有出现 eth0不能识别了,啥原因哈,测试 ifconfig -eth0/1 up 都不行
[root@100ask:~]# ifconfig eth1 up
[root@100ask:~]# ifconfig eth0 up
[ 179.607097] stm32-dwmac 5800a000.ethernet eth0: no phy at addr -1
[ 179.611901] stm32-dwmac 5800a000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
SIOCSIFFLAGS: No such device
这么奇怪
而且在 uboot 里一次也不能ping 通过;有没有配置这个的文档?比如uboot 里的;
STM32MP> ping 192.168.5.15
Could not get PHY for ethernet@5800a000: addr 6
phy_connect() failedFAILED: 0Using ethernet@5800a000 device
我怀疑是不是 uboot 哪个文件没有配置好,导致,引脚不对?

image
感觉这个eth0的 gpio 初始化有问题,帮忙确认下;


请看启动kernel 后,出现 eth0 识别错误;stmmac_open 工作不正常;

需要 路由器来dhcp ,eth0 可以分配到地址了,观察几天看是否稳定;uboot 也可以了

老师,这个eth0还是不稳定;现在又读不到了;手动又不能设置,有什么办法

测试了一下,应该是复位,uboot网卡相关没有复位导致的。
如果是按复位按键重启,多半eth0用不了。
但如果是断电重启,eth0能正常启动。

关开关重启还是识别不了eth0;
只有重新烧录 all 的系统开机可以识别出来,关电源 开关后再次重启就识别不了eth0了(等于是只能用一次,下次开机eth0就不行了,只能重新烧录系统);错误提示如上;应该是mac 识别了,黄绿灯亮(phy也有),但是phy 这个芯片附加不了,是不是mac—phy----RJ45,中间mac到phy 不行,网络通不了?是否是时钟或GPIO 的问题;会不会设备树有冲突哈


只有重新烧录全部系统且第一次启动可以识别;只要关电源开关,重启就不行了;只要这里识别eth0,uboot 可以识别;就是为何第一次可以,且输入reboot 也可以,但是按reset或关开关启动就不行了,且以上也有这些报错,真是奇怪,关电源后上电就不行了;
如果是复位,可以写到驱动里自动复位?还有是不是要唤醒?
我这里不管是 断电重启,或按键reset 都不能识别eth0;难道 这两个键有中断?需要唤醒?上面有个wake up on lan supported?

不知道是否有新的进展 ; 是否测试好了?



eth0的驱动都可以,但是就是不能和PHY 通信;导致不能获得地址;
老师,如何解决?reset 和开关电源都不行;真是一个bug;