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!

Reply

zynq linux mdio problem for dual gem (0, 1)

Visitor
Posts: 7
Registered: ‎09-11-2012

zynq linux mdio problem for dual gem (0, 1)

My custom zynq board supports two gigabit ethernet interface.

But, I can't enable two gigabit ethernet hardware on the linux.

I think it is mdio problem of zynq hardware.

Zynq only support one mido pin for two gem(0, 1)

 

When I set mdio pin like this, gem0, gem1 can detect. but gem0 only usable

1.gif

 

When I set mdio pin like this, gem0, gem1 can detect. but gem1 only usable

2.gif

 

My device tree is follow as : 

 

- Gem 0 phy addr : 0

- Gem 2 phy addr : 2

 

ps7_ethernet_0: ps7-ethernet@e000b000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "xlnx,ps7-ethernet-1.00.a";
interrupt-parent = <&ps7_scugic_0>;
interrupts = < 0 22 4 >;
local-mac-address = [ 00 0a 35 00 00 00 ];
phy-handle = <&phy0>;
reg = < 0xe000b000 0x1000 >;
xlnx,enet-clk-freq-hz = <0x7735940>;
xlnx,enet-reset = <0xffffffff>;
xlnx,enet-slcr-1000mbps-div0 = <0x8>;
xlnx,enet-slcr-1000mbps-div1 = <0x1>;
xlnx,enet-slcr-100mbps-div0 = <0x8>;
xlnx,enet-slcr-100mbps-div1 = <0x5>;
xlnx,enet-slcr-10mbps-div0 = <0x8>;
xlnx,enet-slcr-10mbps-div1 = <0x32>;
xlnx,eth-mode = <0x1>;
xlnx,has-mdio = <0x1>;
xlnx,ptp-enet-clock = <111111115>;
mdio {
#address-cells = <1>;
#size-cells = <0>;
phy0: phy@0 {
compatible = "marvell,88e1111";
device_type = "ethernet-phy";
reg = <0>;
} ;
} ;
} ;
ps7_ethernet_1: ps7-ethernet@e000c000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "xlnx,ps7-ethernet-1.00.a";
interrupt-parent = <&ps7_scugic_0>;
interrupts = < 0 45 4 >;
local-mac-address = [ 00 0a 35 00 00 01 ];
phy-handle = <&phy1>;
reg = < 0xe000c000 0x1000 >;
xlnx,enet-clk-freq-hz = <0x7735940>;
xlnx,enet-reset = <0xffffffff>;
xlnx,enet-slcr-1000mbps-div0 = <0x8>;
xlnx,enet-slcr-1000mbps-div1 = <0x1>;
xlnx,enet-slcr-100mbps-div0 = <0x8>;
xlnx,enet-slcr-100mbps-div1 = <0x5>;
xlnx,enet-slcr-10mbps-div0 = <0x8>;
xlnx,enet-slcr-10mbps-div1 = <0x32>;
xlnx,eth-mode = <0x1>;
xlnx,has-mdio = <0x0>;
xlnx,ptp-enet-clock = <111111115>;
mdio {
#address-cells = <1>;
#size-cells = <0>;
phy1: phy@2 {
compatible = "marvell,88e1111";
device_type = "ethernet-phy";
reg = <2>;
} ;
} ;
} ;

 

 

Adventurer
Posts: 78
Registered: ‎03-19-2008

Re: zynq linux mdio problem for dual gem (0, 1)

This is an old post, so I suspect you will have already resolved.

 

Anyway time ago I asked the same thing to the Xilinx support team and I got this helpful answer:

 

"Both controllers provide MDIO interfaces, however, only one interface is needed to control both of the external PHYs. MDIO bus supports multiple slaves. Make sure the two PHY devices have different PHY addresses. (Some of the PHY devices can support PHY address configurable). Connect one MDIO to MIO 52 53 in Zynq Configuration GUI, leave the other MDIO unconnected. Connect Zynq MDIO pins and two PHY devices as one master and two slaves on board. Visit either of the PHY devices through the connected MDIO by calling XEmacPs_PhyRead or XEmacPs_PhyWrite functions."

 

Hope it may help somebody else.

 

Regards,

Giulio

Adventurer
Posts: 78
Registered: ‎03-19-2008

Re: zynq linux mdio problem for dual gem (0, 1)

As an additional requests the two devices should be configured with different addresses (usually via bootstrap pull-down/pull-up resistors).

 

And the dts file shall be upgraded accordingly.