[BPI-R4] and SFP

Hello everyone, today I did a test - downloaded the latest snapshot image, turned off autoneg off using ethtool and my dfp-34x-2c2 started working!!! I temporarily threw a script into startup to turn off autoneg.

1 Like

Interestingly that on my r3+snapshot(SNAPSHOT r27426-232cc239b8 / LuCI Master 24.258.73557~4728618), autoneg doesn’t need to be disabled when using ODI stick. @dangowrt @frank-w Maybe this is a driver issue? I’m using the same firmware in the pon stick so it shouldn’t be pon’s firmware issue.

Settings for eth1:
	Supported ports: [ FIBRE ]
	Supported link modes:   2500baseX/Full
	Supported pause frame use: Symmetric Receive-only
	Supports auto-negotiation: Yes
	Supported FEC modes: Not reported
	Advertised link modes:  2500baseX/Full
	Advertised pause frame use: Symmetric Receive-only
	Advertised auto-negotiation: Yes
	Advertised FEC modes: Not reported
	Speed: 2500Mb/s
	Duplex: Full
	Auto-negotiation: on
	Port: FIBRE
	PHYAD: 0
	Transceiver: internal
        Current message level: 0x000000ff (255)
                               drv probe link timer ifdown ifup rx_err tx_err
	Link detected: yes
root@OpenWrt:~# uname -a
Linux OpenWrt 6.6.51 #0 SMP Sun Sep 15 22:19:49 2024 aarch64 GNU/Linux

On my old router bpi-r3 i no need any config to work dfp-34x-2c2, all working out of box. This trouble have my new bpi-r4.

@ericwoud I saw this commit, so the issue @kuzevich1983 and @Jefs met is a driver issue?

1 Like

The mtk hardware is not capable of doing inband auto-negotiation for 2500-basex. The linux kernel has no mechanism of dealing with this situation. Ideally, there should be a way for all phy- and mac-drtivers for all hardware to report their inband capabilities. Then phylink can setup both mac and phy, so they are working nicely together.

But there is no such thing (yet). It is very difficult to implement, because there is no standard for it yet and already much different hardware, implementing it all in different ways.

That patch is a crude solution that does something like it, but very simple and only applicable on R3/R3mini, and probably R4 also.

Another solution is to patch phy- and mac-drivers to handle this situation specifically on the hardware that it is being build for. I think this is still done on openwrt. So these patches need to be included in the build, or trouble starts again.

2 Likes

Have you found a solution to enable these mosfets without soldering?
I am having the same problems when trying to use a Zyxel PMG3000-D20B as described here.

Thanks for reply. Have you discussed with upstream maintainers about how to solve this issue? We can’t keep such an issue only having a downstream solution.

1 Like

Yes. Russell was working on something, but I guess it was not finished at that time. It is quite difficult to find a universal solution.

2 Likes

I have now removed the mosfets and replaced them with solder bridges as suggested in the linked post. The Modules now show up correctly in dmesg.

1 Like

I am looking for a 1 Gbps SPF/RJ45 adapter, compatible with the BPI-R4, to increase the number of Ethernet ports in my BPI-R4 box. I want to use the BPI-R4 like a router device in my lab. Each Ethernet port as the gateway for separate ipv4 LANs.

This SFP/RJ45 module listed on the Banana PI R4 site:

https://wiki.banana-pi.org/Getting_Started_with_BPI-R4#1.EF.BC.8910G_SFP_Module

AliExpress is the only place where it is available @ about USD 40/each

Besides the above are there any other SPF/RJ45 adapters (1Gbps OK) that work out of the box in BPI-R4? Please reply with brand/model. Thanks.

https://nl.aliexpress.com/item/1005006215128124.html

They sell a module with the 88E1111 inside. It is best supported in all linux distro’s. They sell 2 different ones, GSFP-1G-T and GSFP-1G-TX, so better contact them and ask them what is the difference…

Probably the difference is as described in this commit’s description.:

[PATCH v3] net: phy: marvell: add special handling of Finisar modules with 88E1111 (kernel.org)

With all the other 1g sfp modules on aliexpress it is unclear what is inside, unless you spend 20 or more on finisar of similar brands.

I am recently bought this adapters - https://aliexpress.com/item/1005007271882485.html?sku_id=12000040029177418 and its works perfectly fine with 1gbit and 2.5gbit standarts with bpi-r4

$40 for 3 pieces

and what i really like, this module have much lower temperature and power consumption then 10gbit version

root@OpenWrt:~# ethtool -m eth2
        Identifier                                : 0x03 (SFP)
        Extended identifier                       : 0x04 (GBIC/SFP defined by 2-wire interface ID)
        Connector                                 : 0x07 (LC)
        Transceiver codes                         : 0x00 0x01 0x00 0x00 0x00 0x00 0x02 0x00 0x00
        Transceiver type                          : SONET: OC-48, short reach
        Encoding                                  : 0x05 (SONET Scrambled)
        BR, Nominal                               : 2500MBd
        Vendor name                               : OEM
        Vendor OUI                                : 00:00:00
        Vendor PN                                 : SFP-2.5G-T
        Vendor rev                                : 1.0
        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                                 : XC202409051030
        Date code                                 : 240905
        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.4000 mW / -3.98 dBm
        Module temperature                        : 52.64 degrees C / 126.75 degrees F
        Module voltage                            : 3.3233 V
        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
1 Like

Could you please show the output of:

dmesg | grep sfp

Then we know which phy we are buying…

seems ethtool gives more information

root@OpenWrt:~# dmesg | grep sfp
[   70.209088] sfp sfp1: Host maximum power 3.0W
[   70.213974] sfp sfp2: Host maximum power 3.0W
[   70.533301] sfp sfp2: module OEM              10G-T-RM-Y-30    rev 1    sn C2408010077      dc 240731
[   70.561973] sfp sfp1: module OEM              SFP-2.5G-T       rev 1.0  sn XC202409051030   dc 240905

I was hoping to see 1 more line… Guess it is different on openwrt.

There are 2 versions of oem sfp-2.5g-t.

I guess he uses it without phy driver…too bad that shop does not ship to germany

It can be rtl8221 or yt8821

Do you know how to use i2cdump?

i2cdump -y 2 0x56

With 2 one needs to find the correct bus number.

root@OpenWrt:~# dmesg | grep i2c
[    2.203409] i2c_dev: i2c /dev entries driver
[   70.040657] i2c i2c-1: Added multiplexed i2c bus 2
[   70.045530] i2c i2c-1: Added multiplexed i2c bus 3
[   70.050386] i2c i2c-1: Added multiplexed i2c bus 4
[   70.055239] i2c i2c-1: Added multiplexed i2c bus 5
root@OpenWrt:~# i2cdetect -y 2
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- 51 -- -- -- -- -- UU -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: UU -- -- -- -- -- -- --
root@OpenWrt:~# i2cdetect -y 3
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: 50 51 -- -- -- -- 56 -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: UU -- -- -- -- -- -- --
root@OpenWrt:~# i2cdetect -y 4
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: 50 51 -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: UU -- -- -- -- -- -- --
root@OpenWrt:~# i2cdetect -y 5
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: UU -- -- -- -- -- -- --
root@OpenWrt:~#

root@OpenWrt:~# i2cdump -y 3 0x56
No size specified (using byte-data access)
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 20 58 00 06 00 1c c8 49 20 70 00 8a 80 00 00 30     X.?.??I p.??..0
10: 82 00 00 00 00 00 41 a0 00 00 00 00 00 1c c8 49    ?.....A?.....??I
20: 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00    ...........?....
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
root@OpenWrt:~# ethtool -m eth2 hex on
Offset          Values
------          ------
0x0000:         03 04 07 00 01 00 00 00 00 02 00 05 19 00 00 00
0x0010:         1e 14 00 00 4f 45 4d 20 20 20 20 20 20 20 20 20
0x0020:         20 20 20 20 00 00 00 00 53 46 50 2d 32 2e 35 47
0x0030:         2d 54 20 20 20 20 20 20 31 2e 30 20 03 52 00 19
0x0040:         00 1a 00 00 58 43 32 30 32 34 30 39 30 35 31 30
0x0050:         33 30 20 20 32 34 30 39 30 35 20 20 68 f0 01 1c
0x0060:         00 00 11 d6 c2 97 d0 20 20 77 eb 4a b1 91 06 77
0x0070:         e1 ff 4a 00 00 00 00 00 00 00 00 00 97 e3 3d a1
0x0080:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0090:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00a0:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00b0:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00c0:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00d0:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00e0:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00f0:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0100:         5f 00 ce 00 5a 00 d3 00 8c a0 75 30 88 b8 79 18
0x0110:         1d 4c 01 f4 19 64 03 e8 4d f0 06 30 3d e8 06 f2
0x0120:         2b d4 00 c7 27 10 00 df 00 00 00 00 00 00 00 00
0x0130:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0140:         00 00 00 00 3f 80 00 00 00 00 00 00 01 00 00 00
0x0150:         01 00 00 00 01 00 00 00 01 00 00 00 00 00 00 f1
0x0160:         31 7d 81 a4 0b b8 13 88 0f a0 ff ff ff ff 80 ff
0x0170:         00 00 ff ff 00 00 ff ff 02 ff ff ff ff ff ff 00
0x0180:         43 4e 55 49 41 46 4a 41 41 41 33 30 2d 31 33 30
0x0190:         31 2d 30 32 56 30 32 20 89 fb 55 00 00 00 00 78
0x01a0:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x01b0:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 aa aa
0x01c0:         47 4c 43 2d 53 58 2d 4d 4d 44 20 20 20 20 20 20
0x01d0:         20 20 20 20 00 00 00 00 00 00 00 00 00 00 00 a2
0x01e0:         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x01f0:         00 00 00 00 00 00 00 00 00 40 00 40 00 00 00 00