[BPI-R3] Which GPON ONU is working?

drivers/net/phy/sfp.c sfp_quirk_2500basex() would be easiest.

I’ve included his suggestion in this patch

I see you moved it to the fixup. I see id is set in sfp, before calling fixup so should also work.

But sfp->id->ext.options will fail builing, it needs to be sfp->id.ext.options then.

You’re right, sorry. @Rooot just manually change it with a text editor

ok, i’ll try ! Thanks !

First question : which git should i use ? this one https://git.openwrt.org/openwrt/openwrt.git or the one from dangowrt ?

Use the first one, Daniel already merged everything

well, i’m lost, where is this folder ?

i followed this howto : https://openwrt.org/docs/guide-developer/toolchain/use-buildsystem

and now i’m at the step where i have to do the “make menuconfig”. i guess i have to place the file before the “menuconfig” ?

Just place it in /target/linux/mediatek/patches-5.15 . The menuconfig is irrelevant to patches

1 Like

Ha thanks, i found it.

@Dale one thing i noticed with the image you made me. When i perform a reboot from Luci or from the shell, the router try to reboot from the nand, so it goes in a bootloop. i have to go with uart to manually set SDCARD in the menu. why does this happen? and do you know how to fix this ?

▒▒▒9▒▒▒DV▒▒c▒Nk▒
ARP Retry count exceeded; starting again
Wrong Image Format for bootm command
ERROR: can't get kernel image!
* spi-nand0
  - device: spi_nand@1
  - parent: spi@1100a000
  - driver: spi_nand
  - type: NAND flash
  - block size:        0x20000 bytes
  - page size:         0x800 bytes
  - OOB size:          64 bytes
  - OOB available:     24 bytes
  - 0x000000000000-0x000008000000 : "spi-nand0"
          - 0x000000000000-0x000000080000 : "bl2"
          - 0x000000080000-0x000000380000 : "factory"
          - 0x000000380000-0x000000580000 : "fip"
          - 0x000000580000-0x000008000000 : "ubi"
Using ethernet@15100000 device
TFTP from server 192.168.1.254; our IP address is 192.168.1.1
Filename 'openwrt-mediatek-filogic-bananapi_bpi-r3-initramfs-recovery.itb'.
Load address: 0x46000000
Loading: *
ARP Retry count exceeded; starting again
Wrong Image Format for bootm command
ERROR: can't get kernel image!
* spi-nand0
  - device: spi_nand@1
  - parent: spi@1100a000
  - driver: spi_nand
  - type: NAND flash
  - block size:        0x20000 bytes
  - page size:         0x800 bytes
  - OOB size:          64 bytes
  - OOB available:     24 bytes
  - 0x000000000000-0x000008000000 : "spi-nand0"
          - 0x000000000000-0x000000080000 : "bl2"
          - 0x000000080000-0x000000380000 : "factory"
          - 0x000000380000-0x000000580000 : "fip"
          - 0x000000580000-0x000008000000 : "ubi"
Using ethernet@15100000 device
TFTP from server 192.168.1.254; our IP address is 192.168.1.1
Filename 'openwrt-mediatek-filogic-bananapi_bpi-r3-initramfs-recovery.itb'.
Load address: 0x46000000
Loading: *
F0: 102B 0000
FA: 1040 0000
FA: 1040 0000 [0200]
F9: 103F 0000
F3: 1001 0000 [0200]
F3: 1001 0000
F6: 300C 0028
F5: 0000 0000
V0: 0000 0000 [0001]
00: 0000 0000
BP: 2400 0041 [0000]
G0: 1190 0000
EC: 0000 0000 [3000]
T0: 0000 0246 [010F]
Jump to BL

NOTICE:  BL2: v2.9(release):OpenWrt v2023-07-24-00ac6db3-1 (mt7986-sdmmc-ddr4)
NOTICE:  BL2: Built : 21:45:47, Sep  1 2023
NOTICE:  WDT: Cold boot
NOTICE:  WDT: disabled
NOTICE:  CPU: MT7986 (2000MHz)
NOTICE:  EMI: Using DDR4 settings
NOTICE:  EMI: Detected DRAM size: 2048MB
NOTICE:  EMI: complex R/W mem test passed
NOTICE:  BL2: Booting BL31
NOTICE:  BL31: v2.9(release):OpenWrt v2023-07-24-00ac6db3-1 (mt7986-sdmmc-ddr4)
NOTICE:  BL31: Built : 21:45:47, Sep  1 2023


U-Boot 2023.07.02-OpenWrt-r23868-02214ab8dc (Sep 01 2023 - 21:45:47 +0000)

CPU:   MediaTek MT7986
Model: BananaPi BPi-R3
DRAM:  2 GiB
Core:  53 devices, 24 uclasses, devicetree: embed
jedec_spi_nor spi_nor@0: unrecognized JEDEC id bytes: ff, ef, aa
MMC:   mmc@11230000: 0
Loading Environment from MMC... OK
In:    serial@11002000
Out:   serial@11002000
Err:   serial@11002000
Loading Environment from MMC... OK
Net:   eth0: ethernet@15100000
Cannot read EFI system partition
Cannot read EFI system partition
Failed to persist EFI variables

        ( ( ( OpenWrt ) ) )  [SD card]       U-Boot 2023.07.02-OpenWrt-r23868-02214ab8dc (Sep 01 2023 - 21:45:47 +0000)

      1. Run default boot command.
      2. Boot system via TFTP.
      3. Boot production system from SD card.
      4. Boot recovery system from SD card.
      5. Load production system via TFTP then write to SD card.
      6. Load recovery system via TFTP then write to SD card.
      7. Install bootloader, recovery and production to NOR.
      8. Install bootloader, recovery and production to NAND.
      9. Reboot.
      a. Reset all settings to factory defaults.
      0. U-Boot console


  Press UP/DOWN to move, ENTER to select, ESC to quit
spi-nand: spi_nand spi_nand@1: Winbond SPI NAND was found.
spi-nand: spi_nand spi_nand@1: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
jedec_spi_nor spi_nor@0: unrecognized JEDEC id bytes: 00, ef, aa
'spi-nand0' is now active device
* spi-nand0
  - device: spi_nand@1
  - parent: spi@1100a000
  - driver: spi_nand
  - type: NAND flash
  - block size:        0x20000 bytes
  - page size:         0x800 bytes
  - OOB size:          64 bytes
  - OOB available:     24 bytes
  - 0x000000000000-0x000008000000 : "spi-nand0"
          - 0x000000000000-0x000000080000 : "bl2"
          - 0x000000080000-0x000000380000 : "factory"
          - 0x000000380000-0x000000580000 : "fip"
          - 0x000000580000-0x000008000000 : "ubi"

MMC read: dev # 0, block # 131072, count 256 ... 256 blocks read: OK

MMC read: dev # 0, block # 131072, count 50824 ... 0 blocks read: ERROR
* spi-nand0
  - device: spi_nand@1
  - parent: spi@1100a000
  - driver: spi_nand
  - type: NAND flash
  - block size:        0x20000 bytes
  - page size:         0x800 bytes
  - OOB size:          64 bytes
  - OOB available:     24 bytes
  - 0x000000000000-0x000008000000 : "spi-nand0"
          - 0x000000000000-0x000000080000 : "bl2"
          - 0x000000080000-0x000000380000 : "factory"
          - 0x000000380000-0x000000580000 : "fip"
          - 0x000000580000-0x000008000000 : "ubi"
* spi-nand0
  - device: spi_nand@1
  - parent: spi@1100a000
  - driver: spi_nand
  - type: NAND flash
  - block size:        0x20000 bytes
  - page size:         0x800 bytes
  - OOB size:          64 bytes
  - OOB available:     24 bytes
  - 0x000000000000-0x000008000000 : "spi-nand0"
          - 0x000000000000-0x000000080000 : "bl2"
          - 0x000000080000-0x000000380000 : "factory"
          - 0x000000380000-0x000000580000 : "fip"
          - 0x000000580000-0x000008000000 : "ubi"
* spi-nand0
  - device: spi_nand@1
  - parent: spi@1100a000
  - driver: spi_nand
  - type: NAND flash
  - block size:        0x20000 bytes
  - page size:         0x800 bytes
  - OOB size:          64 bytes
  - OOB available:     24 bytes
  - 0x000000000000-0x000008000000 : "spi-nand0"
          - 0x000000000000-0x000000080000 : "bl2"
          - 0x000000080000-0x000000380000 : "factory"
          - 0x000000380000-0x000000580000 : "fip"
          - 0x000000580000-0x000008000000 : "ubi"
Using ethernet@15100000 device
TFTP from server 192.168.1.254; our IP address is 192.168.1.1
Filename 'openwrt-mediatek-filogic-bananapi_bpi-r3-initramfs-recovery.itb'.
Load address: 0x46000000
Loading: *
F0: 102B 0000
FA: 1040 0000
FA: 1040 0000 [0200]
F9: 103F 0000
F3: 1001 0000 [0200]
F3: 1001 0000
F6: 300C 0028
F5: 0000 0000
V0: 0000 0000 [0001]
00: 0000 0000
BP: 2400 0041 [0000]
G0: 1190 0000
EC: 0000 0000 [3000]
T0: 0000 0246 [010F]
Jump to BL

NOTICE:  BL2: v2.9(release):OpenWrt v2023-07-24-00ac6db3-1 (mt7986-sdmmc-ddr4)
NOTICE:  BL2: Built : 21:45:47, Sep  1 2023
NOTICE:  WDT: Cold boot
NOTICE:  WDT: disabled
NOTICE:  CPU: MT7986 (2000MHz)
NOTICE:  EMI: Using DDR4 settings
NOTICE:  EMI: Detected DRAM size: 2048MB
NOTICE:  EMI: complex R/W mem test passed
NOTICE:  BL2: Booting BL31
NOTICE:  BL31: v2.9(release):OpenWrt v2023-07-24-00ac6db3-1 (mt7986-sdmmc-ddr4)
NOTICE:  BL31: Built : 21:45:47, Sep  1 2023


U-Boot 2023.07.02-OpenWrt-r23868-02214ab8dc (Sep 01 2023 - 21:45:47 +0000)

CPU:   MediaTek MT7986
Model: BananaPi BPi-R3
DRAM:  2 GiB
Core:  53 devices, 24 uclasses, devicetree: embed
jedec_spi_nor spi_nor@0: unrecognized JEDEC id bytes: ff, ef, aa
MMC:   mmc@11230000: 0
Loading Environment from MMC... OK
In:    serial@11002000
Out:   serial@11002000
Err:   serial@11002000
Loading Environment from MMC... OK
Net:   eth0: ethernet@15100000
Cannot read EFI system partition
Cannot read EFI system partition
Failed to persist EFI variables

        ( ( ( OpenWrt ) ) )  [SD card]       U-Boot 2023.07.02-OpenWrt-r23868-02214ab8dc (Sep 01 2023 - 21:45:47 +0000)

      1. Run default boot command.
      2. Boot system via TFTP.
      3. Boot production system from SD card.
      4. Boot recovery system from SD card.
      5. Load production system via TFTP then write to SD card.
      6. Load recovery system via TFTP then write to SD card.
      7. Install bootloader, recovery and production to NOR.
      8. Install bootloader, recovery and production to NAND.
      9. Reboot.
      a. Reset all settings to factory defaults.
      0. U-Boot console

something else : This patch doesn’t add support for my MA5671A. Wasn’t there a patch added for this ONT too? Currently it doesn’t work if I put it with your last image.

Tomorow morning i’ll post the logs when i plug this ONT.

as a reminder, here i posted the vendor_name and vendor_pn for my MA5671A flashed with a fs.com firmware : [BPI-R3] Which GPON ONU is working?

root@OpenWrt:/# [  189.949737] sfp sfp-1: module Lantiq           Falcon SFP       rev 0    sn 032WDY10J8020978 dc 180607

Does it work without plugging in fiber?

So your MA5671A does not show up as such? So the existing quirk for the huawei sfp is not triggered…

Can you post ethtool -m output? Does the one work with original firmware?

logread | grep ‘sfp-1’

root@OpenWrt:/# logread | grep 'sfp-1'
Tue Sep  5 21:06:51 2023 kern.info kernel: [    9.710030] sfp sfp-1: Host maximum power 3.0W
Tue Sep  5 21:06:51 2023 kern.info kernel: [    9.714509] sfp sfp-1: tx disable 1 -> 1
Tue Sep  5 21:06:51 2023 kern.info kernel: [    9.718433] sfp sfp-1: SM: enter empty:detached:down event insert
Tue Sep  5 21:06:51 2023 kern.info kernel: [    9.724513] sfp sfp-1: SM: exit probe:detached:down
Tue Sep  5 21:06:51 2023 kern.info kernel: [    9.729656] sfp sfp-1: SM: enter probe:detached:down event dev_attach
Tue Sep  5 21:06:51 2023 kern.info kernel: [    9.736136] sfp sfp-1: SM: exit probe:down:down
Tue Sep  5 21:06:51 2023 kern.info kernel: [   10.025101] sfp sfp-1: SM: enter probe:down:down event timeout
Tue Sep  5 21:06:51 2023 kern.info kernel: [   10.060604] sfp sfp-1: module Lantiq           Falcon SFP       rev 0    sn 032WDY10J8020978 dc 180607
Tue Sep  5 21:06:51 2023 kern.info kernel: [   10.078077] sfp sfp-1: SM: exit present:down:down
Tue Sep  5 21:06:53 2023 kern.info kernel: [   15.780199] sfp sfp-1: SM: enter present:down:down event dev_up
Tue Sep  5 21:06:53 2023 kern.info kernel: [   15.786144] sfp sfp-1: tx disable 1 -> 0
Tue Sep  5 21:06:53 2023 kern.info kernel: [   15.790240] sfp sfp-1: SM: exit present:up:wait
Tue Sep  5 21:06:53 2023 kern.info kernel: [   15.841140] sfp sfp-1: SM: enter present:up:wait event timeout
Tue Sep  5 21:06:53 2023 kern.info kernel: [   15.847010] sfp sfp-1: SM: exit present:up:link_up
Tue Sep  5 21:08:56 2023 kern.info kernel: [  139.192507] sfp sfp-1: los 0 -> 1
Tue Sep  5 21:08:56 2023 kern.info kernel: [  139.195839] sfp sfp-1: SM: enter present:up:link_up event los_high
Tue Sep  5 21:08:56 2023 kern.info kernel: [  139.202026] sfp sfp-1: SM: exit present:up:wait_los
Tue Sep  5 21:08:59 2023 kern.info kernel: [  141.611619] sfp sfp-1: mod-def0 1 -> 0
Tue Sep  5 21:08:59 2023 kern.info kernel: [  141.615402] sfp sfp-1: SM: enter present:up:wait_los event remove
Tue Sep  5 21:08:59 2023 kern.info kernel: [  141.621682] sfp sfp-1: module removed
Tue Sep  5 21:08:59 2023 kern.info kernel: [  141.625339] sfp sfp-1: tx disable 0 -> 1
Tue Sep  5 21:08:59 2023 kern.info kernel: [  141.629262] sfp sfp-1: SM: exit empty:up:down
Tue Sep  5 21:08:59 2023 kern.info kernel: [  141.633626] sfp sfp-1: tx-fault 0 -> 1
Tue Sep  5 21:08:59 2023 kern.info kernel: [  141.637367] sfp sfp-1: SM: enter empty:up:down event tx_fault
Tue Sep  5 21:08:59 2023 kern.info kernel: [  141.643100] sfp sfp-1: SM: exit empty:up:down

logread | grep ‘eth1’

root@OpenWrt:/# logread | grep 'eth1'
Tue Sep  5 21:06:51 2023 kern.info kernel: [    1.112130] mtk_soc_eth 15100000.ethernet eth1: mediatek frame engine at 0xffffffc009600000, irq 136
Tue Sep  5 21:06:51 2023 kern.info kernel: [   10.070089] mtk_soc_eth 15100000.ethernet eth1: switched to inband/1000base-x link mode
Tue Sep  5 21:06:53 2023 kern.info kernel: [   15.771679] mtk_soc_eth 15100000.ethernet eth1: configuring for inband/1000base-x link mode
Tue Sep  5 21:06:53 2023 daemon.info avahi-daemon[2144]: Joining mDNS multicast group on interface eth1.IPv4 with address 192.168.20.1.
Tue Sep  5 21:06:53 2023 daemon.info avahi-daemon[2144]: New relevant interface eth1.IPv4 for mDNS.
Tue Sep  5 21:06:53 2023 daemon.info avahi-daemon[2144]: Registering new address record for 192.168.20.1 on eth1.IPv4.
Tue Sep  5 21:06:53 2023 kern.info kernel: [   15.851144] mtk_soc_eth 15100000.ethernet eth1: Link is Up - 1Gbps/Full - flow control off
Tue Sep  5 21:06:53 2023 daemon.notice netifd: Network device 'eth1' link is up
Tue Sep  5 21:06:53 2023 kern.info kernel: [   15.860127] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
Tue Sep  5 21:06:53 2023 user.notice firewall: Reloading firewall due to ifup of ont (eth1)
Tue Sep  5 21:06:54 2023 kern.info kernel: [   16.803153] mtk_soc_eth 15100000.ethernet eth1: Link is Down
Tue Sep  5 21:06:54 2023 daemon.notice netifd: Network device 'eth1' link is down
Tue Sep  5 21:06:54 2023 daemon.info avahi-daemon[2144]: Joining mDNS multicast group on interface eth1.IPv6 with address fe80::f4f4:55ff:fe12:836b.
Tue Sep  5 21:06:54 2023 daemon.info avahi-daemon[2144]: New relevant interface eth1.IPv6 for mDNS.
Tue Sep  5 21:06:54 2023 daemon.info avahi-daemon[2144]: Registering new address record for fe80::f4f4:55ff:fe12:836b on eth1.*.
Tue Sep  5 21:06:58 2023 daemon.notice netifd: Network device 'eth1' link is up
Tue Sep  5 21:06:58 2023 kern.info kernel: [   20.897126] mtk_soc_eth 15100000.ethernet eth1: Link is Up - 1Gbps/Full - flow control off
Tue Sep  5 21:07:15 2023 kern.info kernel: [   38.305112] mtk_soc_eth 15100000.ethernet eth1: Link is Down
Tue Sep  5 21:07:15 2023 daemon.notice netifd: Network device 'eth1' link is down
Tue Sep  5 21:07:25 2023 daemon.notice netifd: Network device 'eth1' link is up
Tue Sep  5 21:07:25 2023 kern.info kernel: [   47.521118] mtk_soc_eth 15100000.ethernet eth1: Link is Up - 1Gbps/Full - flow control off
Tue Sep  5 21:07:26 2023 kern.info kernel: [   48.545116] mtk_soc_eth 15100000.ethernet eth1: Link is Down
Tue Sep  5 21:07:26 2023 daemon.notice netifd: Network device 'eth1' link is down
Tue Sep  5 21:07:29 2023 daemon.notice netifd: Network device 'eth1' link is up
Tue Sep  5 21:07:29 2023 kern.info kernel: [   51.617120] mtk_soc_eth 15100000.ethernet eth1: Link is Up - 1Gbps/Full - flow control off
Tue Sep  5 21:07:30 2023 kern.info kernel: [   52.641117] mtk_soc_eth 15100000.ethernet eth1: Link is Down
Tue Sep  5 21:07:30 2023 daemon.notice netifd: Network device 'eth1' link is down
Tue Sep  5 21:07:34 2023 daemon.notice netifd: Network device 'eth1' link is up
Tue Sep  5 21:07:34 2023 kern.info kernel: [   56.737133] mtk_soc_eth 15100000.ethernet eth1: Link is Up - 1Gbps/Full - flow control off
Tue Sep  5 21:07:35 2023 kern.info kernel: [   57.761129] mtk_soc_eth 15100000.ethernet eth1: Link is Down
Tue Sep  5 21:07:35 2023 daemon.notice netifd: Network device 'eth1' link is down
Tue Sep  5 21:07:39 2023 daemon.notice netifd: Network device 'eth1' link is up
Tue Sep  5 21:07:39 2023 kern.info kernel: [   61.857118] mtk_soc_eth 15100000.ethernet eth1: Link is Up - 1Gbps/Full - flow control off
Tue Sep  5 21:07:40 2023 kern.info kernel: [   62.881107] mtk_soc_eth 15100000.ethernet eth1: Link is Down
Tue Sep  5 21:07:40 2023 daemon.notice netifd: Network device 'eth1' link is down
Tue Sep  5 21:07:50 2023 daemon.notice netifd: Network device 'eth1' link is up
Tue Sep  5 21:07:50 2023 kern.info kernel: [   73.121134] mtk_soc_eth 15100000.ethernet eth1: Link is Up - 1Gbps/Full - flow control off
Tue Sep  5 21:08:30 2023 kern.info kernel: [  113.057116] mtk_soc_eth 15100000.ethernet eth1: Link is Down
Tue Sep  5 21:08:30 2023 daemon.notice netifd: Network device 'eth1' link is down
Tue Sep  5 21:08:38 2023 daemon.notice netifd: Network device 'eth1' link is up
Tue Sep  5 21:08:38 2023 kern.info kernel: [  121.249114] mtk_soc_eth 15100000.ethernet eth1: Link is Up - 1Gbps/Full - flow control off
Tue Sep  5 21:08:55 2023 kern.info kernel: [  137.633116] mtk_soc_eth 15100000.ethernet eth1: Link is Down

ethtool -m eth1

root@OpenWrt:/# ethtool -m eth1
        Identifier                                : 0x03 (SFP)
        Extended identifier                       : 0x04 (GBIC/SFP defined by 2-wire interface ID)
        Connector                                 : 0x01 (SC)
        Transceiver codes                         : 0x00 0x00 0x00 0x02 0x00 0x00 0x00 0x00 0x00
        Transceiver type                          : Ethernet: 1000BASE-LX
        Encoding                                  : 0x03 (NRZ)
        BR, Nominal                               : 1200MBd
        Rate identifier                           : 0x00 (unspecified)
        Length (SMF,km)                           : 20km
        Length (SMF)                              : 20000m
        Length (50um)                             : 0m
        Length (62.5um)                           : 0m
        Length (Copper)                           : 0m
        Length (OM3)                              : 0m
        Laser wavelength                          : 1310nm
        Vendor name                               : Lantiq
        Vendor OUI                                : 00:00:00
        Vendor PN                                 : Falcon SFP
        Vendor rev                                : 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                                 : 032WDY10J8020978
        Date code                                 : 180607
        Optical diagnostics support               : Yes
        Laser bias current                        : 10.010 mA
        Laser output power                        : 1.7841 mW / 2.51 dBm
        Receiver signal average optical power     : 0.0082 mW / -20.86 dBm
        Module temperature                        : 46.27 degrees C / 115.28 degrees F
        Module voltage                            : 3.3365 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                  : Off
        Laser rx power high warning               : Off
        Laser rx power low warning                : Off
        Laser bias current high alarm threshold   : 90.000 mA
        Laser bias current low alarm threshold    : 0.000 mA
        Laser bias current high warning threshold : 70.000 mA
        Laser bias current low warning threshold  : 0.000 mA
        Laser output power high alarm threshold   : 3.9810 mW / 6.00 dBm
        Laser output power low alarm threshold    : 0.8912 mW / -0.50 dBm
        Laser output power high warning threshold : 3.1622 mW / 5.00 dBm
        Laser output power low warning threshold  : 1.1220 mW / 0.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       : 0.2511 mW / -6.00 dBm
        Laser rx power low alarm threshold        : 0.0013 mW / -28.86 dBm
        Laser rx power high warning threshold     : 0.1995 mW / -7.00 dBm
        Laser rx power low warning threshold      : 0.0016 mW / -27.96 dBm

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 f6:f4:55:12:83:6a brd ff:ff:ff:ff:ff:ff
    inet6 fe80::f4f4:55ff:fe12:836a/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 f6:f4:55:12:83:6b 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::f4f4:55ff:fe12:836b/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 f6:f4:55:12:83:6b 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 f6:f4:55:12:83:6a 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 f6:f4:55:12:83:6a 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 f6:f4:55:12:83:6a 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 f6:f4:55:12:83:6a 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 f6:f4:55:12:83:6a brd ff:ff:ff:ff:ff:ff
12: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether f6:f4:55:12:83:6a 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 fd49:9937:b68a::1/60 scope global noprefixroute
       valid_lft forever preferred_lft forever
    inet6 fe80::f4f4:55ff:fe12:836a/64 scope link
       valid_lft forever preferred_lft forever
13: phy1-ap0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether f6:f4:55:12:83:6c brd ff:ff:ff:ff:ff:ff
    inet6 fe80::f4f4:55ff:fe12:836c/64 scope link
       valid_lft forever preferred_lft forever
14: phy0-ap0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether f2:f4:55:12:83:6c brd ff:ff:ff:ff:ff:ff
    inet6 fe80::f0f4:55ff:fe12:836c/64 scope link
       valid_lft forever preferred_lft forever

Because of the “link is up/down” the ONT become pingable for a few seconds and after it doesn’t respond, i even had the time to connect to it with ssh for a few seconds also.

When it is the huawei recognized as Lantiq then you have to copy this quirk with the new values

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/phy/sfp.c?id=v6.1#n394

So adding this after the huawei one:

SFP_QUIRK("Lantiq", "Falcon SFP", sfp_quirk_2500basex,
		  sfp_fixup_ignore_tx_fault),

And maybe the special los handling from eric

I actualy have a problem when i reboot the BPI-R3, each time it doesn’t find the sdcard, i have to reboot from the uart menu several time untill it works

Yes this is a known issue where i wait for mtk…sometimes card is not recognized in uboot

without the fiber connected I can’t ping it, same behavior as with the other ONT.

And it doesn’t do the “Link up/Link down” once the ONT is inserted.

root@OpenWrt:/# [ 1457.946834] sfp sfp-1: los 0 -> 1
[ 1457.950162] sfp sfp-1: SM: enter present:up:link_up event los_high
[ 1457.956350] mtk_soc_eth 15100000.ethernet eth1: Link is Down
[ 1457.962039] sfp sfp-1: SM: exit present:up:wait_los
[ 1459.428792] sfp sfp-1: mod-def0 1 -> 0
[ 1459.432564] sfp sfp-1: SM: enter present:up:wait_los event remove
[ 1459.438852] sfp sfp-1: module removed
[ 1459.442511] sfp sfp-1: tx disable 0 -> 1
[ 1459.446434] sfp sfp-1: SM: exit empty:up:down
[ 1465.502858] sfp sfp-1: mod-def0 0 -> 1
[ 1465.506670] sfp sfp-1: SM: enter empty:up:down event insert
[ 1465.512236] sfp sfp-1: SM: exit probe:up:down
[ 1465.814647] sfp sfp-1: SM: enter probe:up:down event timeout
[ 1465.821745] sfp sfp-1: SM: exit probe:up:down
[ 1465.926500] sfp sfp-1: SM: enter probe:up:down event timeout
[ 1465.933558] sfp sfp-1: SM: exit probe:up:down
[ 1466.038348] sfp sfp-1: SM: enter probe:up:down event timeout
[ 1466.045410] sfp sfp-1: SM: exit probe:up:down
[ 1466.051074] sfp sfp-1: los 1 -> 0
[ 1466.054381] sfp sfp-1: SM: enter probe:up:down event los_low
[ 1466.060026] sfp sfp-1: SM: exit probe:up:down
[ 1466.064397] sfp sfp-1: los 0 -> 1
[ 1466.067703] sfp sfp-1: SM: enter probe:up:down event los_high
[ 1466.073434] sfp sfp-1: SM: exit probe:up:down
[ 1466.150232] sfp sfp-1: SM: enter probe:up:down event timeout
[ 1466.157285] sfp sfp-1: SM: exit probe:up:down
[ 1466.262112] sfp sfp-1: SM: enter probe:up:down event timeout
[ 1466.269165] sfp sfp-1: SM: exit probe:up:down
[ 1466.374003] sfp sfp-1: SM: enter probe:up:down event timeout
[ 1466.381045] sfp sfp-1: SM: exit probe:up:down
[ 1466.485889] sfp sfp-1: SM: enter probe:up:down event timeout
[ 1466.492929] sfp sfp-1: SM: exit probe:up:down
[ 1466.597775] sfp sfp-1: SM: enter probe:up:down event timeout
[ 1466.604816] sfp sfp-1: SM: exit probe:up:down
[ 1466.709667] sfp sfp-1: SM: enter probe:up:down event timeout
[ 1466.716729] sfp sfp-1: SM: exit probe:up:down
[ 1466.821551] sfp sfp-1: SM: enter probe:up:down event timeout
[ 1466.828684] sfp sfp-1: please wait, module slow to respond
[ 1466.834163] sfp sfp-1: SM: exit probe:up:down
[ 1472.135898] sfp sfp-1: SM: enter probe:up:down event timeout
[ 1472.142977] sfp sfp-1: SM: exit probe:up:down
[ 1477.250739] sfp sfp-1: SM: enter probe:up:down event timeout
[ 1477.257818] sfp sfp-1: SM: exit probe:up:down
[ 1482.365663] sfp sfp-1: SM: enter probe:up:down event timeout
[ 1482.372744] sfp sfp-1: SM: exit probe:up:down
[ 1487.480832] sfp sfp-1: SM: enter probe:up:down event timeout
[ 1487.487913] sfp sfp-1: SM: exit probe:up:down
[ 1492.596187] sfp sfp-1: SM: enter probe:up:down event timeout
[ 1492.603276] sfp sfp-1: SM: exit probe:up:down
[ 1497.711675] sfp sfp-1: SM: enter probe:up:down event timeout
[ 1497.718758] sfp sfp-1: SM: exit probe:up:down
[ 1502.827365] sfp sfp-1: SM: enter probe:up:down event timeout
[ 1502.834450] sfp sfp-1: SM: exit probe:up:down
[ 1507.943124] sfp sfp-1: SM: enter probe:up:down event timeout
[ 1507.950205] sfp sfp-1: SM: exit probe:up:down
[ 1513.059096] sfp sfp-1: SM: enter probe:up:down event timeout
[ 1513.094448] sfp sfp-1: module Lantiq           Falcon SFP       rev 0    sn 032WDY10J8020978 dc 180607
[ 1513.103929] mtk_soc_eth 15100000.ethernet eth1: switched to inband/1000base-x link mode
[ 1513.112004] sfp sfp-1: tx disable 1 -> 0
[ 1513.115940] sfp sfp-1: SM: exit present:up:wait
[ 1513.140839] hwmon hwmon2: temp1_input not attached to any thermal zone
[ 1513.165963] sfp sfp-1: SM: enter present:up:wait event timeout
[ 1513.171784] sfp sfp-1: SM: exit present:up:wait_los

Do we know what is causing this ??