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: 
Observer ingdb
Observer
1,677 Views
Registered: ‎09-20-2011

U-BOOT mii problems on 7Z015

Jump to solution

Hi everyone,

 

we did a PCB board based on a ZYNQ 7Z015. The baremetal test of ethernet were successfull, we could ping the board, no effects observed at all.

In the next step we were using petalinux to generate a u-boot project but we're having some problems with that.

In the boot console we see:

"Net: ZYNQ GEM: e000b000, phyaddr ffffffff, interface rgmii-id"

I am confused about a phyaddr of ffffffff.

When accessing the PHY over the U-boot mii tool all we got are '1' (see dump below)

 

It looks as if the PHY is not answering. I am assuming a device tree problem but why are baremetal tests working? We used generated code from XSDK with no changes.

 

 

For your reference here the complete console output:

 

 

 

U-Boot 2018.01 (Aug 03 2018 - 11:27:03 +0200) Xilinx Zynq ZC702

Board: Xilinx Zynq
Silicon: v3.1
I2C:   ready
DRAM:  ECC disabled 1 GiB
MMC:   sdhci@e0100000: 0 (SD)
SF: Detected n25q256a with page size 256 Bytes, erase size 4 KiB, total 32 MiB
*** Warning - bad CRC, using default environment

In:    serial@e0000000
Out:   serial@e0000000
Err:   serial@e0000000
Board: Xilinx Zynq
Silicon: v3.1
Net:   ZYNQ GEM: e000b000, phyaddr ffffffff, interface rgmii-id
eth0: ethernet@e000b000
U-BOOT for ZPFC_Petalinux_2

ethernet@e000b000 Waiting for PHY auto negotiation to complete...... done
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
BOOTP broadcast 4
BOOTP broadcast 5
BOOTP broadcast 6
BOOTP broadcast 7
BOOTP broadcast 8
BOOTP broadcast 9
BOOTP broadcast 10
BOOTP broadcast 11
BOOTP broadcast 12
BOOTP broadcast 13
BOOTP broadcast 14
BOOTP broadcast 15
BOOTP broadcast 16
BOOTP broadcast 17

Retry time exceeded
Hit any key to stop autoboot:  4  3 
Zynq> mii dump 0 0
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)


Zynq> mii info
PHY 0x0D: OUI = 0x80028, Model = 0x23, Rev = 0x01, 1000baseT, FDX

Thanks for any help

Matthias

 

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
Observer ingdb
Observer
1,482 Views
Registered: ‎09-20-2011

Re: U-BOOT mii problems on 7Z015

Jump to solution

found the problem, the phy register in the devictree was configured incorrectly.

0 Kudos
7 Replies
Moderator
Moderator
1,658 Views
Registered: ‎09-12-2007

Re: U-BOOT mii problems on 7Z015

Jump to solution

How did you build the uboot? did you use the Petalinux?

 

Looks like you didnt add the PHY node to the DT. Can you open the system-user.dtsi and add this to your GEM:

 

for example:

 

&gem1 {
        phy-handle = <&phy0>;
        phy0: phy0@1 {
                device_type = "ethernet-phy";
                reg = <1>;
        };
};

 

Explorer
Explorer
1,655 Views
Registered: ‎01-09-2012

Re: U-BOOT mii problems on 7Z015

Jump to solution
Observer ingdb
Observer
1,648 Views
Registered: ‎09-20-2011

Re: U-BOOT mii problems on 7Z015

Jump to solution

Hi Goran,

 

thanks for your help and yes, I guess the device tree is the culprit. 

I played around with various version of device tree, here's my best guess up to now:

&gem0 {
                phy-handle = <&phy0>;
                phy-mode = "rgmii-id";

                ps7_ethernet_0_mdio: mdio {
                #address-cells = <1>;
                #size-cells = <0>;
                                phy0: phy@13 {
                                                compatible = "ti,dp83867";
                                                device_type = "ethernet-phy";
                                                reg = <13>;
                                };
                };
};

The phyaddr is now as expected 0xd (13) but mii dump still only delivering ones :-(

 

cheers 

Matthias

0 Kudos
Observer ingdb
Observer
1,643 Views
Registered: ‎09-20-2011

Re: U-BOOT mii problems on 7Z015

Jump to solution

Hello Stephen,

 

yes I used petalinux.

 

I only added support for TI drivers in petalinux-config -c u-boot

 

regards

Matthias

0 Kudos
Observer ingdb
Observer
1,640 Views
Registered: ‎09-20-2011

Re: U-BOOT mii problems on 7Z015

Jump to solution

With some more googleing I found "working" device tree setting:

 

&gem0 {
  local-mac-address = [00 0a 35 00 c0 12];
  phy-handle = <&phy0>;
  phy-mode = "rgmii-id";
  
  mdio {
   #address-cells = <1>;
   #size-cells = <0>;
   phy0: phy@0 {
    compatible = "ti,dp83867", "ethernet-phy-ieee802.3-c22"; 
    ti,rx-internal-delay = <0x8>; 
    ti,tx-internal-delay = <0xa>; 
    ti,fifo-depth = <0x01>;
    device_type = "ethernet-phy";
    reg = <0>;
   } ;
  } ; 
};

 

 

 

 

0 Kudos
Highlighted
Observer ingdb
Observer
1,592 Views
Registered: ‎09-20-2011

Re: U-BOOT mii problems on 7Z015

Jump to solution

Unfortunately this was not the solution. I made a debug bug, my image.ub was not built with the new device tree. When using this modified device tree also for the kernel I got a crash:

 

Creating 4 MTD partitions on "spi0.0":
0x000000000000-0x000000500000 : "boot"
0x000000500000-0x000000520000 : "bootenv"
0x000000520000-0x000000fa0000 : "kernel"
0x000000fa0000-0x000002000000 : "spare"
libphy: Fixed MDIO Bus: probed
CAN device driver interface
libphy: MACB_mii_bus: probed
Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.14.0-xilinx-v2018.2 #1
Hardware name: Xilinx Zynq Platform
task: ef03f840 task.stack: ef040000
PC is at mdiobus_free.part.2+0x0/0x4
LR is at mdiobus_unregister+0x14/0x74
pc : [<c040ba60>]    lr : [<c040b7f4>]    psr: 20000013
sp : ef041e00  ip : 00000118  fp : ffffffed
r10: c7ddc4c0  r9 : ef13d010  r8 : 00000000
r7 : ef7f42f0  r6 : 00000000  r5 : c7ddf000  r4 : c7ddc000
r3 : 00000003  r2 : 00000004  r1 : 00000000  r0 : c7e1d400
Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
Control: 18c5387d  Table: 0000404a  DAC: 00000051
Process swapper/0 (pid: 1, stack limit = 0xef040210)
Stack: (0xef041e00 to 0xef042000)
1e00: c7ddc000 c7ddf000 00000000 ef7f42f0 00000000 c04171b8 ffffffff ef041e54
1e20: c081d84e c0227ed4 ef7f42f0 ef7f4760 c0414f98 00000001 00000001 00000002
1e40: c7e1a7e8 c7ce0b80 ef3a3780 c7cda740 00000000 00000000 00000001 00000001
1e60: 00000000 c04168e8 ef13d010 c0a1e070 00000000 c0a1e070 00000000 00000000
1e80: 00000000 c03b1914 ef13d010 c0a55d94 c0a55d98 c03b0458 ef13d010 ef13d044
1ea0: c0a1e070 c0a18bb0 00000000 c093cddc c093383c c03b0598 00000000 c0a1e070
1ec0: c03b051c c03aeca8 ef020758 ef1369b4 c0a1e070 ef0f8380 00000000 c03afad0
1ee0: c0814ca4 c0814ca5 00000000 c0a1e070 c0a3b9c0 c0933834 c091ae98 c03b0d1c
1f00: ffffe000 c0a3b9c0 c0933834 c0101a54 c081d2f1 efffcdd6 c0886000 00000000
1f20: 00000000 c0132df4 00000000 c08850f0 000000ce 00000006 00000006 c0886108
1f40: 000000cd c0886108 efffcdd6 00000000 c093383c 00000007 00000007 c0a3b9c0
1f60: c0933834 000000ce c0a3b9c0 c093383c 00000000 c0900da4 00000006 00000006
1f80: 00000000 c090059c 00000000 c0642854 00000000 00000000 00000000 00000000
1fa0: 00000000 c064285c 00000000 c01070f0 00000000 00000000 00000000 00000000
1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 ffffffff 00000000
[<c040ba60>] (mdiobus_free.part.2) from [<c040b7f4>] (mdiobus_unregister+0x14/0x74)
[<c040b7f4>] (mdiobus_unregister) from [<c04171b8>] (macb_probe+0x8d0/0xb54)
[<c04171b8>] (macb_probe) from [<c03b1914>] (platform_drv_probe+0x50/0x9c)
[<c03b1914>] (platform_drv_probe) from [<c03b0458>] (driver_probe_device+0x1ec/0x2b0)
[<c03b0458>] (driver_probe_device) from [<c03b0598>] (__driver_attach+0x7c/0xa8)
[<c03b0598>] (__driver_attach) from [<c03aeca8>] (bus_for_each_dev+0x7c/0x8c)
[<c03aeca8>] (bus_for_each_dev) from [<c03afad0>] (bus_add_driver+0x16c/0x1d4)
[<c03afad0>] (bus_add_driver) from [<c03b0d1c>] (driver_register+0xa0/0xe0)
[<c03b0d1c>] (driver_register) from [<c0101a54>] (do_one_initcall+0xfc/0x11c)
[<c0101a54>] (do_one_initcall) from [<c0900da4>] (kernel_init_freeable+0x188/0x1c8)
[<c0900da4>] (kernel_init_freeable) from [<c064285c>] (kernel_init+0x8/0x108)
[<c064285c>] (kernel_init) from [<c01070f0>] (ret_from_fork+0x14/0x24)
Code: e3a00001 e8bd8070 e1a00003 e8bd8070 (e7f001f2) 
---[ end trace 89ce94a6ad5f5043 ]---
Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

CPU1: stopping
CPU: 1 PID: 0 Comm: swapper/1 Tainted: G      D         4.14.0-xilinx-v2018.2 #1
Hardware name: Xilinx Zynq Platform
[<c010e894>] (unwind_backtrace) from [<c010aad0>] (show_stack+0x10/0x14)
[<c010aad0>] (show_stack) from [<c0631d48>] (dump_stack+0x80/0xa0)
[<c0631d48>] (dump_stack) from [<c010cff8>] (ipi_cpu_stop+0x3c/0x70)
[<c010cff8>] (ipi_cpu_stop) from [<c010d818>] (handle_IPI+0x64/0x84)
[<c010d818>] (handle_IPI) from [<c0101420>] (gic_handle_irq+0x84/0x90)
[<c0101420>] (gic_handle_irq) from [<c010b50c>] (__irq_svc+0x6c/0xa8)
Exception stack(0xef05ff80 to 0xef05ffc8)
ff80: 00000001 00000000 00000000 c0116880 00000000 00000000 ffffe000 c0a03c68
ffa0: c0a03cb4 413fc090 00000000 00000000 2eea0000 ef05ffd0 c0107afc c0107aec
ffc0: 60000113 ffffffff
[<c010b50c>] (__irq_svc) from [<c0107aec>] (arch_cpu_idle+0x1c/0x38)
[<c0107aec>] (arch_cpu_idle) from [<c0149438>] (do_idle+0xf8/0x1a8)
[<c0149438>] (do_idle) from [<c0149620>] (cpu_startup_entry+0x18/0x1c)
[<c0149620>] (cpu_startup_entry) from [<001016cc>] (0x1016cc)
---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b


0 Kudos
Observer ingdb
Observer
1,483 Views
Registered: ‎09-20-2011

Re: U-BOOT mii problems on 7Z015

Jump to solution

found the problem, the phy register in the devictree was configured incorrectly.

0 Kudos