11-22-2019 03:44 AM
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.
11-22-2019 05:56 AM
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>; }; };
11-22-2019 03:49 AM
Hi @simozz
Please check if you have CONFIG_XILINX_PHY enabled in petalinux-config -c kernel?
Best Regards
Shabbir
11-22-2019 04:17 AM - edited 11-22-2019 04:30 AM
11-22-2019 05:44 AM
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
11-22-2019 05:49 AM - edited 11-22-2019 05:51 AM
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.
11-22-2019 05:56 AM
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>; }; };
11-22-2019 06:10 AM
11-28-2019 12:44 AM
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>;
03-22-2020 05:33 AM
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 = <ðernet_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
06-17-2020 04:32 AM
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
06-19-2020 06:28 AM
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.