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 mushihao
Observer
248 Views
Registered: ‎05-07-2019

Zynq eth0 doesn't work

Hi,

I am using xczu7ev with a customized board. We attached Marvell 88E1512 phy to PS gem2. I have set MDIO interface and GEM2 IO accordingly in vivado. After building petalinux, I am able to see eth0 existing, but I failed to ping other IPs in the same network or the other way around. There is no TX or RX packets. When booting, I am seeing phy addr is FFFFFF.

I searched for a few solution and thought it could be device tree issue, because we are using phy addr 1. In u-boot, I can do mii read/write through phy addr 1. So I added below to device tree and I can see phy addr shows as 1 during linux boot. However, I couldn't see eth0 any more by using eth0. Can anyone point me what is the right way to do it? Another ticket mentioned about setting schmitt trigger type in vivado, which didn't work in my side, either.

/include/ "system-conf.dtsi"
/ {
mdio {
#address-cells = <0x2>;
#size-cells = <0x2>;
reg = <0x0 0xff0d0000 0x0 0x1000>;
clock-names = "pclk", "hclk", "tx_clk"; /* Don't touch */
ethernet_phy0: ethernet-phy@0 {
device_type = "ethernet-phy";
reg = <1>;
};


};
};

 

Thanks!


&gem2 {
phy-handle = <&ethernet_phy0>;
};

 

Thanks,

Hao

0 Kudos
3 Replies
Moderator
Moderator
142 Views
Registered: ‎12-04-2016

Re: Zynq eth0 doesn't work

Hi @mushihao 

I have a few queries around this:

Could you please confirm what version of vivado/petalinux being used at your end? Are you using shared MDIO?

Did you try running Lwip echo server standalone test, just to ensure that the design is configured correctly?

Take a look into this forum thread on working device tree snippet:

https://forums.xilinx.com/t5/Embedded-Linux/How-to-solve-dual-Marvell-88e1512-PHY-Ethernet-problem-in/td-p/984844

 

Best Regards

Shabbir

 

0 Kudos
Xilinx Employee
Xilinx Employee
116 Views
Registered: ‎08-15-2018

Re: Zynq eth0 doesn't work

Hi @mushihao,

When the Linux Kernel boots, it takes the device tree and attempts to connect to the PHY which is listed in the DT. Based on the response back from the PHY, it then loads the appropriate driver Here we can see a successful probe of the PHY (in my case the ZCU102 on-board PHY at address 0x0c):

[    5.232490] TI DP83867 ff0e0000.ethernet-ffffffff:0c: attached PHY driver [TI DP83867] (mii_bus:phy_addr=ff0e0000.ethernet-ffffffff:0c, irq=POLL)

The PHY address actually comes after the string of f's. You can also see that it has correctly identified the PHY as a TI DP83867.

 

If you're not using a shared MDIO bus, I would recommend the following change to your device tree:

/include/ "system-conf.dtsi"
/ {
};

&gem2 {
status = "okay"; phy-handle = <&ethernet_phy1>;
ethernet_phy1: ethernet-phy@1 {
device_type = "ethernet-phy";
reg = <1>;
}; };

If you are sharing the MDIO bus, the device tree will be slightly different, and you may need a patch (both dependant on what version of the tools you're using).

 

Thanks,

Clayton

0 Kudos
Observer mushihao
Observer
83 Views
Registered: ‎05-07-2019

Re: Zynq eth0 doesn't work

Hi Shabbir,

I am not using shared MDIO. Only gem2 is enabled and 1 phy is connected to it. I haven't run the lwip echo server standalone test yet.

Thanks,

Hao

0 Kudos