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 ian@lang
Observer
469 Views
Registered: ‎01-11-2019

Zynq/GMII2RGMII not recognised

Jump to solution

I have been trying for some considerable time to get this Gigabit Ethernet module - http://www.knowres.ch/products/kr-lan-a1/ - connected to this Zynq board - http://www.knowres.ch/products/krm-3z030-768/ - via this carrier - http://www.knowres.ch/products/krc3600-carrier-kit-2/ working but without success, so I've decided to try to get help on this forum. 

My Zynq system is as follows: 

 Screenshot from 2019-08-24 19-34-20.png

I am using both Ethernets on the Zynq, the first via MIO and the second, the problematic one, via EMIO.  The second PHY reset is controllable from an AXI writeable register which also generates a low going pulse automatically after power up. The gmii_to_rgmii IP is configured thus: 

 Screenshot from 2019-08-24 20-03-46.png

I can confirm the presence of the two PHYs over the mdio from u-boot: 

Zynq> mdio list 

eth0: 

0 - Marvell 88E1518 <--> ethernet@e000b000 

eth1: 

7 - Marvell 88E1118R <--> ethernet@e000c000 

 

And I can write to the register in the gmii to rgmii: 

Zynq> mii device eth1
Zynq> mii read 0xa 10
0000
Zynq> mii write 0xa 10 0x0040
Zynq> mii read 0xa 10
0040

I've tried many variations of device tree, system-user.dtsi, and here is my current best effort: 

 

&gem1 { 

       phy-handle = <&phy1>; 

       gmii2rgmii-phy-handle = <&gmiitorgmii>; 

       phy-mode = "rgmii-rxid"; 

       status = "okay"; 

       xlnx,has-mdio = <0x1>; 

       ps7_ethernet_1_mdio: mdio { 

                                 phy1: phy@7 { 

                                             compatible = "marvell,88e1118r"; 

                                             device_type = "ethernet-phy"; 

                                             reg = <7>; 

                                             }; 

                                 gmiitorgmii: gmiitorgmii@10 { 

                                             compatible = "xlnx,gmii-to-rgmii-4.0"; 

                                             reg = <10>; 

                                             phy-handle = <&phy1>; 

                                             }; 

                                 }; 

       }; 

 

In u-boot I see: 

 

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

eth0: ethernet@e000b000ZYNQ GEM: e000c000, phyaddr 7, interface rgmii-rxid 

  

Warning: ethernet@e000c000 (eth1) using random MAC address - 06:94:9d:e4:74:ca 

, eth1: ethernet@e000c000 

U-BOOT for os 

 

ethernet@e000b000 Waiting for PHY auto negotiation to complete...... done 

 

And then: 

 

Marvell 88E1510 e000b000.ethernet-ffffffff:00: attached PHY driver [Marvell 88E1510] (mii_bus:phy_addr=e000b000.ethernet-ffffffff:00, irq=POLL) 

macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 28 (00:0a:35:00:22:01) 

libphy: MACB_mii_bus: probed 

xgmiitorgmii e000c000.ethernet-ffffffff:0a: Couldn't find phydev 

macb: probe of e000c000.ethernet failed with error -16 

e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k 

So it appears that the gmii to rgmii is not getting initialised and this is indeed confirmed when I try to ping from u-boot.  However, if I write to the register inside the gmii to rgmii, ping comes to life: 

Zynq> mii device eth1 

Zynq> ping 192.168.0.143 

Using ethernet@e000c000 device 

  

Abort 

ping failed; host 192.168.0.143 is not alive 

Zynq> 

Zynq> mii device eth1 

Zynq> mii write 0xa 10 0x0040 

Zynq> ping 192.168.0.143 

Using ethernet@e000c000 device 

host 192.168.0.143 is alive 

However, upon booting to Linux, even after writing this register, I see no sign of eth1:  

root@os:~# ifconfig 

eth0      Link encap:Ethernet  HWaddr 00:0A:35:00:22:01 

          inet addr:192.168.0.59  Bcast:192.168.0.255  Mask:255.255.255.0 

          inet6 addr: 2a02:8388:6901:c300:20a:35ff:fe00:2201/64 Scope:Global 

          inet6 addr: fe80::20a:35ff:fe00:2201/64 Scope:Link 

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1 

          RX packets:5 errors:0 dropped:0 overruns:0 frame:0 

          TX packets:22 errors:0 dropped:0 overruns:0 carrier:0 

          collisions:0 txqueuelen:1000 

          RX bytes:1456 (1.4 KiB)  TX bytes:3316 (3.2 KiB) 

          Interrupt:28 Base address:0xb000 

  

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: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) 

  

root@os:~# 

So I think I really am very close to getting the second ethernet running.  However, I've been struggling with it for a considerable time now and I'm beginning to run out of ideas.  Som I'm really hoping that somebody can suggest a way forwards. 

0 Kudos
1 Solution

Accepted Solutions
Observer ian@lang
Observer
213 Views
Registered: ‎01-11-2019

Re: Zynq/GMII2RGMII not recognised

Jump to solution

I received no replies to this thread, which is why I re-worded and re-posted the thread here:  https://forums.xilinx.com/t5/Ethernet/Gmii-to-Rgmii-driver/m-p/1041756/highlight/false#M17305.  However, if you find yourself here with the same problem I had, please follow the link, where you might find something more helpful.

Ian Lang

View solution in original post

0 Kudos
1 Reply
Observer ian@lang
Observer
214 Views
Registered: ‎01-11-2019

Re: Zynq/GMII2RGMII not recognised

Jump to solution

I received no replies to this thread, which is why I re-worded and re-posted the thread here:  https://forums.xilinx.com/t5/Ethernet/Gmii-to-Rgmii-driver/m-p/1041756/highlight/false#M17305.  However, if you find yourself here with the same problem I had, please follow the link, where you might find something more helpful.

Ian Lang

View solution in original post

0 Kudos