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: 
Highlighted
Contributor
Contributor
3,504 Views
Registered: ‎11-17-2014

Dual Ethernet still not working after patching macb driver - Petalinux 2017.2

Jump to solution

 

I am doing a hardware checkout on a custom board that has dual Ethernet ports and I'm having some issues with Ethernet 1. Both Ethernet MACs 0 and 1 are being used and they both have their own PHYs (Realtek RTL8211E). The two PHYs share the MDIO bus and the bus is controlled by MAC 0.

 

I tried testing the ports before applying the patch outlined in AR# 61932 and observed that Ethernet 0 comes up on Petalinux 2017.2 just fine and the OS sees the Realtek PHY at PHY address 1 and will communicate with other devices on the network. Ethernet 1 however gets assigned a Generic PHY and will not communicate with other devices. 

 

After applying the patch and a clean recompile both Ethernet 0 and Ethernet 1 get assigned Generic PHYs by Petalinux 2017.2 after booting and neither Ethernet port will communicate with devices on the network. I'm at a loss of what is going on and was curious if anyone had some insight to what could be going on.

 

 

I've added my device tree listing below in case I have messed it up:

 

/include/ “system-conf .dtsi
/{

   aliases  {
      ethernet0 = &gem0;
      ethernet1 = &gem1;
   };

   mdio  {
      compatible=”cdns,macb-mdio”;
      reg= <0xe000b000 0x1000>;
      clocks = <&clkc 30>, <&clkc 30>, <&clkc 13>;
      clock-names = “pclk”, “hclk”, “tx_clk”;
      #address-cells = <1>;
      #size-cells = <0>;
      phy1:phy@1 {
         compatible = “realtek,RTL8211E”;
         device_type = “ethernet-phy”;
         reg = <0x1>;
      };
      phy2: phy@2  {
         compatible = realtek,RTL8211E;
         device_type = “ethernet-phy;
         reg = <0x2>;
      };
   };

   usb_phy1 :usb_phy@0 {
      compatible = “usb-nop-xceiv”;
      #phy-cells = <0>;
      reset-gpios = <&gpio0 7 0>;
      view-port = <0x0170>;
      drv-vbus;
   };
};

&gem0 {
   local-mac-address = [00 0a 35 00 1e 53]
   phy-handle  = <&phy1>;
   phy-mode = “rgmii-id”;
   xlnx,enet-reset = <0xFFFFFFFF>;
   xlnx,eth-mode = <0x1>;
   xlnx,has-mdio = <0x1>;
   status = “okay”;
};

&gem1 {
   local-mac-address = [00 0a 35 00 1e 54]
   phy-handle = <&phy2>;
   phy-mode =  “rgmii-id”;
   xlnx,enet-reset = <0xFFFFFFFF>;
   xlnx,eth-mode = <0x1>;
   xlnx,has-mdio = <0x0>;
   status = “okay”;
};

&flash0 {
   compatible = “spansion,s25f1512s”;
   spi-max-frequency = <100000000>;
};

&usb1 {
   status = “okay”;
   compatible = “xlnx,zynq-usb-2.20a”, “chipidea,usb2”;
   dr_mode = “host”;
   usb-phy = <&usb_phy1>;
};

 

 

 

I've made some progress on this issue. I had to physically separate the MDIO bus for both PHYs and gave each PHY their own MDIO bus.

 

The PHY0 MDIO bus is connected with MIO pins, while the PHY1 MDIO bus is connected with EMIO pins.  Both MACs in the Zynq-7000 are now managing their own MDIO interfaces rather than one MAC managing the MDIO bus for both PHYs. GEM1 still uses MIOs for the RGMII connection to PHY1. See the figure below for clarification.

 

 

MDIO bus before:
 --------		 --------
|        | MIO		|        |
|  GEM0  |--------------|  PHY0  |
|        |     |        |        |
 --------      |         --------
               |   
 --------      |	 --------
|        |     |	|	 |
|  GEM1  |     *--------|  PHY1  |
|        |              |        |
 --------   		 --------

MDIO bus after:
 --------		 --------
|        | MIO		|        |
|  GEM0  |--------------|  PHY0  |
|        |     	        |        |
 --------      	         --------
               	   
 --------      		 --------
|        | EMIO    	|	 |
|  GEM1  |--------------|  PHY1  |
|        |              |        |
 --------   		 --------

 

 

This solution worked with having the PHYs defined in each GEM entry in the device tree and with the Cadence macb driver not patched with the MDIO changes made in AR# 61932. When the patch is applied both PHYs are NOT seen in Petalinux after start up. This tells me that the patch described in AR# 61932 does not seem to play nicely with the Realtek RTL8211E PHY.

  

Our PHYs are hooked up the same way as the Zybo from Digilent with the expection of the PHY reset pin which is tied high.

 

I have a Zybo board that uses the same PHY chip at home and I'll see if I get the same issue when using the patch described in AR# 61932 when I have time.

0 Kudos
0 Solutions
4 Replies
Contributor
Contributor
3,214 Views
Registered: ‎11-17-2014

Re: Dual Ethernet still not working after patching macb driver - Petalinux 2017.2

Jump to solution

I've made some progress on this issue. I had to physically separate the MDIO bus for both PHYs and gave each PHY their own MDIO bus.

 

The PHY0 MDIO bus is connected with MIO pins, while the PHY1 MDIO bus is connected with EMIO pins.  Both MACs in the Zynq-7000 are now managing their own MDIO interfaces rather than one MAC managing the MDIO bus for both PHYs. GEM1 still uses MIOs for the RGMII connection to PHY1. See the figure below for clarification.

 

 

MDIO bus before:
 --------		 --------
|        | MIO		|        |
|  GEM0  |--------------|  PHY0  |
|        |     |        |        |
 --------      |         --------
               |   
 --------      |	 --------
|        |     |	|	 |
|  GEM1  |     *--------|  PHY1  |
|        |              |        |
 --------   		 --------

MDIO bus after:
 --------		 --------
|        | MIO		|        |
|  GEM0  |--------------|  PHY0  |
|        |     	        |        |
 --------      	         --------
               	   
 --------      		 --------
|        | EMIO    	|	 |
|  GEM1  |--------------|  PHY1  |
|        |              |        |
 --------   		 --------

 

 

This solution worked with having the PHYs defined in each GEM entry in the device tree and with the Cadence macb driver not patched with the MDIO changes made in AR# 61932. When the patch is applied both PHYs are NOT seen in Petalinux after start up. This tells me that the patch described in AR# 61932 does not seem to play nicely with the Realtek RTL8211E PHY.

  

Our PHYs are hooked up the same way as the Zybo from Digilent with the expection of the PHY reset pin which is tied high.

 

I have a Zybo board that uses the same PHY chip at home and I'll see if I get the same issue when using the patch described in AR# 61932 when I have time.

0 Kudos
Visitor smcb_dnae
Visitor
2,877 Views
Registered: ‎09-08-2017

Re: Dual Ethernet still not working after patching macb driver - Petalinux 2017.2

Jump to solution

Hi @asm2750: we're having the same issue but I'm curious about your solution. Did you physically wire a separate MDIO interface to PHY1, via EMIO and the PL, or did both ENET0 and ENET1 go via EMIO, with the PL driving the physical, shared MDIO?

 

Physically there is only one MDIO interface, so I am curious to know how you've managed to parallel it up in the way you show in your diagram.

0 Kudos
Contributor
Contributor
2,850 Views
Registered: ‎11-17-2014

Re: Dual Ethernet still not working after patching macb driver - Petalinux 2017.2

Jump to solution

@smcb_dnae wrote:

Hi @asm2750: we're having the same issue but I'm curious about your solution. Did you physically wire a separate MDIO interface to PHY1, via EMIO and the PL, or did both ENET0 and ENET1 go via EMIO, with the PL driving the physical, shared MDIO?

 

Physically there is only one MDIO interface, so I am curious to know how you've managed to parallel it up in the way you show in your diagram.


I have the MDIO interface for ENET0 going through the MIO pins 52 and 53, and a separate MDIO bus for ENET1 going through a pair of PL pins using the EMIO interface. Vivado 2017.2 didn't complain about this configuration when performing synthesis and implementation.

 

Also the cadence macb patch did not work with my Realtek PHYs in any configuration (one Ethernet port, or two Ethernet ports). I'm currently using petalinux 2017.2, I don't know if they fixed that issue in petalinux 2017.3.

0 Kudos
Visitor smcb_dnae
Visitor
2,833 Views
Registered: ‎09-08-2017

Re: Dual Ethernet still not working after patching macb driver - Petalinux 2017.2

Jump to solution

Looks like we've resolved the issue in the Linux kernel without the need to fork out another physical MDIO over EMIO. The solution was to configure PetaLinux to use a Xilinx PHY instead of a Marvel PHY, even though it detects a Marvel PHY. Oh well!

0 Kudos