Banana Pi BPI-R4 Wifi 7 router board with MediaTek MT7988A (Filogic 880),4G RAM and 8G eMMC

I use the upstream openwrt git

This should be nearly same code i use (dangowrts wip tree). I get pwm controller up (after enabling it in dts and adding driver),but i do not get pwm signal when configure through sysfsā€¦

Can you try bpi source? Then we can compare differences.

I have not managed to compile the bpi source, but I did manage to get the fan to stop and start by itself by modifying the pwm-mediatek.c file and editing the dts in the upstream code.

It does not work as it should though, since I not can control it via sysfs, but pwmchip0 is visible now.

I did also manage to get rtc to work perfectly by editing dts and enabling it in the u-boot config.

Can you share shour changes?

dts.patch (541 Bytes) pwm-mediatek.c.patch (2.6 KB) u-boot.patch (555 Bytes)

Here you have the patches. :slight_smile:

Edit: You donā€™t need the u-boot patch for RTC to work in OpenWrt.

2 Likes

thx, but basicly same code i have in my (daniels) tree (except fan setup)ā€¦controller is up, but no pwm signal on fan socket

continued the discussion here to not hijack this topic anymore :slight_smile:

Some more mt7988 fixes appear in mediatek feeds.

https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/+/11d196106ae7e9bcda59c6041105e4f71fc26c44

https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/+/77ce9cf537792ce73a2c94c2fd1973e5ecd3dca4

https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/+/2cd8fe806282810d5da5b993fec8f35daa9faa56

https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/+/b72d6cba92bf9e29fb035c03052fa1e86664a25b

https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/+/3dd6a294708aa607896920265b5d970e4a155842

https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/+/995ea5dd2fa537cd603ec1a47523ca8c175b22ff

1 Like

Is it possible to use this board as wifi 7 access point? Last time i configured hostapd in linux, it only supported wifi 5, wifi 6 was kind of ā€œbetaā€ version.

Well, it is a little shame to start presence on the forum from stupid question, but what can be doneā€¦ I just bought R4 and also T99W175, unfortunately Dell version (will see how I will handle it as I have no wwan on any windows equipment). But the issue is much simpler, how I can connect by ssh to standard ubuntu image? The one from the guide? I am able to put it on sd card. It is booting. When connected to my lan, address is assigned, but cannot authenticate via putty- getting connection and when putting any user it disconnect me with message: No supported authentication methods available (server sent: publickey) At the same time Debian image refuse connection. Openwrt works. I am using WAN/LAN RJ45. When putting address 192.168.1.2 on computer and 192.168.1.1 on Ubuntu (on all ports) I get no ping. Probably solution is simple, still will be grateful for guide.

Edit

<sdcard>/etc/ssh/sshd_config

the line:

PermitRootLogin yes

Assuming a root password has been setā€¦

But Youā€™d better open a different topic for this problem.

OK, easy solution. So basically need to edit the sdcard the best would be some other linux.

Why unfortunately? It should be all the same, just different PCI vendor/product ID, you can easily add that to the mhi-pci driver in Linux, if needed.

Well, being honest I can replicate steps easily, but I am not strong at all with Linux. And was not seeing tutorial for t99w175 with R4. Only know it is possible. :slight_smile: So far the best stage what I achieved is to see it under openwrt as wireless device- modemmanager does not discover it as modem. IUbuntu from wiki does not see anything when lspci. I am trying to compile my kernel with mhi, but have issue for the the time being.

Ok, now I was overdoing it:

root@OpenWrt:/# lspci
0000:00:00.0 PCI bridge: MEDIATEK Corp. Device 7988 (rev 01)
0000:01:00.0 Network controller: MEDIATEK Corp. Device 7990
0001:00:00.0 PCI bridge: MEDIATEK Corp. Device 7988 (rev 01)
0001:01:00.0 Network controller: MEDIATEK Corp. Device 7991
0002:00:00.0 PCI bridge: MEDIATEK Corp. Device 7988 (rev 01)
0002:01:00.0 PCI bridge: ASMedia Technology Inc. ASM1182e 2-Port PCIe x1 Gen2 Packet Switch
0002:02:03.0 PCI bridge: ASMedia Technology Inc. ASM1182e 2-Port PCIe x1 Gen2 Packet Switch
0002:02:07.0 PCI bridge: ASMedia Technology Inc. ASM1182e 2-Port PCIe x1 Gen2 Packet Switch
0002:03:00.0 Network controller: Intel Corporation Wi-Fi 6E(802.11ax) AX210/AX1675* 2x2 [Typhoon Peak] (rev 1a)
0002:04:00.0 Network controller: MEDIATEK Corp. MT7921K (RZ608) Wi-Fi 6E 80MHz
0003:00:00.0 PCI bridge: MEDIATEK Corp. Device 7988 (rev 01)
0003:01:00.0 Wireless controller [0d40]: MEDIATEK Corp. Device 4d75 (rev 01)

Seems to work fine :slight_smile: Just a bit of space problem with the huge BE19000 module installed as wellā€¦

1 Like

I put openwrt on ssd. In my case I had two values:

0003:00:00.0 PCI bridge: MEDIATEK Corp. Device 7988 (rev 01)
0003:01:00.0 Unassigned class [ff00] Foxconn International, Inc. Device e0b0

then after installing kmod mhi it went into Wireless Controller.

root@OpenWrt:~# lspci
0003:00:00.0 PCI bridge: MEDIATEK Corp. Device 7988 (rev 01)
0003:01:00.0 Wireless controller [0d40]: Foxconn International, Inc. Device e0b0

Will need to investigate how I can move from there. On standard Ubuntu (the one from wiki) lspci is giving me nothing, not even single device.

I found that the BPI R4 firmware pptp clients that I downloaded from the openwrt website are all unable to connect to the server and keep repeating this

root@OpenWrt:/# logread 
Sun Mar 31 01:33:32 2024 daemon.notice pppd[1902]: pppd 2.4.9 started by root, uid 0
Sun Mar 31 01:33:32 2024 daemon.debug pppd[1904]: pptp: call manager for xx.94.xx.xx
Sun Mar 31 01:33:32 2024 daemon.debug pppd[1904]: window size:	50
Sun Mar 31 01:33:32 2024 daemon.debug pppd[1904]: call id:	1248
Sun Mar 31 01:33:32 2024 daemon.debug pppd[1904]: control connection
Sun Mar 31 01:33:32 2024 daemon.debug pppd[1904]: unix_sock
Sun Mar 31 01:33:32 2024 daemon.debug pppd[1952]: Sent control packet type is 1 'Start-Control-Connection-Request'
Sun Mar 31 01:33:32 2024 daemon.debug pppd[1952]: Received Start Control Connection Reply
Sun Mar 31 01:33:32 2024 daemon.debug pppd[1952]: Client connection established.
Sun Mar 31 01:33:33 2024 daemon.debug pppd[1952]: Sent control packet type is 7 'Outgoing-Call-Request'
Sun Mar 31 01:33:33 2024 daemon.debug pppd[1952]: Received Outgoing Call Reply.
Sun Mar 31 01:33:33 2024 daemon.debug pppd[1952]: Outgoing call established (call ID 1248, peer's call ID 62976).
Sun Mar 31 01:33:33 2024 daemon.debug pppd[1902]: using channel 1235
Sun Mar 31 01:33:33 2024 daemon.info pppd[1902]: Using interface pptp-vpn
Sun Mar 31 01:33:33 2024 daemon.notice pppd[1902]: Connect: pptp-vpn <--> pptp (xx.94.xx.xx)
Sun Mar 31 01:33:33 2024 daemon.debug pppd[1902]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x5b5839e4>]
Sun Mar 31 01:33:33 2024 daemon.info ModemManager[1956]: hotplug: add network interface pptp-vpn: event processed
Sun Mar 31 01:33:36 2024 daemon.debug pppd[1902]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x5b5839e4>]
Sun Mar 31 01:33:39 2024 daemon.debug pppd[1902]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x5b5839e4>]
Sun Mar 31 01:33:42 2024 daemon.debug pppd[1902]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x5b5839e4>]
Sun Mar 31 01:33:45 2024 daemon.debug pppd[1902]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x5b5839e4>]
Sun Mar 31 01:33:48 2024 daemon.debug pppd[1902]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x5b5839e4>]
Sun Mar 31 01:33:51 2024 daemon.debug pppd[1902]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x5b5839e4>]
Sun Mar 31 01:33:54 2024 daemon.debug pppd[1902]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x5b5839e4>]
Sun Mar 31 01:33:57 2024 daemon.debug pppd[1902]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x5b5839e4>]
Sun Mar 31 01:34:00 2024 daemon.debug pppd[1902]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x5b5839e4>]
Sun Mar 31 01:34:03 2024 daemon.warn pppd[1902]: LCP: timeout sending Config-Requests
Sun Mar 31 01:34:03 2024 daemon.notice pppd[1902]: Connection terminated.
Sun Mar 31 01:34:03 2024 daemon.warn pppd[1952]: read returned zero, peer has closed
Sun Mar 31 01:34:03 2024 daemon.debug pppd[1952]: Closing connection (shutdown)
Sun Mar 31 01:34:03 2024 daemon.debug pppd[1952]: Sent control packet type is 12 'Call-Clear-Request'
Sun Mar 31 01:34:03 2024 daemon.warn pppd[1952]: read returned zero, peer has closed
Sun Mar 31 01:34:03 2024 daemon.debug pppd[1952]: Closing connection (call state)
Sun Mar 31 01:34:03 2024 daemon.info ModemManager[2009]: hotplug: remove network interface pptp-vpn: event processed
Sun Mar 31 01:34:03 2024 daemon.notice pppd[1902]: Modem hangup
Sun Mar 31 01:34:03 2024 daemon.info pppd[1902]: Exit.
Sun Mar 31 01:34:03 2024 daemon.notice netifd: Interface 'vpn' is now down
Sun Mar 31 01:34:03 2024 daemon.notice netifd: Interface 'vpn' is setting up now
Sun Mar 31 01:34:04 2024 daemon.warn odhcpd[2889]: No default route present, overriding ra_lifetime!
Sun Mar 31 01:34:04 2024 daemon.info pppd[2084]: Plugin pptp.so loaded.
Sun Mar 31 01:34:04 2024 daemon.info pppd[2084]: PPTP plugin version 1.00
Sun Mar 31 01:34:04 2024 daemon.notice pppd[2084]: pppd 2.4.9 started by root, uid 0
Sun Mar 31 01:34:04 2024 daemon.debug pppd[2086]: pptp: call manager for xx.94.xx.xx
Sun Mar 31 01:34:04 2024 daemon.debug pppd[2086]: window size:	50
Sun Mar 31 01:34:04 2024 daemon.debug pppd[2086]: call id:	1249
Sun Mar 31 01:34:04 2024 daemon.debug pppd[2086]: control connection
Sun Mar 31 01:34:04 2024 daemon.debug pppd[2086]: unix_sock
Sun Mar 31 01:34:04 2024 daemon.debug pppd[2134]: Sent control packet type is 1 'Start-Control-Connection-Request'
Sun Mar 31 01:34:04 2024 daemon.debug pppd[2134]: Received Start Control Connection Reply
Sun Mar 31 01:34:04 2024 daemon.debug pppd[2134]: Client connection established.
Sun Mar 31 01:34:05 2024 daemon.debug pppd[2134]: Sent control packet type is 7 'Outgoing-Call-Request'
Sun Mar 31 01:34:05 2024 daemon.debug pppd[2134]: Received Outgoing Call Reply.
Sun Mar 31 01:34:05 2024 daemon.debug pppd[2134]: Outgoing call established (call ID 1249, peer's call ID 63104).
Sun Mar 31 01:34:05 2024 daemon.debug pppd[2084]: using channel 1236
Sun Mar 31 01:34:05 2024 daemon.info pppd[2084]: Using interface pptp-vpn
Sun Mar 31 01:34:05 2024 daemon.notice pppd[2084]: Connect: pptp-vpn <--> pptp (xx.94.xx.xx)
Sun Mar 31 01:34:05 2024 daemon.debug pppd[2084]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x9e2b3c36>]
Sun Mar 31 01:34:05 2024 daemon.info ModemManager[2138]: hotplug: add network interface pptp-vpn: event processed
Sun Mar 31 01:34:08 2024 daemon.debug pppd[2084]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x9e2b3c36>]
Sun Mar 31 01:34:11 2024 daemon.debug pppd[2084]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x9e2b3c36>]
Sun Mar 31 01:34:14 2024 daemon.debug pppd[2084]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x9e2b3c36>]
Sun Mar 31 01:34:17 2024 daemon.debug pppd[2084]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x9e2b3c36>]
Sun Mar 31 01:34:20 2024 daemon.debug pppd[2084]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x9e2b3c36>]
Sun Mar 31 01:34:23 2024 daemon.debug pppd[2084]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x9e2b3c36>]
Sun Mar 31 01:34:26 2024 daemon.debug pppd[2084]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x9e2b3c36>]
Sun Mar 31 01:34:29 2024 daemon.debug pppd[2084]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x9e2b3c36>]
Sun Mar 31 01:34:32 2024 daemon.debug pppd[2084]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x9e2b3c36>]
Sun Mar 31 01:34:35 2024 daemon.warn pppd[2084]: LCP: timeout sending Config-Requests
Sun Mar 31 01:34:35 2024 daemon.notice pppd[2084]: Connection terminated.
Sun Mar 31 01:34:35 2024 daemon.warn pppd[2134]: read returned zero, peer has closed
Sun Mar 31 01:34:35 2024 daemon.debug pppd[2134]: Closing connection (shutdown)
Sun Mar 31 01:34:35 2024 daemon.debug pppd[2134]: Sent control packet type is 12 'Call-Clear-Request'
Sun Mar 31 01:34:35 2024 daemon.warn pppd[2134]: read returned zero, peer has closed
Sun Mar 31 01:34:35 2024 daemon.debug pppd[2134]: Closing connection (call state)
Sun Mar 31 01:34:35 2024 daemon.info ModemManager[2161]: hotplug: remove network interface pptp-vpn: event processed
Sun Mar 31 01:34:35 2024 daemon.notice pppd[2084]: Modem hangup
Sun Mar 31 01:34:35 2024 daemon.info pppd[2084]: Exit.
Sun Mar 31 01:34:35 2024 daemon.notice netifd: Interface 'vpn' is now down
Sun Mar 31 01:34:35 2024 daemon.notice netifd: Interface 'vpn' is setting up now

this is why, can someone help me solve it?

Hereā€™s my system info.

NAME="OpenWrt"
VERSION="SNAPSHOT"
ID="openwrt"
ID_LIKE="lede openwrt"
PRETTY_NAME="OpenWrt SNAPSHOT"
VERSION_ID="snapshot"
HOME_URL="https://openwrt.org/"
BUG_URL="https://bugs.openwrt.org/"
SUPPORT_URL="https://forum.openwrt.org/"
BUILD_ID="r25717-d7d94a8d91"
OPENWRT_BOARD="mediatek/filogic"
OPENWRT_ARCH="aarch64_cortex-a53"
OPENWRT_TAINTS=""
OPENWRT_DEVICE_MANUFACTURER="OpenWrt"
OPENWRT_DEVICE_MANUFACTURER_URL="https://openwrt.org/"
OPENWRT_DEVICE_PRODUCT="Generic"
OPENWRT_DEVICE_REVISION="v0"
OPENWRT_RELEASE="OpenWrt SNAPSHOT r25717-d7d94a8d91"

Hi, just got an R4 but unable to boot successfully OpenWRT snapshot (either via download from firmware selector or even compiling locally), specifically, I have a thermal error message thatā€™s causing kernel to panic and shutdown the device. It doesnā€™t happen with the official but older firmware provided by Banana-Pi, with that one Iā€™m able to boot successfully.

[    0.006316] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.006595] DMA: preallocated 512 KiB GFP_KERNEL pool for atomic allocations
[    0.006703] DMA: preallocated 512 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.006799] DMA: preallocated 512 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.007044] thermal_sys: Registered thermal governor 'fair_share'
[    0.007046] thermal_sys: Registered thermal governor 'bang_bang'
[    0.007047] thermal_sys: Registered thermal governor 'step_wise'
[    0.007050] thermal_sys: Registered thermal governor 'user_space'
[    0.007096] ASID allocator initialised with 65536 entries
[    0.007541] printk: console [ramoops-1] enabled
...
    3.006129] mtk-pcie-gen3: probe of 11290000.pcie failed with error -110
[    3.012992] mtk-pcie-gen3 11300000.pcie: host bridge /soc/pcie@11300000 ranges:
[    3.020298] mtk-pcie-gen3 11300000.pcie: Parsing ranges property...
[    3.026558] mtk-pcie-gen3 11300000.pcie:       IO 0x0030000000..0x00301fffff -> 0x0030000000
[    3.034990] mtk-pcie-gen3 11300000.pcie:      MEM 0x0030200000..0x0037ffffff -> 0x0030200000
**[    3.207341] thermal thermal_zone0: cpu-thermal: critical temperature reached, shutting down**
**[    3.215679] reboot: HARDWARE PROTECTION shutdown (Temperature too high)**
**[    3.222366] reboot: Failed to start orderly shutdown: forcing the issue**
[    3.228999] Emergency Sync complete
[    3.280020] mtk-pcie-gen3 11300000.pcie: set IO trans window[0]: cpu_addr = 0x30000000, pci_addr = 0x30000000, size = 0x200000
[    3.291403] mtk-pcie-gen3 11300000.pcie: set MEM trans window[1]: cpu_addr = 0x30200000, pci_addr = 0x30200000, size = 0x200000

Anyone else having this issue or know a way to have it fixed? I have a huge passive heatsink mounted and since I can boot with the official image from BPi, Iā€™m sure that thermal is not the issue, somehow it is improperly detected and reported to kernel that believes CPU hit the critical temp.

EDIT:

I was able to boot with recovery image that also complains about CPU temp being too high. Temperature on recovery image is reported to be about 170C where with BPI-R4 official image is just above 40C, below command I have run to get the temp on both. Seems like snapshot image reads the wrong temp?

root@OpenWrt:~# cat /sys/class/thermal/thermal_zone*/temp
168560

Does someone knows if there is a SFP available for TX 1310 nm, RX 1490/1550 nm, SC-UPC which works on the R4?

I have some cheap one from ali, later i can plug them and check, but i am running still the original sinovoip image.

Any chance you are looking for a GPON module, because GPON uses those particular wavelengths? I got a LuLeey XS-2510 SFP module, that is being detected by the latest OpenWrt snapshot. It uses the wavelengths you are looking for, RX is 1490nm and comes with an SC-UPC connector, though recently they released an SC-APC version as well.

I could not yet test if the actual connection is working, as my ISP has not connected my building yet, though it should happen ā€œsoonā€ :tm: