cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Observer
Observer
366 Views
Registered: ‎05-25-2020

Ethernet cannot ping on custom board

kernel version: 4.19
zynqmp, XAZU3EG-1SFVC784I
vivado 2019.1
petalinux 2019.1
phy AR8031


log about phy:

 

ZYNQ GEM: ff0d0000, phyaddr ffffffff, interface sgmii
mdio_register: non unique device name 'eth0'
ZYNQ GEM: ff0d0000, phyaddr ffffffff, interface sgmii
mdio_register: non unique device name 'eth0'
ZYNQ GEM: ff0d0000, phyaddr ffffffff, interface sgmii
mdio_register: non unique device name 'eth0'
ZYNQ GEM: ff0d0000, phyaddr ffffffff, interface sgmii
mdio_register: non unique device name 'eth0'
No ethernet found.
root@demo_0513:~# dmesg|grep phy
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] arch_timer: cp15 timer(s) running at 33.33MHz (phys).
[ 2.931976] libphy: Fixed MDIO Bus: probed
[ 3.609921] libphy: MACB_mii_bus: probed
[ 3.617015] Generic PHY ff0d0000.ethernet-ffffffff:01: attached PHY driver [Generic PHY] (mii_bus:phy_addr=ff0d0000.ethernet-ffffffff:01, irq=POLL)
root@demo_0513:~# dmesg|grep eth
[ 0.000000] psci: probing for conduit method from DT.
[ 2.965876] usbcore: registered new interface driver cdc_ether
[ 3.602318] macb ff0d0000.ethernet: Not enabling partial store and forward
[ 3.617015] Generic PHY ff0d0000.ethernet-ffffffff:01: attached PHY driver [Generic PHY] (mii_bus:phy_addr=ff0d0000.ethernet-ffffffff:01, irq=POLL)
[ 3.630233] macb ff0d0000.ethernet eth0: Cadence GEM rev 0x50070106 at 0xff0d0000 irq 29 (00:0a:35:00:22:01)
[ 5.899070] macb ff0d0000.ethernet: gem-ptp-timer ptp clock registered.
[ 5.905843] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

 

In linux , can see the eth0 but cannot ping the pc ip.

 

# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0A:35:00:22:01
inet addr:192.168.10.21 Bcast:192.168.10.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:29

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:81 errors:0 dropped:0 overruns:0 frame:0
TX packets:81 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:9072 (8.8 KiB) TX bytes:9072 (8.8 KiB)

 


In uboot , use ZynqMP> mii info , shows nothing .

In vivado , created lwip echo server project ,and test in board

 

shows :
-----lwIP TCP echo server ------
TCP packets sent to port 6001 will be echoed back
Start PHY autonegotiation

 

 

How to resolve this issue ?  I got a similar topic :https://forums.xilinx.com/t5/Embedded-Linux/Zynq-7010-u-boot-PHY-is-not-detected/m-p/804993#M22499

the solution is :a custom gpio pin needs to be set to HIGH to even enable the ethernet peripheral.   I don't understand where to set gpio?

I tried to modified the system-user.dtsi:

 

&gem2 {
    status = "okay";
    phy-mode = "sgmii-id";
    phy-handle = <&phy0>;
	phy-reset-gpio = <&gpio 40 0>;
	phy-reset-active-low;
    phy0: ethernet-phy@0 {
        reg = <0>;
        compatible = "athros,ar8031";
        device_type = "ethernet-phy";
    };
};

 

After linux booting up , I cannot find the eth0 device .

Board: Xilinx ZynqMP
DRAM:  2 GiB
EL Level:	EL2
Chip ID:	zu2eg
MMC:   mmc@ff160000: 0, mmc@ff170000: 1
Loading Environment from FAT... *** Warning - bad CRC, using default environment

In:    serial@ff000000
Out:   serial@ff000000
Err:   serial@ff000000
Board: Xilinx ZynqMP
Bootmode: SD_MODE1
Reset reason:	EXTERNAL 
Net:   No ethernet found.
U-BOOT for demo

No ethernet found.
Hit any key to stop autoboot:  0 
Device: mmc@ff160000
Manufacturer ID: 11
OEM: 100
Name: 016G3 
Bus Speed: 52000000
Mode : MMC High Speed (52MHz)
Rd Block Len: 512
MMC version 5.1
High Capacity: Yes
Capacity: 14.7 GiB
Bus Width: 4-bit
Erase Group Size: 512 KiB
HC WP Group Size: 4 MiB
User Capacity: 14.7 GiB WRREL
Boot Capacity: 4 MiB ENH
RPMB Capacity: 4 MiB ENH
17596488 bytes read in 1288 ms (13 MiB/s)
## Loading kernel from FIT Image at 10000000 ...
   Using 'conf@system-top.dtb' configuration
   Trying 'kernel@1' kernel subimage
     Description:  Linux kernel
     Type:         Kernel Image
     Compression:  uncompressed
     Data Start:   0x100000f8
     Data Size:    17564160 Bytes = 16.8 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x00080000
     Entry Point:  0x00080000
     Hash algo:    sha1
     Hash value:   64699953087ff2f90ffe0851b12aa3d3f76d216d
   Verifying Hash Integrity ... sha1+ OK
## Loading fdt from FIT Image at 10000000 ...
   Using 'conf@system-top.dtb' configuration
   Trying 'fdt@system-top.dtb' fdt subimage
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x110c03fc
     Data Size:    30422 Bytes = 29.7 KiB
     Architecture: AArch64
     Hash algo:    sha1
     Hash value:   ea62aaf67f7af3a9697a0766438822e97ded01d9
   Verifying Hash Integrity ... sha1+ OK
   Booting using the fdt blob at 0x110c03fc
   Loading Kernel Image ... OK
   Loading Device Tree to 0000000007ff5000, end 0000000007fff6d5 ... OK

Starting kernel ...

 

# dmesg |grep eth0
# dmesg|grep phy
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] arch_timer: cp15 timer(s) running at 33.33MHz (phys).
[    2.926971] libphy: Fixed MDIO Bus: probed
[    3.604954] libphy: MACB_mii_bus: probed

 

 

Thank you.

ar8031.jpg
gem2.jpg
zynq.jpg
mio76-77.jpg
0 Kudos
3 Replies
Highlighted
Explorer
Explorer
296 Views
Registered: ‎04-13-2020

@joneylixm 你的要是解决了分享一下呗 ,我的解决了也告诉你下

0 Kudos
Highlighted
Observer
Observer
291 Views
Registered: ‎05-25-2020

ok
0 Kudos
Highlighted
Observer
Observer
251 Views
Registered: ‎01-03-2018

&gem2 { status = "okay"; phy-mode = "sgmii-id"; phy-handle = <&phy0>; phy-reset-gpio = <&gpio 40 0>; phy-reset-active-low; phy0: ethernet-phy@0 { reg = <0>; compatible = "athros,ar8031"; device_type = "ethernet-phy"; }; };

用了复位,在vivado 把设置引脚去掉或者在设备树上用一个错误的引脚

我这是用复位就不行

0 Kudos