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!

Reply

Second Ethernet Port Not Working with Zynq and Petalinux

Accepted Solution Solved
Visitor
Posts: 11
Registered: ‎02-12-2015
Accepted Solution

Second Ethernet Port Not Working with Zynq and Petalinux

We are having trouble getting a second Ethernet port working with Zynq and Petalinux 2013.10. We are using two Marvell 88E1512 phys with a single MDIO bus. The device tree is attached (system.dts).

 

The output of ifconfig and kernel debug messages are attached (ifconfig_and_dmesg.txt). The MAC address and IP address for eth1 seem to be correct but the interface doesn’t say RUNNING. An outgoing ping on the eth1 subnet is redirected to the loopback interface instead of being transmitted on eth1.

 

We monitored the MDIO bus with a scope and determined that only requests to Phy address 0 are going out on the bus. Putting debug messages in xilinx_emacps.c we determined that of_find_mdio bus returns null for both phys, implying that it can’t find the existing bus. Note that the virtual addresses for phy0 and phy1 are different (e0920000 vs. e922000) which might explain why the messages for phy 1 are not sent out on the bus.

 

Any idea why we can't send requests to the second phy? Thank you for your help.


Accepted Solutions
Scholar
Posts: 425
Registered: ‎05-28-2013

Re: Second Ethernet Port Not Working with Zynq and Petalinux

I have not looked at recent versions linux/petalinux, so this information may not be correct anymore. However, this issue has come up a few times in the past on this forum, you may want to search back for them.

 

Since both PHYs are on a shared bus, you would want them together in the dts, like so:

 

		ps7_ethernet_0: ps7-ethernet@e000b000 {
			....
			mdio {
				#address-cells = <1>;
				#size-cells = <0>;
				phy0: phy@0 {
					compatible = "marvell,88e1116r";
					device_type = "ethernet-phy";
					reg = <0>;
				} ;
				phy1: phy@1 {
					compatible = "marvell,88e1116r";
					device_type = "ethernet-phy";
					reg = <1>;
				} ;
			} ;

 The second device uses phy-handle property to "link" to the actual PHY entry.

View solution in original post


All Replies
Scholar
Posts: 425
Registered: ‎05-28-2013

Re: Second Ethernet Port Not Working with Zynq and Petalinux

I have not looked at recent versions linux/petalinux, so this information may not be correct anymore. However, this issue has come up a few times in the past on this forum, you may want to search back for them.

 

Since both PHYs are on a shared bus, you would want them together in the dts, like so:

 

		ps7_ethernet_0: ps7-ethernet@e000b000 {
			....
			mdio {
				#address-cells = <1>;
				#size-cells = <0>;
				phy0: phy@0 {
					compatible = "marvell,88e1116r";
					device_type = "ethernet-phy";
					reg = <0>;
				} ;
				phy1: phy@1 {
					compatible = "marvell,88e1116r";
					device_type = "ethernet-phy";
					reg = <1>;
				} ;
			} ;

 The second device uses phy-handle property to "link" to the actual PHY entry.

Visitor
Posts: 11
Registered: ‎02-12-2015

Re: Second Ethernet Port Not Working with Zynq and Petalinux

Thank you for your response. Would you still have two ethernet entries (ps7_ethernet_0, ps7_ethernet_1) in the device tree, but the second ethernet entry would not include the mdio block?

Scholar
Posts: 425
Registered: ‎05-28-2013

Re: Second Ethernet Port Not Working with Zynq and Petalinux

Yes that is correct, it matches your hardware setup, one MDIO bus with both PHYs on it, attached to ps7_ethernet0.

Visitor
Posts: 11
Registered: ‎02-12-2015

Re: Second Ethernet Port Not Working with Zynq and Petalinux

I got it working, thank you very much for your help!

 

I had applied the patches in this thread, but I was still having the same problem:

http://forums.xilinx.com/t5/Embedded-Linux/zynq-linux-dual-emacps-gem-problem/td-p/263964

 

I didn't realize our device tree was wrong, it does make more sense that both phys would be under a single mdio. After applying the patches AND changing the device tree the second Ethernet port works.

Observer
Posts: 37
Registered: ‎05-04-2015

Re: Second Ethernet Port Not Working with Zynq and Petalinux

Hi,

 

Can you elaborate on which patches you applied from that thread?

 

I'm having the identical issue, but am using xilinx linux, and supposedly this patch had been incorporated into the mainline that I'm using. I have visually verified that this patch:

https://github.com/Xilinx/linux-xlnx/commit/2c5f2b5845f143faeb6aafd06db745af25adedf4#diff-71add37d9f86798e9c59c37708858558

 

has made it into the kernel that I'm using.

 

Thanks,

Charlie

Visitor
Posts: 11
Registered: ‎02-12-2015

Re: Second Ethernet Port Not Working with Zynq and Petalinux

Yes, that is the patch, but I also had to manually change the device tree because the generated version had two mdio elements instead of a shared mdio element.

Scholar
Posts: 1,180
Registered: ‎11-09-2013

Re: Second Ethernet Port Not Working with Zynq and Petalinux

wait do you say that linux (petalinux) works with 2 PHYs on PS MIO with PHY address 0 and 1?

 

petalinux 2015.4 non-patched seems to fail

Visitor
Posts: 11
Registered: ‎02-12-2015

Re: Second Ethernet Port Not Working with Zynq and Petalinux

After applying the patch and changing the device tree, yes. We're still on Petalinux 2013.10, I assume the patch has been incorporated since then.

Scholar
Posts: 1,180
Registered: ‎11-09-2013

Re: Second Ethernet Port Not Working with Zynq and Petalinux

I think it worked in 2014.1

 

in 2015.4 something is again broken so it seems..