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: 
Contributor
Contributor
275 Views
Registered: ‎04-25-2017

PS GEM SGMII not working after reboot

Jump to solution

Hello,

We are using GEM3 of MPSoC with GT Lane 3 connected to a ethernet switch from microchip. When we power on the board, Linux, dsa, and switch drivers work ok and we get two ethernet interfaces from the switch.

 

The problem begins when we do a "reboot" from linux. The driver reports that the links are up but we cannot ping. We have a reset pin on the switch that we cycle when we reboot and configure the switch again, but no luck.

Don't know if the GT Lane needs some restart or what. We are kind of lost.

Any help would be appreciated.

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Contributor
Contributor
107 Views
Registered: ‎04-25-2017

Re: PS GEM SGMII not working after reboot

Jump to solution

Finally, the error was in the ethernet switch from Microchip.

In the Silicon Errata document (module 15), it says that the sgmii interface does not reset with a hardware reset.

http://ww1.microchip.com/downloads/en/DeviceDoc/80000759C.pdf

We tried to reset via switch registers and it did work.

Thanks for the help

 

8 Replies
Moderator
Moderator
262 Views
Registered: ‎09-12-2007

Re: PS GEM SGMII not working after reboot

Jump to solution

The GEM reset can be seen here:

Register 0xFF5E0230 (CRL_APB)

reset_gem.PNG

However, I doubt this is the issue.....

Can you also reset the TX and RX engines from network control register.

Bits 2 and 3 – receive and transmit enable.

Just need to clear and set them again.

netcfg.PNG

 

Reference:

https://www.xilinx.com/html_docs/registers/ug1087/ug1087-zynq-ultrascale-registers.html

 

0 Kudos
258 Views
Registered: ‎07-23-2019

Re: PS GEM SGMII not working after reboot

Jump to solution

 

At reboot, you closed the higher layers (session, application) managed in software, but probably not (or not completely), at least, the PHY.

As @stephenm suggests, reset the hardware as well. What is worrisome is the driver doesn't handle this... it must. Needs investigation, though, to determine that is the cause.

0 Kudos
Contributor
Contributor
190 Views
Registered: ‎04-25-2017

Re: PS GEM SGMII not working after reboot

Jump to solution

Hello,

Thank you very much for the answers. We tried both things but did not have success. Tried to unbind macb for gem3 and switch driver, then reset gem3 and tx-rx, then bind again both drivers and restart network. It didn't work.

We have algo GEM0 through EMIO and a GMII2RGMII core and a external phy. This interface reboots ok, but GEM3 with sgmii and this device tree does not.

&gem3 {
       fixed-link {
       speed = <1000>;
       full-duplex;
       };
};

 

Any idea?

Thanks in advance

0 Kudos
184 Views
Registered: ‎07-23-2019

Re: PS GEM SGMII not working after reboot

Jump to solution

 

"connected to an ethernet switch from microchip"  A COTS or your own stuff? Can you try another switch? (the 2nd most popular advice after 'have you tried power cycling?')

0 Kudos
Contributor
Contributor
178 Views
Registered: ‎04-25-2017

Re: PS GEM SGMII not working after reboot

Jump to solution

The switch is KSZ9897-S from Microchip Technology Inc.

As I mentioned before, the system works fine when we power on the board, but when we reboot from Linux, the interfaces provided by the switch using DSA does not work even though they appear to be ok. We can detect the link up/down if we insert or remove the ethernet cable, but ping does not work for example. The switch has a reset signal that we toggle in the driver with a gpio during initialization. We cannot power cycle only de switch.

 

0 Kudos
171 Views
Registered: ‎07-23-2019

Re: PS GEM SGMII not working after reboot

Jump to solution

 

The green and orange LEDs only reveal connection in the lower layers, basically, if they negotiated a speed and there is traffic (but that doesn't ensure what is sent will be received, as you are noticing)

One more suggestion, you say you are hard resetting with a GPIO, that sounds fine, just that the switch could need some time to wake up before your thing starts kicking off packets. 

0 Kudos
Highlighted
Contributor
Contributor
108 Views
Registered: ‎04-25-2017

Re: PS GEM SGMII not working after reboot

Jump to solution

Finally, the error was in the ethernet switch from Microchip.

In the Silicon Errata document (module 15), it says that the sgmii interface does not reset with a hardware reset.

http://ww1.microchip.com/downloads/en/DeviceDoc/80000759C.pdf

We tried to reset via switch registers and it did work.

Thanks for the help

 

101 Views
Registered: ‎07-23-2019

Re: PS GEM SGMII not working after reboot

Jump to solution

"does not reset with a hardware reset"

So the hard reset is done in software... omg, Microchip... they used to be good

Good you sorted it out

0 Kudos