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: 
Adventurer
Adventurer
8,138 Views
Registered: ‎04-23-2014

No Ethernet in PetaLinux 2017.1

Jump to solution

After upgrading to PataLinux 2017.1 no ethernet devices are detected on my Zynq Ultrascale+ board. Typing ifconfig -a after boot prints:

 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1%4879712/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:1 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

sit0      Link encap:IPv6-in-IPv4  
          NOARP  MTU:1480  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:1 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

The only ethernet related log message during boot that I can find is (see attachment for full log):

 

[    3.120349] libphy: MACB_mii_bus: probed

No errors are logged. I thought that this is probably a device tree problem, but the device tree is very similar to the working device tree from 2016.4. The current device tree contains:

 

        ethernet@ff0c0000 {
            compatible = "cdns,zynqmp-gem";
            status = "okay";
            interrupt-parent = <0x4>;
            interrupts = <0x0 0x3b 0x4 0x0 0x3b 0x4>;
            reg = <0x0 0xff0c0000 0x0 0x1000>;
            clock-names = "pclk", "tx_clk", "hclk";
            #address-cells = <0x1>;
            #size-cells = <0x0>;
            #stream-id-cells = <0x1>;
            iommus = <0x7 0x875>;
            power-domains = <0xd>;
            clocks = <0x3 0x2e 0x3 0x2e 0x3 0x32>;
            phy-mode = "rgmii-id";
            xlnx,ptp-enet-clock = <0x0>;
            local-mac-address = [00 0a 35 00 22 01];
        };

 

The device tree from the working 2016.4 configuration looked like this:

 

        ethernet@ff0c0000 {
            compatible = "cdns,zynqmp-gem";
            status = "okay";
            interrupt-parent = <0x2>;
            interrupts = <0x0 0x3b 0x4 0x0 0x3b 0x4>;
            reg = <0x0 0xff0c0000 0x0 0x1000>;
            clock-names = "pclk", "hclk", "tx_clk";
            #address-cells = <0x1>;
            #size-cells = <0x0>;
            #stream-id-cells = <0x1>;
            iommus = <0x6 0x875>;
            power-domains = <0xe>;
            clocks = <0xd 0xd 0xd>;
            phy-mode = "rgmii-id";
            xlnx,ptp-enet-clock = <0x0>;
            linux,phandle = <0x1f>;
            phandle = <0x1f>;
        };

 

I double checked that the driver is compiled into the kernel (I'm using the default configuration anyway).

 

Any help is welcome.

0 Kudos
1 Solution

Accepted Solutions
Adventurer
Adventurer
13,431 Views
Registered: ‎04-23-2014

Re: No Ethernet in PetaLinux 2017.1

Jump to solution

I solved it by manually configuring the PHY in the device tree. I added the following to my system-user.dsi:

 

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

I'm just wondering why PetaLinux 2016.4 was fine without that.

View solution in original post

0 Kudos
7 Replies
Adventurer
Adventurer
13,432 Views
Registered: ‎04-23-2014

Re: No Ethernet in PetaLinux 2017.1

Jump to solution

I solved it by manually configuring the PHY in the device tree. I added the following to my system-user.dsi:

 

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

I'm just wondering why PetaLinux 2016.4 was fine without that.

View solution in original post

0 Kudos
Adventurer
Adventurer
8,051 Views
Registered: ‎11-30-2015

Re: No Ethernet in PetaLinux 2017.1

Jump to solution

I've the same problem with a Zynq mmp board.

Work perfectly with petalinux 2016.4 but now phy is not dectected with petalinux 2017.1 and have the following message at U-boot:

 

U-Boot 2017.01 (May 11 2017 - 12:41:12 +0200)

Board: Xilinx Zynq
DRAM: ECC disabled 1 GiB
MMC: sdhci@e0100000: 0 (SD)
SF: Detected s25fl128s_64k with page size 512 Bytes, erase size 128 KiB, total 32 MiB
*** Warning - bad CRC, using default environment

## Error: flags type check failure for "serverip" <= "AUTO" (type: i)
himport_r: can't insert "serverip=AUTO" into hash table
In: serial
Out: serial
Err: serial
Net: ZYNQ GEM: e000b000, phyaddr ffffffff, interface rgmii-id
eth0: ethernet@e000b000ZYNQ GEM: e000c000, phyaddr ffffffff, interface gmii
PHY is not detected
GEM PHY init failed

 

Could you be more precise about your solution.

Is it in the pl.dtsi that you add your patch?

Do you work with MACB Ethernet 0 or MACB Ethernet 1?

 

Thank you

 

0 Kudos
Adventurer
Adventurer
8,048 Views
Registered: ‎04-23-2014

Re: No Ethernet in PetaLinux 2017.1

Jump to solution

hi fredb@comex

 

I added that to project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi

 

The value of reg should be set to the PHY address, which is 1 in my case, but this depends on the board. I got this address by looking at how the config pins of the phy chip are wired up in the schematics of my board.

0 Kudos
Adventurer
Adventurer
8,030 Views
Registered: ‎11-30-2015

Re: No Ethernet in PetaLinux 2017.1

Jump to solution

Not working for me...

Always give me a syntax error during petalinux build at device tree generation.

 

If you can check the attachment file, I will appreciate (I use gem0 in my design) but it seems that zynq ultrascale compilation is different from mine with a "simple" zynq component.

 

Thanks again

 

 

 

 

0 Kudos
Adventurer
Adventurer
8,011 Views
Registered: ‎04-23-2014

Re: No Ethernet in PetaLinux 2017.1

Jump to solution

I can't see a syntax error in the file you provided. What exactly is the error? Maybe the ethernet is not called gem0 or there is already a phy0 defined.

0 Kudos
Adventurer
Adventurer
7,918 Views
Registered: ‎11-30-2015

Re: No Ethernet in PetaLinux 2017.1

Jump to solution

Hi

Finally, someone else () give me the correct configuration for my application.

The system-user file must have the following lines added: 

 

&gem0 {
        phy-handle = <&phy0>;
        phy0: phy@0 {
        compatible = "marvell,88e1510";
                device_type = "ethernet-phy";
                reg = <0x0>;
        marvell,reg-init = <0x3 0x10 0xff00 0x1e 0x3 0x11 0xfff0 0xa>;
        };
};

 

Thank you again for the information.

 

 

0 Kudos
Newbie peanut
Newbie
806 Views
Registered: ‎11-30-2018

Re: No Ethernet in PetaLinux 2017.1

Jump to solution

Where did you modify the device tree? What is the order? Thank you! Looking forward to your reply!

0 Kudos