Sorry, you need to enable JavaScript to visit this website.

PL Ethernet through SFP

Unsolved
4 posts / 0 new
Cone83's picture
Cone83
Junior(0)
PL Ethernet through SFP

Hi!
Has anybody been able to use the SFP port with PL ethernet? I'm trying to replicate the design from XAPP1082. I've been closely following the provided example design and copied the device tree. I've set SW10 to OFF, OFF, and SW11 to OFF, OFF, ON, OFF, which to my understanding should provide the required 125 MHz. In the SFP slot I plugged a 1000Base-T RJ45 module from Delock.
 
Unfortunately it doesn't seem to work. When booting linux, I get the following output during boot:
 
xilinx_axienet a0500000.axi-ethernet: TX_CSUM 2
xilinx_axienet a0500000.axi-ethernet: RX_CSUM 2
libphy: Xilinx Axi Ethernet MDIO: probed
 
I think that looks fine. But if I'm trying to activate the network trough ifup, I get the following:
 
net eth1: Promiscuous mode disabled.
net eth1: Promiscuous mode disabled.
ip: RTNETLINK answers: File exists
xilinx_axienet a0500000.axi-ethernet eth1: Error setting Axi Ethernet mac speed

I guess that only the last message is an issue. I don't really know what could be the cause for this. I get the same results even when unplugging the SFP module. Are there any ways to narrow this problem down?
 
Thanks

Cone83's picture
Cone83
Junior(0)
Oh dear. Having another close

Oh dear. Having another close look at XAPP1082, I see that they program the Phy in the SFP module over I2C in the FSBL. I had a close look at the Mini-ITX schematics and compared them to the schematics of the ZC706 board that is used in XAPP1082. The SFP pins are not clearly labeled in the Mini-ITX schematics, but I guess that SDA is SFP_MOD_DEF2 and SLC is SFP_MOD_DEF1. Unfortunately they are not connected to the I2C switch like for the ZC706 board, but instead to bank 9.
 
So, I guess that I'll have to implement the I2C communication for programming the SFP Phy in PL. Does anyone have an idea for an easier solution?

Hi, Currently, I met the same

Hi, Currently, I met the same problem as you.I also study XAPP1082 and adapted it to picozed.Have you solved the problem?
Hope your response.

Cone83's picture
Cone83
Junior(0)
Hi!

Hi!
 
I did get it running somehow,  but the solution isn't yet really satisfactory. The SFP module that I am using can be configured as 1000Base-T through SGMII or as 1000Base-X. In the latter case, the module should behave like an optical transceiver and the OS shouldn't notice that this is actually a 1000Base-T link. I have written a bit more about this on the Xilinx forums:
https://forums.xilinx.com/t5/Embedded-Processor-System-Design/PL-Etherne...
 
I have been able to get the SPF module running in 1000Base-X mode (the default), but not in SGMII mode. However, the auto negotiation is not working, which was causing the error in my initial post. According to the documentation, the SFP module should emulate the 1000Base-X auto negotiation.
 
So either the auto negotiation of the SFP module isn't working correctly or there's a bug in the kernel driver. I'm suspecting the latter one. Due to the failed auto negotiation, the kernel driver tries to set a transfer speed of 10 MBit/s, which is illegal for a 1000Base-X link. This triggers the "Error setting Axi Ethernet mac speed" error. Therefore I have patched the kernel driver to set a 1 GBit/s transfer speed by default instead.
 
For Xilinx kernel 2015.2 modify the file:
./drivers/net/ethernet/xilinx/xilinx_axienet_main.c
 
Change lines 572 to 575 from
 
        if ((phy->speed == SPEED_10) || (phy->speed == SPEED_100)) {
            if (lp->phy_type == XAE_PHY_TYPE_1000BASE_X)
                setspeed = 0;
        } else {
 
to:
 
        if ((phy->speed == SPEED_10) || (phy->speed == SPEED_100)) {
            if (lp->phy_type == XAE_PHY_TYPE_1000BASE_X) {
                printk("Illegal speed setting: %d\n", phy->speed);
                lp->phy_type = XAE_PHY_TYPE_1000BASE_X;
            }
        } else {
 
Then install ethtool and configure the link manually:
#> ethtool -s eth1 speed 1000 duplex full autoneg off
 
Maybe ethtool also works with the unpatched kernel. I haven't yet tried that.
 
Regards