BPI-R3 SFP Module compatibility

Which slot do you use and which image/kernel do you use? My kernel has reworked phylink support. I’m not sure this is already merged to recent openwrt snapshots.

Can you provide ethtool for parent interface too? Maybe we need to add 2500baseX to adverticed modes.

Hi, Thanks for your help. I tried a dozen or more snapshots in the last 3 weeks. Now R3 is using this release.

  OpenWrt SNAPSHOT r21962-d649a8dcef

I’m testing recently in wan port ( left port = eth1 ). Already tested some weeks ago in lan port ( right port = sfp2 ) with the same results. If the port is empty ethtool shows 2500Base-x as available. The moment that plugged the xpon module it shows that message “mtk_soc_eth 15100000.ethernet eth1: switched to inband/1000base-x link mode” and doesn’t revert back to 2500base-x in any way. Unplugging the xpon module and after plugging a 2.5gbase-t module ( that works ok if plugged directly ) doesn’t solve this.

By parent interface do you are refering to what ? at night I can test and post the ethtool results.

I don’t know if openwrt use the phylink-changes currently mainline. Have no 2g5 sfp at the moment…only 1g fibre.

I meant eth1/lan4,you had posted only ethtool of the module itself.but the parent itself maybe should show both (maybe more) modes…eth1 itself can be 1g and 2g5,but sfp limits this to modes it supports

For 2g5 mode we have to look if speed needs to be set too…here for sfp1/eth1 sfp slot.

Or maybe this is wrong beginning here:

At least this looks strange to me:

if (interface == PHY_INTERFACE_MODE_2500BASEX)
		rgc3 = RG_PHY_SPEED_3_125G;
	else
		rgc3 = 0;
...
regmap_update_bits(mpcs->regmap, mpcs->ana_rgc3,
			   RG_PHY_SPEED_3_125G, rgc3);

Either RG_PHY_SPEED_3_125G is a genmask or a value,but using it as both in the regmap looks strange

Maybe you can add printks on these positions to figure out which mode is requested and if options are set right

eth1 after a reboot of bpi-r3.

ethtool eth1
Settings for eth1:
        Supported ports: [ MII ]
        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: Unknown!
        Duplex: Unknown! (255)
        Auto-negotiation: on
        Port: MII
        PHYAD: 0
        Transceiver: internal
        Current message level: 0x000000ff (255)
                               drv probe link timer ifdown ifup rx_err tx_err
        Link detected: no

After plugging the XPON SFP

at logread
Wed Feb  1 18:25:05 2023 kern.info kernel: [  151.432958] sfp sfp1: module ODI             DFP-34X-2C2      rev      sn XPON22120052     dc 221206
Wed Feb  1 18:25:05 2023 kern.info kernel: [  151.442363] mtk_soc_eth 15100000.ethernet eth1: switched to inband/1000base-x link mode
ethtool eth1
Settings for eth1:
        Supported ports: [ FIBRE ]
        Supported link modes:   1000baseX/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  1000baseX/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Speed: 1000Mb/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

Thx,so basicly eth1 is initially in 2500baseX/Full mode and change when sfp is inserted. You can try to force mode to 2500baseX in code i posted above

1 Like

@prdtabim

can you try if this series from @dangowrt fixes your 2g5-problem?

https://patchwork.kernel.org/project/linux-mediatek/cover/[email protected]/

?

see comment in coverletter as it requires additional patch to 6.2 for apply

Hi

Thanks for the tips. I will try this weekend.

note series is based on net-next (patch 8 will fail, so apply it with reject and make changes manually)

have applied series here, but have no 2g5 sfp to test: https://github.com/frank-w/BPI-Router-Linux/tree/6.2-netnext-pcs

Updated series is here https://patchwork.kernel.org/project/linux-mediatek/cover/[email protected]/

This one has an option to order for banana pi

€ 14,24 59%OFF | SFP-2.5GE-RJ45 Gigabit 2.5G Module SFP To RJ45 Optical Interface Expansion 2500M Rate Compatible Huawei H3C Cisco TPLINK Switch https://a.aliexpress.com/_EyiBS4l

Anyone have any experience?

3 Likes

Just tested a couple of Huawei MA5671A GPON sticks with standard rooted firmware and Carlito firmware. Both seems to works at 2.5Gbps. Some reeboot attempts are needed to be recognized by R3. I get EEPROM -6 reading error (the EEPROM is simulated on MA5671). Maybe due to the fact that this device is slow to start (fyi it uses an old OpenWRT version). On my TP-LInk MC220L media converter the sticks works without issues. Probably a longer timeout somewhere on R3 startup procedure may be useful…

I got the 2g5 sfps i ordered from erics link above.

They work well with v12 of daniels patches on 6.3. v13 does not work as he needs to drop a patch (or 2) for 2500base-X support. This needs to be done via sfp quirks. It is a software issue we try to solve…hardware works well…i get ~ 2.4 gbit/s with iperf3

Here is a new sale for 13.22€ and without shipping costs if interested:

https://m.de.aliexpress.com/item/1005005052139284.html

1 Like

Ordered a pair. I hope these will be made compatible soon with OpenWRT. :wink:

I guess daniel will add the rejected patches to openwrt till a better solution is available

Guess those sales really do not last more than a couple of days… Price is already up on that link as well.

Anyway, I have received the 2 from the first link.

Noticed a possible bug with the 2g5 sfp while bootup and cable connected. Uboot does bot found sd/-partitions. Also full powercycle (disconect power completely for some minutes) does not help. Only disconnecting the cable and powercycle.

It is possible that there are slightly different gnd levels between r3 and my laptop which are bridged by the cable,have not done more tests (e.g. direct connection to rj45 ports of r3 to my laptop…these are connected to my switch).

When i’m in linux there are no issues anymore only uboot seems to be disturbed.

Just in case anyone else fall into it.

I just received the SFP module from Aliexpress. Tried it with OpenWrt SNAPSHOT r22257 on the LAN port (on the WAN I have a Mini ONT MA5671A). I hot plugged the module in, it is recognized and everything seems to work correctly.

I will try to see if rebooting with the cable plugged in causes any problems.

Just received 2 modules from this seller. Working perfectly fine on OpenWrt SNAPSHOT r22235.

do the TL-sm410U work at 1gbit on the BPI-R3?

This module has internal phy which support is currently WIP (discussion between daniel and russel in netdev mailinglist). My cn module can support it,but we have no phy and it can cause retransmitts if more than 1G is transferred (no working flowcontrol on <2g5)