good news, i got the SFP-Slots working so far without ethmux, just by adding a g…pio-hog to force the channel to SFP (10G phy not usable at all), there are still problems with aeonsemi mainline phy driver, so imho it does not make sense for now to add the module (but left it in filogic.mk)
```
#wan-combo-sfp:
root@OpenWrt:~# cat /sys/kernel/debug/gpio
gpiochip0: GPIOs 512-595, parent: platform/1001f000.pinctrl, pinctrl_moore:
gpio-512 ( |tx-disable ) out hi
gpio-513 ( |mod-def0 ) in lo IRQ ACTIVE LOW
gpio-514 ( |los ) in lo IRQ
gpio-515 ( |sfp-wan-hog ) out hi
gpio-524 ( |cd ) in lo IRQ ACTIVE LOW
gpio-525 ( |reset ) in hi IRQ ACTIVE LOW
gpio-526 ( |WPS ) in hi IRQ ACTIVE LOW
gpio-533 ( |tx-disable ) in lo
gpio-566 ( |sfp-lan-hog ) out lo
gpio-575 ( |pcie-3-hog ) out hi
gpio-581 ( |mod-def0 ) in hi IRQ ACTIVE LOW
gpio-582 ( |los ) in hi IRQ
gpio-591 ( |pcie-2-hog ) out hi
gpiochip1: GPIOs 596-611, parent: i2c/3-0020, 3-0020, can sleep:
gpio-610 ( |blue: ) out hi
gpio-611 ( |red: ) out hi
root@OpenWrt:~# ip link set eth1 up
[ 43.393047] mtk_soc_eth 15100000.ethernet eth1: configuring for inband/10gbase-r link mode
root@OpenWrt:~# [ 43.544439] mtk_soc_eth 15100000.ethernet eth1: Link is Up - 10Gbps/Full - flow control off
root@OpenWrt:~# ip a a 192.168.1.1/24 dev eth1
root@OpenWrt:~# ping 192.168.1.2
PING 192.168.1.2 (192.168.1.2): 56 data bytes
64 bytes from 192.168.1.2: seq=0 ttl=64 time=0.644 ms
64 bytes from 192.168.1.2: seq=1 ttl=64 time=0.295 ms
64 bytes from 192.168.1.2: seq=2 ttl=64 time=0.315 ms
64 bytes from 192.168.1.2: seq=3 ttl=64 time=0.355 ms
64 bytes from 192.168.1.2: seq=4 ttl=64 time=0.303 ms
64 bytes from 192.168.1.2: seq=5 ttl=64 time=0.258 ms
^C
--- 192.168.1.2 ping statistics ---
6 packets transmitted, 6 packets received, 0% packet loss
round-trip min/avg/max = 0.258/0.361/0.644 ms
root@OpenWrt:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1504 qdisc mq state UP qlen 1000
link/ether 62:8b:b0:ac:90:c8 brd ff:ff:ff:ff:ff:ff
inet6 fe80::608b:b0ff:feac:90c8/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
link/ether e6:27:1b:f8:5a:63 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.1/24 scope global eth1
valid_lft forever preferred_lft forever
inet6 fe80::e427:1bff:fef8:5a63/64 scope link
valid_lft forever preferred_lft forever
4: eth2: <BROADCAST,MULTICAST> mtu 1504 qdisc mq state DOWN qlen 1000
link/ether 3a:e2:30:2b:15:0b brd ff:ff:ff:ff:ff:ff
5: mgmt@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state LOWERLAYERDOWN qlen 1000
link/ether 62:8b:b0:ac:90:c8 brd ff:ff:ff:ff:ff:ff
6: lan1@eth2: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noqueue state DOWN qlen 1000
link/ether 3a:e2:30:2b:15:0b brd ff:ff:ff:ff:ff:ff
7: lan2@eth2: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noqueue state DOWN qlen 1000
link/ether 3a:e2:30:2b:15:0b brd ff:ff:ff:ff:ff:ff
8: lan3@eth2: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noqueue state DOWN qlen 1000
link/ether 3a:e2:30:2b:15:0b brd ff:ff:ff:ff:ff:ff
9: lan4@eth2: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noqueue state DOWN qlen 1000
link/ether 3a:e2:30:2b:15:0b brd ff:ff:ff:ff:ff:ff
14: br-lan: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 0a:c4:02:b3:04:6d brd ff:ff:ff:ff:ff:ff
#lan-combo-sfp:
root@OpenWrt:~# ip link set br-lan down
root@OpenWrt:~# ip link del br-lan
root@OpenWrt:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1504 qdisc mq state UP qlen 1000
link/ether 62:8b:b0:ac:90:c8 brd ff:ff:ff:ff:ff:ff
inet6 fe80::608b:b0ff:feac:90c8/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether fe:19:fe:4d:4d:db brd ff:ff:ff:ff:ff:ff
4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1504 qdisc mq state UP qlen 1000
link/ether 62:5f:55:b8:81:91 brd ff:ff:ff:ff:ff:ff
inet6 fe80::605f:55ff:feb8:8191/64 scope link
valid_lft forever preferred_lft forever
5: mgmt@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state LOWERLAYERDOWN qlen 1000
link/ether 62:8b:b0:ac:90:c8 brd ff:ff:ff:ff:ff:ff
6: lan1@eth2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state LOWERLAYERDOWN qlen 1000
link/ether 62:5f:55:b8:81:91 brd ff:ff:ff:ff:ff:ff
7: lan2@eth2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state LOWERLAYERDOWN qlen 1000
link/ether 62:5f:55:b8:81:91 brd ff:ff:ff:ff:ff:ff
8: lan3@eth2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state LOWERLAYERDOWN qlen 1000
link/ether 62:5f:55:b8:81:91 brd ff:ff:ff:ff:ff:ff
9: lan4@eth2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state LOWERLAYERDOWN qlen 1000
link/ether 62:5f:55:b8:81:91 brd ff:ff:ff:ff:ff:ff
10: lan6@eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 62:5f:55:b8:81:91 brd ff:ff:ff:ff:ff:ff
root@OpenWrt:~# ip a a 192.168.1.1/24 dev lan6
root@OpenWrt:~# ip link set lan6 up
[ 53.979210] mxl862xx mdio-bus:10 lan6: configuring for inband/10gbase-r link mode
root@OpenWrt:~# [ 54.042554] mxl862xx mdio-bus:10 lan6: Link is Up - 10Gbps/Full - flow control off
root@OpenWrt:~# ping 192.168.1.2
PING 192.168.1.2 (192.168.1.2): 56 data bytes
64 bytes from 192.168.1.2: seq=0 ttl=64 time=0.720 ms
64 bytes from 192.168.1.2: seq=1 ttl=64 time=0.315 ms
64 bytes from 192.168.1.2: seq=2 ttl=64 time=0.318 ms
^C
--- 192.168.1.2 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 0.315/0.451/0.720 ms
```
also fixed the led-part so far (replaced green by red and added missing depencies), CMD_I2C and CMD_GO (for chainloading u-boot.bin without flashing every time) are optional, but helped me debugging the issue.
code:
https://github.com/frank-w/openwrt/tree/R4Pro_newmxl3
binary-image:
https://drive.google.com/file/d/1h0Nqq4kAFhh7-qXgir-S6niALi9yc1lz/view?usp=drive_link
optional....if interested here are my steps for testing without flashing every time:
recovery itb (for booting kernel and openwrt rootfs manually from already installed image without flashing):
https://drive.google.com/file/d/1UonaOvnV6q_7IWPRA2TecEewsd_cNFrD/view?usp=drive_link
put file on usb stick and do these commands in uboot:
```
usb start
load usb 0:1 $loadaddr openwrt-mediatek-filogic-bananapi_bpi-r4-pro-8x-initramfs-recovery.itb
bootm $loadaddr#$bootconf#$bootconf_sd
```
chainloading u-boot.bin can be done like this (if installed uboot has go-command):
```
MT7988> usb start
starting USB...
xhci-mtk xhci@11200000: hcd: 0x0000000011200000, ippc: 0x0000000011203e00
xhci-mtk xhci@11200000: ports disabled mask: u3p-0x0, u2p-0x0
xhci-mtk xhci@11200000: u2p:1, u3p:1
Starting the controller
USB XHCI 1.10
Bus xhci@11200000: 4 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
MT7988> load usb 0:1 $loadaddr u-boot-openwrt-go-i2c.bin
1203984 bytes read in 104 ms (11 MiB/s)
MT7988> go $loadaddr
```