[BPI-R4] SinoVoIP/Bipai 10Gbps SFP not recognised

Did anyone have any luck getting the 10Gbps SFP modules from the Bipai store (link below) to work on the BPI-R4 on a standard Linux distro (Arch, Debian, not OpenWRT)? I bought two of these last week but neither works and dmesg outputs:

[15767.226799] [  T57176] sfp sfp1: module OEM              SFP-10G-T        rev 1    sn 2506020007       dc 250530  
[15767.256828] [  T76393] hwmon hwmon4: temp1_input not attached to any thermal zone
[15767.874986] [  T57176] mtk_soc_eth 15100000.ethernet sfp1: validation with support 00,00000000,00000000,00000000 failed: -EINVAL
[15767.875079] [  T57176] sfp sfp1: sfp_add_phy failed: -EINVAL

These leads me to think there is some sort of firmware issue?

(link to 10Gbps SFP modules: https://www.aliexpress.com/item/1005006458266455.html?spm=a2g0o.order_list.order_list_main.11.2c411802TZ2NND)

Empty value in validation looks strange but maybe caused by phy not recognized. You can try reading out the eeprom to get vendor/product of sfp phy chip and its supported values. I guess it needs some quirks/fixups to get it recognized

Hmm. That’s strange. output of ethtool -m is:

	Identifier                                : 0x03 (SFP)
	Extended identifier                       : 0x04 (GBIC/SFP defined by 2-wire interface ID)
	Connector                                 : 0x07 (LC)
	Transceiver codes                         : 0x10 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
	Transceiver type                          : 10G Ethernet: 10G Base-SR
	Encoding                                  : 0x06 (64B/66B)
	BR, Nominal                               : 10300MBd
	Rate identifier                           : 0x00 (unspecified)
	Length (SMF,km)                           : 0km
	Length (SMF)                              : 0m
	Length (50um)                             : 80m
	Length (62.5um)                           : 20m
	Length (Copper)                           : 0m
	Length (OM3)                              : 300m
	Laser wavelength                          : 850nm
	Vendor name                               : OEM
	Vendor OUI                                : 00:00:00
	Vendor PN                                 : SFP-10G-T
	Vendor rev                                : 1
	Option values                             : 0x00 0x1a
	Option                                    : RX_LOS implemented
	Option                                    : TX_FAULT implemented
	Option                                    : TX_DISABLE implemented
	BR margin, max                            : 0%
	BR margin, min                            : 0%
	Vendor SN                                 : 2506020007
	Date code                                 : 250530
	Optical diagnostics support               : Yes
	Laser bias current                        : 6.000 mA
	Laser output power                        : 0.5000 mW / -3.01 dBm
	Receiver signal average optical power     : 0.0000 mW / -inf dBm
	Module temperature                        : 54.52 degrees C / 130.13 degrees F
	Module voltage                            : 3.2987 V
	Alarm/warning flags implemented           : Yes
	Laser bias current high alarm             : Off
	Laser bias current low alarm              : Off
	Laser bias current high warning           : Off
	Laser bias current low warning            : Off
	Laser output power high alarm             : Off
	Laser output power low alarm              : Off
	Laser output power high warning           : Off
	Laser output power low warning            : Off
	Module temperature high alarm             : Off
	Module temperature low alarm              : Off
	Module temperature high warning           : Off
	Module temperature low warning            : Off
	Module voltage high alarm                 : Off
	Module voltage low alarm                  : Off
	Module voltage high warning               : Off
	Module voltage low warning                : Off
	Laser rx power high alarm                 : Off
	Laser rx power low alarm                  : On
	Laser rx power high warning               : Off
	Laser rx power low warning                : On
	Laser bias current high alarm threshold   : 15.000 mA
	Laser bias current low alarm threshold    : 1.000 mA
	Laser bias current high warning threshold : 13.000 mA
	Laser bias current low warning threshold  : 2.000 mA
	Laser output power high alarm threshold   : 1.9952 mW / 3.00 dBm
	Laser output power low alarm threshold    : 0.1584 mW / -8.00 dBm
	Laser output power high warning threshold : 1.5848 mW / 2.00 dBm
	Laser output power low warning threshold  : 0.1778 mW / -7.50 dBm
	Module temperature high alarm threshold   : 95.00 degrees C / 203.00 degrees F
	Module temperature low alarm threshold    : -50.00 degrees C / -58.00 degrees F
	Module temperature high warning threshold : 90.00 degrees C / 194.00 degrees F
	Module temperature low warning threshold  : -45.00 degrees C / -49.00 degrees F
	Module voltage high alarm threshold       : 3.6000 V
	Module voltage low alarm threshold        : 3.0000 V
	Module voltage high warning threshold     : 3.5000 V
	Module voltage low warning threshold      : 3.1000 V
	Laser rx power high alarm threshold       : 1.1220 mW / 0.50 dBm
	Laser rx power low alarm threshold        : 0.0199 mW / -17.01 dBm
	Laser rx power high warning threshold     : 1.0000 mW / 0.00 dBm
	Laser rx power low warning threshold      : 0.0223 mW / -16.52 dBm

Vendor seems to be missing. Could it be that Bipai/Sinovoip forgot to flash this?

There are many sfps having OEM as vendor…this is no issue,but with these strings the quirk/fixup is mapped in linux kernel

Thanks. I’ll start digging for info then. I naively thought that buying the module from Sinovoip would lead to a quick and easy SFP swap. Seems like I wasn’t so lucky. Maybe this thread gives others a heads’s up until we find a fix.

Do you have the corresponding phy driver installed? Maybe it is the aquantia 113c? Or another phy? You need this installed built-in/kernel-module,.

Then indeed also need a fixup for OEM, SFP-10G-T, which may or may not be already present in the kernel you use.

I guess it is a realtek phy as it is in most cheaper modules. Aquatia phys seem to be rare.

Can you give us the output as like here:

This will only work if the module is rollball, but chances are it is. The eth1/2 interface needs to be set link up before the i2cdump command at 0x56.

But do need to find the correct i2c bus to the used sfp. In this case it may not be 0.

i2cdetect with the module plugged in and removed may help you find the bus where there is a difference plugged in or not

Hi Eric, thanks for looking into this too. Output from

i2cdump -y 3 0x56

is:

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 20 40 00 02 31 c3 1c 13 60 31 00 9a e0 00 00 09     @.?1???`1.??..?
10: b3 01 00 00 00 00 40 fc 00 00 00 00 31 c3 1c 13    ??....@?....1???
20: 00 00 00 00 00 00 00 00 00 00 00 03 00 00 00 00    ...........?....
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................

I’m hoping this is what you asked for. I seem to have (a?) Realtek PHY driver, Mediatek and I am now building a kernel with Aquatia too. Let me know what the output from the i2cdump tells you.

#define AQUANTIA_PHY_113C_B1    0x31c31C13

Only can find this is in openwrt related patches… May need to add it also to kernel.

“Good news, everyone!” Turns out this was quite easy to fix. The SFP modules have the Aquantia AQR113C chip, and the chip is supported by the 6.12 kernel that I use (frank-w’s). For future reference, after building the CONFIG_AQUANTIA_PHY as a module everything seems to work.

Also related, iperf3 speed between two of these (each on a BPI-R4) is: 3.46 Gbits/sec.

Thank you @frank-w and @ericwoud for the help!