[BPI-R4] and SFP

Well, i have this stick. And in BPI-R4 is not detected. I have checked this onu-stick in a Mikrotik switch, and it works there :frowning: Also i have checked this in BPI-R3 and it sometimes work there and sometimes not.

{
        "kernel": "6.6.30",
        "hostname": "r1",
        "system": "ARMv8 Processor rev 0",
        "model": "Bananapi BPI-R4",
        "board_name": "bananapi,bpi-r4",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "SNAPSHOT",
                "revision": "r26305-eb1b022043",
                "target": "mediatek/filogic",
                "description": "OpenWrt SNAPSHOT r26305-eb1b022043"
        }
}
1 Like

have you tried with fibre connected (link detected) or if this is not possible define other gpio for LOS?

so, after the statement of @ericwoud saying the modules will never work, I tried buying a new set. These are even funnier:

let’s try to bring them up:

root@APBureau4:~# ifconfig eth1 up
root@APBureau4:~# dmesg | tail
[   58.808505] br-lan: port 5(phy0-ap0) entered blocking state
[   58.808524] br-lan: port 5(phy0-ap0) entered disabled state
[   58.808559] mt7915e 0002:01:00.0 phy0-ap0: entered allmulticast mode
[   58.808704] mt7915e 0002:01:00.0 phy0-ap0: entered promiscuous mode
[   58.980732] br-lan: port 5(phy0-ap0) entered blocking state
[   58.980755] br-lan: port 5(phy0-ap0) entered forwarding state
[   59.607616] mt7530-mmio 15020000.switch lan1: Link is Up - 1Gbps/Full - flow control rx/tx
[   59.607670] br-lan: port 1(lan1) entered blocking state
[   59.607684] br-lan: port 1(lan1) entered forwarding state
[15351.219912] mtk_soc_eth 15100000.ethernet eth1: configuring for inband/usxgmii link mode
root@APBureau4:~# ifconfig eth2 up
root@APBureau4:~# dmesg | tail
[   58.980755] br-lan: port 5(phy0-ap0) entered forwarding state
[   59.607616] mt7530-mmio 15020000.switch lan1: Link is Up - 1Gbps/Full - flow control rx/tx
[   59.607670] br-lan: port 1(lan1) entered blocking state
[   59.607684] br-lan: port 1(lan1) entered forwarding state
[15351.219912] mtk_soc_eth 15100000.ethernet eth1: configuring for inband/usxgmii link mode
[15355.307266] device: 'i2c:sfp2': device_add
[15355.307515] PM: Adding info for No Bus:i2c:sfp2
[15382.608963] mtk_soc_eth 15100000.ethernet eth2: configuring for inband/usxgmii link mode
[15409.969346] device: 'i2c:sfp1': device_add
[15409.969504] PM: Adding info for No Bus:i2c:sfp1

ok, so devices are up. Let’s inspect them:

root@APBureau4:~# ethtool -m eth2
        Identifier                                : 0x03 (SFP)
        Extended identifier                       : 0x04 (GBIC/SFP defined by 2-wire interface ID)
        Connector                                 : 0x07 (LC)
        Transceiver codes                         : 0x00 0x00 0x00 0x00 0x00 0x00 0x40 0x00 0x00
        Transceiver type                          : FC: Twisted Pair (TP)
        Encoding                                  : 0x01 (8B/10B)
        BR, Nominal                               : 3100MBd
        Rate identifier                           : 0x00 (unspecified)
        Length (SMF,km)                           : 0km
        Length (SMF)                              : 0m
        Length (50um)                             : 0m
        Length (62.5um)                           : 0m
        Length (Copper)                           : 0m
        Length (OM3)                              : 0m
        Laser wavelength                          : 0nm
        Vendor name                               : OEM
        Vendor OUI                                : 00:00:00
        Vendor PN                                 : SFP-2G5
        Vendor rev                                : 1.0
        Option values                             : 0x00 0x18
        Option                                    : TX_FAULT implemented
        Option                                    : TX_DISABLE implemented
        BR margin, max                            : 0%
        BR margin, min                            : 0%
        Vendor SN                                 : 2G522112324218
        Date code                                 : 220801
root@APBureau4:~# dmesg | tail
[   58.980755] br-lan: port 5(phy0-ap0) entered forwarding state
[   59.607616] mt7530-mmio 15020000.switch lan1: Link is Up - 1Gbps/Full - flow control rx/tx
[   59.607670] br-lan: port 1(lan1) entered blocking state
[   59.607684] br-lan: port 1(lan1) entered forwarding state
[15351.219912] mtk_soc_eth 15100000.ethernet eth1: configuring for inband/usxgmii link mode
[15355.307266] device: 'i2c:sfp2': device_add
[15355.307515] PM: Adding info for No Bus:i2c:sfp2
[15382.608963] mtk_soc_eth 15100000.ethernet eth2: configuring for inband/usxgmii link mode
[15409.969346] device: 'i2c:sfp1': device_add
[15409.969504] PM: Adding info for No Bus:i2c:sfp1
root@APBureau4:~# ethtool -m eth1
        Identifier                                : 0x03 (SFP)
        Extended identifier                       : 0x04 (GBIC/SFP defined by 2-wire interface ID)
        Connector                                 : 0x07 (LC)
        Transceiver codes                         : 0x00 0x00 0x00 0x00 0x00 0x00 0x40 0x00 0x00
        Transceiver type                          : FC: Twisted Pair (TP)
        Encoding                                  : 0x01 (8B/10B)
        BR, Nominal                               : 3100MBd
        Rate identifier                           : 0x00 (unspecified)
        Length (SMF,km)                           : 0km
        Length (SMF)                              : 0m
        Length (50um)                             : 0m
        Length (62.5um)                           : 0m
        Length (Copper)                           : 0m
        Length (OM3)                              : 0m
        Laser wavelength                          : 0nm
        Vendor name                               : OEM
        Vendor OUI                                : 00:00:00
        Vendor PN                                 : SFP-2G5
        Vendor rev                                : 1.0
        Option values                             : 0x00 0x18
        Option                                    : TX_FAULT implemented
        Option                                    : TX_DISABLE implemented
        BR margin, max                            : 0%
        BR margin, min                            : 0%
        Vendor SN                                 : 2G522112324218
        Date code                                 : 220801
root@APBureau4:~# ethtool eth1
Settings for eth1:
        Supported ports: [ MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
                                10000baseT/Full
                                2500baseX/Full
                                1000baseKX/Full
                                10000baseKX4/Full
                                10000baseKR/Full
                                1000baseX/Full
                                10000baseCR/Full
                                10000baseSR/Full
                                10000baseLR/Full
                                10000baseLRM/Full
                                10000baseER/Full
                                2500baseT/Full
                                5000baseT/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
                                10000baseT/Full
                                2500baseX/Full
                                1000baseKX/Full
                                10000baseKX4/Full
                                10000baseKR/Full
                                1000baseX/Full
                                10000baseCR/Full
                                10000baseSR/Full
                                10000baseLR/Full
                                10000baseLRM/Full
                                10000baseER/Full
                                2500baseT/Full
                                5000baseT/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
root@APBureau4:~# dmesg | tail
[   58.980755] br-lan: port 5(phy0-ap0) entered forwarding state
[   59.607616] mt7530-mmio 15020000.switch lan1: Link is Up - 1Gbps/Full - flow control rx/tx
[   59.607670] br-lan: port 1(lan1) entered blocking state
[   59.607684] br-lan: port 1(lan1) entered forwarding state
[15351.219912] mtk_soc_eth 15100000.ethernet eth1: configuring for inband/usxgmii link mode
[15355.307266] device: 'i2c:sfp2': device_add
[15355.307515] PM: Adding info for No Bus:i2c:sfp2
[15382.608963] mtk_soc_eth 15100000.ethernet eth2: configuring for inband/usxgmii link mode
[15409.969346] device: 'i2c:sfp1': device_add
[15409.969504] PM: Adding info for No Bus:i2c:sfp1

so far, no luck … let’s get some coffee …

root@APBureau4:~# dmesg | tail
[15355.307266] device: 'i2c:sfp2': device_add
[15355.307515] PM: Adding info for No Bus:i2c:sfp2
[15382.608963] mtk_soc_eth 15100000.ethernet eth2: configuring for inband/usxgmii link mode
[15409.969346] device: 'i2c:sfp1': device_add
[15409.969504] PM: Adding info for No Bus:i2c:sfp1
[15956.549344] sfp sfp2: no PHY detected
[15956.549374] mtk_soc_eth 15100000.ethernet eth1: switched to inband/2500base-x link mode
[15956.555803] mtk_soc_eth 15100000.ethernet eth1: Link is Up - 2.5Gbps/Full - flow control off
[16011.209433] sfp sfp1: no PHY detected
[16011.209463] mtk_soc_eth 15100000.ethernet eth2: switched to inband/2500base-x link mode
root@APBureau4:~# ethtool eth1
Settings for eth1:
        Supported ports: [ TP ]
        Supported link modes:   2500baseT/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  2500baseT/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: No
        Advertised FEC modes: Not reported
        Speed: 2500Mb/s
        Duplex: Full
        Auto-negotiation: off
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        MDI-X: Unknown
        Current message level: 0x000000ff (255)
                               drv probe link timer ifdown ifup rx_err tx_err
        Link detected: yes

wth? where does this come from?

any ideas?

So we were trying to find out which module you have, by peeking around with i2cdump. See if you have the RTL8221B on Rollball SFP module. Somehow, we did not get the right output to determine this.

You now have a module that reports it’s supported interface mode via eeprom and actually has link up. However, the PHY is not recognised (unknown vendor & product string).

I still did not check this myself on R4, but I assume the R4 has the same issue with 2500base-x as the R3.

Quick fix:

ethtool -s eth1 autoneg off

This should setup the MAC without auto-negotiation and traffic should pass. You can do the same with a patch that adds a quirk to disable auto-negotiation for this sfp module.

The module is now treated as if it is an optical module.

To gain control over the PHY (If it is the RTL8221B behind Rollball protocol) you need to either:

  1. Use a patch to add a fixup that matches your vendor/product string.
  2. Change product string on the sfp module’s eeprom (I have a tool that makes this easier).

But this is only useful If it is the RTL8221B behind Rollball protocol.

More can be found on this in other topics on the forum.

1 Like

Your eeprom hack sounds cool. Can I see your tool?

EDIT: @ericwoud which addresses specify the PHY iD again? so far, I got the following info:

root@APBureau4:~# i2cdump -y 3 0x50
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: 03 04 07 00 00 00 00 00 00 40 00 01 1f 00 00 00    ???......@.??...
10: 00 00 00 00 4f 45 4d 20 20 20 20 20 20 20 20 20    ....OEM         
20: 20 20 20 20 00 00 00 00 53 46 50 2d 32 47 35 20        ....SFP-2G5 
30: 20 20 20 20 20 20 20 20 31 2e 30 20 00 00 00 82            1.0 ...?
40: 00 18 00 00 32 47 35 32 32 31 31 32 33 32 34 32    .?..2G5221123242
50: 31 38 20 20 32 32 30 38 30 31 20 20 00 00 00 9f    18  220801  ...?
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    ................
root@APBureau4:~# i2cdump -y 3 0x51
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: 50 00 f6 00 4b 00 fb 00 8c a0 75 30 88 b8 79 18    P.?.K.?.??u0??y?
10: 1d 4c 01 f4 19 64 03 e8 4d f0 06 30 3d e8 06 f2    ?L???d??M??0=???
20: 2b d4 00 c7 27 10 00 df 00 00 00 00 00 00 00 00    +?.?'?.?........
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
40: 00 00 00 00 3f 80 00 00 00 00 00 00 01 00 00 00    ....??......?...
50: 01 00 00 00 01 00 00 00 01 00 00 00 00 00 00 23    ?...?...?......#
60: 18 40 83 bd 0b b8 13 88 00 00 00 00 00 00 02 00    ?@??????......?.
70: 00 40 00 00 00 40 00 00 00 00 00 ff ff ff ff 00    .@...@..........
80: 02 00 00 05 00 00 00 00 00 00 00 00 00 00 00 00    ?..?............
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
root@APBureau4:~# 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: 11 79 01 0c 0d 41 00 00 00 02 00 00 00 00 00 a0    ?y???A...?.....?
10: 00 00 00 00 00 00 00 00 00 00 00 82 00 00 00 00    ...........?....
20: 11 79 01 0c 0d 41 00 00 00 02 00 00 00 00 00 a0    ?y???A...?.....?
30: 00 00 00 00 00 00 00 00 00 00 00 82 00 00 00 00    ...........?....
40: 11 79 01 0c 0d 41 00 00 00 02 00 00 00 00 00 a0    ?y???A...?.....?
50: 00 00 00 00 00 00 00 00 00 00 00 82 00 00 00 00    ...........?....
60: 11 79 01 0c 0d 41 00 00 00 02 00 00 00 00 00 a0    ?y???A...?.....?
70: 00 00 00 00 00 00 00 00 00 00 00 82 00 00 00 00    ...........?....
80: 11 79 01 0c 0d 41 00 00 00 02 00 00 00 00 00 a0    ?y???A...?.....?
90: 00 00 00 00 00 00 00 00 00 00 00 82 00 00 00 00    ...........?....
a0: 11 79 01 0c 0d 41 00 00 00 02 00 00 00 00 00 a0    ?y???A...?.....?
b0: 00 00 00 00 00 00 00 00 00 00 00 82 00 00 00 00    ...........?....
c0: 11 79 01 0c 0d 41 00 00 00 02 00 00 00 00 00 a0    ?y???A...?.....?
d0: 00 00 00 00 00 00 00 00 00 00 00 82 00 00 00 00    ...........?....
e0: 11 79 01 0c 0d 41 00 00 00 02 00 00 00 00 00 a0    ?y???A...?.....?
f0: 00 00 00 00 00 00 00 00 00 00 00 82 00 00 00 00    ...........?....

EDIT2: this is the vanilla openwrt kernel with all sorts of mdio and i2c devices compiled in (so without your patches):

[   36.902576] bus: 'platform': __driver_probe_device: matched device sfp2 with driver sfp
[   36.910620] bus: 'platform': really_probe: probing driver sfp with device sfp2
[   36.921898] sfp sfp2: no pinctrl handle
[   36.982436] sfp sfp2: Host maximum power 3.0W
[   36.991783] driver: 'sfp': driver_bound: bound to device 'sfp2'
[   37.002451] sfp sfp2: Dropping the link to 1001f000.pinctrl
[   37.008025] device: 'platform:1001f000.pinctrl--platform:sfp2': device_unregister
[   37.015614] bus: 'platform': really_probe: bound device sfp2 to driver sfp
[   37.022501] devices_kset: Moving sfp1 to end of list
[   37.022504] PM: Moving platform:sfp1 to end of list
[   37.022508] platform sfp1: Retrying from deferred list
[   37.030918] bus: 'platform': __driver_probe_device: matched device sfp1 with driver sfp
[   37.040834] bus: 'platform': really_probe: probing driver sfp with device sfp1
[   37.058398] sfp sfp1: no pinctrl handle
[   37.123592] sfp sfp1: Host maximum power 3.0W
[   37.128389] driver: 'sfp': driver_bound: bound to device 'sfp1'
[   37.134318] sfp sfp1: Dropping the link to 1001f000.pinctrl
[   37.139960] device: 'platform:1001f000.pinctrl--platform:sfp1': device_unregister
[   37.147556] bus: 'platform': really_probe: bound device sfp1 to driver sfp
[   37.330125] sfp sfp2: module OEM              SFP-2G5          rev 1.0  sn 2G522112324218   dc 220801  
[   37.339544] mtk_soc_eth 15100000.ethernet eth1: unsupported SFP module: no common interface modes
[   37.459424] sfp sfp1: module OEM              SFP-2G5          rev 1.0  sn 2G522112324218   dc 220801  
[   37.474012] mtk_soc_eth 15100000.ethernet eth2: unsupported SFP module: no common interface modes
[   38.237617] bus: 'mdio_bus': __driver_probe_device: matched device r8169-1-300:00 with driver RTL8226B_RTL8221B 2.5Gbps PHY
[   38.248769] bus: 'mdio_bus': really_probe: probing driver RTL8226B_RTL8221B 2.5Gbps PHY with device r8169-1-300:00
[   38.259122] RTL8226B_RTL8221B 2.5Gbps PHY r8169-1-300:00: no of_node; not parsing pinctrl DT
[   38.267568] RTL8226B_RTL8221B 2.5Gbps PHY r8169-1-300:00: no default pinctrl state
[   38.275180] driver: 'RTL8226B_RTL8221B 2.5Gbps PHY': driver_bound: bound to device 'r8169-1-300:00'
[   38.284255] bus: 'mdio_bus': really_probe: bound device r8169-1-300:00 to driver RTL8226B_RTL8221B 2.5Gbps PHY
[   38.477745] bus: 'mdio_bus': __driver_probe_device: matched device r8169-1-400:00 with driver RTL8226B_RTL8221B 2.5Gbps PHY
[   38.488874] bus: 'mdio_bus': really_probe: probing driver RTL8226B_RTL8221B 2.5Gbps PHY with device r8169-1-400:00
[   38.499216] RTL8226B_RTL8221B 2.5Gbps PHY r8169-1-400:00: no of_node; not parsing pinctrl DT
[   38.507654] RTL8226B_RTL8221B 2.5Gbps PHY r8169-1-400:00: no default pinctrl state
[   38.515249] driver: 'RTL8226B_RTL8221B 2.5Gbps PHY': driver_bound: bound to device 'r8169-1-400:00'
[   38.524299] bus: 'mdio_bus': really_probe: bound device r8169-1-400:00 to driver RTL8226B_RTL8221B 2.5Gbps PHY
[  187.266862] mtk_soc_eth 15100000.ethernet eth2: configuring for inband/usxgmii link mode
[  194.138474] mtk_soc_eth 15100000.ethernet eth1: configuring for inband/usxgmii link mode

I do not know where you keep buying your sfp modules, but this is not a Rollball module. These look like this:

Check bytes 4 to 7 at i2c address 0x56 for PHY ID on these Rollball modules.

Perhaps you get more info using word access i2cdump of 0x56, but it isn’t Rollball.

So best we can do is have it behave like an optical module, MAC fixed at 2500base-x (and autoneg disabled).

My tool is here, but you do not have the eeprom password. Could use brute force attack, but that might take a little time… https://forum.banana-pi.org/t/i2csfp-sfp-debugging-via-i2c/17761

At github: ericwoud/i2csfp (github.com)

But…

did you try if ethtool -s eth1 autoneg off gives you a functional eth1 (pingable)?

Edit:

[ 37.339544] mtk_soc_eth 15100000.ethernet eth1: unsupported SFP module: no common interface modes

So I guess it does not report it’s supported interface mode… ( address 0x50, byte 0x24 = 0 )

Your patches actually make it work… This latest kernel is without your patches (buth with mdio/i2c multiplexers compiled in), the previous one was with your patches but no mdio and limited i2c. I’ll combine them

Yes, I have tried with a fiber connected. When i plug this SFP i see really short blink on a LED related for this port but nothing in a dmesg. (sfp1 is a port which i am using for this GPON-SFP)

root@r1:~# dmesg | grep sfp
[   10.012336] sfp sfp1: Host maximum power 3.0W
[   10.017183] sfp sfp2: Host maximum power 3.0W
[   10.342437] sfp sfp2: module CISCO-FINISAR    FCBG110SD1C01-CS rev A    sn FIW1952056K-A    dc 151224
root@r1:~#

I was talking with a producer of a leox - leolabs, and they told me that currently it is not possible to change LOS behaviour.

Also for BPI-R3, small correction i was testing different SFP. It was Opton GP801R - clone of vsol v2801f.

[   17.482679] sfp sfp-1: Switching to reading EEPROM to one byte at a time
[   17.603894] sfp sfp-1: module OEM              V2801F           rev 1.0  sn 202302270087     dc 230228
[   17.629150] sfp sfp-1: skipping hwmon device registration due to broken EEPROM
[   17.636376] sfp sfp-1: diagnostic EEPROM area cannot be read atomically to guarantee data coherency

Is the mac up (eth1/eth2)? What does ethtool say (with and without -m)…i only see ethtool and dmesg from janpieter

Any other messages like LOS for mac or sfp in dmesg? You message point to broken eeprom (i guess crc mismatch)…maybe you need quirk to ignore this in kernel

Opton GP801R in BPI-R3 was working and i was able to use it for some time (was not stable, so not using currently). So we can forget about this in this topic. Sorry for making mess in this thread.

Back to BPI-R4 and LEOX LXT-010S-H. Any idea why this is working in Mikrotik switch and not working in BPI-R4? (not detected with/without fiber connected)

Then post dmesg and ethtool

Sure. In SFP2/eth1 ia have Cisco DAC

dmesg

root@r1:~# dmesg
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x411fd090]
[    0.000000] Linux version 6.6.30 (builder@buildhost) (aarch64-openwrt-linux-musl-gcc (OpenWrt GCC 13.2.0 r26305-eb1b022043) 13.2.0, GNU ld (GNU Binutils) 2.42) #0 SMP Mon May 13 22:27:12 2024
[    0.000000] Machine model: Bananapi BPI-R4
[    0.000000] OF: reserved mem: 0x0000000042ff0000..0x0000000042ffffff (64 KiB) map non-reusable ramoops@42ff0000
[    0.000000] OF: reserved mem: 0x0000000043000000..0x000000004304ffff (320 KiB) nomap non-reusable secmon@43000000
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000040000000-0x00000000ffffffff]
[    0.000000]   DMA32    empty
[    0.000000]   Normal   [mem 0x0000000100000000-0x000000013fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000040000000-0x0000000042ffffff]
[    0.000000]   node   0: [mem 0x0000000043000000-0x000000004304ffff]
[    0.000000]   node   0: [mem 0x0000000043050000-0x000000013fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000013fffffff]
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.1 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] psci: SMC Calling Convention v1.4
[    0.000000] percpu: Embedded 18 pages/cpu s35048 r8192 d30488 u73728
[    0.000000] pcpu-alloc: s35048 r8192 d30488 u73728 alloc=18*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: detected: GIC system register CPU interface
[    0.000000] CPU features: detected: Spectre-BHB
[    0.000000] CPU features: kernel page table isolation disabled by kernel configuration
[    0.000000] alternatives: applying boot alternatives
[    0.000000] Kernel command line: console=ttyS0,115200n1 pci=pcie_bus_perf root=/dev/fit0
[    0.000000] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes, linear)
[    0.000000] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 1032192
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] software IO TLB: area num 4.
[    0.000000] software IO TLB: mapped [mem 0x00000000fa7b4000-0x00000000fe7b4000] (64MB)
[    0.000000] Memory: 4034116K/4194304K available (8768K kernel code, 900K rwdata, 2564K rodata, 384K init, 304K bss, 160188K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GICv3: GIC: Using split EOI/Deactivate mode
[    0.000000] GICv3: 416 SPIs implemented
[    0.000000] GICv3: 0 Extended SPIs implemented
[    0.000000] Root IRQ handler: gic_handle_irq
[    0.000000] GICv3: GICv3 features: 16 PPIs
[    0.000000] GICv3: CPU0: found redistributor 0 region 0:0x000000000c080000
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] arch_timer: cp15 timer(s) running at 13.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x2ff89eacb, max_idle_ns: 440795202429 ns
[    0.000000] sched_clock: 56 bits at 13MHz, resolution 76ns, wraps every 4398046511101ns
[    0.000061] Calibrating delay loop (skipped), value calculated using timer frequency.. 26.00 BogoMIPS (lpj=130000)
[    0.000068] pid_max: default: 32768 minimum: 301
[    0.002145] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.002159] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.003645] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    0.003936] RCU Tasks Trace: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1.
[    0.004019] rcu: Hierarchical SRCU implementation.
[    0.004021] rcu:     Max phase no-delay instances is 1000.
[    0.004306] smp: Bringing up secondary CPUs ...
[    0.004521] Detected VIPT I-cache on CPU1
[    0.004555] GICv3: CPU1: found redistributor 1 region 0:0x000000000c0a0000
[    0.004576] CPU1: Booted secondary processor 0x0000000001 [0x411fd090]
[    0.004831] Detected VIPT I-cache on CPU2
[    0.004850] GICv3: CPU2: found redistributor 2 region 0:0x000000000c0c0000
[    0.004860] CPU2: Booted secondary processor 0x0000000002 [0x411fd090]
[    0.005091] Detected VIPT I-cache on CPU3
[    0.005112] GICv3: CPU3: found redistributor 3 region 0:0x000000000c0e0000
[    0.005121] CPU3: Booted secondary processor 0x0000000003 [0x411fd090]
[    0.005148] smp: Brought up 1 node, 4 CPUs
[    0.005152] SMP: Total of 4 processors activated.
[    0.005155] CPU features: detected: 32-bit EL0 Support
[    0.005157] CPU features: detected: CRC32 instructions
[    0.005175] spectre-bhb mitigation disabled by compile time option
[    0.005188] CPU features: emulated: Privileged Access Never (PAN) using TTBR0_EL1 switching
[    0.005191] CPU: All CPU(s) started at EL2
[    0.005193] alternatives: applying system-wide alternatives
[    0.008313] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.008322] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.009278] pinctrl core: initialized pinctrl subsystem
[    0.010134] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.010408] DMA: preallocated 512 KiB GFP_KERNEL pool for atomic allocations
[    0.010509] DMA: preallocated 512 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.010602] DMA: preallocated 512 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.010863] thermal_sys: Registered thermal governor 'fair_share'
[    0.010865] thermal_sys: Registered thermal governor 'bang_bang'
[    0.010867] thermal_sys: Registered thermal governor 'step_wise'
[    0.010868] thermal_sys: Registered thermal governor 'user_space'
[    0.010904] ASID allocator initialised with 65536 entries
[    0.011652] pstore: Using crash dump compression: deflate
[    0.011657] printk: console [ramoops-1] enabled
[    0.011876] pstore: Registered ramoops as persistent store backend
[    0.011881] ramoops: using 0x10000@0x42ff0000, ecc: 0
[    0.018739] Modules: 29504 pages in range for non-PLT usage
[    0.018748] Modules: 521024 pages in range for PLT usage
[    0.019422] cryptd: max_cpu_qlen set to 1000
[    0.020163] SCSI subsystem initialized
[    0.020239] libata version 3.00 loaded.
[    0.021098] clocksource: Switched to clocksource arch_sys_counter
[    0.022757] NET: Registered PF_INET protocol family
[    0.022887] IP idents hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.025420] tcp_listen_portaddr_hash hash table entries: 2048 (order: 3, 32768 bytes, linear)
[    0.025444] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.025453] TCP established hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.025553] TCP bind hash table entries: 32768 (order: 8, 1048576 bytes, linear)
[    0.025962] TCP: Hash tables configured (established 32768 bind 32768)
[    0.026057] UDP hash table entries: 2048 (order: 4, 65536 bytes, linear)
[    0.026113] UDP-Lite hash table entries: 2048 (order: 4, 65536 bytes, linear)
[    0.026448] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.026492] PCI: CLS 0 bytes, default 64
[    0.027316] workingset: timestamp_bits=46 max_order=20 bucket_order=0
[    0.031018] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.031025] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.051945] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
[    0.052940] mtk-xsphy soc:xphy@11e10000: failed to get ref_clk(id-1)
[    0.053498] mtk-pcie-gen3 11280000.pcie: host bridge /soc/pcie@11280000 ranges:
[    0.053518] mtk-pcie-gen3 11280000.pcie: Parsing ranges property...
[    0.053529] mtk-pcie-gen3 11280000.pcie:       IO 0x0020000000..0x00201fffff -> 0x0020000000
[    0.053541] mtk-pcie-gen3 11280000.pcie:      MEM 0x0020200000..0x0027ffffff -> 0x0020200000
[    0.053639] mtk-pcie-gen3 11290000.pcie: host bridge /soc/pcie@11290000 ranges:
[    0.053650] mtk-pcie-gen3 11290000.pcie: Parsing ranges property...
[    0.053659] mtk-pcie-gen3 11290000.pcie:       IO 0x0028000000..0x00281fffff -> 0x0028000000
[    0.053668] mtk-pcie-gen3 11290000.pcie:      MEM 0x0028200000..0x002fffffff -> 0x0028200000
[    0.053687] /soc/pcie@11290000: Failed to get clk index: 0 ret: -517
[    0.053695] mtk-pcie-gen3 11290000.pcie: failed to get clocks
[    0.053755] mtk-pcie-gen3 11300000.pcie: host bridge /soc/pcie@11300000 ranges:
[    0.053765] mtk-pcie-gen3 11300000.pcie: Parsing ranges property...
[    0.053773] mtk-pcie-gen3 11300000.pcie:       IO 0x0030000000..0x00301fffff -> 0x0030000000
[    0.053782] mtk-pcie-gen3 11300000.pcie:      MEM 0x0030200000..0x0037ffffff -> 0x0030200000
[    0.053798] /soc/pcie@11300000: Failed to get clk index: 0 ret: -517
[    0.053806] mtk-pcie-gen3 11300000.pcie: failed to get clocks
[    0.053879] mtk-pcie-gen3 11310000.pcie: host bridge /soc/pcie@11310000 ranges:
[    0.053889] mtk-pcie-gen3 11310000.pcie: Parsing ranges property...
[    0.053898] mtk-pcie-gen3 11310000.pcie:       IO 0x0038000000..0x00381fffff -> 0x0038000000
[    0.053907] mtk-pcie-gen3 11310000.pcie:      MEM 0x0038200000..0x003fffffff -> 0x0038200000
[    0.053923] /soc/pcie@11310000: Failed to get clk index: 0 ret: -517
[    0.053930] mtk-pcie-gen3 11310000.pcie: failed to get clocks
[    0.058291] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.060417] printk: console [ttyS0] disabled
[    0.080704] 11000000.serial: ttyS0 at MMIO 0x11000000 (irq = 99, base_baud = 2500000) is a ST16650V2
[    0.080739] printk: console [ttyS0] enabled
[    0.994719] 11000100.serial: ttyS1 at MMIO 0x11000100 (irq = 100, base_baud = 2500000) is a ST16650V2
[    1.024586] 11000200.serial: ttyS2 at MMIO 0x11000200 (irq = 101, base_baud = 2500000) is a ST16650V2
[    1.036486] loop: module loaded
[    1.040933] spi-nand spi0.0: Winbond SPI NAND was found.
[    1.046276] spi-nand spi0.0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
[    1.054587] 2 fixed-partitions partitions found on MTD device spi0.0
[    1.060954] OF: Bad cell count for /soc/spi@11007000/spi_nand@0/partitions
[    1.067838] OF: Bad cell count for /soc/spi@11007000/spi_nand@0/partitions
[    1.074857] Creating 2 MTD partitions on "spi0.0":
[    1.079639] 0x000000000000-0x000000200000 : "bl2"
[    1.085768] 0x000000200000-0x000008000000 : "ubi"
[    1.162389] ubi0: default fastmap pool size: 50
[    1.166917] ubi0: default fastmap WL pool size: 25
[    1.171706] ubi0: attaching mtd1
[    1.989332] ubi0: scanning is finished
[    2.002918] ubi0: attached mtd1 (name "ubi", size 126 MiB)
[    2.008400] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    2.015273] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    2.022052] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    2.029001] ubi0: good PEBs: 1007, bad PEBs: 1, corrupted PEBs: 0
[    2.035084] ubi0: user volume: 7, internal volumes: 1, max. volumes count: 128
[    2.042294] ubi0: max/mean erase counter: 3/1, WL threshold: 4096, image sequence number: 0
[    2.050630] ubi0: available PEBs: 0, total reserved PEBs: 1007, PEBs reserved for bad PEB handling: 19
[    2.059930] ubi0: background thread "ubi_bgt0d" started, PID 314
[    2.060009] OF: Bad cell count for /soc/spi@11007000/spi_nand@0/partitions
[    2.072879] OF: Bad cell count for /soc/spi@11007000/spi_nand@0/partitions
[    2.081451] block ubiblock0_4: created from ubi0:4(fit)
[    2.212512] i2c_dev: i2c /dev entries driver
[    2.219812] mtk-wdt 1001c000.watchdog: Watchdog enabled (timeout=31 sec, nowayout=0)
[    2.227880] mtk-cpufreq mtk-cpufreq: failed to initialize dvfs info for cpu0
[    2.235539] NET: Registered PF_INET6 protocol family
[    2.240940] Segment Routing with IPv6
[    2.244631] In-situ OAM (IOAM) with IPv6
[    2.248574] NET: Registered PF_PACKET protocol family
[    2.253647] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    2.266668] 8021q: 802.1Q VLAN Support v1.8
[    2.283211] phy phy-soc:[email protected]: type_sw - reg 0x218, index 0
[    2.290391] mtk-pcie-gen3 11280000.pcie: host bridge /soc/pcie@11280000 ranges:
[    2.297731] mtk-pcie-gen3 11280000.pcie: Parsing ranges property...
[    2.304016] mtk-pcie-gen3 11280000.pcie:       IO 0x0020000000..0x00201fffff -> 0x0020000000
[    2.312475] mtk-pcie-gen3 11280000.pcie:      MEM 0x0020200000..0x0027ffffff -> 0x0020200000
[    2.339383] mtk-msdc 11230000.mmc: Final PAD_DS_TUNE: 0x13414
[    2.345259] mmc0: new HS400 MMC card at address 0001
[    2.350825] mmcblk0: mmc0:0001 8GTF4R 7.28 GiB
[    2.356812]  mmcblk0: p1 p2 p3 p4 p5 p6 p128
[    2.362009] mmcblk0boot0: mmc0:0001 8GTF4R 4.00 MiB
[    2.367504] mmcblk0boot1: mmc0:0001 8GTF4R 4.00 MiB
[    2.372669] mmcblk0rpmb: mmc0:0001 8GTF4R 512 KiB, chardev (248:0)
[    2.651111] mtk-pcie-gen3 11280000.pcie: PCIe link down, current LTSSM state: detect.quiet (0x1)
[    2.659909] mtk-pcie-gen3: probe of 11280000.pcie failed with error -110
[    2.666945] mtk-pcie-gen3 11290000.pcie: host bridge /soc/pcie@11290000 ranges:
[    2.674263] mtk-pcie-gen3 11290000.pcie: Parsing ranges property...
[    2.680527] mtk-pcie-gen3 11290000.pcie:       IO 0x0028000000..0x00281fffff -> 0x0028000000
[    2.688962] mtk-pcie-gen3 11290000.pcie:      MEM 0x0028200000..0x002fffffff -> 0x0028200000
[    2.949619] mtk-pcie-gen3 11290000.pcie: set IO trans window[0]: cpu_addr = 0x28000000, pci_addr = 0x28000000, size = 0x200000
[    2.961003] mtk-pcie-gen3 11290000.pcie: set MEM trans window[1]: cpu_addr = 0x28200000, pci_addr = 0x28200000, size = 0x200000
[    2.972468] mtk-pcie-gen3 11290000.pcie: set MEM trans window[2]: cpu_addr = 0x28400000, pci_addr = 0x28400000, size = 0x400000
[    2.983933] mtk-pcie-gen3 11290000.pcie: set MEM trans window[3]: cpu_addr = 0x28800000, pci_addr = 0x28800000, size = 0x800000
[    2.995395] mtk-pcie-gen3 11290000.pcie: set MEM trans window[4]: cpu_addr = 0x29000000, pci_addr = 0x29000000, size = 0x1000000
[    3.006945] mtk-pcie-gen3 11290000.pcie: set MEM trans window[5]: cpu_addr = 0x2a000000, pci_addr = 0x2a000000, size = 0x2000000
[    3.018495] mtk-pcie-gen3 11290000.pcie: set MEM trans window[6]: cpu_addr = 0x2c000000, pci_addr = 0x2c000000, size = 0x4000000
[    3.030279] mtk-pcie-gen3 11290000.pcie: PCI host bridge to bus 0002:00
[    3.036890] pci_bus 0002:00: root bus resource [bus 00-ff]
[    3.042371] pci_bus 0002:00: root bus resource [io  0x200000-0x3fffff] (bus address [0x28000000-0x281fffff])
[    3.052187] pci_bus 0002:00: root bus resource [mem 0x28200000-0x2fffffff]
[    3.059049] pci_bus 0002:00: scanning bus
[    3.063070] pci 0002:00:00.0: [14c3:7988] type 01 class 0x060400
[    3.069077] pci 0002:00:00.0: reg 0x10: [mem 0x00000000-0x00007fff 64bit]
[    3.075916] pci 0002:00:00.0: PME# supported from D0 D3hot D3cold
[    3.082003] pci 0002:00:00.0: PME# disabled
[    3.087322] pci_bus 0002:00: fixups for bus
[    3.091500] pci 0002:00:00.0: scanning [bus 00-00] behind bridge, pass 0
[    3.098189] pci 0002:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    3.106186] pci 0002:00:00.0: scanning [bus 00-00] behind bridge, pass 1
[    3.112928] pci_bus 0002:01: scanning bus
[    3.116952] pci 0002:01:00.0: [15b7:5002] type 00 class 0x010802
[    3.122972] pci 0002:01:00.0: reg 0x10: [mem 0x00000000-0x00003fff 64bit]
[    3.129773] pci 0002:01:00.0: reg 0x20: [mem 0x00000000-0x000000ff 64bit]
[    3.136685] pci 0002:01:00.0: 7.876 Gb/s available PCIe bandwidth, limited by 8.0 GT/s PCIe x1 link at 0002:00:00.0 (capable of 31.504 Gb/s with 8.0 GT/s PCIe x4 link)
[    3.181134] pci_bus 0002:01: fixups for bus
[    3.185306] pci_bus 0002:01: bus scan returning with max=01
[    3.190867] pci_bus 0002:01: busn_res: [bus 01-ff] end is updated to 01
[    3.197479] pci_bus 0002:00: bus scan returning with max=01
[    3.203052] pci 0002:00:00.0: BAR 8: assigned [mem 0x28200000-0x282fffff]
[    3.209828] pci 0002:00:00.0: BAR 0: assigned [mem 0x28300000-0x28307fff 64bit]
[    3.217134] pci 0002:01:00.0: BAR 0: assigned [mem 0x28200000-0x28203fff 64bit]
[    3.224441] pci 0002:01:00.0: BAR 4: assigned [mem 0x28204000-0x282040ff 64bit]
[    3.231749] pci 0002:00:00.0: PCI bridge to [bus 01]
[    3.236703] pci 0002:00:00.0:   bridge window [mem 0x28200000-0x282fffff]
[    3.243492] pci 0002:00:00.0: Max Payload Size set to  256/ 256 (was  128), Max Read Rq  256
[    3.251934] pci 0002:01:00.0: Max Payload Size set to  256/ 512 (was  128), Max Read Rq  256
[    3.260432] pcieport 0002:00:00.0: assign IRQ: got 112
[    3.265570] pcieport 0002:00:00.0: enabling device (0000 -> 0002)
[    3.271662] pcieport 0002:00:00.0: enabling bus mastering
[    3.277447] mtk-pcie-gen3 11290000.pcie: msi#0x0 address_hi 0x0 address_lo 0x11290c00 data 0
[    3.285884] mtk-pcie-gen3 11290000.pcie: msi#0x1 address_hi 0x0 address_lo 0x11290c00 data 1
[    3.294310] mtk-pcie-gen3 11290000.pcie: msi#0x2 address_hi 0x0 address_lo 0x11290c00 data 2
[    3.302739] mtk-pcie-gen3 11290000.pcie: msi#0x3 address_hi 0x0 address_lo 0x11290c00 data 3
[    3.311165] mtk-pcie-gen3 11290000.pcie: msi#0x4 address_hi 0x0 address_lo 0x11290c00 data 4
[    3.319588] mtk-pcie-gen3 11290000.pcie: msi#0x5 address_hi 0x0 address_lo 0x11290c00 data 5
[    3.328015] mtk-pcie-gen3 11290000.pcie: msi#0x6 address_hi 0x0 address_lo 0x11290c00 data 6
[    3.336440] mtk-pcie-gen3 11290000.pcie: msi#0x7 address_hi 0x0 address_lo 0x11290c00 data 7
[    3.344865] mtk-pcie-gen3 11290000.pcie: msi#0x8 address_hi 0x0 address_lo 0x11290c00 data 8
[    3.353290] mtk-pcie-gen3 11290000.pcie: msi#0x9 address_hi 0x0 address_lo 0x11290c00 data 9
[    3.361715] mtk-pcie-gen3 11290000.pcie: msi#0xa address_hi 0x0 address_lo 0x11290c00 data 10
[    3.370226] mtk-pcie-gen3 11290000.pcie: msi#0xb address_hi 0x0 address_lo 0x11290c00 data 11
[    3.378740] mtk-pcie-gen3 11290000.pcie: msi#0xc address_hi 0x0 address_lo 0x11290c00 data 12
[    3.387253] mtk-pcie-gen3 11290000.pcie: msi#0xd address_hi 0x0 address_lo 0x11290c00 data 13
[    3.395766] mtk-pcie-gen3 11290000.pcie: msi#0xe address_hi 0x0 address_lo 0x11290c00 data 14
[    3.404277] mtk-pcie-gen3 11290000.pcie: msi#0xf address_hi 0x0 address_lo 0x11290c00 data 15
[    3.412789] mtk-pcie-gen3 11290000.pcie: msi#0x10 address_hi 0x0 address_lo 0x11290c00 data 16
[    3.421391] mtk-pcie-gen3 11290000.pcie: msi#0x11 address_hi 0x0 address_lo 0x11290c00 data 17
[    3.429987] mtk-pcie-gen3 11290000.pcie: msi#0x12 address_hi 0x0 address_lo 0x11290c00 data 18
[    3.438586] mtk-pcie-gen3 11290000.pcie: msi#0x13 address_hi 0x0 address_lo 0x11290c00 data 19
[    3.447185] mtk-pcie-gen3 11290000.pcie: msi#0x14 address_hi 0x0 address_lo 0x11290c00 data 20
[    3.455784] mtk-pcie-gen3 11290000.pcie: msi#0x15 address_hi 0x0 address_lo 0x11290c00 data 21
[    3.464383] mtk-pcie-gen3 11290000.pcie: msi#0x16 address_hi 0x0 address_lo 0x11290c00 data 22
[    3.472982] mtk-pcie-gen3 11290000.pcie: msi#0x17 address_hi 0x0 address_lo 0x11290c00 data 23
[    3.481581] mtk-pcie-gen3 11290000.pcie: msi#0x18 address_hi 0x0 address_lo 0x11290c00 data 24
[    3.490178] mtk-pcie-gen3 11290000.pcie: msi#0x19 address_hi 0x0 address_lo 0x11290c00 data 25
[    3.498777] mtk-pcie-gen3 11290000.pcie: msi#0x1a address_hi 0x0 address_lo 0x11290c00 data 26
[    3.507375] mtk-pcie-gen3 11290000.pcie: msi#0x1b address_hi 0x0 address_lo 0x11290c00 data 27
[    3.515974] mtk-pcie-gen3 11290000.pcie: msi#0x1c address_hi 0x0 address_lo 0x11290c00 data 28
[    3.524573] mtk-pcie-gen3 11290000.pcie: msi#0x1d address_hi 0x0 address_lo 0x11290c00 data 29
[    3.533171] mtk-pcie-gen3 11290000.pcie: msi#0x1e address_hi 0x0 address_lo 0x11290c00 data 30
[    3.541772] mtk-pcie-gen3 11290000.pcie: msi#0x1f address_hi 0x0 address_lo 0x11290c00 data 31
[    3.550796] mtk-pcie-gen3 11290000.pcie: msi#0x0 address_hi 0x0 address_lo 0x11290c00 data 0
[    3.559295] pcieport 0002:00:00.0: PME: Signaling with IRQ 113
[    3.565236] pcieport 0002:00:00.0: AER: enabled with IRQ 113
[    3.570929] pcieport 0002:00:00.0: save config 0x00: 0x798814c3
[    3.576870] pcieport 0002:00:00.0: save config 0x04: 0x00100406
[    3.582786] pcieport 0002:00:00.0: save config 0x08: 0x06040001
[    3.588694] pcieport 0002:00:00.0: save config 0x0c: 0x00010000
[    3.594605] pcieport 0002:00:00.0: save config 0x10: 0x28300004
[    3.600513] pcieport 0002:00:00.0: save config 0x14: 0x00000000
[    3.606422] pcieport 0002:00:00.0: save config 0x18: 0x00010100
[    3.612330] pcieport 0002:00:00.0: save config 0x1c: 0x000001f1
[    3.618237] pcieport 0002:00:00.0: save config 0x20: 0x28202820
[    3.624146] pcieport 0002:00:00.0: save config 0x24: 0x0001fff1
[    3.630054] pcieport 0002:00:00.0: save config 0x28: 0x00000000
[    3.635963] pcieport 0002:00:00.0: save config 0x2c: 0x00000000
[    3.641873] pcieport 0002:00:00.0: save config 0x30: 0x00000000
[    3.647780] pcieport 0002:00:00.0: save config 0x34: 0x00000080
[    3.653689] pcieport 0002:00:00.0: save config 0x38: 0x00000000
[    3.659596] pcieport 0002:00:00.0: save config 0x3c: 0x00020170
[    3.665819] mtk-pcie-gen3 11300000.pcie: host bridge /soc/pcie@11300000 ranges:
[    3.673133] mtk-pcie-gen3 11300000.pcie: Parsing ranges property...
[    3.679397] mtk-pcie-gen3 11300000.pcie:       IO 0x0030000000..0x00301fffff -> 0x0030000000
[    3.687830] mtk-pcie-gen3 11300000.pcie:      MEM 0x0030200000..0x0037ffffff -> 0x0030200000
[    4.031105] mtk-pcie-gen3 11300000.pcie: PCIe link down, current LTSSM state: detect.quiet (0x1)
[    4.039892] mtk-pcie-gen3: probe of 11300000.pcie failed with error -110
[    4.046829] mtk-pcie-gen3 11310000.pcie: host bridge /soc/pcie@11310000 ranges:
[    4.054140] mtk-pcie-gen3 11310000.pcie: Parsing ranges property...
[    4.060401] mtk-pcie-gen3 11310000.pcie:       IO 0x0038000000..0x00381fffff -> 0x0038000000
[    4.068835] mtk-pcie-gen3 11310000.pcie:      MEM 0x0038200000..0x003fffffff -> 0x0038200000
[    4.411110] mtk-pcie-gen3 11310000.pcie: PCIe link down, current LTSSM state: detect.quiet (0x1)
[    4.419889] mtk-pcie-gen3: probe of 11310000.pcie failed with error -110
[    4.427258] FIT: Detected U-Boot 2024.01-OpenWrt-r25366-7f13b9f8be
[    4.433439] FIT: Selected configuration: "config-mt7988a-bananapi-bpi-r4" (OpenWrt bananapi_bpi-r4)
[    4.442482] FIT:           kernel sub-image 0x00001000..0x00588227 "kernel-1" (ARM64 OpenWrt Linux-6.6.30)
[    4.452217] FIT:          flat_dt sub-image 0x00589000..0x00593921 "fdt-1" (ARM64 OpenWrt bananapi_bpi-r4 device tree blob)
[    4.463428] FIT:          flat_dt sub-image 0x00594000..0x00594611 "fdt-mt7988a-bananapi-bpi-r4-emmc" (ARM64 OpenWrt bananapi_bpi-r4 device tree overlay mt7988a-bananapi-bpi-r4-emmc)
[    4.479756] FIT:          flat_dt sub-image 0x00595000..0x0059511c "fdt-mt7988a-bananapi-bpi-r4-rtc" (ARM64 OpenWrt bananapi_bpi-r4 device tree overlay mt7988a-bananapi-bpi-r4-rtc)
[    4.495914] FIT:          flat_dt sub-image 0x00596000..0x005965c9 "fdt-mt7988a-bananapi-bpi-r4-sd" (ARM64 OpenWrt bananapi_bpi-r4 device tree overlay mt7988a-bananapi-bpi-r4-sd)
[    4.511897] FIT:          flat_dt sub-image 0x00597000..0x005978eb "fdt-mt7988a-bananapi-bpi-r4-wifi-mt7996a" (ARM64 OpenWrt bananapi_bpi-r4 device tree overlay mt7988a-bananapi-bpi-r4-wifi-mt7996a)
[    4.529612] FIT:       filesystem sub-image 0x00598000..0x0123cfff "rootfs-1" (ARM64 OpenWrt bananapi_bpi-r4 rootfs)
[    4.540443] block mmcblk0p5: mapped 1 uImage.FIT filesystem sub-image as /dev/fit0
[    4.548183] block mmcblk0p5: mapped remaing space as /dev/fitrw
[    4.682613] mtk_soc_eth 15100000.ethernet: generated random MAC address 65:74:68:25:64:00
[    4.692993] mtk_soc_eth 15100000.ethernet eth0: mediatek frame engine at 0xffffffc082780000, irq 103
[    4.702662] mtk_soc_eth 15100000.ethernet eth1: mediatek frame engine at 0xffffffc082780000, irq 103
[    4.712341] mtk_soc_eth 15100000.ethernet eth2: mediatek frame engine at 0xffffffc082780000, irq 103
[    4.804305] mt7530-mmio 15020000.switch: configuring for fixed/internal link mode
[    4.811820] mt7530-mmio 15020000.switch: Link is Up - 10Gbps/Full - flow control rx/tx
[    4.836071] mt7530-mmio 15020000.switch wan (uninitialized): PHY [mt7530-0:00] driver [MediaTek MT7988 PHY] (irq=115)
[    4.871283] mt7530-mmio 15020000.switch lan1 (uninitialized): PHY [mt7530-0:01] driver [MediaTek MT7988 PHY] (irq=116)
[    4.906830] mt7530-mmio 15020000.switch lan2 (uninitialized): PHY [mt7530-0:02] driver [MediaTek MT7988 PHY] (irq=117)
[    4.942992] mt7530-mmio 15020000.switch lan3 (uninitialized): PHY [mt7530-0:03] driver [MediaTek MT7988 PHY] (irq=118)
[    4.953969] mtk_soc_eth 15100000.ethernet eth0: entered promiscuous mode
[    4.960678] DSA: tree 0 setup
[    4.964245] UBI: auto-attach mtd1
[    4.967554] ubi: mtd1 is already attached to ubi0
[    4.972257] UBI error: cannot attach mtd1
[    4.976311] clk: Disabling unused clocks
[    4.982466] VFS: Mounted root (squashfs filesystem) readonly on device 259:1.
[    4.989680] Freeing unused kernel memory: 384K
[    4.994171] Run /sbin/init as init process
[    4.998257]   with arguments:
[    5.001218]     /sbin/init
[    5.003914]   with environment:
[    5.007043]     HOME=/
[    5.009391]     TERM=linux
[    5.106374] init: Console is alive
[    5.109854] init: - watchdog -
[    5.405967] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    5.426215] Key type encrypted registered
[    5.438896] usbcore: registered new interface driver usbfs
[    5.444438] usbcore: registered new interface driver hub
[    5.449763] usbcore: registered new device driver usb
[    5.457942] device-mapper: ioctl: 4.48.0-ioctl (2023-03-01) initialised: [email protected]
[    5.468360] gpio_button_hotplug: loading out-of-tree module taints kernel.
[    5.478450] nvme 0002:01:00.0: assign IRQ: got 112
[    5.483381] nvme nvme0: pci function 0002:01:00.0
[    5.488082] nvme 0002:01:00.0: enabling device (0000 -> 0002)
[    5.493843] nvme 0002:01:00.0: enabling bus mastering
[    5.498952] mtk-pcie-gen3 11290000.pcie: msi#0x1 address_hi 0x0 address_lo 0x11290c00 data 1
[    5.507417] nvme 0002:01:00.0: save config 0x00: 0x500215b7
[    5.512990] nvme 0002:01:00.0: save config 0x04: 0x00100406
[    5.518551] nvme 0002:01:00.0: save config 0x08: 0x01080200
[    5.524123] nvme 0002:01:00.0: save config 0x0c: 0x00000000
[    5.529684] nvme 0002:01:00.0: save config 0x10: 0x28200004
[    5.535258] nvme 0002:01:00.0: save config 0x14: 0x00000000
[    5.540819] nvme 0002:01:00.0: save config 0x18: 0x00000000
[    5.546390] nvme 0002:01:00.0: save config 0x1c: 0x00000000
[    5.551960] nvme 0002:01:00.0: save config 0x20: 0x28204004
[    5.557520] nvme 0002:01:00.0: save config 0x24: 0x00000000
[    5.563088] nvme 0002:01:00.0: save config 0x28: 0x00000000
[    5.568648] nvme 0002:01:00.0: save config 0x2c: 0x500215b7
[    5.574218] nvme 0002:01:00.0: save config 0x30: 0x00000000
[    5.579779] nvme 0002:01:00.0: save config 0x34: 0x00000080
[    5.585349] nvme 0002:01:00.0: save config 0x38: 0x00000000
[    5.590910] nvme 0002:01:00.0: save config 0x3c: 0x00000170
[    5.600697] hwmon hwmon1: temp1_input not attached to any thermal zone
[    5.607363] mtk-pcie-gen3 11290000.pcie: msi#0x1 address_hi 0x0 address_lo 0x11290c00 data 1
[    5.615853] mtk-pcie-gen3 11290000.pcie: msi#0x2 address_hi 0x0 address_lo 0x11290c00 data 2
[    5.624312] mtk-pcie-gen3 11290000.pcie: msi#0x3 address_hi 0x0 address_lo 0x11290c00 data 3
[    5.632763] mtk-pcie-gen3 11290000.pcie: msi#0x4 address_hi 0x0 address_lo 0x11290c00 data 4
[    5.641210] mtk-pcie-gen3 11290000.pcie: msi#0x5 address_hi 0x0 address_lo 0x11290c00 data 5
[    5.649983] nvme nvme0: 4/0/0 default/read/poll queues
[    5.658358]  nvme0n1: p1
[    5.686857] xhci-mtk 11200000.usb: supply vbus not found, using dummy regulator
[    5.694257] xhci-mtk 11200000.usb: supply vusb33 not found, using dummy regulator
[    5.702157] xhci-mtk 11200000.usb: xHCI Host Controller
[    5.707381] xhci-mtk 11200000.usb: new USB bus registered, assigned bus number 1
[    5.717824] xhci-mtk 11200000.usb: hcc params 0x01403f99 hci version 0x110 quirks 0x0000000000200010
[    5.727009] xhci-mtk 11200000.usb: irq 124, io mem 0x11200000
[    5.732816] xhci-mtk 11200000.usb: xHCI Host Controller
[    5.738032] xhci-mtk 11200000.usb: new USB bus registered, assigned bus number 2
[    5.745419] xhci-mtk 11200000.usb: Host supports USB 3.2 Enhanced SuperSpeed
[    5.752782] hub 1-0:1.0: USB hub found
[    5.756540] hub 1-0:1.0: 1 port detected
[    5.760640] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    5.768920] hub 2-0:1.0: USB hub found
[    5.772708] hub 2-0:1.0: 1 port detected
[    5.779435] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    5.792908] init: - preinit -
[    5.987733] mtk_soc_eth 15100000.ethernet eth0: configuring for fixed/internal link mode
[    5.995967] mtk_soc_eth 15100000.ethernet eth0: Link is Up - 10Gbps/Full - flow control rx/tx
[    6.002651] mt7530-mmio 15020000.switch lan1: configuring for phy/internal link mode
[    6.013349] mt7530-mmio 15020000.switch lan1: Link is Up - 1Gbps/Full - flow control rx/tx
[    6.251099] usb 1-1: new high-speed USB device number 2 using xhci-mtk
[    6.433787] hub 1-1:1.0: USB hub found
[    6.437732] hub 1-1:1.0: 5 ports detected
[    6.581167] usb 2-1: new SuperSpeed USB device number 2 using xhci-mtk
[    6.613728] hub 2-1:1.0: USB hub found
[    6.617536] hub 2-1:1.0: 4 ports detected
[    7.131099] usb 1-1.5: new high-speed USB device number 3 using xhci-mtk
[    7.261103] random: crng init done
[    7.371963] usb 2-1.1: new SuperSpeed USB device number 3 using xhci-mtk
[    7.402951] usb 2-1.1: LPM exit latency is zeroed, disabling LPM.
[    8.123171] Starting lvm2 during preinit
[    8.666234] F2FS-fs (fitrw): Disable nat_bits due to incorrect cp_ver (11767746251995403946, 0)
[    8.676676] F2FS-fs (fitrw): Mounted with checkpoint version = 351ed6aa
[    8.684133] mount_root: switching to f2fs overlay
[    8.689740] overlayfs: null uuid detected in lower fs '/', falling back to xino=off,index=off,nfs_export=off.
[    8.700953] urandom-seed: Seeding with /etc/urandom.seed
[    8.727755] mt7530-mmio 15020000.switch lan1: Link is Down
[    8.735474] procd: - early -
[    8.738393] procd: - watchdog -
[    9.263452] procd: - watchdog -
[    9.267121] procd: - ubus -
[    9.421051] procd: - init -
[    9.632392] kmodloader: loading kernel modules from /etc/modules.d/*
[    9.687144] pca954x 1-0070: supply vdd not found, using dummy regulator
[    9.694427] i2c i2c-1: Added multiplexed i2c bus 2
[    9.699299] i2c i2c-1: Added multiplexed i2c bus 3
[    9.704177] i2c i2c-1: Added multiplexed i2c bus 4
[    9.709030] i2c i2c-1: Added multiplexed i2c bus 5
[    9.713903] pca954x 1-0070: registered 4 multiplexed busses for I2C switch pca9545
[    9.723615] urngd: v1.0.2 started.
[    9.727416] crypto-safexcel 15600000.crypto: can't request region for resource [mem 0x15600000-0x1577ffff]
[    9.737093] crypto-safexcel 15600000.crypto: failed to get resource
[    9.743362] crypto-safexcel: probe of 15600000.crypto failed with error -16
[    9.754355] at24 2-0050: supply vcc not found, using dummy regulator
[    9.783030] at24 2-0057: supply vcc not found, using dummy regulator
[    9.789962] at24 2-0057: 256 byte 24c02 EEPROM, writable, 1 bytes/write
[    9.797656] usbcore: registered new interface driver cdc_wdm
[    9.803903] Loading modules backported from Linux version v6.6.15-0-g51f354b815c4
[    9.811400] Backport generated by backports.git 193becf2
[    9.821858] sfp sfp1: Host maximum power 3.0W
[    9.826724] sfp sfp2: Host maximum power 3.0W
[    9.867129] PPP generic driver version 2.4.2
[    9.871894] NET: Registered PF_PPPOX protocol family
[    9.878768] qmi_wwan 2-1.1:1.4: cdc-wdm0: USB WDM device
[    9.885209] qmi_wwan 2-1.1:1.4 wwan0: register 'qmi_wwan' at usb-11200000.usb-1.1, WWAN/QMI device, 96:69:10:b2:68:d6
[    9.895891] usbcore: registered new interface driver qmi_wwan
[    9.903179] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
[    9.911006] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <[email protected]>. All Rights Reserved.
[    9.922185] kmodloader: done loading kernel modules from /etc/modules.d/*
[   10.152454] sfp sfp2: module CISCO-FINISAR    FCBG110SD1C01-CS rev A    sn FIW1952056K-A    dc 151224
[   10.161916] mtk_soc_eth 15100000.ethernet eth1: switched to inband/10gbase-r link mode
[   11.937539] mtk_soc_eth 15100000.ethernet eth1: configuring for inband/10gbase-r link mode
[   11.959797] br-lan: port 1(eth1) entered blocking state
[   11.965097] br-lan: port 1(eth1) entered disabled state
[   11.970362] mtk_soc_eth 15100000.ethernet eth1: entered allmulticast mode
[   11.977375] mtk_soc_eth 15100000.ethernet eth1: entered promiscuous mode
[   11.990445] mtk_soc_eth 15100000.ethernet eth0: Link is Down
[   11.997887] mtk_soc_eth 15100000.ethernet eth0: configuring for fixed/internal link mode
[   12.006034] mtk_soc_eth 15100000.ethernet eth0: Link is Up - 10Gbps/Full - flow control rx/tx
[   12.007643] mt7530-mmio 15020000.switch lan1: configuring for phy/internal link mode
[   12.025161] br-lan: port 2(lan1) entered blocking state
[   12.030401] br-lan: port 2(lan1) entered disabled state
[   12.035682] mt7530-mmio 15020000.switch lan1: entered allmulticast mode
[   12.042305] mtk_soc_eth 15100000.ethernet eth0: entered allmulticast mode
[   12.049297] mt7530-mmio 15020000.switch lan1: entered promiscuous mode
[   12.057593] mtk_soc_eth 15100000.ethernet eth1: Link is Up - 10Gbps/Full - flow control off
[   12.059414] mt7530-mmio 15020000.switch lan2: configuring for phy/internal link mode
[   12.073951] br-lan: port 1(eth1) entered blocking state
[   12.079183] br-lan: port 1(eth1) entered forwarding state
[   12.085778] br-lan: port 3(lan2) entered blocking state
[   12.091014] br-lan: port 3(lan2) entered disabled state
[   12.096316] mt7530-mmio 15020000.switch lan2: entered allmulticast mode
[   12.103145] mt7530-mmio 15020000.switch lan2: entered promiscuous mode
[   12.112268] mt7530-mmio 15020000.switch lan3: configuring for phy/internal link mode
[   12.120776] br-lan: port 4(lan3) entered blocking state
[   12.126034] br-lan: port 4(lan3) entered disabled state
[   12.131295] mt7530-mmio 15020000.switch lan3: entered allmulticast mode
[   12.138111] mt7530-mmio 15020000.switch lan3: entered promiscuous mode
[   12.156736] mt7530-mmio 15020000.switch wan: configuring for phy/internal link mode
[   14.772292] mt7530-mmio 15020000.switch wan: Link is Up - 1Gbps/Full - flow control rx/tx
[   14.848355] mt7530-mmio 15020000.switch lan1: Link is Up - 1Gbps/Full - flow control rx/tx
[   14.857065] br-lan: port 2(lan1) entered blocking state
[   14.862298] br-lan: port 2(lan1) entered forwarding state
[   15.549090] mt7530-mmio 15020000.switch lan3: Link is Up - 100Mbps/Full - flow control off
[   15.557773] br-lan: port 4(lan3) entered blocking state
[   15.563000] br-lan: port 4(lan3) entered forwarding state
[   15.682383] mt7530-mmio 15020000.switch lan2: Link is Up - 1Gbps/Full - flow control rx/tx
[   15.691053] br-lan: port 3(lan2) entered blocking state
[   15.696282] br-lan: port 3(lan2) entered forwarding state
[   16.534856] mt7530-mmio 15020000.switch lan3: Link is Down
[   16.540796] br-lan: port 4(lan3) entered disabled state
[   18.704103] mt7530-mmio 15020000.switch lan3: Link is Up - 100Mbps/Full - flow control off
[   18.712782] br-lan: port 4(lan3) entered blocking state
[   18.718000] br-lan: port 4(lan3) entered forwarding state

Ethtool

root@r1:~# ethtool eth1
Settings for eth1:
        Supported ports: [  ]
        Supported link modes:   10000baseCR/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  10000baseCR/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Speed: 10000Mb/s
        Duplex: Full
        Auto-negotiation: on
        Port: Direct Attach Copper
        PHYAD: 0
        Transceiver: internal
        Current message level: 0x000000ff (255)
                               drv probe link timer ifdown ifup rx_err tx_err
        Link detected: yes
root@r1:~# ethtool eth2
Settings for eth2:
        Supported ports: [ MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
                                10000baseT/Full
                                2500baseX/Full
                                1000baseKX/Full
                                10000baseKX4/Full
                                10000baseKR/Full
                                1000baseX/Full
                                10000baseCR/Full
                                10000baseSR/Full
                                10000baseLR/Full
                                10000baseLRM/Full
                                10000baseER/Full
                                2500baseT/Full
                                5000baseT/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
                                10000baseT/Full
                                2500baseX/Full
                                1000baseKX/Full
                                10000baseKX4/Full
                                10000baseKR/Full
                                1000baseX/Full
                                10000baseCR/Full
                                10000baseSR/Full
                                10000baseLR/Full
                                10000baseLRM/Full
                                10000baseER/Full
                                2500baseT/Full
                                5000baseT/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
root@r1:~# ethtool -m eth2
netlink error: No such device
root@r1:~# ethtool -m eth1
        Identifier                                : 0x03 (SFP)
        Extended identifier                       : 0x04 (GBIC/SFP defined by 2-wire interface ID)
        Connector                                 : 0x21 (Copper pigtail)
        Transceiver codes                         : 0x00 0x00 0x00 0x00 0x00 0x08 0x00 0x00 0x00
        Transceiver type                          : Active Cable
        Encoding                                  : 0x00 (unspecified)
        BR, Nominal                               : 10300MBd
        Rate identifier                           : 0x00 (unspecified)
        Length (SMF,km)                           : 0km
        Length (SMF)                              : 0m
        Length (50um)                             : 0m
        Length (62.5um)                           : 0m
        Length (Copper)                           : 1m
        Length (OM3)                              : 0m
        Active Cu cmplnce.                        : 0x0c (unknown) [SFF-8472 rev10.4 only]
        Vendor name                               : CISCO-FINISAR
        Vendor OUI                                : 00:90:65
        Vendor PN                                 : FCBG110SD1C01-CS
        Vendor rev                                : A
        Option values                             : 0x00 0x12
        Option                                    : RX_LOS implemented
        Option                                    : TX_DISABLE implemented
        BR margin, max                            : 0%
        BR margin, min                            : 0%
        Vendor SN                                 : FIW1952056K-A
        Date code                                 : 151224

Mhm,it is not even seen as sfp…no eeprom message for sfp1.

Are you sure it is completely inserted? My 2g5 sf connects on the last millimeter. maybe yours is similar

Yes, its as deep as possible. I have changed place for both sfp, to see if cage is OK. And for DAC sfp it is detected not even fully inserted.

Is there any hardware which is detecting SFP and sending power to it?

[...]
[ 2650.271886] mtk_soc_eth 15100000.ethernet eth1: Link is Down
[ 2650.277598] sfp sfp2: module removed
[ 2650.281567] br-lan: port 1(eth1) entered disabled state
[ 2714.584986] sfp sfp1: module CISCO-FINISAR    FCBG110SD1C01-CS rev A    sn FIW1952056K-A    dc 151224
[ 2714.594467] mtk_soc_eth 15100000.ethernet eth2: switched to inband/10gbase-r link mode
[ 2716.448588] sfp sfp1: module removed
[ 2719.664727] sfp sfp1: module CISCO-FINISAR    FCBG110SD1C01-CS rev A    sn FIW1952056K-A    dc 151224
[ 2722.069842] sfp sfp1: module removed
[ 2736.935080] sfp sfp2: module CISCO-FINISAR    FCBG110SD1C01-CS rev A    sn FIW1952056K-A    dc 151224
[ 2737.036154] mtk_soc_eth 15100000.ethernet eth1: Link is Up - 10Gbps/Full - flow control off
[ 2737.044546] br-lan: port 1(eth1) entered blocking state
[ 2737.049765] br-lan: port 1(eth1) entered forwarding state

I have reached producer of LEOX, and the issue here is that sfp module itself would change mod-def0 to LO only when internal linux will bootup. So it is simmilar to problem described by @Vasya

You have suggested that there may be a way to change moddef0:

Hi Eric, sorry for the late reply, I backported your patches of your net-next-realtek-phy-v4 to the openwrt 6.6 kernel, and the behavior for both is the same: BPI-R4 need 10 mins to run the SFP modules, but they really seem to be realtek:

root@OpenWrt:/tmp# dmesg | grep -E "(sfp)|(eth1)|(eth2)|(PHY)"
[    8.874055] mtk_soc_eth 15100000.ethernet eth1: mediatek frame engine at 0xffffffc082b00000, irq 103
[    8.883742] mtk_soc_eth 15100000.ethernet eth2: mediatek frame engine at 0xffffffc082b00000, irq 103
[    9.161435] mt7530-mmio 15020000.switch wan (uninitialized): PHY [mt7530-0:00] driver [MediaTek MT7988 PHY] (irq=125)
[    9.196796] mt7530-mmio 15020000.switch lan1 (uninitialized): PHY [mt7530-0:01] driver [MediaTek MT7988 PHY] (irq=126)
[    9.232088] mt7530-mmio 15020000.switch lan2 (uninitialized): PHY [mt7530-0:02] driver [MediaTek MT7988 PHY] (irq=127)
[    9.267378] mt7530-mmio 15020000.switch lan3 (uninitialized): PHY [mt7530-0:03] driver [MediaTek MT7988 PHY] (irq=128)
[   18.939765] RTL8226B_RTL8221B 2.5Gbps PHY r8169-1-300:00: no of_node; not parsing pinctrl DT
[   19.050755] RTL8226B_RTL8221B 2.5Gbps PHY r8169-1-400:00: no of_node; not parsing pinctrl DT
[   19.134861] sfp sfp1: Host maximum power 3.0W
[   19.182139] sfp sfp2: Host maximum power 3.0W
[   19.453762] sfp sfp1: module OEM              SFP-2G5          rev 1.0  sn 2G522112324218   dc 220801  
[   28.643776] sfp sfp2: module OEM              SFP-2G5          rev 1.0  sn 2G522112324218   dc 220801  
[   37.496202] mtk_soc_eth 15100000.ethernet eth1: configuring for inband/10gbase-r link mode
[   37.527727] br-lan: port 4(eth1) entered blocking state
[   37.533006] br-lan: port 4(eth1) entered disabled state
[   37.538260] mtk_soc_eth 15100000.ethernet eth1: entered allmulticast mode
[   37.545211] mtk_soc_eth 15100000.ethernet eth1: entered promiscuous mode
[   37.589570] mtk_soc_eth 15100000.ethernet eth2: configuring for inband/10gbase-r link mode
[   37.622382] br-wan: port 2(eth2) entered blocking state
[   37.627631] br-wan: port 2(eth2) entered disabled state
[   37.632916] mtk_soc_eth 15100000.ethernet eth2: entered allmulticast mode
[   37.639904] mtk_soc_eth 15100000.ethernet eth2: entered promiscuous mode
[  690.624485] sfp sfp2: no PHY detected
[  690.628166] mtk_soc_eth 15100000.ethernet eth1: switched to inband/2500base-x link mode
[  717.974486] sfp sfp1: no PHY detected
[  717.978165] mtk_soc_eth 15100000.ethernet eth2: switched to inband/2500base-x link mode

on both AOCCLINK and FB-LINK modules (you said the 2nd one would not be rollball), I read i2cdump info:

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:/tmp# 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 -- -- -- -- 56 -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: UU -- -- -- -- -- -- --                         
root@OpenWrt:/tmp# 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: 11 79 01 0c 0d 41 00 00 00 02 00 00 00 00 00 a0    ?y???A...?.....?
10: 00 00 00 00 00 00 00 00 00 00 00 82 00 00 00 00    ...........?....
20: 11 79 01 0c 0d 41 00 00 00 02 00 00 00 00 00 a0    ?y???A...?.....?
30: 00 00 00 00 00 00 00 00 00 00 00 82 00 00 00 00    ...........?....
40: 11 79 01 0c 0d 41 00 00 00 02 00 00 00 00 00 a0    ?y???A...?.....?
50: 00 00 00 00 00 00 00 00 00 00 00 82 00 00 00 00    ...........?....
60: 11 79 01 0c 0d 41 00 00 00 02 00 00 00 00 00 a0    ?y???A...?.....?
70: 00 00 00 00 00 00 00 00 00 00 00 82 00 00 00 00    ...........?....
80: 11 79 01 0c 0d 41 00 00 00 02 00 00 00 00 00 a0    ?y???A...?.....?
90: 00 00 00 00 00 00 00 00 00 00 00 82 00 00 00 00    ...........?....
a0: 11 79 01 0c 0d 41 00 00 00 02 00 00 00 00 00 a0    ?y???A...?.....?
b0: 00 00 00 00 00 00 00 00 00 00 00 82 00 00 00 00    ...........?....
c0: 11 79 01 0c 0d 41 00 00 00 02 00 00 00 00 00 a0    ?y???A...?.....?
d0: 00 00 00 00 00 00 00 00 00 00 00 82 00 00 00 00    ...........?....
e0: 11 79 01 0c 0d 41 00 00 00 02 00 00 00 00 00 a0    ?y???A...?.....?
f0: 00 00 00 00 00 00 00 00 00 00 00 82 00 00 00 00    ...........?....
root@OpenWrt:/tmp# i2cdump -y 4 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: 11 79 01 0c 0d 41 00 00 00 02 00 00 00 00 00 a0    ?y???A...?.....?
10: 00 00 00 00 00 00 00 00 00 00 00 82 00 00 00 00    ...........?....
20: 11 79 01 0c 0d 41 00 00 00 02 00 00 00 00 00 a0    ?y???A...?.....?
30: 00 00 00 00 00 00 00 00 00 00 00 82 00 00 00 00    ...........?....
40: 11 79 01 0c 0d 41 00 00 00 02 00 00 00 00 00 a0    ?y???A...?.....?
50: 00 00 00 00 00 00 00 00 00 00 00 82 00 00 00 00    ...........?....
60: 11 79 01 0c 0d 41 00 00 00 02 00 00 00 00 00 a0    ?y???A...?.....?
70: 00 00 00 00 00 00 00 00 00 00 00 82 00 00 00 00    ...........?....
80: 11 79 01 0c 0d 41 00 00 00 02 00 00 00 00 00 a0    ?y???A...?.....?
90: 00 00 00 00 00 00 00 00 00 00 00 82 00 00 00 00    ...........?....
a0: 11 79 01 0c 0d 41 00 00 00 02 00 00 00 00 00 a0    ?y???A...?.....?
b0: 00 00 00 00 00 00 00 00 00 00 00 82 00 00 00 00    ...........?....
c0: 11 79 01 0c 0d 41 00 00 00 02 00 00 00 00 00 a0    ?y???A...?.....?
d0: 00 00 00 00 00 00 00 00 00 00 00 82 00 00 00 00    ...........?....
e0: 11 79 01 0c 0d 41 00 00 00 02 00 00 00 00 00 a0    ?y???A...?.....?
f0: 00 00 00 00 00 00 00 00 00 00 00 82 00 00 00 00    ...........?....
root@OpenWrt:/tmp# i2cdump -y 3 0x50
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: 03 04 07 00 00 00 00 00 00 40 00 01 1f 00 00 00    ???......@.??...
10: 00 00 00 00 4f 45 4d 20 20 20 20 20 20 20 20 20    ....OEM         
20: 20 20 20 20 00 00 00 00 53 46 50 2d 32 47 35 20        ....SFP-2G5 
30: 20 20 20 20 20 20 20 20 31 2e 30 20 00 00 00 82            1.0 ...?
40: 00 18 00 00 32 47 35 32 32 31 31 32 33 32 34 32    .?..2G5221123242
50: 31 38 20 20 32 32 30 38 30 31 20 20 00 00 00 9f    18  220801  ...?
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    ................
root@OpenWrt:/tmp# i2cdump -y 4 0x50
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: 03 04 07 00 00 00 00 00 00 40 00 01 1f 00 00 00    ???......@.??...
10: 00 00 00 00 4f 45 4d 20 20 20 20 20 20 20 20 20    ....OEM         
20: 20 20 20 20 00 00 00 00 53 46 50 2d 32 47 35 20        ....SFP-2G5 
30: 20 20 20 20 20 20 20 20 31 2e 30 20 00 00 00 82            1.0 ...?
40: 00 18 00 00 32 47 35 32 32 31 31 32 33 32 34 32    .?..2G5221123242
50: 31 38 20 20 32 32 30 38 30 31 20 20 00 00 00 9f    18  220801  ...?
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    ................

could run your i2csfp tool. Both could be bruteforced using your tool to a password of 0000000.

./i2csfp /dev/i2c-3 bruteforce
Checking 0x0000XXXX (1/65536)
Readback matched at SOMEWHERE!
Readback matched at 0xXXXX0000
root@OpenWrt:/tmp# ./i2csfp /dev/i2c-3 rbpassword
RollBall Password used: 0x00000000
./i2csfp /dev/i2c-4 bruteforce
Checking 0x0000XXXX (1/65536)
Readback matched at SOMEWHERE!
Readback matched at 0xXXXX0000
root@OpenWrt:/tmp# ./i2csfp /dev/i2c-4 rbpassword
RollBall Password used: 0x00000000
root@OpenWrt:/tmp# ./i2csfp /dev/i2c-4 eepromfix
Checksum 0x00-0x3e matched 82
Checksum 0x40-0x5e matched 9f
RollBall Password used: 0x00000000
Checksum 0x00-0x3e matched 82
Checksum 0x40-0x5e matched 9f

I ran i2csfp bruteforce + rbpassword + eepromfix, but I couldn’t really see any different behavior. Can you tell me what I should expect and what I’m doing wrong? What might cause the lockup of 10 minutes? What info might be useful from both modules? I got a lot to learn about SFP and the i2c link, but I’m somewhat lost in the woods right now…

Something I also was thinking about: my R4 board gets pretty hot, probably due to all expansion slots (also the M.2 for SSD and M.2 for 5G) populated with wifi adapters. Might this be a power problem? I’m using a 65W USB-C dapter, maybe this is what causes my headaches?

EDIT to whom it might be useful: i2cdump of 0x56 provides different values when you insert the cable:

#cable unplugged
i2cdump -y 4 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: 11 79 01 0c 0d 41 00 00 00 02 00 00 00 00 00 a0    ?y???A...?.....?
10: 00 00 00 00 00 00 00 00 00 00 00 82 00 00 00 00    ...........?....
20: 11 79 01 0c 0d 41 00 00 00 02 00 00 00 00 00 a0    ?y???A...?.....?
30: 00 00 00 00 00 00 00 00 00 00 00 82 00 00 00 00    ...........?....
40: 11 79 01 0c 0d 41 00 00 00 02 00 00 00 00 00 a0    ?y???A...?.....?
50: 00 00 00 00 00 00 00 00 00 00 00 82 00 00 00 00    ...........?....
60: 11 79 01 0c 0d 41 00 00 00 02 00 00 00 00 00 a0    ?y???A...?.....?
70: 00 00 00 00 00 00 00 00 00 00 00 82 00 00 00 00    ...........?....
80: 11 79 01 0c 0d 41 00 00 00 02 00 00 00 00 00 a0    ?y???A...?.....?
90: 00 00 00 00 00 00 00 00 00 00 00 82 00 00 00 00    ...........?....
a0: 11 79 01 0c 0d 41 00 00 00 02 00 00 00 00 00 a0    ?y???A...?.....?
b0: 00 00 00 00 00 00 00 00 00 00 00 82 00 00 00 00    ...........?....
c0: 11 79 01 0c 0d 41 00 00 00 02 00 00 00 00 00 a0    ?y???A...?.....?
d0: 00 00 00 00 00 00 00 00 00 00 00 82 00 00 00 00    ...........?....
e0: 11 79 01 0c 0d 41 00 00 00 02 00 00 00 00 00 a0    ?y???A...?.....?
f0: 00 00 00 00 00 00 00 00 00 00 00 82 00 00 00 00    ...........?....
#cable plugged in
root@OpenWrt:/tmp# i2cdump -y 4 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: 11 79 01 0c 0d cd 00 00 00 02 28 00 00 00 00 a0    ?y????...?(....?
10: 00 bc 00 00 00 00 00 00 00 00 00 82 00 00 00 00    .?.........?....
20: 11 79 01 0c 0d cd 00 00 00 02 28 00 00 00 00 a0    ?y????...?(....?
30: 00 bc 00 00 00 00 00 00 00 00 00 82 00 00 00 00    .?.........?....
40: 11 79 01 0c 0d cd 00 00 00 02 28 00 00 00 00 a0    ?y????...?(....?
50: 00 bc 00 00 00 00 00 00 00 00 00 82 00 00 00 00    .?.........?....
60: 11 79 01 0c 0d cd 00 00 00 02 28 00 00 00 00 a0    ?y????...?(....?
70: 00 bc 00 00 00 00 00 00 00 00 00 82 00 00 00 00    .?.........?....
80: 11 79 01 0c 0d cd 00 00 00 02 28 00 00 00 00 a0    ?y????...?(....?
90: 00 bc 00 00 00 00 00 00 00 00 00 82 00 00 00 00    .?.........?....
a0: 11 79 01 0c 0d cd 00 00 00 02 28 00 00 00 00 a0    ?y????...?(....?
b0: 00 bc 00 00 00 00 00 00 00 00 00 82 00 00 00 00    .?.........?....
c0: 11 79 01 0c 0d cd 00 00 00 02 28 00 00 00 00 a0    ?y????...?(....?
d0: 00 bc 00 00 00 00 00 00 00 00 00 82 00 00 00 00    .?.........?....
e0: 11 79 01 0c 0d cd 00 00 00 02 28 00 00 00 00 a0    ?y????...?(....?
f0: 00 bc 00 00 00 00 00 00 00 00 00 82 00 00 00 00    .?.........?....

This means that on the very first try the data on eeprom can be altered. But must likeliy after powerdown it will be the old value again. This means the brute force attack cannot be done on this module.

Why do you not choose modules that are reported to be successful in using the PHY on the module if this is what you want? (Luleey shop several reports, FS several reports, even from BPI-store also 1 report of Rollball + rtl8221b)

Guess you are right … I thought it would be fun but it seems more like a nightmare right now. Do you have any idea what actually happens in the background that causes a delay of 10 minutes? Is therr a way to shorten the ‘no phy detected’ to 1 minute or so?

Here is a good place to start searching. But I think this is all hardcoded delays and nr of retries. https://elixir.bootlin.com/linux/v6.9.1/source/drivers/net/phy/sfp.c#L2645