cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
11,170 Views
Registered: ‎05-31-2015

Zynq Ethernet Issues

Jump to solution

Hi all,

I have a Zybo Zynq 7000 where I am implementing a custom design in Vivado 2014.4. I am using a version of Ubuntu 12.04 from Xillybus as my Linux distrubution and am having problems getting the ethernet to work. 

 

Here is a snippet of my top level .dts with the relevant ethernet portion:

&gem0 {

	local-mac-address = [00 0a 35 00 00 00];

	phy-mode = "rgmii-id";

	status = "okay";

	xlnx,ptp-enet-clock = <0x6750918>;

	ps7_ethernet_0_mdio: mdio {

		#address-cells = <1>;

		#size-cells = <0>;

	};

here is the relevant ethernet portion from the zynq-7000.dtsi

gem0: ethernet@e000b000 {
                         compatible = "cdns,zynq-gem";
                         reg = <0xe000b000 0x1000>;
                         interrupts = <0 22 4>;
                         clocks = <&clkc 30>, <&clkc 30>, <&clkc 13>;
                         clock-names = "pclk", "hclk", "tx_clk";
                         #address-cells = <1>;
                         #size-cells = <0>;
                 };

When I do cd /sys/bus/platform/devices ls, an entry for ethernet shows up as "e000b000.ethernet" so it appears that it is recognizing the ethernet.

When I run ifconfig -a, the only thing displayed is the loopback address information. There is no other entry for an eth0 or anything else.

 

In my /etc/network/interfaces file, i have the following information (didn't post the actual address/netmask/gateway):

auto eth0

iface eth0 inet static

address xx.xx.xx.xx

netmask xx.xx.xx.xx

gateway xx.xx.xx.xx

dns-nameserver 8.8.8.8

 

When I do a  /etc/init.d/networking restart, I get the follwing:

"*Reconfiguring networking interfaces...

Cannot find device "eth0"

Failed to bring up eth0"

 

When I do an ifup eth0, I get the following:

"Cannot find device "eth0"

Failed to bring up eth0"

 

Just to add, on the board, the LINK and ACT leds next to the ethernet connector light up and blink when the board is powered up, suggesting that it is sending or receiving network traffic, but as I said I cannot connect to the internet.

 

Can anyone help identify my problem? If you need the output of any other commands or any other information, please let me know. I've tried browsing the forums and trying the suggested solutions from other threads with similar problems, but am not having any luck.

 

Thank you,
Chris

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Xilinx Employee
Xilinx Employee
19,407 Views
Registered: ‎07-01-2010

Re: Zynq Ethernet Issues

Jump to solution

@digicloud

 

Once you boot , can you try the command ifconfig to see if the eth0 is seen interface?

 

If the eth0 is seen, try setting the IP address to it by using the command ifconfig eth0 192.168.1.11 up.

 

As i expect the board and PC are connected through the ethernet cable, configure your PC IPV4 setting to 192.168.1.10 and the subnet.

 

If all this is fine, try to ping using the command ping 192.168.1.10 and see what happens.

 

If you are not able to work with above steps, you may have to verify the dts settings etc.

 

I see the compatiable PHY details missing in the device-tree.

example device-tree for eth0:

&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 = "marvell,88e1116r";
    device_type = "ethernet-phy";
    reg = <0>;
   } ;
  } ; 
};

 

Hope this helps.

 

Regards,

Achutha

---------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------

View solution in original post

4 Replies
Highlighted
Xilinx Employee
Xilinx Employee
11,119 Views
Registered: ‎08-01-2008

Re: Zynq Ethernet Issues

Jump to solution
You cant try this example design
http://www.xilinx.com/support/answers/51616.html
Thanks and Regards
Balkrishan
--------------------------------------------------------------------------------------------
Please mark the post as an answer "Accept as solution" in case it helped resolve your query.
Give kudos in case a post in case it guided to the solution.
0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
19,408 Views
Registered: ‎07-01-2010

Re: Zynq Ethernet Issues

Jump to solution

@digicloud

 

Once you boot , can you try the command ifconfig to see if the eth0 is seen interface?

 

If the eth0 is seen, try setting the IP address to it by using the command ifconfig eth0 192.168.1.11 up.

 

As i expect the board and PC are connected through the ethernet cable, configure your PC IPV4 setting to 192.168.1.10 and the subnet.

 

If all this is fine, try to ping using the command ping 192.168.1.10 and see what happens.

 

If you are not able to work with above steps, you may have to verify the dts settings etc.

 

I see the compatiable PHY details missing in the device-tree.

example device-tree for eth0:

&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 = "marvell,88e1116r";
    device_type = "ethernet-phy";
    reg = <0>;
   } ;
  } ; 
};

 

Hope this helps.

 

Regards,

Achutha

---------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------

View solution in original post

Highlighted
Visitor
Visitor
11,031 Views
Registered: ‎05-31-2015

Re: Zynq Ethernet Issues

Jump to solution

@achutha,

When I run ifconfig, there is no eth0 displayed, only the loopback. Over the course of my troubleshooting, I have been able to get eth0 to appear in the ifconfig command a few times by manually adding the information to the /etc/network/interfaces file and performing a networking restart. But even in those cases, I did not have internet connectivity. As of late, I can't get it to appear in the ifconfig at all anymore, even with the networking interfaces file manually edited so I'm not sure what the cause is. I believe the issue is with my device tree, so I'll try appending the information you posted below.

I'll let you know how it goes, thanks for the help!

Chris

0 Kudos
Highlighted
Visitor
Visitor
11,015 Views
Registered: ‎05-31-2015

Re: Zynq Ethernet Issues

Jump to solution

Resolved the issue, ethernet is now working. Just had to make some modifications to my device tree as you said and it did the trick. Thanks for the help!

0 Kudos