Altera_Forum
Honored Contributor
12 years agoSFP link/speed detection - NicheStack
Hi,
I am using NiosII + ucOSii + NicheStack in a webserver application. Instead of a regular MDIO-accessible PHY device I am using a SFP cage compatible with any standard SFP module (i2c accessible, various vendors). When NicheStack is started it warns about not finding a PHY on mdio, assumes default link and speed (100 Mbps) and then operates correctly.
> SFP1 Link status changed: UP. Starting NicheStack...
InterNiche Portable TCP/IP, v3.1
Copyright 1996-2008 by InterNiche Technologies. All rights reserved.
prep_tse_mac 0
MAC Address: 00:07:ED:12:34:56
(*) Static IP Address is 172.16.100.50
prepped 1 interface, initializing...
INFO : TSE MAC 0 found at address 0x0c013000
WARNING : MAC Groups->pmac_info MDIO is not used, unable to run PHY detection
INFO : PCS - Configuring PCS operating mode
INFO : PCS - PCS SGMII mode enabled
Created "Inet main" task (Prio: 2)
Created "clock tick" task (Prio: 3)
WARNING : MAC Group - MDIO not enabled! Speed = 100, Duplex = Full
OK, x=1, CMD_CONFIG=0x00000000
MAC post-initialization: CMD_CONFIG=0x04000203
RX descriptor chain desc (1 depth) created
mctest init called
IP address of et1 : 172.16.100.50
Created "web server" task (Prio: 11)
Is there a possiblity to add a generic driver for SFP devices? The alt_tse_phy_add_profile method only seems to work if vendor/revision/OUI/model are precisely known. I want my application to accept/recognize any SFP module, as the register interface (i2c accessible) is JEDEC-standardized so from an operation point of view it wouldn't matter who produced it. The functions for getting link/speed indication over i2c I already have. What is the way to create a driver in such a case?