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
4,032 Views
Registered: ‎04-24-2017

ethernet adapter not found petalinux 2017.1

Jump to solution

I'm working on UltraZed-EG (Zynq UltraScale+ MPSoC based) and when I build, package and boot linux, the eth0 adapter is not visible with ifconfig -a.  The adapter does work with the out-of-the-box build, but I need to customise mine.

 

I believe the problem is something like this (ethernet adapter not getting added to the device tree correctly).  When I try the solutions there, I get the same result.  From my board's documentation Pg15, I believe I need to alter the device tree at gem3.  Based on the output of the out-of-the box build, the phyaddr should be 5, so I set reg accordingly giving me the following in /project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi.

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

Which after building gives me the following device tree in /components/plnx_workspace/device-tree-generation/plnx_aarch64-system.dts (full attached) 

ethernet@ff0e0000 {
			compatible = "cdns,zynqmp-gem";
			status = "okay";
			interrupt-parent = <0x4>;
			interrupts = <0x0 0x3f 0x4 0x0 0x3f 0x4>;
			reg = <0x0 0xff0e0000 0x0 0x1000>;
			clock-names = "pclk", "hclk", "tx_clk", "rx_clk";
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			#stream-id-cells = <0x1>;
			iommus = <0x7 0x877>;
			power-domains = <0xf>;
			clocks = <0x3 0x1f 0x3 0x34 0x3 0x30 0x3 0x34>;
			phy-mode = "rgmii-id";
			xlnx,ptp-enet-clock = <0x0>;
			local-mac-address = [00 0a 35 00 22 01];
			phy-handle = <0x10>;

			phy@5 {
				device_type = "ethernet-phy";
				reg = <0x5>;
				linux,phandle = <0x10>;
				phandle = <0x10>;
			};
		};

My problem is that I don't really understand what it is I'm (mis)configuring in the device tree.  As I understand it this is configuring the Ethernet adapter and its connection to the phy channel, from this linux should detect and initialize the device at boot up.

 

I'd appreciate any insight,

1 Solution

Accepted Solutions
Adventurer
Adventurer
6,338 Views
Registered: ‎04-24-2017

Re: ethernet adapter not found petalinux 2017.1

Jump to solution

I fixed it with the following in project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi (inspired by Avnet's git for uz3eg)

 

&gem3 {
	status = "okay";
	local-mac-address = [00 0a 35 00 02 90];
	phy-mode = "rgmii-id";
	phy-handle = <&phy0>;
	phy0: phy@5 {
		reg = <0x5>;
		ti,rx-internal-delay = <0x5>;
		ti,tx-internal-delay = <0x5>;
		ti,fifo-depth = <0x1>;
	};
};
2 Replies
Adventurer
Adventurer
6,339 Views
Registered: ‎04-24-2017

Re: ethernet adapter not found petalinux 2017.1

Jump to solution

I fixed it with the following in project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi (inspired by Avnet's git for uz3eg)

 

&gem3 {
	status = "okay";
	local-mac-address = [00 0a 35 00 02 90];
	phy-mode = "rgmii-id";
	phy-handle = <&phy0>;
	phy0: phy@5 {
		reg = <0x5>;
		ti,rx-internal-delay = <0x5>;
		ti,tx-internal-delay = <0x5>;
		ti,fifo-depth = <0x1>;
	};
};
Adventurer
Adventurer
2,599 Views
Registered: ‎04-24-2017

Re: ethernet adapter not found petalinux 2017.1

Jump to solution

For completeness, according to this they've changed the PHY address, so the following works:

 

&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>;
    };
};

Note 9 rather than 5