cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sujay
Visitor
Visitor
665 Views
Registered: ‎10-28-2020

Eth1 link not coming up on Zynqmp

Hi

I'm using a custom zynqmp board with eth0 having ksz8031 PHY and eth1 having marvell 88e1512 PHY.

The eth0 uses gem0 and eth1 uses gem1

ETH0 comes up fine on bootup but for ETH1 I need to do ifconfig eth1 up and even on doing this I get the log eth1 link not ready.

 

The following is my dtsi configuration:

&gem0 {
phy-mode = "rgmii-id";
local-mac-address = [00 01 02 03 04 05];
status = "okay";
xlnx,ptp-enet-clock = <0x0>;
phy-handle = <&phy0>;
phy0: phy@1 {
reg = <1>;
ti,rx-internal-delay = <0x8>;
ti,tx-internal-delay = <0xa>;
ti,fifo-depth = <0x1>;
ti,rxctrl-strap-worka;
at803x,led-act-blind-workaround;
at803x,eee-disabled;
at803x,vddio-1p8v;
};
};

&gem1 {
phy-mode = "rgmii-id";
phy-handle = <&phy1>;
status = "okay";
xlnx,ptp-enet-clock = <0x0>;

phy1:phy@1{
compatible="marvell,88e1512";
local-mac-address=[00 0a 35 00 22 28];
reg=<1>;
marvell,reg-init=<0x12 0x14 0x0000 0x8004>;
};

}

 

How do I enable both eth0 and eth1?

 

Tags (4)
0 Kudos
11 Replies
nanz
Moderator
Moderator
633 Views
Registered: ‎08-25-2009

Hi @sujay ,

Do you have the bootlog to share? Have you checked if the PHY driver for eth1 has been correctly probed and picked up? Are you using MDIO at all as shared MDIO bus? From your DTS, it does not seem so. 

One more testing is if you disable eth0, will eth1 come up directly or not? 


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

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
sujay
Visitor
Visitor
592 Views
Registered: ‎10-28-2020

Hi

I've attached the boot logs for my test,

I'm not using shared mdio bus.

Also can you please tell me how to check if " PHY driver for eth1 has been correctly probed and picked up" ?

 

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

Hi @sujay ,

From your log file - 

[ 4.255319] macb ff0b0000.ethernet: Not enabling partial store and forward
[ 4.255361] macb ff0b0000.ethernet (unnamed net_device) (uninitialized): get phy mode success
[ 4.255723] macb ff0b0000.ethernet eth0: macb mii init called
[ 4.255781] libphy: MACB_mii_bus: probed
[ 4.257530] macb ff0b0000.ethernet eth0: try dt phy reg called
[ 4.328041] macb ff0b0000.ethernet eth0: Cadence GEM rev 0x50070106 at 0xff0b0000 irq 32 (00:01:02:03:04:05)
[ 4.328059] Atheros 8031 ethernet ff0b0000.ethernet-ffffffff:01: attached PHY driver [Atheros 8031 ethernet] (mii_bus:phy_addr=ff0b0000.ethernet-ffffffff:01, irq=POLL)
[ 4.328369] macb ff0c0000.ethernet: Not enabling partial store and forward
[ 4.328405] macb ff0c0000.ethernet (unnamed net_device) (uninitialized): get phy mode success
[ 4.328751] macb ff0c0000.ethernet eth1: macb mii init called
[ 4.328809] libphy: MACB_mii_bus: probed
[ 4.328921] macb ff0c0000.ethernet eth1: try dt phy reg called
[ 4.332407] macb ff0c0000.ethernet eth1: fallback to standard phy reg called
[ 4.332564] macb ff0c0000.ethernet eth1: Cadence GEM rev 0x50070106 at 0xff0c0000 irq 33 (1a:2b:3c:4d:5e:6f)
[ 4.332580] Generic PHY ff0c0000.ethernet-ffffffff:08: attached PHY driver [Generic PHY] (mii_bus:phy_addr=ff0c0000.ethernet-ffffffff:08, irq=POLL)
[ 4.332877] macb ff0e0000.ethernet: Not enabling partial store and forward
[ 4.332905] macb ff0e0000.ethernet: invalid hw address, using random
[ 4.332923] macb ff0e0000.ethernet (unnamed net_device) (uninitialized): get phy mode success
[ 4.333257] macb ff0e0000.ethernet eth2: macb mii init called
[ 4.333311] libphy: MACB_mii_bus: probed
[ 4.333321] macb ff0e0000.ethernet eth2: try dt phy reg called
[ 4.370589] macb ff0e0000.ethernet eth2: fallback to standard phy reg called
[ 4.370758] macb ff0e0000.ethernet eth2: Cadence GEM rev 0x50070106 at 0xff0e0000 irq 34 (2e:25:80:e4:dc:8a)
[ 4.370775] Generic PHY ff0e0000.ethernet-ffffffff:00: attached PHY driver [Generic PHY] (mii_bus:phy_addr=ff0e0000.ethernet-ffffffff:00, irq=POLL)

It seems eth1 and eth2 PHYs are generic PHYs driver attached. Is the marvel PHY driver enabled in your kernel config? 


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

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
sujay
Visitor
Visitor
551 Views
Registered: ‎10-28-2020

Yes The marvell PHY driver is enabled in menuconfig.

But the eth1 interface still doesn't come up.

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

Hi @sujay ,

Have you had an update regarding the issue please? If so, could you please update the forum thread so other users can also benefit from it?

Thank you!


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

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
sujay
Visitor
Visitor
356 Views
Registered: ‎10-28-2020

Hi Nanz,

Sorry for the delay.

We did get a little ahead, It turns out there was an issue in the pin assignment and after correcting that the marvell driver was getting attached to the phy.

Here are the logs:

[ 5.913572] libphy: MACB_mii_bus: probed
[ 5.917519] macb ff0c0000.ethernet eth1: try dt phy reg called
[ 5.927865] macb ff0c0000.ethernet eth1: fallback to standard phy reg called
[ 5.934721] Driver Number 8d96250
[ 6.007237] macb ff0c0000.ethernet eth1: Cadence GEM rev 0x50070106 at 0xff0c0000 irq 33 (00:0a:35:00:04:e9)
[ 6.016855] Marvell 88E1510 ff0c0000.ethernet-ffffffff:00: attached PHY driver [Marvell 88E1510] (mii_bus:phy_addr=ff0c0000.ethernet-ffffffff:00, irq=POLL)
[ 6.031521] usbcore: registered new interface driver asix

However we are unable to ping from eth1 here is our test case:

root@zynqmp-iwg30m-eth1:~# ping -I eth1 192.168.10.239
PING 192.168.10.239 (192.168.10.239): 56 data bytes

 

<NOTE> I've set the ip statically using ifconfig eth1 192.168.10.101

Another thing we noticed is: While running arp -a on a Linux machine both eth1 and eth0 ip's are seen but both have same Mac id's. unlike output of ifconfig on the board.

Here is if config on the board:

root@zynqmp-iwg30m-eth1:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:01:02:03:04:16
inet addr:192.168.10.191 Bcast:192.168.10.255 Mask:255.255.255.0
inet6 addr: fe80::201:2ff:fe03:416/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5050 errors:0 dropped:958 overruns:0 frame:0
TX packets:2343 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:593634 (579.7 KiB) TX bytes:607267 (593.0 KiB)
Interrupt:32

eth1 Link encap:Ethernet HWaddr 00:0a:35:00:04:e9
inet addr:192.168.10.101 Bcast:192.168.10.255 Mask:255.255.255.0
inet6 addr: fe80::20a:35ff:fe00:4e9/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5311 errors:0 dropped:930 overruns:0 frame:0
TX packets:187 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:646547 (631.3 KiB) TX bytes:37298 (36.4 KiB)
Interrupt:33

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:97 errors:0 dropped:0 overruns:0 frame:0
TX packets:97 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:10864 (10.6 KiB) TX bytes:10864 (10.6 KiB)

and here is arp-a output on Linux machine:

$arp -a

? (192.168.10.101) at 00:01:02:03:04:16 [ether] on eno1

? (192.168.10.191) at 00:01:02:03:04:16 [ether] on eno1

 

Any ideas why this happens?

 

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

Hi @sujay ,

It seems both interfaces are not taking the assigned MAC address?

In your system_user.dtsi:

local-mac-address = [00 01 02 03 04 05];

local-mac-address=[00 0a 35 00 22 28];

Also I noticed for gem1, this is set under phy node, can you remove it and add it to the MAC node instead? 


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

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
sujay
Visitor
Visitor
317 Views
Registered: ‎10-28-2020

Hi Nanz

 

This is my gem1 node as seen in system-user.dtsi

&gem1 {
phy-mode = "gmii";
phy-handle = <&phy1>;
local-mac-address = [00 0a 35 00 22 01];
status = "okay";
xlnx,ptp-enet-clock = <0x0>;

phy1: phy@1 {
reg = <1>;
compatible = "marvell,88e1512";
ti,rx-internal-delay = <0x8>;
ti,tx-internal-delay = <0xa>;
ti,fifo-depth = <0x1>;
ti,rxctrl-strap-worka;
};
};

 

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

Hi @sujay ,

Ok, you made modification from your original post:

&gem1 {
phy-mode = "rgmii-id";
phy-handle = <&phy1>;
status = "okay";
xlnx,ptp-enet-clock = <0x0>;

phy1:phy@1{
compatible="marvell,88e1512";
local-mac-address=[00 0a 35 00 22 28];
reg=<1>;
marvell,reg-init=<0x12 0x14 0x0000 0x8004>;
};

Do you know why the MAC address set in your DTS is not picked up correctly by the tool? 


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

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
shabbirk
Moderator
Moderator
241 Views
Registered: ‎12-04-2016

Hi @sujay 

I can see that the PHY ID is not detected as it's showing all f's: Marvell 88E1510 ff0c0000.ethernet-ffffffff:00

How are you configuring the GEM, is it through MIO or EMIO. If it's through MIO then it should be RGMII. If it is EMIO you may need to use GMII2RGMII converter as I think your PHY is RGMII compatible

If your PHY ID is 1 and RGMII configured GEM through MIO, then try modifying the device tree slightly something like this and see if that helps:

&gem1 {
phy-mode = "rgmii-id";

mdio {
phy1:phy@1{
reg=<1>;
};

};

};

0 Kudos
sujay
Visitor
Visitor
192 Views
Registered: ‎10-28-2020

Hi Shabbir,

Yes there is a gmii2rgmii converter on the fpga side and I've looked into your suggestion.

I found more details of this here: https://forums.xilinx.com/t5/Embedded-Linux/Petalinux-2017-2-dts-node-for-GMII-to-RGMII-ip/m-p/823988/highlight/true#M23772

I've configured the dts in the exact same way, In this case however the phy is undetected.

Here are the logs:

6.804954] macb ff0c0000.ethernet: Not enabling partial store and forward
[ 6.811658] macb ff0c0000.ethernet (unnamed net_device) (uninitialized): get phy mode success
[ 6.820435] macb ff0c0000.ethernet eth1: macb mii init called
[ 6.825995] macb ff0c0000.ethernet eth1: get_child_by_name called
[ 6.832084] libphy: MACB_mii_bus: probed
[ 6.836118] xgmiitorgmii ff0c0000.ethernet-ffffffff:08: Couldn't find phydev
[ 6.842981] macb ff0c0000.ethernet eth1: no PHY found
[ 6.847988] macb ff0c0000.ethernet eth1: no PHY found
[ 6.853004] macb ff0c0000.ethernet eth1: Error macb_mii_probe failed
[ 6.859437] macb ff0c0000.ethernet eth1: Error Cadence init failed

Is there any change in configuration thaat is needed? I've attached my updated dts too.

 

0 Kudos