Concerning the Cisco module, it seems to be advertised as Fibre Channel SFP module (and not Ethernet). There seems to be a lot of guesswork involved during parsing of the SFP firmware (phylink.c et al). Maybe Mikrotik and Linux do it in different ways, ending up in incompatible configurations.
In my understanding of recent Linux kernels (>=4.14), parsing of SFP module EEPROM is done by phylink_sfp_module_insert() in phylink.c and the supporting sfp_parse_*() functions in sfp-bus.c. The code covers Fibre Channel modules.
To find out what is going wrong, you may want to correlate that code with your kernel messages and/or the output of ethtool -m eth2. The structure of the EEPROM is declared in include/linux/sfp.h.
there was any news ? i have some cisco and juniper sx sfp , and i will give it a try!!
in the future this support will become part of the standard tree??
No news, I am just regularly re-basing the branch against master, and it is working fine for me.
Upon request, I had submitted the LED support to openwrt-devel, but it was rejected. I guess the same would happen to the SFP support.
A clean solution with support for hot plugging would be a modification of the phylink subsystem (see this linux-netdev thread). At the moment, I don't have time for this.
In case anybody is interested, I force-pushed a slightly improved version. No need for omnia-select-device-tree anymore. Instead, the u-boot environment is modified to probe for SFP module presence at boot time, and to choose the appropriate device tree.
Just be aware, only the new sysupgrade will set the new environment. So, you may have to sysupgrade twice, or run the new fw_setenv command (from /lib/upgrade/sdcard.sh) manually.
Finally, I have included Russell King's SFP patches, which are waiting for review in patchwork. They seem to work for me.
Wondering whether fdtput could perhaps be leveraged to manipulate the active device tree and thus change from the cli between SFP and PHY?
Usage: write a property value to a device tree
fdtput <options> <dt file> <node> <property> [<value>...]
fdtput -c <options> <dt file> [<node>...]
fdtput -r <options> <dt file> [<node>...]
fdtput -d <options> <dt file> <node> [<property>...]
The command line arguments are joined together into a single value.
<type> s=string, i=int, u=unsigned, x=hex
Optional modifier prefix:
hh or b=byte, h=2 byte, l=4 byte (default)
Options: -[crdpt:vhV]
-c, --create Create nodes if they don't already exist
-r, --remove Delete nodes (and any subnodes) if they already exist
-d, --delete Delete properties if they already exist
-p, --auto-path Automatically create nodes as needed for the node path
-t, --type <arg> Type of data
-v, --verbose Display each value decoded from command line
-h, --help Print this help and exit
-V, --version Print version and exit
I would never try to change the device tree on the running kernel. But, indeed, one generic dtb, modified in RAM by some magic using U-Boot fdt commands, that might work.
To me IRQ #76 very much looks like an unhandled interrupt due to one of the PCA9538 input pins changing, see Turris Omnia schematic. One candidate would be pin 7, coming from the PHY connected to the WAN port.
Anyway, I never seem to get an interrupt on these (current uptime 7 days).
im got a turris omnia and several GPon SFP modules but only one module works with turris (DFP-34G-2C2)
the other modules that i have that doesnt work are (MA5671A oem and other unlocked with HL23446 firmware) Carlitosxxpro CPGOS03-490-v2 (realtek chipset) G-010s-a g-010s-b and zisa op151s
How i can debug or something to view what its the issue? Ma5671A unlocked modded its working on a neutral Switch without issues but in turris omnia doesnt work
kernel | sys log should show some related SFP info, but its verbosity may depend on the kernel (debug) config flags, particularly related to driver debugging.
tool for getting module info ethtool -m eth2
tool for dumping the module's eprom content ethtool -m eth2 raw on | hexdump -C
common causes with SFP module issues
module's eprom not compatible with kernel version code
kernel version code lagging behind kernel mainline patches related to SFP code development (stuff not getting backported)