cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
simozz
Scholar
Scholar
2,916 Views
Registered: ‎05-14-2017

petalinux 2018.3 - Cannot find device "eth0"

Jump to solution

I'm having problems to have the PHY ethernet eth0 device loaded into a Linux distro using UltraZed-EG.

From Vivado this is enabled through GEM3.

From <petalinux-prj-dir>/components/plnx_workspace/device-tree/device-tree/zynqmp.dtsi the gem3 is defined as follows:

		gem3: ethernet@ff0e0000 {
			compatible = "cdns,zynqmp-gem", "cdns,gem";
			status = "disabled";
			interrupt-parent = <&gic>;
			interrupts = <0 63 4>, <0 63 4>;
			reg = <0x0 0xff0e0000 0x0 0x1000>;
			clock-names = "pclk", "hclk", "tx_clk";
			#address-cells = <1>;
			#size-cells = <0>;
			#stream-id-cells = <1>;
			iommus = <&smmu 0x877>;
			power-domains = <&pd_eth3>;
		};

Following the instructions of the solution given at the following post

https://forums.xilinx.com/t5/Embedded-Linux/ethernet-adapter-not-found-petalinux-2017-1/td-p/772804

nothing changes.

So I simply tried to enable the gem3 device from <petalinux-prj-dir>/project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi by simply adding

&gem3 {
	status = "okay";
};

At boot time, GEM3 is detected:

Xilinx Zynq MP First Stage Boot Loader
Release 2018.3   Nov 21 2019  -  23:58:58
NOTICE:  ATF running on XCZU3EG/silicon v4/RTL5.1 at 0xfffea000
NOTICE:  BL31: Secure code at 0x0
NOTICE:  BL31: Non secure code at 0x8000000
NOTICE:  BL31: v1.5(release):xilinx-v2018.2-919-g08560c36
NOTICE:  BL31: Built : 10:20:34, Nov 22 2019
PMUFW:  v1.1


U-Boot 2018.01 (Nov 22 2019 - 11:28:01 +0000) Xilinx ZynqMP ZCU102 rev1.0

I2C:   ready
DRAM:  2 GiB
usb dr_mode not found
EL Level:       EL2
Chip ID:        zu3eg
MMC:   mmc@ff160000: 0 (eMMC), mmc@ff170000: 1 (SD)
SF: Detected n25q256a with page size 512 Bytes, erase size 128 KiB, total 64 MiB
In:    serial@ff000000
Out:   serial@ff000000
Err:   serial@ff000000
Board: Xilinx ZynqMP
Net:   ZYNQ GEM: ff0e0000, phyaddr ffffffff, interface rgmii-id
eth0: ethernet@ff0e0000
Hit any key to stop autoboot:  0
Device: mmc@ff160000
Manufacturer ID: 13

but then, after loading rootfs and just before booting I can see:

Configuring network interfaces... Cannot find device "eth0"

Complete boot stage is attached as txt file.

What's the right way to enable eth0 device ? Could someone suggest a solution ?

Thanks.

s.

 

0 Kudos
Reply
1 Solution

Accepted Solutions
shabbirk
Moderator
Moderator
2,853 Views
Registered: ‎12-04-2016

Hi @simozz 

Can you try adding this to project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi

&gem3 {
    status = "okay";
    local-mac-address = [00 0a 35 00 02 90];
    phy-mode = "rgmii-id";
    phy-handle = <&phy0>;
    phy0: phy@9 {
        reg = <0x9>;
        ti,rx-internal-delay = <0x5>;
        ti,tx-internal-delay = <0x5>;
        ti,fifo-depth = <0x1>;
    };
};

 

View solution in original post

10 Replies
shabbirk
Moderator
Moderator
2,912 Views
Registered: ‎12-04-2016

Hi @simozz 

Please check if you have CONFIG_XILINX_PHY enabled in petalinux-config -c kernel?

 

Best Regards

Shabbir

0 Kudos
Reply
simozz
Scholar
Scholar
2,899 Views
Registered: ‎05-14-2017

Hello @shabbirk ,

As far as I can see yes, it's enabled:

Screenshot_2019-11-22_13-05-16.pngScreenshot_2019-11-22_13-06-17.png

Screenshot_2019-11-22_13-29-51.png

0 Kudos
Reply
shabbirk
Moderator
Moderator
2,863 Views
Registered: ‎12-04-2016

Hi @simozz 

It looks from the uboot log that the PHY ID is either wrong or don't have a PHY node in your device tree.

 

 

Best Regards

Shabbir

simozz
Scholar
Scholar
2,858 Views
Registered: ‎05-14-2017

Hello @shabbirk,

I also tried setting

&gem3 {
       status = "okay";
       phy-handle = <&&phy0>;
       phy-mode = "rgmii-id";
       pinctrl-names = "default";
       pinctrl-0 = <&&pinctrl_gem3_default>;
       phy0: phy@9{
               reg = <9>;
               ti,rx-internal-delay = <0x8>;
               ti,tx-internal-delay = <0xa>;
               ti,fifo-depth = <0x1>;
               ti,rxctrl-strap-worka;
       };
};

but no way...

So how do I fix this ? Any keypoint ?

Setup is automatically generated by petalinux..

Regards,

s.

0 Kudos
Reply
shabbirk
Moderator
Moderator
2,854 Views
Registered: ‎12-04-2016

Hi @simozz 

Can you try adding this to project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi

&gem3 {
    status = "okay";
    local-mac-address = [00 0a 35 00 02 90];
    phy-mode = "rgmii-id";
    phy-handle = <&phy0>;
    phy0: phy@9 {
        reg = <0x9>;
        ti,rx-internal-delay = <0x5>;
        ti,tx-internal-delay = <0x5>;
        ti,fifo-depth = <0x1>;
    };
};

 

View solution in original post

simozz
Scholar
Scholar
2,843 Views
Registered: ‎05-14-2017

Thanks @shabbirk !

It works now :)

Regards,

s.

0 Kudos
Reply
2,715 Views
Registered: ‎07-23-2019

 

@shabbirk 

That could be my solution as well. when you say 'add' do you mean that on top of any other gem3 stuff?

Also, any reason for the 9 and 5 values?

phy0: phy@9 {
        reg = <0x9>;
        ti,rx-internal-delay = <0x5>;
        ti,tx-internal-delay = <0x5>;

 

0 Kudos
Reply
rani.feldman
Observer
Observer
2,216 Views
Registered: ‎01-06-2019

Hi,

For me it still does not work.

Here are my settings from system-user.dtsi

&gem0 {
    status = "okay";
    local-mac-address = [00 0a 35 00 1e 53];
    phy-handle = <&ethernet_phy_new>;
    ethernet_phy_new: ethernet-phy@0{
        compatible="marvell,88E1512";
        phy-mode = "rgmii-id";
        reg = <0>;
        ti,rx-internal-delay = <0x5>;
        ti,tx-internal-delay = <0x5>;
        ti,fifo-depth = <0x1>;
    };
            
}; 

I am using 2019.2

0 Kudos
Reply
oguzhanarm
Visitor
Visitor
1,741 Views
Registered: ‎07-17-2017

Hello simozz,

I'm using  ZCU-104. When I used solved Comment, the problem wasn't fixed. But when I added the below code to

/project-spec/meta-user/recipes-bsp/device-tree/system-user.dtsi, it is fixed. The PHY register and local mac address can be different in different boards.
 
&gem3 {
status = "okay";
local-mac-address = [00 0a 35 00 22 01];
phy-mode = "rgmii-id";
phy-handle = <&phy0>;
phy0: phy@c {
reg = <0xc>;
ti,rx-internal-delay = <0x8>;
ti,tx-internal-delay = <0xa>;
ti,fifo-depth = <0x1>;
};
};
0 Kudos
Reply
simozz
Scholar
Scholar
1,701 Views
Registered: ‎05-14-2017

Hi,

The device-tree code for the Ethernet PHY for my solution is taken from the bsp provided by AVnet, since I am using and basing my design on a UZED board.

I think ZCU-104 and others have their own bsp from Xilinx's website.

Regards,

s.

0 Kudos
Reply