cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
tayloral
Adventurer
Adventurer
5,273 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
tayloral
Adventurer
Adventurer
7,579 Views
Registered: ‎04-24-2017

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

View solution in original post

4 Replies
tayloral
Adventurer
Adventurer
7,580 Views
Registered: ‎04-24-2017

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

View solution in original post

tayloral
Adventurer
Adventurer
3,840 Views
Registered: ‎04-24-2017

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

rani.feldman
Observer
Observer
950 Views
Registered: ‎01-06-2019

Hi,

For me it still does not work.

This is my settings in 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 also followed the kernel configurations.

I am using 2019.2 version

0 Kudos
Reply
vchc
Visitor
Visitor
853 Views
Registered: ‎05-27-2019

You should use:

compatible="marvell,88e1510";

0 Kudos
Reply