cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
robbieataeye
Visitor
Visitor
687 Views
Registered: ‎11-21-2019

Marvell PHY only works when TI PHY is UP

On my board with 3EG ultraScale+, I have 2 ethernet phys: 1) TI DP83867 and 2) Marvell 88Q2112. Both are using PS_GEM with SGMII modewith TI on GEM0 and Marvel on GEM1.
I am running Petalinux 2019.1 on it.
With the following dtsi file, I can ping both devices as long as the TI is enabled first. WheneverI disable the TI chip with the "ifconfig ti_ip_address down" command.  The Marvell chip will not work anymore ie. it stops responding to ping.

Any help would be greatly appreciated.Thanks

&gem0 {
   phy-handle = <&phy0>;
   xlnx,has-mdio = <0x1>;
   phy-mode = "sgmii";
   compatible = "cdns,zynqmp-gem";
   /* START of DP83867 patch for U-Boot */
   /* For some unknown reasons, DP83867 PHY driver for U-Boot doesn't read its properties from the phy0 node. */
   /* As a workaround we repeat them here */
   ti,rx-internal-delay = <0x8>;
   ti,tx-internal-delay = <0x0>;
   ti,fifo-depth = <0x1>;
   ti,dp83867-rxctrl-strap-quirk = <1>;
   /* END of DP83867 patch for U-Boot */

   mdio {
       phy0: phy0@0 {
         device_type = "ethernet-phy";
         compatible = "ti,dp83867", "ethernet-phy-ieee802.3-c22";
         reg = <0>;
         ti,rx-internal-delay = <0x8>;
         ti,tx-internal-delay = <0x0>;
         ti,fifo-depth = <0x1>;
         ti,dp83867-rxctrl-strap-quirk = <1>;
         ti,rxctrl-strap-worka;
      };
   };

};

&gem1 {
    phy-handle = <&phy1>;
    local-mac-address = [00 0a 35 01 23 46];
    xlnx,has-mdio = <0x1>;
    phy-mode = "sgmii";
    compatible = "cdns,zynqmp-gem";

    mdio {
       phy1: phy1@1 {
           device_type = "ethernet-phy";
           compatible = "marvell,88q2112", "ethernet-phy-ieee802.3-c22";
           //compatible = "marvell,88q2112", "ethernet-phy-ieee802.3-c45";
          reg = <1>;
      };
   };

};

0 Kudos
5 Replies
nanz
Moderator
Moderator
600 Views
Registered: ‎08-25-2009

Hi @robbieataeye ,

Can you please upload your complete bootlog file to take a look? 

What will happen if you disable GEM0 completely and try to only bring up GEM1? It seems you are using separate MDIO lines for two PHYs, so GEM0 does not have the master MDIO which will affect PHY1 connected to GEM1. 

 


-------------------------------------------------------------------------------------------

Don’t forget to reply, kudo, and accept as solution.

If starting with Versal take a look at our Versal Design Process Hub and our Versal Blogs and our Versal Ethernet Sticky Note.

-------------------------------------------------------------------------------------------
0 Kudos
robbieataeye
Visitor
Visitor
579 Views
Registered: ‎11-21-2019

Hi Nanz

Thank you for the reply. I did try using Marvell only as Ethernet0 but it do not work.

Here is section of the dtsi file that is relavant


&gem1 {
   phy-handle = <&phy1>;
   local-mac-address = [00 0a 35 01 23 46];
   xlnx,has-mdio = <0x1>;
   phy-mode = "sgmii";
   compatible = "cdns,zynqmp-gem";

   mdio {
      phy1: phy@0 {
      device_type = "ethernet-phy";
      compatible = "marvell,88q2112", "ethernet-phy-ieee802.3-c22";
      reg = <0>;
     };
  };

};

 

I attached the bootlog for the marvell only eth0 and TI_and_Marvell bootlog.

Thanks a lot for the help

0 Kudos
nanz
Moderator
Moderator
509 Views
Registered: ‎08-25-2009

Hi @robbieataeye ,

Thank you for the log file. I see GEM0 is still probed. Can  you please completely disable it? In the Marvel PHY only bootlog, i see both gem0 and gem1 are probed as eth0.Also, I do not see marvel phy driver picked up but instead it's a "Generic PHY". Can you also check if marvel phy driver is enabled?

I noticed you do not have local-mac-address set for GEM0. Can you add to it when you enable both GEMs?

You are use you are using both MDIO lines as per your HW design? Why I am asking this is the issue you run into is more likely to happen with shared MDIO node.

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841740/Macb+Driver

See "Common MDIO DT".

 

 


-------------------------------------------------------------------------------------------

Don’t forget to reply, kudo, and accept as solution.

If starting with Versal take a look at our Versal Design Process Hub and our Versal Blogs and our Versal Ethernet Sticky Note.

-------------------------------------------------------------------------------------------
0 Kudos
robbieataeye
Visitor
Visitor
486 Views
Registered: ‎11-21-2019

I am sorry nanz.  Petalinux is very new to me. Can you tell me where I can find a driver for the Marvell 88Q2112 and how to integrate the driver into the petalinux-build or petalinux-config?

Thanks

0 Kudos
nanz
Moderator
Moderator
319 Views
Registered: ‎08-25-2009

Hi @robbieataeye ,

I am sorry for the late response. Have you made any progress on it?

If you do a "petalinux-config", you should see the pop-up window for config selections. And phy driver should be enabled there. After you just save/exit to rebuild it. 


-------------------------------------------------------------------------------------------

Don’t forget to reply, kudo, and accept as solution.

If starting with Versal take a look at our Versal Design Process Hub and our Versal Blogs and our Versal Ethernet Sticky Note.

-------------------------------------------------------------------------------------------
0 Kudos