cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Observer
Observer
754 Views
Registered: ‎07-16-2017

How to solve dual Marvell 88e1512 PHY Ethernet problem in petalinux?

Jump to solution

Platform: petalinux 2019.1

Board: Customed board--ZU7EV

Our Board used 2 GEM port(gem2 and gem3), these 2 ports used only 1 mdc/mdio interface. 

GEM2: phy addr 1

GEM3: phy addr 0

The MIO and device tree as following:

微信截图_20190618110743.png

 

/**/
/include/ "system-conf.dtsi"
/ {
	mdio {
		#address-cells = <0x2>;
		#size-cells = <0x2>;
		compatible = "cdns,macb-mdio";
		reg = <0x0 0xff0d0000 0x0 0x1000>;
		/*clocks = <&clk 0x1f>, <&clk 0x31>, <&clk 0x2d>;*/ /* GEM 2 1st 3 clocks */
		clock-names = "pclk", "hclk", "tx_clk"; /* Don't touch */
	     	ethernet_phy0: ethernet-phy@0 {
			compatible = "marvell,88e1510";
			device_type = "ethernet-phy";
		        reg = <0>;
		};
	     	ethernet_phy1: ethernet-phy@1 {
			compatible = "marvell,88e1510";
			device_type = "ethernet-phy";
		        reg = <1>;
		};


	};
};


&gem2 {
	local-mac-address = [00 0a 36 00 00 01];
	phy-mode = "rgmii-id";
	status = "okay";
	phy-handle = <&ethernet_phy1>;
};

&gem3 {
	local-mac-address = [00 0a 36 00 00 00];
	phy-mode = "rgmii-id";
	status = "okay";
	phy-handle = <&ethernet_phy0>;

};

 

But unfortunately, these ports can not  run in linux and u-boot

But if we just open 1 gem port in vivado project, then both ports can be used separately

I checked all the posts in this forum about this issue, which mentioned that need to install two patches:

0001-net-macb-Add-MDIO-driver-for-accessing-multiple-PHY-.patch

0002-Documentation-devictree-Add-macb-mdio-bindings.patch

So my question are:

  1. Do we need these patch in petalinux 2019.1?
  2. Is there any problems in the device tree?

Looking forward to your reply, Thx a lot!

 

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Moderator
Moderator
741 Views
Registered: ‎12-04-2016

Re: How to solve dual Marvell 88e1512 PHY Ethernet problem in petalinux?

Jump to solution

Hi @jlynnc 

Can you try removing both compatible & device_type property from the PHY node and see if that helps in detecting PHY's?

 

Best Regards

Shabbir

View solution in original post

0 Kudos
4 Replies
Highlighted
Moderator
Moderator
742 Views
Registered: ‎12-04-2016

Re: How to solve dual Marvell 88e1512 PHY Ethernet problem in petalinux?

Jump to solution

Hi @jlynnc 

Can you try removing both compatible & device_type property from the PHY node and see if that helps in detecting PHY's?

 

Best Regards

Shabbir

View solution in original post

0 Kudos
Highlighted
Observer
Observer
727 Views
Registered: ‎07-16-2017

Re: How to solve dual Marvell 88e1512 PHY Ethernet problem in petalinux?

Jump to solution

Thx for the reply!

The initial situation has some minor mistakes.

When using gem3 alone, the network port has no problem in uboot and kernel.

But when using gem2 alone, the network port has no problem in uboot, but eth0 is not found in the kernel.

I tried to remove both compatible & device_type property from the PHY node as  you suggestion!

When using gem2 alone, the ethernet port worked well in the kernel!

Next I will test the situation where both network ports are configured.

I will be back soon!THX again!

0 Kudos
Highlighted
Observer
Observer
720 Views
Registered: ‎07-16-2017

Re: How to solve dual Marvell 88e1512 PHY Ethernet problem in petalinux?

Jump to solution

Thx a lot!

The problem is solved!

Dual port are worked well.

But I still want ask that why we need to remove those 2 lines?

0 Kudos
Highlighted
Moderator
Moderator
712 Views
Registered: ‎12-04-2016

Re: How to solve dual Marvell 88e1512 PHY Ethernet problem in petalinux?

Jump to solution

Hi @jlynnc 

Driver is already taking care of detecting the PHY hence these cleanup's are required in DT

https://github.com/Xilinx/linux-xlnx/blob/master/drivers/of/of_mdio.c#L135

 

0 Kudos