[BPI-R3] Which GPON ONU is working?

@frank-w

i can’t find the path to this file

is it one of these ?

kiki@ubuntu:/dev/shm/openwrt$ find . -name "*sfp*"
./target/linux/realtek/patches-5.15/712-net-phy-sfp-add-support-for-SMBus.patch
./target/linux/realtek/patches-5.15/710-net-phy-sfp-re-probe-modules-on-DEV_UP-event.patch
./target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts
./target/linux/ramips/dts/mt7621_snr_snr-cpe-me2-sfp.dts
./target/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7988a-rfb-eth2-sfp.dtso
./target/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7988a-rfb-eth1-sfp.dtso
./target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7988a-rfb-eth2-sfp.dtso
./target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7988a-rfb-eth1-sfp.dtso
./target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_falcon-sfp.dts
./target/linux/generic/backport-5.15/805-v5.19-0009-nvmem-sfp-Add-support-for-TA-2.1-devices.patch
./target/linux/generic/backport-5.15/805-v5.19-0008-nvmem-sfp-Use-regmap.patch
./target/linux/generic/backport-5.15/789-v6.3-net-sfp-add-quirk-enabling-2500Base-x-for-HG-MXPD-48.patch
./target/linux/generic/backport-5.15/787-v6.1-net-sfp-add-support-for-HALNy-GPON-SFP.patch
./target/linux/generic/backport-5.15/786-v6.1-net-sfp-move-Huawei-MA5671A-fixup.patch
./target/linux/generic/backport-5.15/785-v6.1-net-sfp-move-Alcatel-Lucent-3FE46541AA-fixup.patch
./target/linux/generic/backport-5.15/784-v6.1-net-sfp-move-quirk-handling-into-sfp.c.patch
./target/linux/generic/backport-5.15/783-v6.1-net-sfp-re-implement-soft-state-polling-setup.patch
kiki@ubuntu:/dev/shm/openwrt$

No,openwrt downloads a specific kernel version from official linux git and applies it patches to this source. I don’t know where it is downloaded/unpacked.

5.15 has a different quirk structure,so you have to adapt my code above to old structure

i don’t understand anything about this :thinking:

is there a topic opened already about the reboot issue ?

This is the last time i’ve pointed to it: R3 - thermal sensor went crazy after the kernel update

i found something here : BPI-R3 SD card boot error

Then remove my addition to the patch for now, it was only to try, guess it needs something extra …

Or maybe it does need to be in the quirk instead of the fixup… Normally it would be in the quirk (changes in eeprom info)

what exactly ??

here is the patch :

--- a/drivers/net/phy/sfp.c	2023-09-01 08:35:57.700716555 +0300
+++ b/drivers/net/phy/sfp.c	2023-09-01 13:28:23.793973851 +0300
@@ -327,6 +327,14 @@
 	sfp->tx_fault_ignore = true;
 }

+static void sfp_fixup_test(struct sfp *sfp)
+{
+	sfp->tx_fault_ignore = true;
+	sfp->module_t_start_up = T_START_UP_BAD_GPON;
+	sfp->id.ext.options &= ~(cpu_to_be16(SFP_OPTIONS_LOS_INVERTED) |
+				cpu_to_be16(SFP_OPTIONS_LOS_NORMAL));
+}
+
 static void sfp_fixup_halny_gsfp(struct sfp *sfp)
 {
 	/* Ignore the TX_FAULT and LOS signals on this module.
@@ -360,6 +368,7 @@
 		.vendor = "ALCATELLUCENT",
 		.part = "G010SP",
 		.modes = sfp_quirk_2500basex,
+		.fixup = sfp_fixup_test,
 	}, {
 		// Alcatel Lucent G-010S-A can operate at 2500base-X, but
 		// report 3.2GBd NRZ in their EEPROM

btw @Dale your patch is working well, i’m actually with my own image + your patch applied. Thanks !

can’t we just add the support for my other ONT here in this patch ??

If it is working then leave it…

I don’t remember seeing that Lantiq string, your other module was recognised as Huawei. I can add another quirk + fixup to the lantiq as well… hold on

Try this

it works better, but i can’t receive my IP from my ISP.

root@OpenWrt:/# ethtool eth1
Settings for eth1:
        Supported ports: [ FIBRE ]
        Supported link modes:   2500baseX/Full
                                1000baseX/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

ip a

root@OpenWrt:/# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1504 qdisc mq state UP qlen 1000
    link/ether b2:2d:e6:d9:d9:b3 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::b02d:e6ff:fed9:d9b3/64 scope link
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether e2:52:f8:bd:e9:e2 brd ff:ff:ff:ff:ff:ff
    inet 192.168.20.1/24 brd 192.168.20.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::e052:f8ff:febd:e9e2/64 scope link
       valid_lft forever preferred_lft forever
4: wan@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br-lan state LOWERLAYERDOWN qlen 1000
    link/ether e2:52:f8:bd:e9:e2 brd ff:ff:ff:ff:ff:ff
5: lan1@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br-lan state LOWERLAYERDOWN qlen 1000
    link/ether b2:2d:e6:d9:d9:b3 brd ff:ff:ff:ff:ff:ff
6: lan2@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether b2:2d:e6:d9:d9:b3 brd ff:ff:ff:ff:ff:ff
7: lan3@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether b2:2d:e6:d9:d9:b3 brd ff:ff:ff:ff:ff:ff
8: lan4@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br-lan state LOWERLAYERDOWN qlen 1000
    link/ether b2:2d:e6:d9:d9:b3 brd ff:ff:ff:ff:ff:ff
9: sfp2@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether b2:2d:e6:d9:d9:b3 brd ff:ff:ff:ff:ff:ff
10: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 00:0c:43:26:60:00 brd ff:ff:ff:ff:ff:ff
11: wlan1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether b6:2d:e6:d9:d9:b5 brd ff:ff:ff:ff:ff:ff
15: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether b2:2d:e6:d9:d9:b3 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.1/24 brd 192.168.1.255 scope global br-lan
       valid_lft forever preferred_lft forever
    inet6 fd5b:6915:1f::1/60 scope global noprefixroute
       valid_lft forever preferred_lft forever
    inet6 fe80::b02d:e6ff:fed9:d9b3/64 scope link
       valid_lft forever preferred_lft forever

ping 192.168.20.10

root@OpenWrt:/# ping 192.168.20.10
PING 192.168.20.10 (192.168.20.10): 56 data bytes
64 bytes from 192.168.20.10: seq=8 ttl=64 time=0.523 ms
64 bytes from 192.168.20.10: seq=8 ttl=64 time=0.569 ms (DUP!)
64 bytes from 192.168.20.10: seq=8 ttl=64 time=0.631 ms (DUP!)
64 bytes from 192.168.20.10: seq=9 ttl=64 time=0.817 ms
[  940.800077] mtk_soc_eth 15100000.ethernet eth1: Link is Down
[  941.830065] mtk_soc_eth 15100000.ethernet eth1: Link is Up - 2.5Gbps/Full - flow control off
64 bytes from 192.168.20.10: seq=9 ttl=64 time=15001.510 ms (DUP!)
64 bytes from 192.168.20.10: seq=24 ttl=64 time=0.861 ms
64 bytes from 192.168.20.10: seq=25 ttl=64 time=0.422 ms
64 bytes from 192.168.20.10: seq=26 ttl=64 time=0.368 ms
64 bytes from 192.168.20.10: seq=27 ttl=64 time=0.411 ms
64 bytes from 192.168.20.10: seq=28 ttl=64 time=0.300 ms
64 bytes from 192.168.20.10: seq=29 ttl=64 time=0.300 ms
64 bytes from 192.168.20.10: seq=30 ttl=64 time=0.351 ms
64 bytes from 192.168.20.10: seq=31 ttl=64 time=0.362 ms
64 bytes from 192.168.20.10: seq=32 ttl=64 time=4.561 ms
64 bytes from 192.168.20.10: seq=33 ttl=64 time=0.365 ms
64 bytes from 192.168.20.10: seq=34 ttl=64 time=0.292 ms
64 bytes from 192.168.20.10: seq=35 ttl=64 time=0.287 ms
64 bytes from 192.168.20.10: seq=36 ttl=64 time=0.371 ms
64 bytes from 192.168.20.10: seq=37 ttl=64 time=0.354 ms
64 bytes from 192.168.20.10: seq=38 ttl=64 time=0.302 ms
64 bytes from 192.168.20.10: seq=39 ttl=64 time=0.301 ms
64 bytes from 192.168.20.10: seq=40 ttl=64 time=0.365 ms
64 bytes from 192.168.20.10: seq=41 ttl=64 time=0.354 ms
64 bytes from 192.168.20.10: seq=42 ttl=64 time=0.413 ms
64 bytes from 192.168.20.10: seq=43 ttl=64 time=0.423 ms
64 bytes from 192.168.20.10: seq=44 ttl=64 time=0.412 ms
64 bytes from 192.168.20.10: seq=45 ttl=64 time=0.361 ms
64 bytes from 192.168.20.10: seq=43 ttl=64 time=11001.194 ms (DUP!)
64 bytes from 192.168.20.10: seq=44 ttl=64 time=10001.161 ms (DUP!)
64 bytes from 192.168.20.10: seq=45 ttl=64 time=9001.103 ms (DUP!)
64 bytes from 192.168.20.10: seq=54 ttl=64 time=0.502 ms
64 bytes from 192.168.20.10: seq=55 ttl=64 time=0.354 ms
64 bytes from 192.168.20.10: seq=55 ttl=64 time=13379.608 ms (DUP!)
64 bytes from 192.168.20.10: seq=54 ttl=64 time=14379.714 ms (DUP!)
64 bytes from 192.168.20.10: seq=45 ttl=64 time=23380.337 ms (DUP!)
64 bytes from 192.168.20.10: seq=54 ttl=64 time=14379.735 ms (DUP!)
64 bytes from 192.168.20.10: seq=55 ttl=64 time=13379.678 ms (DUP!)
64 bytes from 192.168.20.10: seq=69 ttl=64 time=0.411 ms
64 bytes from 192.168.20.10: seq=70 ttl=64 time=0.395 ms
64 bytes from 192.168.20.10: seq=55 ttl=64 time=24002.043 ms (DUP!)
64 bytes from 192.168.20.10: seq=54 ttl=64 time=25002.148 ms (DUP!)
64 bytes from 192.168.20.10: seq=69 ttl=64 time=10001.137 ms (DUP!)
64 bytes from 192.168.20.10: seq=70 ttl=64 time=9001.080 ms (DUP!)
64 bytes from 192.168.20.10: seq=55 ttl=64 time=24002.112 ms (DUP!)
64 bytes from 192.168.20.10: seq=69 ttl=64 time=10001.288 ms (DUP!)
64 bytes from 192.168.20.10: seq=80 ttl=64 time=0.295 ms
64 bytes from 192.168.20.10: seq=81 ttl=64 time=0.385 ms
^C
--- 192.168.20.10 ping statistics ---
83 packets transmitted, 30 packets received, 17 duplicates, 63% packet loss
round-trip min/avg/max = 0.287/4807.048/25002.148 ms

i can ping the ONT but here are (DUP!), so i guess something doesn’t work as expected and i don’t get my IP

the good thing is that it is now recognized at 2500mbps and eth1 is UP

Once i plug back the other ONT, everything works.

You should always write which ont you currently test…else it is hard to follow your resulta and what works and what not.

sorry, as the G-010S-P is now fully working, we are checking the MA5671A which is flashed with the fs.com firmware and viewed as "Lantiq Falcon SFP "

Is the MA5671A with original firmware working?

The dup ping could be caused by bit errors. Could you check ethtool statiatics (ethtool -s iface) if there are crc- or any other errors (fcs)?

Someone here reported he was using one with the original rooted firmware, and it was working.

I bought mine flashed with the FS.COM firmware, because the original firmware doesn’t work with my ISP.

I’m using R3 with the MA5671A and standard firmware on a relative old snapshot release of OpenWRT. It works ok. The same ONT never worked with other firmware with my R3 and ISP.

Have you tried recent version after adding the sfp power patch? If not can you please try?

I’m on r23223 with Kernel 5.15.114 that is already 3W patched. I found this on bootlog:

[14.723146] sfp sfp1: Host maximum power 3.0W [14.728273] sfp sfp2: Host maximum power 3.0W

I don’t want to risk with newer snapshots cause automatic upgrade don’t works anymore and I have no time and a secure way to revert in case of troubles. Anyway the issue seems not related with 3 watts patch.

My guess it is that the issue is related only with the MA5671A with not original firmware. Solving with FS.com firmware can be really useful ‘cause it is needed with different ISP / OLT manufacturers. Anyway I hope that solving for FS.com fw do not break the standard fw.

you can try different sdcard so you keep current version…if it does not work,try to find out exact version (git commit id) of your working version so we can try to find out whats missing