cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
pwo1
Observer
Observer
371 Views
Registered: ‎05-04-2015

Yocto 3.0 4.19-xlnx-v2019.2 PS EMIO GEM

Jump to solution

Hi,

I have a custom FPGA Board (zynq-7000, xc7z020)  with 3 Micrel ksz9031 phys. 1 of them is attached to the PS, 2 are attached to the PL.

I have an FPGA design where both PS GEMs (inclusive MDIO) are connected via EMIO to the PL. The PS MDIO is directly connected to the PL phys. The PS GMII interface is connected to some custom PL blocks, converted to RGMII (also custom block) and then connected to the PL pins.
Everything works fine with yocto 2.1. Linux detects eth0 and eth1.

Now I tried to switch to yocto 3.0. I started with an empty design, only with the PS phy connected via MIO. This scenario works fine. However, when I try to use the PL phy design linux does not recognize any ethernet interfaces.

This was the working device tree (only GEM 0) for yocto 2.1:

        ps7-ethernet@e000b000 {
            #address-cells = <0x1>;
            #size-cells = <0x0>;
            clock-names = "pclk", "hclk", "tx_clk", "ref_clk", "aper_clk";
            clocks = <0x2 0x1e 0x2 0x1e 0x2 0xd 0x2 0xd 0x2 0x1e>;
            compatible = "cdns,zynq-gem", "cdns,gem", "xlnx,ps7-ethernet-1.00.a";
            interrupt-parent = <0x3>;
            interrupts = <0x0 0x16 0x4>;
            local-mac-address = [00 0a 35 00 00 00];
            reg = <0xe000b000 0x1000>;
            xlnx,enet-reset = <0xffffffff>;
            xlnx,eth-mode = <0x1>;
            xlnx,has-mdio = <0x1>;
            xlnx,ptp-enet-clock = <0x69f6bcb>;
            phy-handle = <0x6>;
            phy-mode = "rgmii-id";

            phy@0 {
                compatible = "micrel,ksz9031";
                device_type = "ethernet-phy";
                reg = <0x1>;
                linux,phandle = <0x6>;
                phandle = <0x6>;
            };
        };

I digged around a lot, tried various combinations, nothing works:

https://forums.xilinx.com/t5/Embedded-Linux/GMII2RGMII-Ethernet-gem1-with-Kernel-4-19-not-working-with/td-p/993620

https://forums.xilinx.com/t5/Embedded-Linux/Secondary-eth1-ethernet-port-not-working/td-p/861499

https://forums.xilinx.com/t5/Ethernet/Gmii-to-Rgmii-driver/td-p/1022662

I also had a look at https://www.xilinx.com/support/documentation/application_notes/xapp1082-zynq-eth.pdf, however the download link in this PDF (https://secure.xilinx.com/webreg/clickthrough.do?cid=203511) does not work. It stops downloading after a few seconds.

My current device tree:

gem0: ethernet@e000b000 {
  compatible = "cdns,zynq-gem", "cdns,gem";
reg = <0xe000b000 0x1000>; status = "okay";
clocks = <&clkc 30>, <&clkc 30>, <&clkc 13>;
clock-names = "pclk", "hclk", "tx_clk"; #address-cells = <1>;
status = "okay"; interrupt-parent = <0x3>; interrupts = <0x0 0x16 0x4>; local-mac-address = [00 0a 35 00 00 00]; xlnx,enet-reset = <0xffffffff>; xlnx,eth-mode = <0x1>; xlnx,has-mdio = <0x1>; xlnx,ptp-enet-clock = <0x69f6bcb>; phy-handle = <0x6>; phy-mode = "rgmii-id"; phy@0 { compatible = "micrel,ksz9031"; device_type = "ethernet-phy"; reg = <0x1>; linux,phandle = <0x6>; phandle = <0x6>; }; };

gives me the following output

libphy: Fixed MDIO Bus: probed
libphy: MACB_mii_bus: probed
e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
e1000e: Copyright(c) 1999 - 2015 Intel Corporation.

but linux does not see any interface.

Any help is appreciated. Thanks in advance,
p

 

0 Kudos
1 Solution

Accepted Solutions
pwo1
Observer
Observer
329 Views
Registered: ‎05-04-2015

The one thing causing the problem tends to be the one thing you don't consider to be the problem.

It was the phy reset done within the PL. The new linux boots much faster than the old one. When the driver tries to access the phy via MDIO the reset was still active and therefore it cannot find any phy.

For future references the working device tree snippet:

gem0: ethernet@e000b000 {
  compatible = "cdns,zynq-gem", "cdns,gem";
  reg = <0xe000b000 0x1000>;
status = "okay";
clocks = <0x1 0x1e 0x1 0x1e 0x1 0xd>;
clock-names = "pclk", "hclk", "tx_clk";
#address-cells = <1>; #size-cells = <0x0>; interrupts = <0x0 0x16 0x4>; local-mac-address = [00 0a 35 00 00 00]; xlnx,ptp-enet-clock = <0x6750918>; phy-mode = "rgmii-id"; ethernet-phy@0 { compatible = "micrel,ksz9031"; device_type = "ethernet-phy"; reg = <0x1>; }; };


Best Regards,
p

 

View solution in original post

0 Kudos
1 Reply
pwo1
Observer
Observer
330 Views
Registered: ‎05-04-2015

The one thing causing the problem tends to be the one thing you don't consider to be the problem.

It was the phy reset done within the PL. The new linux boots much faster than the old one. When the driver tries to access the phy via MDIO the reset was still active and therefore it cannot find any phy.

For future references the working device tree snippet:

gem0: ethernet@e000b000 {
  compatible = "cdns,zynq-gem", "cdns,gem";
  reg = <0xe000b000 0x1000>;
status = "okay";
clocks = <0x1 0x1e 0x1 0x1e 0x1 0xd>;
clock-names = "pclk", "hclk", "tx_clk";
#address-cells = <1>; #size-cells = <0x0>; interrupts = <0x0 0x16 0x4>; local-mac-address = [00 0a 35 00 00 00]; xlnx,ptp-enet-clock = <0x6750918>; phy-mode = "rgmii-id"; ethernet-phy@0 { compatible = "micrel,ksz9031"; device_type = "ethernet-phy"; reg = <0x1>; }; };


Best Regards,
p

 

View solution in original post

0 Kudos