[bpi-r3] sfp 2.5g

Thank you for your answers. Here is the output of the commands :

root@bpi-r3:/dev# i2cdetect -l
i2c-0   i2c             i2c-gpio-0                              I2C adapter
i2c-1   i2c             i2c-gpio-1                              I2C adapter
i2c-2   i2c             i2c-mt65xx                              I2C adapter
root@bpi-r3:/dev# i2cdetect -y 0
     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: -- -- -- -- -- -- -- --

root@bpi-r3:/dev# i2cdump -y 0 0x56
No size specified (using byte-data access)
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 20 58 00 02 00 1c c8 49 20 70 00 8a 80 00 00 30     X.?.??I p.??..0
10: 82 00 00 00 00 00 41 a0 00 00 00 00 00 1c c8 49    ?.....A?.....??I
20: 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00    ...........?....
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
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    ................

Thanks!

So ths also looks like a rtl8221b behind rollball.

So At the least you can add to drivers/net/phy/sfp.c:

	SFP_QUIRK_M("FS", "SFP-2.5G-T", sfp_quirk_oem_2_5g),

It will disable auto negotiation and set the correct interface.

If you want to control the phy some more, you’ll need to add a patch-set…

Actually, it would be nice if you can test it… I was working on a testing image anyway, to test yet another module. I will add this one as well, but it will be a few days before I have the image.

Update sfp.c Change FS module to new fixup · ericwoud/linux@ca57821 (github.com)

This commit will need the rest of the patch-set.

Edit:

This last commit is different than the change above. It is part of the (first version of) my patchset.

eeprom looks really broken/invalid

Thank you, Yes, I will test the patch

No, I have added it to my bpir-rolling-stable branch, so it will be part of the image.

Edit:

The package containing this kernel will get rebuild overnight automatically. You could extract a kernel from that to test, or wait for me to finish an image (archlinuxarm).

Same as the module from the BPI store:

There should actually be a C22 accessible (mdio over i2c bridge) virtual device at the 0x56 address, which partly works. At least it has the ID of the PHY at offset 4 to 7. But further then that it does not really work and we use the Rollball protocol at address 0x51 to access the phy.

@clo

Could you also try

(Archlibux image with the patchset for your module)

I tested your image, and it’s working fine.

[root@bpir3 ~]# dmesg
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 6.7.9-bpi (nathalieeneric@rk3588) (gcc (GCC) 12.1.0, GNU ld (GNU Binutils) 2.38) #31 SMP PREEMPT Fri Mar 15 15:48:55 UTC 2024
[    0.000000] Machine model: Bananapi BPI-R3
[    0.000000] earlycon: uart8250 at MMIO32 0x0000000011002000 (options '')
[    0.000000] printk: legacy bootconsole [uart8250] enabled
[    0.000000] efi: UEFI not found.
[    0.000000] OF: reserved mem: 0x0000000015194000..0x0000000015194fff (4 KiB) nomap non-reusable wo-boot@15194000
[    0.000000] OF: reserved mem: 0x00000000151e0000..0x00000000151e7fff (32 KiB) nomap non-reusable wo-ilm@151e0000
[    0.000000] OF: reserved mem: 0x00000000151e8000..0x00000000151e9fff (8 KiB) nomap non-reusable wo-dlm@151e8000
[    0.000000] OF: reserved mem: 0x00000000151f0000..0x00000000151f7fff (32 KiB) nomap non-reusable wo-ilm@151f0000
[    0.000000] OF: reserved mem: 0x00000000151f8000..0x00000000151f9fff (8 KiB) nomap non-reusable wo-dlm@151f8000
[    0.000000] OF: reserved mem: 0x0000000043000000..0x000000004302ffff (192 KiB) nomap non-reusable secmon@43000000
[    0.000000] OF: reserved mem: 0x0000000043030000..0x00000000430300ff (0 KiB) nomap non-reusable atf-data@43030000
[    0.000000] OF: reserved mem: 0x000000004fc00000..0x000000004fcfffff (1024 KiB) nomap non-reusable wmcpu-reserved@4fc00000
[    0.000000] OF: reserved mem: 0x000000004fd00000..0x000000004fd3ffff (256 KiB) nomap non-reusable wo-emi@4fd00000
[    0.000000] OF: reserved mem: 0x000000004fd40000..0x000000004fd7ffff (256 KiB) nomap non-reusable wo-emi@4fd40000
[    0.000000] OF: reserved mem: 0x000000004fd80000..0x000000004ffbffff (2304 KiB) nomap non-reusable wo-data@4fd80000
[    0.000000] OF: reserved mem: 0x0000000051000000..0x0000000052ffffff (32768 KiB) nomap non-reusable atf-buffer@51000000
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000040000000-0x00000000bfffffff]
[    0.000000]   DMA32    empty
[    0.000000]   Normal   empty
[    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-0x000000004302ffff]
[    0.000000]   node   0: [mem 0x0000000043031000-0x000000004fbfffff]
[    0.000000]   node   0: [mem 0x000000004fc00000-0x000000004ffbffff]
[    0.000000]   node   0: [mem 0x000000004ffc0000-0x0000000050ffffff]
[    0.000000]   node   0: [mem 0x0000000051000000-0x0000000052ffffff]
[    0.000000]   node   0: [mem 0x0000000053000000-0x00000000bfffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x00000000bfffffff]
[    0.000000] On node 0, zone DMA: 1 pages in unavailable ranges
[    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 19 pages/cpu s39272 r8192 d30360 u77824
[    0.000000] pcpu-alloc: s39272 r8192 d30360 u77824 alloc=19*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: ARM erratum 845719
[    0.000000] alternatives: applying boot alternatives
[    0.000000] Kernel command line: root=PARTLABEL=bpir3-sdmmc-root earlycon=uart8250,mmio32,0x11002000 console=ttyS0,115200 debug=7 rw rootwait audit=0
[    0.000000] audit: disabled (until reboot)
[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 516095
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] software IO TLB: SWIOTLB bounce buffer size adjusted to 2MB
[    0.000000] software IO TLB: area num 4.
[    0.000000] software IO TLB: mapped [mem 0x00000000bd600000-0x00000000bd800000] (2MB)
[    0.000000] Memory: 1988680K/2097148K available (10176K kernel code, 1480K rwdata, 4040K rodata, 3200K init, 421K bss, 108468K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000]  Trampoline variant of Tasks RCU enabled.
[    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: 640 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.008308] Console: colour dummy device 80x25
[    0.012796] Calibrating delay loop (skipped), value calculated using timer frequency.. 26.00 BogoMIPS (lpj=130000)
[    0.023209] pid_max: default: 32768 minimum: 301
[    0.027963] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.035410] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.043963] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    0.050646] RCU Tasks: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1.
[    0.057808] RCU Tasks Trace: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1.
[    0.065547] rcu: Hierarchical SRCU implementation.
[    0.070357] rcu:     Max phase no-delay instances is 1000.
[    0.076085] EFI services will not be available.
[    0.080811] smp: Bringing up secondary CPUs ...
[    0.085763] Detected VIPT I-cache on CPU1
[    0.085817] GICv3: CPU1: found redistributor 1 region 0:0x000000000c0a0000
[    0.085853] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.086252] Detected VIPT I-cache on CPU2
[    0.086287] GICv3: CPU2: found redistributor 2 region 0:0x000000000c0c0000
[    0.086303] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[    0.086648] Detected VIPT I-cache on CPU3
[    0.086677] GICv3: CPU3: found redistributor 3 region 0:0x000000000c0e0000
[    0.086691] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[    0.086744] smp: Brought up 1 node, 4 CPUs
[    0.143339] SMP: Total of 4 processors activated.
[    0.148064] CPU features: detected: 32-bit EL0 Support
[    0.153223] CPU features: detected: CRC32 instructions
[    0.158393] CPU features: emulated: Privileged Access Never (PAN) using TTBR0_EL1 switching
[    0.166807] CPU: All CPU(s) started at EL2
[    0.170932] alternatives: applying system-wide alternatives
[    0.177373] devtmpfs: initialized
[    0.183753] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.193669] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.200695] pinctrl core: initialized pinctrl subsystem
[    0.206227] DMI not present or invalid.
[    0.210591] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.216948] DMA: preallocated 256 KiB GFP_KERNEL pool for atomic allocations
[    0.224060] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.231873] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.240272] thermal_sys: Registered thermal governor 'fair_share'
[    0.240276] thermal_sys: Registered thermal governor 'bang_bang'
[    0.246407] thermal_sys: Registered thermal governor 'step_wise'
[    0.252440] thermal_sys: Registered thermal governor 'user_space'
[    0.258598] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.271592] ASID allocator initialised with 65536 entries
[    0.287573] Modules: 27904 pages in range for non-PLT usage
[    0.287589] Modules: 519424 pages in range for PLT usage
[    0.293912] cryptd: max_cpu_qlen set to 1000
[    0.473610] raid6: neonx8   gen()  3707 MB/s
[    0.643667] raid6: neonx4   gen()  3567 MB/s
[    0.813719] raid6: neonx2   gen()  3363 MB/s
[    0.983785] raid6: neonx1   gen()  2605 MB/s
[    1.153848] raid6: int64x8  gen()   966 MB/s
[    1.323911] raid6: int64x4  gen()  1168 MB/s
[    1.493941] raid6: int64x2  gen()  1870 MB/s
[    1.663996] raid6: int64x1  gen()  1325 MB/s
[    1.668286] raid6: using algorithm neonx8 gen() 3707 MB/s
[    1.834030] raid6: .... xor() 2662 MB/s, rmw enabled
[    1.839019] raid6: using neon recovery algorithm
[    1.843948] iommu: Default domain type: Translated
[    1.848760] iommu: DMA domain TLB invalidation policy: strict mode
[    1.855230] SCSI subsystem initialized
[    1.859093] libata version 3.00 loaded.
[    1.863062] usbcore: registered new interface driver usbfs
[    1.868601] usbcore: registered new interface driver hub
[    1.873956] usbcore: registered new device driver usb
[    1.879335] i2c-gpio i2c-gpio-0: using lines 528 (SDA) and 529 (SCL)
[    1.885861] i2c-gpio i2c-gpio-1: using lines 530 (SDA) and 531 (SCL)
[    1.892288] mc: Linux media interface: v0.10
[    1.896593] videodev: Linux video capture interface: v2.00
[    1.902129] pps_core: LinuxPPS API ver. 1 registered
[    1.907117] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <[email protected]>
[    1.916304] PTP clock support registered
[    1.921358] vgaarb: loaded
[    1.924359] clocksource: Switched to clocksource arch_sys_counter
[    1.935884] NET: Registered PF_INET protocol family
[    1.940934] IP idents hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    1.949634] tcp_listen_portaddr_hash hash table entries: 1024 (order: 2, 16384 bytes, linear)
[    1.958263] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    1.966060] TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    1.974084] TCP bind hash table entries: 16384 (order: 7, 524288 bytes, linear)
[    1.981764] TCP: Hash tables configured (established 16384 bind 16384)
[    1.988447] UDP hash table entries: 1024 (order: 3, 32768 bytes, linear)
[    1.995215] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes, linear)
[    2.002544] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    2.008263] PCI: CLS 0 bytes, default 64
[    2.012377] Unpacking initramfs...
[    2.016786] Initialise system trusted keyrings
[    2.021519] workingset: timestamp_bits=46 max_order=19 bucket_order=0
[    2.028424] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    2.034342] jffs2: version 2.2. (NAND) (SUMMARY)  \xc2\xa9 2001-2006 Red Hat, Inc.
[    2.073922] xor: measuring software checksum speed
[    2.081381]    8regs           :  3832 MB/sec
[    2.087889]    32regs          :  4678 MB/sec
[    2.094850]    arm64_neon      :  3872 MB/sec
[    2.099238] xor: using function: 32regs (4678 MB/sec)
[    2.104330] Key type asymmetric registered
[    2.108486] Asymmetric key parser 'x509' registered
[    2.113522] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[    2.121013] io scheduler mq-deadline registered
[    2.125584] io scheduler kyber registered
[    2.129691] io scheduler bfq registered
[    2.148376] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[    2.156779] printk: legacy console [ttyS0] disabled
[    2.182309] 11002000.serial: ttyS0 at MMIO 0x11002000 (irq = 116, base_baud = 2500000) is a ST16650V2
[    2.191729] printk: legacy console [ttyS0] enabled
[    2.201374] printk: legacy bootconsole [uart8250] disabled
[    2.235854] 11003000.serial: ttyS1 at MMIO 0x11003000 (irq = 117, base_baud = 1625000) is a ST16650V2
[    2.245067] Freeing initrd memory: 9792K
[    2.273506] 11004000.serial: ttyS2 at MMIO 0x11004000 (irq = 118, base_baud = 1625000) is a ST16650V2
[    2.283718] mtk_rng 1020f000.rng: registered RNG driver
[    2.283979] random: crng init done
[    2.297259] loop: module loaded
[    2.303412] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
[    2.311273] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <[email protected]>. All Rights Reserved.
[    2.321976] sfp sfp-1: Host maximum power 3.0W
[    2.327081] sfp sfp-2: Host maximum power 3.0W
[    2.465564] mtk_soc_eth 15100000.ethernet: generated random MAC address c6:30:f9:93:60:9a
[    2.473816] mtk_soc_eth 15100000.ethernet: generated random MAC address 66:64:c9:41:69:c1
[    2.484522] mtk_soc_eth 15100000.ethernet eth0: mediatek frame engine at 0xffffffc082180000, irq 123
[    2.494563] mtk_soc_eth 15100000.ethernet eth1: mediatek frame engine at 0xffffffc082180000, irq 123
[    2.504322] usbcore: registered new interface driver usb-storage
[    2.510696] i2c_dev: i2c /dev entries driver
[    2.517566] mtk-wdt 1001c000.watchdog: Watchdog enabled (timeout=31 sec, nowayout=0)
[    2.526737] ledtrig-cpu: registered to indicate activity on CPUs
[    2.532747] SMCCC: SOC_ID: ARCH_SOC_ID not implemented, skipping ....
[    2.539639] usbcore: registered new interface driver usbhid
[    2.545235] usbhid: USB HID core driver
[    2.549753] NET: Registered PF_INET6 protocol family
[    2.555458] Segment Routing with IPv6
[    2.559130] In-situ OAM (IOAM) with IPv6
[    2.563075] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    2.569455] NET: Registered PF_PACKET protocol family
[    2.574649] 8021q: 802.1Q VLAN Support v1.8
[    2.586735] Loading compiled-in X.509 certificates
[    2.600054] Btrfs loaded, zoned=no, fsverity=no
[    2.612681] mtk-pcie-gen3 11280000.pcie: host bridge /soc/pcie@11280000 ranges:
[    2.620222] mtk-pcie-gen3 11280000.pcie:      MEM 0x0020000000..0x002fffffff -> 0x0020000000
[    2.674542] sfp sfp-1: module FS               SFP-2.5G-T       rev 1.0  sn G2340039491      dc 231101
[    2.844375] mtk-pcie-gen3 11280000.pcie: PCIe link down, current LTSSM state: detect.active (0x1000001)
[    2.853780] mtk-pcie-gen3: probe of 11280000.pcie failed with error -110
[    2.943798] mt7530-mdio mdio-bus:1f: configuring for fixed/2500base-x link mode
[    2.952876] mt7530-mdio mdio-bus:1f: Link is Up - 2.5Gbps/Full - flow control rx/tx
[    2.961849] mt7530-mdio mdio-bus:1f wan (uninitialized): PHY [mt7530-0:00] driver [MediaTek MT7531 PHY] (irq=128)
[    2.982323] mt7530-mdio mdio-bus:1f lan0 (uninitialized): PHY [mt7530-0:01] driver [MediaTek MT7531 PHY] (irq=129)
[    3.002663] mt7530-mdio mdio-bus:1f lan1 (uninitialized): PHY [mt7530-0:02] driver [MediaTek MT7531 PHY] (irq=130)
[    3.022974] mt7530-mdio mdio-bus:1f lan2 (uninitialized): PHY [mt7530-0:03] driver [MediaTek MT7531 PHY] (irq=131)
[    3.043263] mt7530-mdio mdio-bus:1f lan3 (uninitialized): PHY [mt7530-0:04] driver [MediaTek MT7531 PHY] (irq=132)
[    3.054954] mtk_soc_eth 15100000.ethernet eth0: entered promiscuous mode
[    3.061683] DSA: tree 0 setup
[    3.065257] xhci-mtk 11200000.usb: supply vbus not found, using dummy regulator
[    3.072663] xhci-mtk 11200000.usb: supply vusb33 not found, using dummy regulator
[    3.081223] xhci-mtk 11200000.usb: xHCI Host Controller
[    3.086484] xhci-mtk 11200000.usb: new USB bus registered, assigned bus number 1
[    3.096938] xhci-mtk 11200000.usb: hcc params 0x01403f99 hci version 0x110 quirks 0x0000000000200010
[    3.106099] xhci-mtk 11200000.usb: irq 133, io mem 0x11200000
[    3.111943] xhci-mtk 11200000.usb: xHCI Host Controller
[    3.117170] xhci-mtk 11200000.usb: new USB bus registered, assigned bus number 2
[    3.124558] xhci-mtk 11200000.usb: Host supports USB 3.2 Enhanced SuperSpeed
[    3.132099] hub 1-0:1.0: USB hub found
[    3.135869] hub 1-0:1.0: 2 ports detected
[    3.140187] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    3.148678] hub 2-0:1.0: USB hub found
[    3.152439] hub 2-0:1.0: 1 port detected
[    3.158618] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[    3.165731] of_cfs_init
[    3.168257] of_cfs_init: OK
[    3.171155] clk: Disabling unused clocks
[    3.185506] Freeing unused kernel memory: 3200K
[    3.219654] mmc0: host does not support reading read-only switch, assuming write-enable
[    3.224401] Run /init as init process
[    3.231286]   with arguments:
[    3.231513] mmc0: new high speed SDHC card at address e624
[    3.234239]     /init
[    3.240736] mmcblk0: mmc0:e624 SA08G 7.40 GiB
[    3.241970]   with environment:
[    3.249449]     HOME=/
[    3.251800]     TERM=linux
[    3.255419]  mmcblk0: p1 p2 p3
[    3.604441] usb 1-1: new high-speed USB device number 2 using xhci-mtk
[    3.785647] hub 1-1:1.0: USB hub found
[    3.789695] hub 1-1:1.0: 4 ports detected
[    4.482335] F2FS-fs (mmcblk0p3): Found nat_bits in checkpoint
[    4.548719] F2FS-fs (mmcblk0p3): Mounted with checkpoint version = 7a29e49e
[    5.392205] systemd[1]: System time before build time, advancing clock.
[    5.533608] systemd[1]: systemd 255.4-2-arch running in system mode (+PAM +AUDIT -SELINUX -APPARMOR -IMA +SMACK +SECCOMP +GCRYPT +GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 +PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD +BPF_FRAMEWORK +XKBCOMMON +UTMP -SYSVINIT default-hierarchy=unified)
[    5.565939] systemd[1]: Detected architecture arm64.
[    5.610111] systemd[1]: Hostname set to <bpir3>.
[    5.760417] systemd[1]: bpf-lsm: BPF LSM hook not enabled in the kernel, BPF LSM not supported
[    6.502631] systemd[1]: Queued start job for default target Graphical Interface.
[    6.555574] systemd[1]: Unnecessary job was removed for /sys/subsystem/net/devices/wlan1.
[    6.563797] systemd[1]: Unnecessary job was removed for /sys/subsystem/net/devices/wlan0.
[    6.574170] systemd[1]: Created slice Slice /system/dirmngr.
[    6.615786] systemd[1]: Created slice Slice /system/getty.
[    6.655737] systemd[1]: Created slice Slice /system/gpg-agent.
[    6.695764] systemd[1]: Created slice Slice /system/gpg-agent-browser.
[    6.735757] systemd[1]: Created slice Slice /system/gpg-agent-extra.
[    6.775756] systemd[1]: Created slice Slice /system/gpg-agent-ssh.
[    6.815799] systemd[1]: Created slice Slice /system/hostapd.
[    6.855745] systemd[1]: Created slice Slice /system/keyboxd.
[    6.895784] systemd[1]: Created slice Slice /system/modprobe.
[    6.935778] systemd[1]: Created slice Slice /system/serial-getty.
[    6.975341] systemd[1]: Created slice User and Session Slice.
[    7.014737] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[    7.054595] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[    7.094583] systemd[1]: Arbitrary Executable File Formats File System Automount Point was skipped because of an unmet condition check (ConditionPathExists=/proc/sys/fs/binfmt_misc).
[    7.110806] systemd[1]: Expecting device /dev/ttyS0...
[    7.144445] systemd[1]: Reached target Local Encrypted Volumes.
[    7.184442] systemd[1]: Reached target Local Integrity Protected Volumes.
[    7.224478] systemd[1]: Reached target Path Units.
[    7.254436] systemd[1]: Reached target Remote File Systems.
[    7.294430] systemd[1]: Reached target Slice Units.
[    7.324456] systemd[1]: Reached target Swaps.
[    7.354469] systemd[1]: Reached target Local Verity Protected Volumes.
[    7.394721] systemd[1]: Listening on Device-mapper event daemon FIFOs.
[    7.440381] systemd[1]: Listening on Process Core Dump Socket.
[    7.476639] systemd[1]: Listening on Journal Socket (/dev/log).
[    7.514969] systemd[1]: Listening on Journal Socket.
[    7.546333] systemd[1]: Listening on Network Service Netlink Socket.
[    7.584505] systemd[1]: TPM2 PCR Extension (Varlink) was skipped because of an unmet condition check (ConditionSecurity=measured-uki).
[    7.599114] systemd[1]: Listening on udev Control Socket.
[    7.634879] systemd[1]: Listening on udev Kernel Socket.
[    7.676182] systemd[1]: Listening on User Database Manager Socket.
[    7.714872] systemd[1]: Huge Pages File System was skipped because of an unmet condition check (ConditionPathExists=/sys/kernel/mm/hugepages).
[    7.764645] systemd[1]: Mounting POSIX Message Queue File System...
[    7.807194] systemd[1]: Mounting Kernel Debug File System...
[    7.844805] systemd[1]: Kernel Trace File System was skipped because of an unmet condition check (ConditionPathExists=/sys/kernel/tracing).
[    7.860349] systemd[1]: Mounting Temporary Directory /tmp...
[    7.899465] systemd[1]: Starting Create List of Static Device Nodes...
[    7.937851] systemd[1]: Starting Load Kernel Module configfs...
[    7.977820] systemd[1]: Starting Load Kernel Module dm_mod...
[    8.017851] systemd[1]: Starting Load Kernel Module drm...
[    8.057817] systemd[1]: Starting Load Kernel Module fuse...
[    8.097957] systemd[1]: Starting Load Kernel Module loop...
[    8.137397] systemd[1]: Starting Setup MAC addresses...
[    8.174739] systemd[1]: File System Check on Root Device was skipped because of an unmet condition check (ConditionPathIsReadWrite=!/).
[    8.187574] systemd[1]: systemd-journald.service: unit configures an IP firewall, but the local system does not support BPF/cgroup firewalling.
[    8.200496] systemd[1]: systemd-journald.service: (This warning is only shown for the first unit using IP firewalling.)
[    8.214598] systemd[1]: Starting Journal Service...
[    8.259531] systemd[1]: Starting Load Kernel Modules...
[    8.297913] systemd[1]: Starting Generate network units from Kernel command line...
[    8.312578] systemd-journald[1743]: Collecting audit messages is disabled.
[    8.344658] systemd[1]: TPM2 PCR Machine ID Measurement was skipped because of an unmet condition check (ConditionSecurity=measured-uki).
[    8.360236] systemd[1]: Starting Remount Root and Kernel File Systems...
[    8.381367] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    8.394718] systemd[1]: TPM2 SRK Setup (Early) was skipped because of an unmet condition check (ConditionSecurity=measured-uki).
[    8.410153] systemd[1]: Starting Coldplug All udev Devices...
[    8.412766] Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    8.422622] Loaded X.509 cert 'wens: 61c038651aabdcf94bd0ac7ff06c7248db18c600'
[    8.459663] systemd[1]: Started Journal Service.
[    9.019456] mt798x-wmac 18000000.wifi: HW/SW Version: 0x8a108a10, Build Time: 20221012174743a

[    9.176515] mt798x-wmac 18000000.wifi: WM Firmware Version: ____000000, Build Time: 20221012174805
[    9.226774] systemd-journald[1743]: Received client request to flush runtime journal.
[    9.249771] mt798x-wmac 18000000.wifi: WA Firmware Version: DEV_000000, Build Time: 20221012174937
[    9.355373] mt798x-wmac 18000000.wifi: Load eeprom: /lib/firmware/mediatek/mt798x-wmac_rf.bin
[    9.363945] mt798x-wmac 18000000.wifi: Open eeprom file failed: /lib/firmware/mediatek/mt798x-wmac_rf.bin
[    9.413385] mt798x-wmac 18000000.wifi: eeprom load fail, use default bin
[   13.350595] mtk_soc_eth 15100000.ethernet eth0: configuring for fixed/2500base-x link mode
[   13.359086] mtk_soc_eth 15100000.ethernet eth0: Link is Up - 2.5Gbps/Full - flow control rx/tx
[   13.361693] brlan: port 1(eth1) entered blocking state
[   13.372878] brlan: port 1(eth1) entered disabled state
[   13.378143] mtk_soc_eth 15100000.ethernet eth1: entered allmulticast mode
[   13.385142] mtk_soc_eth 15100000.ethernet eth1: entered promiscuous mode
[   13.394104] brlan: port 2(wan) entered blocking state
[   13.399194] brlan: port 2(wan) entered disabled state
[   13.404267] mt7530-mdio mdio-bus:1f wan: entered allmulticast mode
[   13.410513] mtk_soc_eth 15100000.ethernet eth0: entered allmulticast mode
[   13.420196] mt7530-mdio mdio-bus:1f wan: entered promiscuous mode
[   13.428569] brlan: port 3(lan0) entered blocking state
[   13.433730] brlan: port 3(lan0) entered disabled state
[   13.438918] mt7530-mdio mdio-bus:1f lan0: entered allmulticast mode
[   13.447222] mt7530-mdio mdio-bus:1f lan0: entered promiscuous mode
[   13.455600] brlan: port 4(lan1) entered blocking state
[   13.460775] brlan: port 4(lan1) entered disabled state
[   13.466021] mt7530-mdio mdio-bus:1f lan1: entered allmulticast mode
[   13.474335] mt7530-mdio mdio-bus:1f lan1: entered promiscuous mode
[   13.483491] brlan: port 5(lan2) entered blocking state
[   13.489292] brlan: port 5(lan2) entered disabled state
[   13.495272] mt7530-mdio mdio-bus:1f lan2: entered allmulticast mode
[   13.503575] mt7530-mdio mdio-bus:1f lan2: entered promiscuous mode
[   13.511919] brlan: port 6(lan3) entered blocking state
[   13.517126] brlan: port 6(lan3) entered disabled state
[   13.522315] mt7530-mdio mdio-bus:1f lan3: entered allmulticast mode
[   13.530821] mt7530-mdio mdio-bus:1f lan3: entered promiscuous mode
[   13.539692] brlan: port 7(lan4) entered blocking state
[   13.544908] brlan: port 7(lan4) entered disabled state
[   13.550088] mt7530-mdio mdio-bus:1f lan4: entered allmulticast mode
[   13.558641] mt7530-mdio mdio-bus:1f lan4: entered promiscuous mode
[   14.344712] mtk_soc_eth 15100000.ethernet eth1: configuring for inband/2500base-x link mode
[   14.354856] mt7530-mdio mdio-bus:1f lan1: configuring for phy/gmii link mode
[   14.362590] 8021q: adding VLAN 0 to HW filter on device lan1
[   14.370477] mt7530-mdio mdio-bus:1f lan2: configuring for phy/gmii link mode
[   14.378176] 8021q: adding VLAN 0 to HW filter on device lan2
[   14.386138] mt7530-mdio mdio-bus:1f lan3: configuring for phy/gmii link mode
[   14.395278] 8021q: adding VLAN 0 to HW filter on device lan3
[   14.402972] mt7530-mdio mdio-bus:1f lan0: configuring for phy/gmii link mode
[   14.410671] 8021q: adding VLAN 0 to HW filter on device lan0
[   14.413315] mt7530-mdio mdio-bus:1f lan0: Link is Up - 1Gbps/Full - flow control rx/tx
[   14.417718] mt7530-mdio mdio-bus:1f wan: configuring for phy/gmii link mode
[   14.431927] 8021q: adding VLAN 0 to HW filter on device wan
[   14.438598] brlan: port 3(lan0) entered blocking state
[   14.443751] brlan: port 3(lan0) entered forwarding state
[   14.450033] mt7530-mdio mdio-bus:1f lan4: configuring for inband/2500base-x link mode
[   14.459718] 8021q: adding VLAN 0 to HW filter on device lan4
[   14.734855] brlan: port 8(wlan0) entered blocking state
[   14.740137] brlan: port 8(wlan0) entered disabled state
[   14.745449] mt798x-wmac 18000000.wifi wlan0: entered allmulticast mode
[   14.752255] mt798x-wmac 18000000.wifi wlan0: entered promiscuous mode
[   14.760665] brlan: port 8(wlan0) entered blocking state
[   14.766197] brlan: port 8(wlan0) entered forwarding state
[   14.816566] brlan: port 9(wlan1) entered blocking state
[   14.821842] brlan: port 9(wlan1) entered disabled state
[   14.827535] mt798x-wmac 18000000.wifi wlan1: entered allmulticast mode
[   14.834316] mt798x-wmac 18000000.wifi wlan1: entered promiscuous mode
[   14.841923] brlan: port 9(wlan1) entered blocking state
[   14.847189] brlan: port 9(wlan1) entered forwarding state
[   15.294450] brlan: port 8(wlan0) entered disabled state
[   15.300079] brlan: port 9(wlan1) entered disabled state
[   19.229959] mtk_soc_eth 15100000.ethernet eth1: switched to phy/2500base-x link mode
[   20.389889] mtk_soc_eth 15100000.ethernet eth1: PHY [i2c:sfp-1:11] driver [RTL8221B-VB-CG 2.5Gbps PHY (C45)] (irq=POLL)
[   20.617402] brlan: port 8(wlan0) entered blocking state
[   20.622647] brlan: port 8(wlan0) entered forwarding state
[   21.027852] brlan: port 9(wlan1) entered blocking state
[   21.033097] brlan: port 9(wlan1) entered forwarding state
[   67.137873] mt7530-mdio mdio-bus:1f lan0: Link is Down
[   67.143101] brlan: port 3(lan0) entered disabled state
[   69.640631] mt7530-mdio mdio-bus:1f wan: Link is Up - 1Gbps/Full - flow control rx/tx
[   69.648590] brlan: port 2(wan) entered blocking state
[   69.653641] brlan: port 2(wan) entered forwarding state
[   83.313215] mt7530-mdio mdio-bus:1f wan: Link is Down
[   83.318369] brlan: port 2(wan) entered disabled state
[   85.274528] mt7530-mdio mdio-bus:1f lan0: Link is Up - 1Gbps/Full - flow control rx/tx
[   85.282499] brlan: port 3(lan0) entered blocking state
[   85.287644] brlan: port 3(lan0) entered forwarding state
[  193.265071] mt7530-mdio mdio-bus:1f lan0: Link is Down
[  193.270301] brlan: port 3(lan0) entered disabled state
[  195.319825] mt7530-mdio mdio-bus:1f lan1: Link is Up - 1Gbps/Full - flow control rx/tx
[  195.327868] brlan: port 4(lan1) entered blocking state
[  195.333006] brlan: port 4(lan1) entered forwarding state
[  207.705445] mt7530-mdio mdio-bus:1f lan1: Link is Down
[  207.710677] brlan: port 4(lan1) entered disabled state
[  210.545025] mt7530-mdio mdio-bus:1f lan0: Link is Up - 1Gbps/Full - flow control rx/tx
[  210.552997] brlan: port 3(lan0) entered blocking state
[  210.558142] brlan: port 3(lan0) entered forwarding state
[  279.566726] mt798x-wmac 18000000.wifi wlan0: failed (err=-2) to del object (id=3)
[  279.574215] mt798x-wmac 18000000.wifi wlan1: failed (err=-2) to del object (id=3)
[  279.582835] mt798x-wmac 18000000.wifi wlan0: failed (err=-2) to del object (id=3)
[  279.590336] mt798x-wmac 18000000.wifi wlan1: failed (err=-2) to del object (id=3)
[  579.278319] mt7530-mdio mdio-bus:1f lan0: Link is Down
[  579.283674] brlan: port 3(lan0) entered disabled state
[  581.294667] mt7530-mdio mdio-bus:1f wan: Link is Up - 1Gbps/Full - flow control rx/tx
[  581.302553] brlan: port 2(wan) entered blocking state
[  581.307612] brlan: port 2(wan) entered forwarding state
[  592.396608] mt7530-mdio mdio-bus:1f wan: Link is Down
[  592.401896] brlan: port 2(wan) entered disabled state
[  595.090398] mt7530-mdio mdio-bus:1f lan0: Link is Up - 1Gbps/Full - flow control rx/tx
[  595.098380] brlan: port 3(lan0) entered blocking state
[  595.103514] brlan: port 3(lan0) entered forwarding state
[  872.519881] mtk_soc_eth 15100000.ethernet eth1: No phy led trigger registered for speed(2500)
[  872.519900] mtk_soc_eth 15100000.ethernet eth1: Link is Up - 2.5Gbps/Full - flow control off
[  872.536881] brlan: port 1(eth1) entered blocking state
[  872.542037] brlan: port 1(eth1) entered forwarding state
[  879.131234] mtk_soc_eth 15100000.ethernet eth1: Link is Down
[  879.137843] brlan: port 1(eth1) entered disabled state
[  883.479880] mtk_soc_eth 15100000.ethernet eth1: No phy led trigger registered for speed(2500)
[  883.479896] mtk_soc_eth 15100000.ethernet eth1: Link is Up - 2.5Gbps/Full - flow control rx/tx
[  883.497044] brlan: port 1(eth1) entered blocking state
[  883.502197] brlan: port 1(eth1) entered forwarding state
[  911.709165] mtk_soc_eth 15100000.ethernet eth1: Link is Down
[  911.715773] brlan: port 1(eth1) entered disabled state
[  916.039890] mtk_soc_eth 15100000.ethernet eth1: No phy led trigger registered for speed(2500)
[  916.039912] mtk_soc_eth 15100000.ethernet eth1: Link is Up - 2.5Gbps/Full - flow control rx/tx
[  916.057221] brlan: port 1(eth1) entered blocking state
[  916.062365] brlan: port 1(eth1) entered forwarding state
[ 1044.888183] mtk_soc_eth 15100000.ethernet eth1: Link is Down
[ 1044.894883] brlan: port 1(eth1) entered disabled state
[ 1046.221214] mt7530-mdio mdio-bus:1f lan0: Link is Down
[ 1046.226470] brlan: port 3(lan0) entered disabled state
[ 1050.679883] mtk_soc_eth 15100000.ethernet eth1: No phy led trigger registered for speed(1000)
[ 1050.680041] mtk_soc_eth 15100000.ethernet eth1: Link is Up - 1Gbps/Full - flow control rx/tx
[ 1050.696980] brlan: port 1(eth1) entered blocking state
[ 1050.702134] brlan: port 1(eth1) entered forwarding state
[ 1056.989580] mtk_soc_eth 15100000.ethernet eth1: Link is Down
[ 1056.996069] brlan: port 1(eth1) entered disabled state
[ 1059.264678] mt7530-mdio mdio-bus:1f lan0: Link is Up - 1Gbps/Full - flow control rx/tx
[ 1059.272662] brlan: port 3(lan0) entered blocking state
[ 1059.277810] brlan: port 3(lan0) entered forwarding state
[ 1065.479880] mtk_soc_eth 15100000.ethernet eth1: No phy led trigger registered for speed(2500)
[ 1065.480038] mtk_soc_eth 15100000.ethernet eth1: Link is Up - 2.5Gbps/Full - flow control rx/tx
[ 1065.497085] brlan: port 1(eth1) entered blocking state
[ 1065.502228] brlan: port 1(eth1) entered forwarding state
[ 1088.779786] mtk_soc_eth 15100000.ethernet eth1: Link is Down
[ 1088.786267] brlan: port 1(eth1) entered disabled state
[ 1096.359880] mtk_soc_eth 15100000.ethernet eth1: No phy led trigger registered for speed(1000)
[ 1096.360040] mtk_soc_eth 15100000.ethernet eth1: Link is Up - 1Gbps/Full - flow control rx/tx
[ 1096.376908] brlan: port 1(eth1) entered blocking state
[ 1096.382050] brlan: port 1(eth1) entered forwarding state

I tried to connect to a 2.5G port and also a 1G port and both speed where detected :

[root@bpir3 ~]# cat /sys/class/net/eth1/speed
2500
[root@bpir3 ~]# cat /sys/class/net/eth1/speed
1000
[root@bpir3 ~]#

Works also on the other port :

[ 1524.526474] sfp sfp-1: module transmit fault indicated
[ 1524.531643] sfp sfp-1: module removed
[ 1527.234539] sfp sfp-2: module FS               SFP-2.5G-T       rev 1.0  sn G2340039491      dc 231101
[ 1532.119958] mt7530-mdio mdio-bus:1f lan4: switched to phy/2500base-x link mode
[ 1533.279896] mt7530-mdio mdio-bus:1f lan4: PHY [i2c:sfp-2:11] driver [RTL8221B-VB-CG 2.5Gbps PHY (C45)] (irq=POLL)
[ 1538.039888] mt7530-mdio mdio-bus:1f lan4: No phy led trigger registered for speed(1000)
[ 1538.140072] mt7530-mdio mdio-bus:1f lan4: Link is Up - 1Gbps/Full - flow control rx/tx
[ 1538.148124] brlan: port 7(lan4) entered blocking state
[ 1538.153266] brlan: port 7(lan4) entered forwarding state
[ 1548.353143] mt7530-mdio mdio-bus:1f lan4: Link is Down
[ 1548.358462] brlan: port 7(lan4) entered disabled state
[ 1552.039885] mt7530-mdio mdio-bus:1f lan4: No phy led trigger registered for speed(2500)
[ 1552.140079] mt7530-mdio mdio-bus:1f lan4: Link is Up - 2.5Gbps/Full - flow control rx/tx
[ 1552.148233] brlan: port 7(lan4) entered blocking state
[ 1552.153367] brlan: port 7(lan4) entered forwarding state

Thank you !

Thanks for trying, then I know I can add this module to the patchset.

This is an older version of the patchset, but at least I know that the module is a rtl8221b behind RollBall also.

Now, I’m trying to make this SFP works with kernel from frank :

https://github.com/frank-w/BPI-Router-Linux

I used sfp.c / sfp.h from your repo :

https://github.com/ericwoud/linux

But it’s not completely working. No errors in dmesg but interface remains down and ping is KO :

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 6.6.16-bpi-r3 (mtg@mtg-VirtualBox) (aarch64-linux-gnu-gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #1 SMP Tue Mar 19 10:13:32 CET 2024
[    0.000000] Machine model: Bananapi BPI-R3
[    0.000000] earlycon: uart8250 at MMIO32 0x0000000011002000 (options '')
[    0.000000] printk: bootconsole [uart8250] enabled
[    0.000000] efi: UEFI not found.
[    0.000000] OF: reserved mem: 0x0000000015194000..0x0000000015194fff (4 KiB) nomap non-reusable wo-boot@15194000
[    0.000000] OF: reserved mem: 0x00000000151e0000..0x00000000151e7fff (32 KiB) nomap non-reusable wo-ilm@151e0000
[    0.000000] OF: reserved mem: 0x00000000151e8000..0x00000000151e9fff (8 KiB) nomap non-reusable wo-dlm@151e8000
[    0.000000] OF: reserved mem: 0x00000000151f0000..0x00000000151f7fff (32 KiB) nomap non-reusable wo-ilm@151f0000
[    0.000000] OF: reserved mem: 0x00000000151f8000..0x00000000151f9fff (8 KiB) nomap non-reusable wo-dlm@151f8000
[    0.000000] OF: reserved mem: 0x0000000043000000..0x000000004302ffff (192 KiB) nomap non-reusable secmon@43000000
[    0.000000] OF: reserved mem: 0x000000004fc00000..0x000000004fcfffff (1024 KiB) nomap non-reusable wmcpu-reserved@4fc00000
[    0.000000] OF: reserved mem: 0x000000004fd00000..0x000000004fd3ffff (256 KiB) nomap non-reusable wo-emi@4fd00000
[    0.000000] OF: reserved mem: 0x000000004fd40000..0x000000004fd7ffff (256 KiB) nomap non-reusable wo-emi@4fd40000
[    0.000000] OF: reserved mem: 0x000000004fd80000..0x000000004ffbffff (2304 KiB) nomap non-reusable wo-data@4fd80000
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000040000000-0x00000000bfffffff]
[    0.000000]   DMA32    empty
[    0.000000]   Normal   empty
[    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-0x000000004302ffff]
[    0.000000]   node   0: [mem 0x0000000043030000-0x000000004fbfffff]
[    0.000000]   node   0: [mem 0x000000004fc00000-0x000000004ffbffff]
[    0.000000]   node   0: [mem 0x000000004ffc0000-0x00000000bfffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x00000000bfffffff]
[    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 28 pages/cpu s76584 r8192 d29912 u114688
[    0.000000] pcpu-alloc: s76584 r8192 d29912 u114688 alloc=28*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: ARM erratum 845719
[    0.000000] alternatives: applying boot alternatives
[    0.000000] Kernel command line: board=bpi-r3 earlycon=uart8250,mmio32,0x11002000 debug=7 root=/dev/mmcblk0p6 rootfstype=ext4 rootwait
[    0.000000] Unknown kernel command line parameters "board=bpi-r3", will be passed to user space.
[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 516096
[    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 0x00000000b9600000-0x00000000bd600000] (64MB)
[    0.000000] Memory: 1961948K/2097152K available (12608K kernel code, 2410K rwdata, 4204K rodata, 4480K init, 419K bss, 135204K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] trace event string verifier disabled
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     RCU event tracing is enabled.
[    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: 640 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.008275] Console: colour dummy device 80x25
[    0.012738] printk: console [tty0] enabled
[    0.016849] printk: bootconsole [uart8250] disabled
[    0.021777] Calibrating delay loop (skipped), value calculated using timer frequency.. 26.00 BogoMIPS (lpj=130000)
[    0.021789] pid_max: default: 32768 minimum: 301
[    0.021896] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.021912] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.022503] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    0.022932] RCU Tasks Trace: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1.
[    0.023054] rcu: Hierarchical SRCU implementation.
[    0.023061] rcu:     Max phase no-delay instances is 1000.
[    0.023464] EFI services will not be available.
[    0.023616] smp: Bringing up secondary CPUs ...
[    0.023941] Detected VIPT I-cache on CPU1
[    0.023980] GICv3: CPU1: found redistributor 1 region 0:0x000000000c0a0000
[    0.024012] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.024356] Detected VIPT I-cache on CPU2
[    0.024380] GICv3: CPU2: found redistributor 2 region 0:0x000000000c0c0000
[    0.024394] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[    0.024674] Detected VIPT I-cache on CPU3
[    0.024695] GICv3: CPU3: found redistributor 3 region 0:0x000000000c0e0000
[    0.024707] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[    0.024742] smp: Brought up 1 node, 4 CPUs
[    0.024784] SMP: Total of 4 processors activated.
[    0.024790] CPU features: detected: 32-bit EL0 Support
[    0.024796] CPU features: detected: CRC32 instructions
[    0.024843] CPU features: emulated: Privileged Access Never (PAN) using TTBR0_EL1 switching
[    0.024854] CPU: All CPU(s) started at EL2
[    0.024860] alternatives: applying system-wide alternatives
[    0.026436] devtmpfs: initialized
[    0.028489] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.028520] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.028648] pinctrl core: initialized pinctrl subsystem
[    0.028861] DMI not present or invalid.
[    0.029235] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.029782] DMA: preallocated 256 KiB GFP_KERNEL pool for atomic allocations
[    0.029821] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.029850] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.030226] thermal_sys: Registered thermal governor 'fair_share'
[    0.030230] thermal_sys: Registered thermal governor 'bang_bang'
[    0.030238] thermal_sys: Registered thermal governor 'step_wise'
[    0.030244] thermal_sys: Registered thermal governor 'user_space'
[    0.030342] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.030407] ASID allocator initialised with 65536 entries
[    0.038001] Modules: 26688 pages in range for non-PLT usage
[    0.038015] Modules: 518208 pages in range for PLT usage
[    0.038744] cryptd: max_cpu_qlen set to 1000
[    0.039157] iommu: Default domain type: Translated
[    0.039173] iommu: DMA domain TLB invalidation policy: strict mode
[    0.039307] SCSI subsystem initialized
[    0.039405] libata version 3.00 loaded.
[    0.039515] usbcore: registered new interface driver usbfs
[    0.039540] usbcore: registered new interface driver hub
[    0.039567] usbcore: registered new device driver usb
[    0.039816] i2c-gpio i2c-gpio-0: using lines 528 (SDA) and 529 (SCL)
[    0.039928] i2c-gpio i2c-gpio-1: using lines 530 (SDA) and 531 (SCL)
[    0.039976] pps_core: LinuxPPS API ver. 1 registered
[    0.039982] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <[email protected]>
[    0.039998] PTP clock support registered
[    0.040936] vgaarb: loaded
[    0.041237] clocksource: Switched to clocksource arch_sys_counter
[    0.045122] NET: Registered PF_INET protocol family
[    0.045273] IP idents hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.046277] tcp_listen_portaddr_hash hash table entries: 1024 (order: 2, 16384 bytes, linear)
[    0.046306] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.046320] TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.046394] TCP bind hash table entries: 16384 (order: 7, 524288 bytes, linear)
[    0.046725] TCP: Hash tables configured (established 16384 bind 16384)
[    0.046818] UDP hash table entries: 1024 (order: 3, 32768 bytes, linear)
[    0.046854] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes, linear)
[    0.046987] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.047322] RPC: Registered named UNIX socket transport module.
[    0.047333] RPC: Registered udp transport module.
[    0.047339] RPC: Registered tcp transport module.
[    0.047344] RPC: Registered tcp-with-tls transport module.
[    0.047350] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.047364] PCI: CLS 0 bytes, default 64
[    0.052029] Initialise system trusted keyrings
[    0.052261] workingset: timestamp_bits=46 max_order=19 bucket_order=0
[    0.052515] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.052751] NFS: Registering the id_resolver key type
[    0.052789] Key type id_resolver registered
[    0.052796] Key type id_legacy registered
[    0.052813] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.052821] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    0.052842] jffs2: version 2.2. (NAND) (SUMMARY)  \xc2\xa9 2001-2006 Red Hat, Inc.
[    0.071986] Key type asymmetric registered
[    0.072009] Asymmetric key parser 'x509' registered
[    0.072065] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
[    0.072076] io scheduler mq-deadline registered
[    0.072086] io scheduler kyber registered
[    0.072126] io scheduler bfq registered
[    0.109780] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[    0.132148] 11002000.serial: ttyS0 at MMIO 0x11002000 (irq = 116, base_baud = 2500000) is a ST16650V2
[    0.132211] printk: console [ttyS0] enabled
[    1.141287] 11003000.serial: ttyS1 at MMIO 0x11003000 (irq = 117, base_baud = 1625000) is a ST16650V2
[    1.172026] 11004000.serial: ttyS2 at MMIO 0x11004000 (irq = 118, base_baud = 1625000) is a ST16650V2
[    1.182177] mtk_rng 1020f000.rng: registered RNG driver
[    1.191252] loop: module loaded
[    1.196137] spi-nand spi0.0: Winbond SPI NAND was found.
[    1.201487] spi-nand spi0.0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
[    1.209798] 4 fixed-partitions partitions found on MTD device spi0.0
[    1.216221] Creating 4 MTD partitions on "spi0.0":
[    1.221000] 0x000000580000-0x000008000000 : "ubi"
[    1.340140] 0x000000380000-0x000000580000 : "fip"
[    1.347637] 0x000000100000-0x000000380000 : "reserved"
[    1.356016] 0x000000000000-0x000000100000 : "bl2"
[    1.363623] sfp sfp-1: Host maximum power 3.0W
[    1.368590] sfp sfp-2: Host maximum power 3.0W
[    1.502471] mtk_soc_eth 15100000.ethernet: generated random MAC address 12:08:af:64:50:52
[    1.512693] mtk_soc_eth 15100000.ethernet eth0: mediatek frame engine at 0xffffffc082700000, irq 123
[    1.522569] mtk_soc_eth 15100000.ethernet eth1: mediatek frame engine at 0xffffffc082700000, irq 123
[    1.532194] usbcore: registered new interface driver usb-storage
[    1.538387] i2c_dev: i2c /dev entries driver
[    1.544913] mtk-wdt 1001c000.watchdog: Watchdog enabled (timeout=31 sec, nowayout=0)
[    1.553661] SMCCC: SOC_ID: ID = jep106:0426:7986 Revision = 0x00000000
[    1.560302] usbcore: registered new interface driver usbhid
[    1.565886] usbhid: USB HID core driver
[    1.570140] NET: Registered PF_INET6 protocol family
[    1.575723] Segment Routing with IPv6
[    1.579405] In-situ OAM (IOAM) with IPv6
[    1.583363] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    1.589663] NET: Registered PF_PACKET protocol family
[    1.594982] 8021q: 802.1Q VLAN Support v1.8
[    1.605082] Loading compiled-in X.509 certificates
[    1.621102] mtk-pcie-gen3 11280000.pcie: host bridge /soc/pcie@11280000 ranges:
[    1.628455] mtk-pcie-gen3 11280000.pcie: Parsing ranges property...
[    1.634719] mtk-pcie-gen3 11280000.pcie:      MEM 0x0020000000..0x002fffffff -> 0x0020000000
[    1.720921] sfp sfp-2: module FS               SFP-2.5G-T       rev 1.0  sn G2340039491      dc 231101
[    1.861250] mtk-pcie-gen3 11280000.pcie: PCIe link down, current LTSSM state: detect.active (0x1000001)
[    1.870685] mtk-pcie-gen3: probe of 11280000.pcie failed with error -110
[    1.930473] mt7530-mdio mdio-bus:1f: configuring for fixed/2500base-x link mode
[    1.939627] mt7530-mdio mdio-bus:1f: Link is Up - 2.5Gbps/Full - flow control rx/tx
[    1.948325] mt7530-mdio mdio-bus:1f wan (uninitialized): PHY [mt7530-0:00] driver [MediaTek MT7531 PHY] (irq=128)
[    1.968676] mt7530-mdio mdio-bus:1f lan0 (uninitialized): PHY [mt7530-0:01] driver [MediaTek MT7531 PHY] (irq=129)
[    1.988844] mt7530-mdio mdio-bus:1f lan1 (uninitialized): PHY [mt7530-0:02] driver [MediaTek MT7531 PHY] (irq=130)
[    2.009027] mt7530-mdio mdio-bus:1f lan2 (uninitialized): PHY [mt7530-0:03] driver [MediaTek MT7531 PHY] (irq=131)
[    2.029189] mt7530-mdio mdio-bus:1f lan3 (uninitialized): PHY [mt7530-0:04] driver [MediaTek MT7531 PHY] (irq=132)
[    2.040583] mtk_soc_eth 15100000.ethernet eth0: entered promiscuous mode
[    2.047336] DSA: tree 0 setup
[    2.050770] xhci-mtk 11200000.usb: supply vbus not found, using dummy regulator
[    2.058173] xhci-mtk 11200000.usb: supply vusb33 not found, using dummy regulator
[    2.066612] xhci-mtk 11200000.usb: xHCI Host Controller
[    2.071872] xhci-mtk 11200000.usb: new USB bus registered, assigned bus number 1
[    2.082234] xhci-mtk 11200000.usb: hcc params 0x01403f99 hci version 0x110 quirks 0x0000000000200010
[    2.091406] xhci-mtk 11200000.usb: irq 133, io mem 0x11200000
[    2.097228] xhci-mtk 11200000.usb: xHCI Host Controller
[    2.102450] xhci-mtk 11200000.usb: new USB bus registered, assigned bus number 2
[    2.109834] xhci-mtk 11200000.usb: Host supports USB 3.2 Enhanced SuperSpeed
[    2.117356] hub 1-0:1.0: USB hub found
[    2.121126] hub 1-0:1.0: 2 ports detected
[    2.125508] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    2.133982] hub 2-0:1.0: USB hub found
[    2.137747] hub 2-0:1.0: 1 port detected
[    2.143303] clk: Disabling unused clocks
[    2.170040] Waiting for root device /dev/mmcblk0p6...
[    2.204735] mmc0: host does not support reading read-only switch, assuming write-enable
[    2.216423] mmc0: new high speed SDHC card at address aaaa
[    2.222757] mmcblk0: mmc0:aaaa SA08G 7.40 GiB
[    2.235216]  mmcblk0: p1 p2 p3 p4 p5 p6
[    2.274302] EXT4-fs (mmcblk0p6): mounted filesystem c4133c1c-a36b-48da-952a-43ee4e59dcfb ro with ordered data mode. Quota mode: disabled.
[    2.286750] VFS: Mounted root (ext4 filesystem) readonly on device 179:6.
[    2.294887] devtmpfs: mounted
[    2.299331] Freeing unused kernel memory: 4480K
[    2.391267] Run /sbin/init as init process
[    2.395362]   with arguments:
[    2.398318]     /sbin/init
[    2.401013]   with environment:
[    2.404151]     HOME=/
[    2.406499]     TERM=linux
[    2.409194]     board=bpi-r3
[    2.571246] usb 1-1: new high-speed USB device number 2 using xhci-mtk
[    2.762106] hub 1-1:1.0: USB hub found
[    2.765921] hub 1-1:1.0: 4 ports detected
[    3.194012] systemd[1]: System time before build time, advancing clock.
[    3.256043] systemd[1]: Failed to find module 'autofs4'
[    3.420930] systemd[1]: systemd 252.22-1~deb12u1 running in system mode (+PAM +AUDIT +SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT -GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD -BPF_FRAMEWORK -XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified)
[    3.453659] systemd[1]: Detected architecture arm64.
[    3.497552] systemd[1]: Hostname set to <bpi-r3>.
[    4.053159] systemd[1]: Queued start job for default target graphical.target.
[    4.123406] systemd[1]: Created slice system-getty.slice - Slice /system/getty.
[    4.162531] systemd[1]: Created slice system-modprobe.slice - Slice /system/modprobe.
[    4.202471] systemd[1]: Created slice system-serial\x2dgetty.slice - Slice /system/serial-getty.
[    4.242058] systemd[1]: Created slice user.slice - User and Session Slice.
[    4.281567] systemd[1]: Started systemd-ask-password-console.path - Dispatch Password Requests to Console Directory Watch.
[    4.321498] systemd[1]: Started systemd-ask-password-wall.path - Forward Password Requests to Wall Directory Watch.
[    4.361434] systemd[1]: proc-sys-fs-binfmt_misc.automount - Arbitrary Executable File Formats File System Automount Point was skipped because of an unmet condition check (ConditionPathExists=/proc/sys/fs/binfmt_misc).
[    4.380789] systemd[1]: Expecting device dev-mmcblk0p5.device - /dev/mmcblk0p5...
[    4.421291] systemd[1]: Expecting device dev-ttyS0.device - /dev/ttyS0...
[    4.461333] systemd[1]: Reached target cryptsetup.target - Local Encrypted Volumes.
[    4.501355] systemd[1]: Reached target integritysetup.target - Local Integrity Protected Volumes.
[    4.541390] systemd[1]: Reached target paths.target - Path Units.
[    4.581341] systemd[1]: Reached target remote-fs.target - Remote File Systems.
[    4.621323] systemd[1]: Reached target slices.target - Slice Units.
[    4.661358] systemd[1]: Reached target swap.target - Swaps.
[    4.701345] systemd[1]: Reached target veritysetup.target - Local Verity Protected Volumes.
[    4.741604] systemd[1]: Listening on systemd-initctl.socket - initctl Compatibility Named Pipe.
[    4.787564] systemd[1]: systemd-journald-audit.socket - Journal Audit Socket was skipped because of an unmet condition check (ConditionSecurity=audit).
[    4.801790] systemd[1]: Listening on systemd-journald-dev-log.socket - Journal Socket (/dev/log).
[    4.841786] systemd[1]: Listening on systemd-journald.socket - Journal Socket.
[    4.881893] systemd[1]: Listening on systemd-networkd.socket - Network Service Netlink Socket.
[    4.921840] systemd[1]: Listening on systemd-udevd-control.socket - udev Control Socket.
[    4.961700] systemd[1]: Listening on systemd-udevd-kernel.socket - udev Kernel Socket.
[    5.001739] systemd[1]: dev-hugepages.mount - Huge Pages File System was skipped because of an unmet condition check (ConditionPathExists=/sys/kernel/mm/hugepages).
[    5.071481] systemd[1]: Mounting dev-mqueue.mount - POSIX Message Queue File System...
[    5.113949] systemd[1]: Mounting sys-kernel-debug.mount - Kernel Debug File System...
[    5.153983] systemd[1]: Mounting sys-kernel-tracing.mount - Kernel Trace File System...
[    5.194494] systemd[1]: Starting kmod-static-nodes.service - Create List of Static Device Nodes...
[    5.234354] systemd[1]: Starting [email protected] - Load Kernel Module configfs...
[    5.284277] systemd[1]: Starting modprobe@dm_mod.service - Load Kernel Module dm_mod...
[    5.324302] systemd[1]: Starting [email protected] - Load Kernel Module drm...
[    5.374276] systemd[1]: Starting modprobe@efi_pstore.service - Load Kernel Module efi_pstore...
[    5.414299] systemd[1]: Starting [email protected] - Load Kernel Module fuse...
[    5.464381] systemd[1]: Starting [email protected] - Load Kernel Module loop...
[    5.501974] systemd[1]: systemd-journald.service: unit configures an IP firewall, but the local system does not support BPF/cgroup firewalling.
[    5.514877] systemd[1]: (This warning is only shown for the first unit using IP firewalling.)
[    5.525910] systemd[1]: Starting systemd-journald.service - Journal Service...
[    5.674292] fuse: init (API version 7.39)
[    5.675638] systemd[1]: Starting systemd-modules-load.service - Load Kernel Modules...
[    5.724230] systemd[1]: Starting systemd-network-generator.service - Generate network units from Kernel command line...
[    5.774237] systemd[1]: Starting systemd-remount-fs.service - Remount Root and Kernel File Systems...
[    5.824201] systemd[1]: Starting systemd-udev-trigger.service - Coldplug All udev Devices...
[    5.856431] EXT4-fs (mmcblk0p6): re-mounted c4133c1c-a36b-48da-952a-43ee4e59dcfb r/w. Quota mode: disabled.
[    5.870844] systemd[1]: Started systemd-journald.service - Journal Service.
[    6.574484] systemd-journald[1455]: Received client request to flush runtime journal.
[    7.451365] mtdblock: MTD device 'ubi' is NAND, please consider using UBI block devices instead.
[    7.462158] mtdblock: MTD device 'reserved' is NAND, please consider using UBI block devices instead.
[    7.465899] mtdblock: MTD device 'fip' is NAND, please consider using UBI block devices instead.
[    7.469191] mtdblock: MTD device 'bl2' is NAND, please consider using UBI block devices instead.
[    9.034540] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    9.055390] Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    9.061575] Loaded X.509 cert 'wens: 61c038651aabdcf94bd0ac7ff06c7248db18c600'
[   10.353689] lanbr0: port 1(lan3) entered blocking state
[   10.358936] lanbr0: port 1(lan3) entered disabled state
[   10.364255] mt7530-mdio mdio-bus:1f lan3: entered allmulticast mode
[   10.370521] mtk_soc_eth 15100000.ethernet eth0: entered allmulticast mode
[   10.380662] mt7530-mdio mdio-bus:1f lan3: entered promiscuous mode
[   10.390900] lanbr0: port 2(lan2) entered blocking state
[   10.397307] lanbr0: port 2(lan2) entered disabled state
[   10.402575] mt7530-mdio mdio-bus:1f lan2: entered allmulticast mode
[   10.410124] mt7530-mdio mdio-bus:1f lan2: entered promiscuous mode
[   10.419545] lanbr0: port 3(lan1) entered blocking state
[   10.424906] lanbr0: port 3(lan1) entered disabled state
[   10.430190] mt7530-mdio mdio-bus:1f lan1: entered allmulticast mode
[   10.437993] mt7530-mdio mdio-bus:1f lan1: entered promiscuous mode
[   10.446907] lanbr0: port 4(lan0) entered blocking state
[   10.452212] lanbr0: port 4(lan0) entered disabled state
[   10.457463] mt7530-mdio mdio-bus:1f lan0: entered allmulticast mode
[   10.465079] mt7530-mdio mdio-bus:1f lan0: entered promiscuous mode
[   10.480979] mtk_soc_eth 15100000.ethernet eth0: configuring for fixed/2500base-x link mode
[   10.490842] mtk_soc_eth 15100000.ethernet eth0: Link is Up - 2.5Gbps/Full - flow control rx/tx
[   10.494638] mt7530-mdio mdio-bus:1f lan3: configuring for phy/gmii link mode
[   10.507577] mt7530-mdio mdio-bus:1f lan2: configuring for phy/gmii link mode
[   10.515739] mt7530-mdio mdio-bus:1f lan1: configuring for phy/gmii link mode
[   10.523981] mt7530-mdio mdio-bus:1f lan0: configuring for phy/gmii link mode
[   10.534304] mt7530-mdio mdio-bus:1f lan0: Link is Up - 1Gbps/Full - flow control rx/tx
[   10.582325] mt7530-mdio mdio-bus:1f wan: configuring for phy/gmii link mode
[   10.589967] lanbr0: port 4(lan0) entered blocking state
[   10.596301] lanbr0: port 4(lan0) entered forwarding state
[   11.371501] random: crng init done
[   12.598491] mt798x-wmac 18000000.wifi: HW/SW Version: 0x8a108a10, Build Time: 20221012174743a

[   12.686231] mt798x-wmac 18000000.wifi: WM Firmware Version: ____000000, Build Time: 20221012174805
[   12.752219] mt798x-wmac 18000000.wifi: WA Firmware Version: DEV_000000, Build Time: 20221012174937
[   12.897079] mt798x-wmac 18000000.wifi: eeprom load fail, use default bin
[  173.547685] sfp sfp-2: module removed
[  176.080873] sfp sfp-1: module FS               SFP-2.5G-T       rev 1.0  sn G2340039491      dc 231101

I notices this line was present in dmesg with you image, but not here :

[ 1532.119958] mt7530-mdio mdio-bus:1f lan4: switched to phy/2500base-x link mode
[ 1533.279896] mt7530-mdio mdio-bus:1f lan4: PHY [i2c:sfp-2:11] driver [RTL8221B-VB-CG 2.5Gbps PHY (C45)] (irq=POLL)
[ 1538.039888] mt7530-mdio mdio-bus:1f lan4: No phy led trigger registered for speed(1000)
[ 1538.140072] mt7530-mdio mdio-bus:1f lan4: Link is Up - 1Gbps/Full - flow control rx/tx

Do you know what I’m missing ?

Thanks.

6.6 does not have (latest version of) the phy driver from eric included

Btw. My name does not contain letter “c”

Sorry about that, corrected.

If I wan’t to make this SFP work with Debian, do you think I should use a more recent kernel like (6.7 ? 6.8 ?) or should I add the patches from Eric into 6.6 ?

My 6.6-main does not support bpi-r4 you should use 6.8-dango2

I use the SFP in a bpi-r3.

Ah ok, then you can use 6.6…for upstreaming you have to use latest net-next

On R3 you will need:

net: phylink: add support for disabling in-band-status for base-x · ericwoud/linux@e44c360 (github.com)

Together with the other patches. From 6.8, phylink_pcs_neg_mode() has moved to phylink.c So you may have to change the name of the function, if you want to use it below 6.8.

So, I am still trying to make the SFP work on Debian with my BPI-R3. I apply all the patches I think. SFP is now detected :

[    1.374294] sfp sfp-1: Host maximum power 3.0W
[    1.379261] sfp sfp-2: Host maximum power 3.0W
[    1.512721] mtk_soc_eth 15100000.ethernet: generated random MAC address 06:27:b6:80:ad:2a
[    1.522925] mtk_soc_eth 15100000.ethernet eth0: mediatek frame engine at 0xffffffc083300000, irq 123
[    1.532776] mtk_soc_eth 15100000.ethernet eth1: mediatek frame engine at 0xffffffc083300000, irq 123
[    1.542384] usbcore: registered new interface driver usb-storage
[    1.548573] i2c_dev: i2c /dev entries driver
[    1.555053] mtk-wdt 1001c000.watchdog: Watchdog enabled (timeout=31 sec, nowayout=0)
[    1.563772] SMCCC: SOC_ID: ID = jep106:0426:7986 Revision = 0x00000000
[    1.570400] usbcore: registered new interface driver usbhid
[    1.575982] usbhid: USB HID core driver
[    1.580260] NET: Registered PF_INET6 protocol family
[    1.585818] Segment Routing with IPv6
[    1.589495] In-situ OAM (IOAM) with IPv6
[    1.593449] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    1.599737] NET: Registered PF_PACKET protocol family
[    1.604955] 8021q: 802.1Q VLAN Support v1.8
[    1.617597] Loading compiled-in X.509 certificates
[    1.633751] mtk-pcie-gen3 11280000.pcie: host bridge /soc/pcie@11280000 ranges:
[    1.641076] mtk-pcie-gen3 11280000.pcie: Parsing ranges property...
[    1.647408] mtk-pcie-gen3 11280000.pcie:      MEM 0x0020000000..0x002fffffff -> 0x0020000000
[    1.711182] sfp sfp-1: module FS               SFP-2.5G-T       rev 1.0  sn G2340039491      dc 231101
[    1.871493] mtk-pcie-gen3 11280000.pcie: PCIe link down, current LTSSM state: detect.active (0x1000001)
[    1.880905] mtk-pcie-gen3: probe of 11280000.pcie failed with error -110
[    1.940641] mt7530-mdio mdio-bus:1f: configuring for fixed/2500base-x link mode
[    1.949792] mt7530-mdio mdio-bus:1f: Link is Up - 2.5Gbps/Full - flow control rx/tx
[    1.958480] mt7530-mdio mdio-bus:1f wan (uninitialized): PHY [mt7530-0:00] driver [MediaTek MT7531 PHY] (irq=128)
[    1.978957] mt7530-mdio mdio-bus:1f lan0 (uninitialized): PHY [mt7530-0:01] driver [MediaTek MT7531 PHY] (irq=129)
[    1.999095] mt7530-mdio mdio-bus:1f lan1 (uninitialized): PHY [mt7530-0:02] driver [MediaTek MT7531 PHY] (irq=130)
[    2.019244] mt7530-mdio mdio-bus:1f lan2 (uninitialized): PHY [mt7530-0:03] driver [MediaTek MT7531 PHY] (irq=131)
[    2.039409] mt7530-mdio mdio-bus:1f lan3 (uninitialized): PHY [mt7530-0:04] driver [MediaTek MT7531 PHY] (irq=132)
[    2.050790] mtk_soc_eth 15100000.ethernet eth0: entered promiscuous mode
[    2.057540] DSA: tree 0 setup
[    2.060978] xhci-mtk 11200000.usb: supply vbus not found, using dummy regulator
[    2.068382] xhci-mtk 11200000.usb: supply vusb33 not found, using dummy regulator
[    2.076821] xhci-mtk 11200000.usb: xHCI Host Controller
[    2.082079] xhci-mtk 11200000.usb: new USB bus registered, assigned bus number 1
[    2.092439] xhci-mtk 11200000.usb: hcc params 0x01403f99 hci version 0x110 quirks 0x0000000000200010
[    2.101609] xhci-mtk 11200000.usb: irq 133, io mem 0x11200000
[    2.107433] xhci-mtk 11200000.usb: xHCI Host Controller
[    2.112658] xhci-mtk 11200000.usb: new USB bus registered, assigned bus number 2
[    2.120041] xhci-mtk 11200000.usb: Host supports USB 3.2 Enhanced SuperSpeed
[    2.127564] hub 1-0:1.0: USB hub found
[    2.131332] hub 1-0:1.0: 2 ports detected
[    2.135689] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    2.144170] hub 2-0:1.0: USB hub found
[    2.147946] hub 2-0:1.0: 1 port detected
[    2.153529] clk: Disabling unused clocks
[    2.180303] Waiting for root device /dev/mmcblk0p6...
[    2.214990] mmc0: host does not support reading read-only switch, assuming write-enable
[    2.226819] mmc0: new high speed SDHC card at address aaaa
[    2.233143] mmcblk0: mmc0:aaaa SA08G 7.40 GiB
[    2.246414]  mmcblk0: p1 p2 p3 p4 p5 p6
[    2.263397] EXT4-fs (mmcblk0p6): INFO: recovery required on readonly filesystem
[    2.270711] EXT4-fs (mmcblk0p6): write access will be enabled during recovery
[    2.581512] usb 1-1: new high-speed USB device number 2 using xhci-mtk
[    2.762304] hub 1-1:1.0: USB hub found
[    2.766109] hub 1-1:1.0: 4 ports detected
[    2.870731] EXT4-fs (mmcblk0p6): recovery complete
[    2.878313] EXT4-fs (mmcblk0p6): mounted filesystem c4133c1c-a36b-48da-952a-43ee4e59dcfb ro with ordered data mode. Quota mode: disabled.
[    2.890687] VFS: Mounted root (ext4 filesystem) readonly on device 179:6.
[    2.899559] devtmpfs: mounted
[    2.904021] Freeing unused kernel memory: 4480K
[    2.908636] Run /sbin/init as init process
[    2.912767]   with arguments:
[    2.915723]     /sbin/init
[    2.918418]   with environment:
[    2.921552]     HOME=/
[    2.923900]     TERM=linux
[    2.926595]     board=bpi-r3
[    3.829267] systemd[1]: System time before build time, advancing clock.
[    3.883826] systemd[1]: Failed to find module 'autofs4'
[    4.070276] systemd[1]: systemd 252.19-1~deb12u1 running in system mode (+PAM +AUDIT +SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT -GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD -BPF_FRAMEWORK -XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified)
[    4.102974] systemd[1]: Detected architecture arm64.
[    4.147870] systemd[1]: Hostname set to <bpi-r3>.
[    4.792753] systemd[1]: Queued start job for default target graphical.target.
[    4.799921] systemd[1]: Unnecessary job was removed for sys-subsystem-net-devices-wlan0.device - /sys/subsystem/net/devices/wlan0.
[    4.811690] systemd[1]: Unnecessary job was removed for sys-subsystem-net-devices-wlan1.device - /sys/subsystem/net/devices/wlan1.
[    4.863694] systemd[1]: Created slice system-getty.slice - Slice /system/getty.
[    4.902657] systemd[1]: Created slice system-hostapd.slice - Slice /system/hostapd.
[    4.942575] systemd[1]: Created slice system-modprobe.slice - Slice /system/modprobe.
[    4.982600] systemd[1]: Created slice system-serial\x2dgetty.slice - Slice /system/serial-getty.
[    5.022308] systemd[1]: Created slice user.slice - User and Session Slice.
[    5.061835] systemd[1]: Started systemd-ask-password-console.path - Dispatch Password Requests to Console Directory Watch.
[    5.101725] systemd[1]: Started systemd-ask-password-wall.path - Forward Password Requests to Wall Directory Watch.
[    5.141661] systemd[1]: proc-sys-fs-binfmt_misc.automount - Arbitrary Executable File Formats File System Automount Point was skipped because of an unmet condition check (ConditionPathExists=/proc/sys/fs/binfmt_misc).
[    5.161077] systemd[1]: Reached target cryptsetup.target - Local Encrypted Volumes.
[    5.201610] systemd[1]: Reached target integritysetup.target - Local Integrity Protected Volumes.
[    5.241623] systemd[1]: Reached target paths.target - Path Units.
[    5.281587] systemd[1]: Reached target remote-fs.target - Remote File Systems.
[    5.321578] systemd[1]: Reached target slices.target - Slice Units.
[    5.361583] systemd[1]: Reached target swap.target - Swaps.
[    5.401581] systemd[1]: Reached target veritysetup.target - Local Verity Protected Volumes.
[    5.441830] systemd[1]: Listening on systemd-initctl.socket - initctl Compatibility Named Pipe.
[    5.487782] systemd[1]: systemd-journald-audit.socket - Journal Audit Socket was skipped because of an unmet condition check (ConditionSecurity=audit).
[    5.501979] systemd[1]: Listening on systemd-journald-dev-log.socket - Journal Socket (/dev/log).
[    5.542004] systemd[1]: Listening on systemd-journald.socket - Journal Socket.
[    5.582138] systemd[1]: Listening on systemd-networkd.socket - Network Service Netlink Socket.
[    5.622078] systemd[1]: Listening on systemd-udevd-control.socket - udev Control Socket.
[    5.661912] systemd[1]: Listening on systemd-udevd-kernel.socket - udev Kernel Socket.
[    5.701966] systemd[1]: dev-hugepages.mount - Huge Pages File System was skipped because of an unmet condition check (ConditionPathExists=/sys/kernel/mm/hugepages).
[    5.761732] systemd[1]: Mounting dev-mqueue.mount - POSIX Message Queue File System...
[    5.804088] systemd[1]: Mounting sys-kernel-debug.mount - Kernel Debug File System...
[    5.844070] systemd[1]: Mounting sys-kernel-tracing.mount - Kernel Trace File System...
[    5.884656] systemd[1]: Starting kmod-static-nodes.service - Create List of Static Device Nodes...
[    5.924469] systemd[1]: Starting [email protected] - Load Kernel Module configfs...
[    5.964429] systemd[1]: Starting modprobe@dm_mod.service - Load Kernel Module dm_mod...
[    6.004471] systemd[1]: Starting [email protected] - Load Kernel Module drm...
[    6.044457] systemd[1]: Starting modprobe@efi_pstore.service - Load Kernel Module efi_pstore...
[    6.084475] systemd[1]: Starting [email protected] - Load Kernel Module fuse...
[    6.124720] systemd[1]: Starting [email protected] - Load Kernel Module loop...
[    6.162276] systemd[1]: systemd-journald.service: unit configures an IP firewall, but the local system does not support BPF/cgroup firewalling.
[    6.175179] systemd[1]: (This warning is only shown for the first unit using IP firewalling.)
[    6.186119] systemd[1]: Starting systemd-journald.service - Journal Service...
[    6.351770] fuse: init (API version 7.39)
[    6.381912] systemd[1]: Starting systemd-modules-load.service - Load Kernel Modules...
[    6.434269] systemd[1]: Starting systemd-network-generator.service - Generate network units from Kernel command line...
[    6.494294] systemd[1]: Starting systemd-remount-fs.service - Remount Root and Kernel File Systems...
[    6.534434] systemd[1]: Starting systemd-udev-trigger.service - Coldplug All udev Devices...
[    6.573803] EXT4-fs (mmcblk0p6): re-mounted c4133c1c-a36b-48da-952a-43ee4e59dcfb r/w. Quota mode: disabled.
[    6.588219] systemd[1]: Started systemd-journald.service - Journal Service.
[    7.319999] systemd-journald[1458]: Received client request to flush runtime journal.
[    7.331869] systemd-journald[1458]: File /var/log/journal/dc93093cb66c4760ac05b4224ae2d753/system.journal corrupted or uncleanly shut down, renaming and replacing.
[    9.015403] mtdblock: MTD device 'ubi' is NAND, please consider using UBI block devices instead.
[    9.021333] mtdblock: MTD device 'reserved' is NAND, please consider using UBI block devices instead.
[    9.043727] mtdblock: MTD device 'fip' is NAND, please consider using UBI block devices instead.
[    9.052936] mtdblock: MTD device 'bl2' is NAND, please consider using UBI block devices instead.
[   10.601638] FAT-fs (mmcblk0p5): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[   10.605037] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[   10.632162] Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[   10.638300] Loaded X.509 cert 'wens: 61c038651aabdcf94bd0ac7ff06c7248db18c600'
[   13.944842] mt798x-wmac 18000000.wifi: HW/SW Version: 0x8a108a10, Build Time: 20221012174743a

[   14.033218] mt798x-wmac 18000000.wifi: WM Firmware Version: ____000000, Build Time: 20221012174805
[   14.099766] mt798x-wmac 18000000.wifi: WA Firmware Version: DEV_000000, Build Time: 20221012174937
[   14.244892] mt798x-wmac 18000000.wifi: eeprom load fail, use default bin
[   14.913201] mtk_soc_eth 15100000.ethernet eth0: configuring for fixed/2500base-x link mode
[   14.921707] mtk_soc_eth 15100000.ethernet eth0: Link is Up - 2.5Gbps/Full - flow control rx/tx
[   14.923292] mt7530-mdio mdio-bus:1f wan: configuring for phy/gmii link mode
[   14.940572] mt7530-mdio mdio-bus:1f wan: Link is Up - 1Gbps/Full - flow control rx/tx
[   15.076652] mt7530-mdio mdio-bus:1f lan0: configuring for phy/gmii link mode
[   15.253604] mt7530-mdio mdio-bus:1f lan1: configuring for phy/gmii link mode
[   15.430061] mt7530-mdio mdio-bus:1f lan2: configuring for phy/gmii link mode
[   15.606106] mt7530-mdio mdio-bus:1f lan3: configuring for phy/gmii link mode
[   17.333503] mtk_soc_eth 15100000.ethernet eth1: configuring for inband/2500base-x link mode
[   43.646970] mtk_soc_eth 15100000.ethernet eth1: switched to inband/sgmii link mode
[   44.061629] mtk_soc_eth 15100000.ethernet eth1: PHY [i2c:sfp-1:11] driver [RTL8221B-VB-CG 2.5Gbps PHY (C45)] (irq=POLL)

I can see with ethtool speed is correct (1000 or 2500) :

root@bpi-r3:~# ethtool eth1
Settings for eth1:
        Supported ports: [ TP    MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
                                2500baseT/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/Full
                                2500baseT/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                             100baseT/Half 100baseT/Full
                                             1000baseT/Full
                                             2500baseT/Full
        Link partner advertised pause frame use: Symmetric Receive-only
        Link partner advertised auto-negotiation: Yes
        Link partner advertised FEC modes: Not reported
        Speed: 2500Mb/s
        Duplex: Full
        Auto-negotiation: on
        Port: Twisted Pair
        PHYAD: 17
        Transceiver: external
        MDI-X: Unknown
        Current message level: 0x000000ff (255)
                               drv probe link timer ifdown ifup rx_err tx_err
        Link detected: no
root@bpi-r3:~# ethtool eth1
Settings for eth1:
        Supported ports: [ TP    MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
                                2500baseT/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/Full
                                2500baseT/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Link partner advertised link modes:  10baseT/Full
                                             100baseT/Full
                                             1000baseT/Full
        Link partner advertised pause frame use: Symmetric
        Link partner advertised auto-negotiation: Yes
        Link partner advertised FEC modes: Not reported
        Speed: 1000Mb/s
        Duplex: Full
        Auto-negotiation: on
        Port: Twisted Pair
        PHYAD: 17
        Transceiver: external
        MDI-X: Unknown
        Current message level: 0x000000ff (255)
                               drv probe link timer ifdown ifup rx_err tx_err
        Link detected: no
root@bpi-r3:~#

I configured the interface like this with /etc/network/interfaces :

auto eth1
iface eth1 inet static
        address 192.168.1.16
        netmask 255.255.255.0

But traffic is still KO, I can’t ping a product with IP 192.168.1.254 which is connected on the SFP :

root@bpi-r3:~# ping 192.168.1.254 -I eth1 -c 4
PING 192.168.1.254 (192.168.1.254) from 192.168.1.16 eth1: 56(84) bytes of data.

--- 192.168.1.254 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3134ms

I f I use a lan of the BPI to make the ping, it is OK :

root@bpi-r3:~# ping 192.168.1.254 -I lan0 -c 4
PING 192.168.1.254 (192.168.1.254) from 192.168.1.10 lan0: 56(84) bytes of data.
64 bytes from 192.168.1.254: icmp_seq=1 ttl=64 time=1.72 ms
64 bytes from 192.168.1.254: icmp_seq=2 ttl=64 time=0.369 ms
64 bytes from 192.168.1.254: icmp_seq=3 ttl=64 time=0.459 ms
64 bytes from 192.168.1.254: icmp_seq=4 ttl=64 time=0.417 ms

--- 192.168.1.254 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3060ms
rtt min/avg/max/mdev = 0.369/0.741/1.722/0.566 ms

Do you have an idea on what I am missing ?

This ping was OK with the ArchLinux image and this SFP.

Thank you.

If you are trying to ping to/from the same BPI-R3, this is a bit more difficult than using another computer/board to connect to the R3. It should be possible, but there are a few catches. So I don’t do this myself when testing, I might end up spending to much time trying to figure out why this is not working, wasting the little time I have.

So try to keep it simple by using another pc/board. Also, if the pc/board and the R3 are already connected on 1 subnet, then you need to test the SFP over another subnet…

Also make sure there is one patch dealing with the fact that the R3 MAC cannot use inband at 2500base-x

Please show your ip config…afair i used 192.168.1.0/24 for lanbr0 so you cannot assign this to external interface

So either put eth1 into the bridge (please do not if it is wan) or change ip settings including dhcp of the lanbridge.