UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Observer thburghout
Observer
3,947 Views
Registered: ‎10-27-2017

Zynq 7010: u-boot PHY is not detected

Jump to solution

Hi,

 

I've successfully flashed fsbl, u-boot, the kernel and a rootfs to my zynq-7010 board. Then the device is able to boot the linux kernel. Unfortunately I don't seem to be able to use the network.

 

Debug output of the FSBL does not give any clues on errors. U-boot does:

 

U-Boot 2017.01 (Nov 01 2017 - 14:20:58 +0100)

Board: Xilinx Zynq
DRAM:  ECC disabled 512 MiB
SF: Detected s25fl256s_64k with page size 256 Bytes, erase size 64 KiB, total 64 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   ZYNQ GEM: e000b000, phyaddr ffffffff, interface rgmii-id
PHY is not detected
GEM PHY init failed
No ethernet found.
U-BOOT for as7010

ZYNQ GEM: e000b000, phyaddr ffffffff, interface rgmii-id
mdio_register: non unique device name 'eth0'
ZYNQ GEM: e000b000, phyaddr ffffffff, interface rgmii-id
mdio_register: non unique device name 'eth0'
ZYNQ GEM: e000b000, phyaddr ffffffff, interface rgmii-id
mdio_register: non unique device name 'eth0'
ZYNQ GEM: e000b000, phyaddr ffffffff, interface rgmii-id
mdio_register: non unique device name 'eth0'
No ethernet found.
ZYNQ GEM: e000b000, phyaddr ffffffff, interface rgmii-id
mdio_register: non unique device name 'eth0'
Hit any key to stop autoboot:  0 
Zynq> 

The warning is expected, I did not save any configuration.

 

 

During Linux boot the following output is shown (filtered):

 

[...]
libphy: MACB_mii_bus: probed
macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 147 (00:0a:35:00:1e:53)
Generic PHY e000b000.etherne:00: attached PHY driver [Generic PHY] (mii_bus:phy_addr=e000b000.etherne:00, irq=-1)
e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[...]
Configuring network interfaces... IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
udhcpc (v1.24.1) started
Sending discover...
Sending discover...
Sending discover...
No lease, forking to background
done.
[...]
root@as7010:~# ping 108.177.119.139
PING 108.177.119.139 (108.177.119.139): 56 data bytes
ping: sendto: Network is unreachable
root@as7010:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0A:35:00:1E:53  
          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:147 Base address:0xb000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1%1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  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:1 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

root@as7010:~# 

Instead of the "Generic PHY" I was actually expecting something for the "Marvell 88E1011S" which we use. Also, running mii info in u-boot actually hangs the console, or resets the cpu...

 

Can somebody shed some light on this issue?

 

Thanks!

 

Thomas

 

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
Observer thburghout
Observer
6,073 Views
Registered: ‎10-27-2017

Re: Zynq 7010: u-boot PHY is not detected

Jump to solution
Okay, I've figured it out. It has something to do with the custom board I'm using. I was not informed of the fact that a custom gpio pin needs to be set to HIGH to even enable the ethernet peripheral.

Therefore the chances are minuscule that anyone else might have the same issue.
0 Kudos
6 Replies
Observer thburghout
Observer
3,906 Views
Registered: ‎10-27-2017

Re: Zynq 7010: u-boot PHY is not detected

Jump to solution

When using the jtag to boot the kernel while the original bare-metal firmware is loaded on the 7010 networking is available. The bare-metal firmware uses lwip to initializes the network devices. The boot log confirms this as well

Net:   ZYNQ GEM: e000b000, phyaddr ffffffff, interface rgmii-id
eth0: ethernet@e000b000
[...]
libphy: MACB_mii_bus: probed
macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 147 (00:0a:35:00:1e:53)
Marvell 88E1510 e000b000.etherne:00: attached PHY driver [Marvell 88E1510] (mii_bus:phy_addr=e000b000.etherne:00, irq=-1)
e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[...]
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
macb e000b000.ethernet eth0: link up (1000/Full)
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

I tried using a FSBL generated in the same manner as the original FSBL used with the bare metal firmware, with no luck. I'm unable to use the exact FSBL since it uses a custom partition table.

 

This leads me to think that the cause is not in the FSBL or BSP, contradicting various other sources: 

https://forums.xilinx.com/t5/Embedded-Linux/Problem-in-Ethernet-port-Zedboard/td-p/712705

https://forums.xilinx.com/t5/Xilinx-Boards-and-Kits/zc706-ethernet-does-not-work/td-p/347803

 

So why is U-boot and Linux unable to use the PHY? Even the leds don't work. Yet when using JTAG with the bare-metal firmware flashed on the board, everything is fine.

0 Kudos
Observer thburghout
Observer
3,900 Views
Registered: ‎10-27-2017

Re: Zynq 7010: u-boot PHY is not detected

Jump to solution

Also, in the same way with the bootloader (using JTAG over a flashed original image) mii provides way more information:

Zynq> mii info eth0
Zynq> mii info
PHY 0x00: OUI = 0x5043, Model = 0x1D, Rev = 0x01, 1000baseT, FDX
Zynq> mii dump eth0
0.     (ffff)                 -- PHY control register --
  (8000:8000) 0.15    =     1    reset
  (4000:4000) 0.14    =     1    loopback
  (2040:2040) 0. 6,13 =   b11    speed selection = 10 Mbps
  (1000:1000) 0.12    =     1    A/N enable
  (0800:0800) 0.11    =     1    power-down
  (0400:0400) 0.10    =     1    isolate
  (0200:0200) 0. 9    =     1    restart A/N
  (0100:0100) 0. 8    =     1    duplex = full
  (0080:0080) 0. 7    =     1    collision test enable
  (003f:003f) 0. 5- 0 =    63    (reserved)

What steps are needed to have it configured correctly?

Does it have anything to do with the BSP? I just noticed that the one used in Petalinux is vastly different from the one that the bare-metal firmware is using.

 

Thanks!

0 Kudos
Observer thburghout
Observer
3,841 Views
Registered: ‎10-27-2017

Re: Zynq 7010: u-boot PHY is not detected

Jump to solution
The custom board is based on the zedboard. Are there any ideas how to narrow the issue down?
0 Kudos
Observer thburghout
Observer
6,074 Views
Registered: ‎10-27-2017

Re: Zynq 7010: u-boot PHY is not detected

Jump to solution
Okay, I've figured it out. It has something to do with the custom board I'm using. I was not informed of the fact that a custom gpio pin needs to be set to HIGH to even enable the ethernet peripheral.

Therefore the chances are minuscule that anyone else might have the same issue.
0 Kudos
Adventurer
Adventurer
3,208 Views
Registered: ‎06-17-2016

Re: Zynq 7010: u-boot PHY is not detected

Jump to solution
Hi,
We have the same problem, how to figure it out?

Thank you,
Muuu
0 Kudos
Observer thburghout
Observer
3,196 Views
Registered: ‎10-27-2017

Re: Zynq 7010: u-boot PHY is not detected

Jump to solution

Hi,

 

I'm afraid that I won't be able to help you much. I have not spend any time on actually fixing this issue due to prioritization. I think I did find the cause of this issue, which is specific to our specific board.

 

Our board has an additional pin for powering off the ethernet hardware. This is powered off by default, the original firmware would check the configuration first before enabling ethernet. I did not know this when starting with petalinux. I think my issue would be resolved by adding the pin configuration to the device tree to set the appropriate pin to HIGH. Another option would be to adjust the FSBL to do this.

 

I validated this assumption by adjusting the pin with the command line. See http://www.wiki.xilinx.com/Linux+GPIO+Driver to find out how to do that. The ethernet hardware went online, but I wasn't able to use ethernet yet, I think this is caused by the wrong driver ("generic") being loaded at boot-time. Making sure that the pin is written first would probably resolve this.

 

Again, very specific for my issue. I hope this will help resolve yours.

 

Thomas

0 Kudos