[BPI-R2] mt7925

Debian from Frank , I compiled the kernel myself I’m trying to start wifi on the mt7925 card .

root@bpi-r2:~# inxi -Fxz
System:    Kernel: 6.11.0-rc5-bpi-r2 armv7l bits: 32 compiler: gcc v: 10.2.1 Console: tty 0 
           Distro: Debian GNU/Linux 11 (bullseye) 
Machine:   Type: ARM Device System: Bananapi BPI-R2 details: Mediatek Cortex-A7 rev: N/A serial: N/A 

root@bpi-r2:~# lspci
00:00.0 PCI bridge: MEDIATEK Corp. Device 0801 (rev 01)
00:01.0 PCI bridge: MEDIATEK Corp. Device 0801 (rev 01)
01:00.0 Network controller: MEDIATEK Corp. Device 7925
02:00.0 IDE interface: ASMedia Technology Inc. ASM1061 SATA IDE Controller (rev 02)

root@bpi-r2:~# lsmod | grep 79
mt7925e                16384  0
mt7925_common          73728  1 mt7925e
mt792x_lib             28672  2 mt7925_common,mt7925e
mt76_connac_lib        49152  3 mt792x_lib,mt7925_common,mt7925e
mt76                   77824  4 mt792x_lib,mt76_connac_lib,mt7925_common,mt7925e
mac80211              565248  4 mt76,mt792x_lib,mt76_connac_lib,mt7925_common
cfg80211              352256  4 mt76,mac80211,mt76_connac_lib,mt7925_common
root@bpi-r2:/lib/firmware/mediatek/mt7925# ls -all
razem 1752
drwxr-xr-x 2 root root    4096 09-02 23:12 .
drwxr-xr-x 3 root root    4096 09-02 23:09 ..
-rw-rw-r-- 1 root root  454959 09-02 23:07 BT_RAM_CODE_MT7925_1_1_hdr.bin
-rw-rw-r-- 1 root root  211040 09-02 23:06 WIFI_MT7925_PATCH_MCU_1_1_hdr.bin
-rw-rw-r-- 1 root root 1110312 09-02 23:07 WIFI_RAM_CODE_MT7925_1_1.bin

root@bpi-r2:~# dmesg | grep 7925
[    4.033207] pci 0000:01:00.0: [14c3:7925] type 00 class 0x028000 PCIe Endpoint
[   10.428925] mt7925e 0000:01:00.0: enabling device (0140 -> 0142)
[   10.610597] mt7925e 0000:01:00.0: ASIC revision: 79250000
[   13.768170] mt7925e 0000:01:00.0: Message 00000010 (seq 1) timeout
[   13.774399] mt7925e 0000:01:00.0: Failed to get patch semaphore
[   16.888157] mt7925e 0000:01:00.0: Message 00000010 (seq 2) timeout
[   16.894386] mt7925e 0000:01:00.0: Failed to get patch semaphore
[   20.008158] mt7925e 0000:01:00.0: Message 00000010 (seq 3) timeout
[   20.014388] mt7925e 0000:01:00.0: Failed to get patch semaphore
[   23.128155] mt7925e 0000:01:00.0: Message 00000010 (seq 4) timeout
[   23.134381] mt7925e 0000:01:00.0: Failed to get patch semaphore
[   26.238155] mt7925e 0000:01:00.0: Message 00000010 (seq 5) timeout
[   26.244385] mt7925e 0000:01:00.0: Failed to get patch semaphore
[   29.368156] mt7925e 0000:01:00.0: Message 00000010 (seq 6) timeout
[   29.374387] mt7925e 0000:01:00.0: Failed to get patch semaphore
[   32.488162] mt7925e 0000:01:00.0: Message 00000010 (seq 7) timeout
[   32.494391] mt7925e 0000:01:00.0: Failed to get patch semaphore
[   35.688159] mt7925e 0000:01:00.0: Message 00000010 (seq 8) timeout
[   35.694376] mt7925e 0000:01:00.0: Failed to get patch semaphore
[   38.880639] mt7925e 0000:01:00.0: Message 00000010 (seq 9) timeout
[   38.886888] mt7925e 0000:01:00.0: Failed to get patch semaphore
[   42.088290] mt7925e 0000:01:00.0: Message 00000010 (seq 10) timeout
[   42.094662] mt7925e 0000:01:00.0: Failed to get patch semaphore
[   42.190917] mt7925e 0000:01:00.0: hardware init failed

how to run it ???

seems like driver bug for me, or card draws too much current and hangs till fw init

maybe it can be fixed like mt7996:

but also possible that semaphore was not released in the code-path…then you need to debug the firmware loading code (e.g. with printks).

Hi
Frank is it available Debian GNU/Linux 12 (bookworm) on R2 ??? or Ubuntu 24.04 .
Is there any instructions on how to build such a system? ( I can try it myself )

My images-repo also supports r2…on my gdrive there are prebuilt images (automatic-images folder)

https://drive.google.com/drive/mobile/folders/1A5S7_82Bg4EYxjzdQ5FKyBw9Qi2C3uK-?sort=13&direction=a

thank you, but there is a problem I don’t know how to download the certificates

root@bpi-r2:/etc/apt# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
root@bpi-r2:/etc/apt# 

root@bpi-r2:/etc/apt# cat sources.list
deb http://ftp.de.debian.org/debian bookworm main contrib non-free non-free-firmware non-free-firmware
deb-src http://ftp.de.debian.org/debian bookworm main contrib non-free non-free-firmware non-free-firmware
deb http://ftp.de.debian.org/debian bookworm-updates main contrib non-free non-free-firmware non-free-firmware
deb-src http://ftp.de.debian.org/debian bookworm-updates main contrib non-free non-free-firmware non-free-firmware
deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware non-free-firmware
deb-src http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware non-free-firmware
root@bpi-r2:/etc/apt# 

root@bpi-r2:/etc/apt# apt update
Get:1 http://security.debian.org/debian-security bookworm-security InRelease [48.0 kB]
Get:2 http://ftp.de.debian.org/debian bookworm InRelease [151 kB]                                          
Ign:3 https://deb.nodesource.com/node_18.x nodistro InRelease                    
Get:4 http://ftp.de.debian.org/debian bookworm-updates InRelease [55.4 kB]       
Ign:3 https://deb.nodesource.com/node_18.x nodistro InRelease
Ign:3 https://deb.nodesource.com/node_18.x nodistro InRelease
Err:3 https://deb.nodesource.com/node_18.x nodistro InRelease                                                                                                               
  Certificate verification failed: The certificate is NOT trusted. The certificate chain uses not yet valid certificate.  Could not handshake: Error in the certificate verification. [IP: 104.22.5.26 443]
Reading package lists... Done                                                                                                                                               
E: Release file for http://security.debian.org/debian-security/dists/bookworm-security/InRelease is not valid yet (invalid for another 87d 20h 2min 8s). Updates for this repository will not be applied.
E: Release file for http://ftp.de.debian.org/debian/dists/bookworm/InRelease is not valid yet (invalid for another 75d 22h 43min 25s). Updates for this repository will not be applied.
E: Release file for http://ftp.de.debian.org/debian/dists/bookworm-updates/InRelease is not valid yet (invalid for another 88d 3h 10min 56s). Updates for this repository will not be applied.

I guess you need to set your clock,e.g.

date -s "2024-09-12 20:51 CEST"

Just change to your own time(zone) and run apt update again

Thank you :grinning: now it works

what are the main differences Debian GNU/Linux 12 (bookworm) vs ubuntu 24.04 LTS (Noble Numbat,I check both, they have the basic number of packages , e.g. systemd network

ubuntu is based on debian but is an own distribution…some users prefer ubuntu, some debian :wink:

hello Frank how to update sources to 6.12 rc-4 , I am using your debian image

Kernel: 6.12.0-rc1-bpi-r2-mt7988upstream armv7l bits: 32 compiler: gcc v: 10.2.1 Console: tty 0 
           Distro: Debian GNU/Linux 11 (bullseye) 
Machine:   Type: ARM Device System: Bananapi BPI-R2 details: Mediatek Cortex-A7 rev: N/A serial: N/A

You can simply use git to add torvalds repo as remote and do a rebase while on branch you want

git rebase v6.12-rc4