Skip to content

All Wi-Fi MiniPCIe cards MediaTek not working in hat Raspberry Pi 5 #17619

Open
@tinware

Description

Describe the bug

In Rpi5 MiniPCIe hat I run MiniPCIe Wi-Fi cards based on the following chipsets: MT7603, MT7612 and MT7921.
After installing the appropriate driver it is not driver visible in lspci -k.
I ran all three cards based on the above-mentioned systems in the other device with 24.10.0-rc5 and they work properly.
The issue only Raspberry Pi 5.
I noticed that I need to remove wpad* to be able to install kmod-mt*

OpenWrt version

r28304-6dacba30a7

OpenWrt release

24.10.0-rc5

OpenWrt target/subtarget

bcm27xx/bcm2712

Device

Raspberry Pi 5 Model B Rev 1.0

Image kind

Official downloaded image

Steps to reproduce

Install the "52Pi Raspberry Pi 5 Mini PCIe Hat M02" and mount Wi-Fi modules with MT7603, MT7612 and MT7921 chip.

Actual behaviour

Errors in dmesg during driver installation and lspci -k does not put the message: "Kernel driver in use"

Expected behaviour

Fixing error

Additional info

Test MT7603:

opkg install kmod-mt7603
dmesg

[  221.100265] kmodloader: loading kernel modules from /etc/modules.d/*
[  221.108524] mt7603e 0000:01:00.0: enabling device (0000 -> 0002)
[  221.115042] mt7603e 0000:01:00.0: ASIC revision: 76030010
[  221.122306] mt7603e: probe of 0000:01:00.0 failed with error -12
[  221.128845] kmodloader: done loading kernel modules from /etc/modules.d/*

lspci -k

0000:00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2712 PCIe Bridge (rev 21)
        Kernel driver in use: pcieport
lspci: Unable to load libkmod resources: error -2
0000:01:00.0 Network controller: MEDIATEK Corp. MT7612E 802.11acbgn PCI Express Wireless Network Adapter
        Subsystem: MEDIATEK Corp. MT7612E 802.11acbgn PCI Express Wireless Network Adapter
0001:00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2712 PCIe Bridge (rev 21)
        Kernel driver in use: pcieport
0001:01:00.0 Ethernet controller: Raspberry Pi Ltd RP1 PCIe 2.0 South Bridge
        Kernel driver in use: rp1

After reboot:

dmesg | grep "/etc/modules.d/"

[    8.405922] kmodloader: loading kernel modules from /etc/modules.d/*
[    8.543344] kmodloader: done loading kernel modules from /etc/modules.d/*

cat /etc/modules.d/mt7603
mt7603e

cat /sys/bus/pci/devices/0000:01:00.0/vendor
0x14c3

cat /sys/bus/pci/devices/0000:01:00.0/device
0x7603

echo 14c3 7603 > /sys/bus/pci/drivers/mt7603e/new_id
ash: write error: File exists

echo 14c3 7603 > /sys/bus/pci/drivers/mt7603e/remove_id
ash: write error: No such device

echo 14c3 7603 > /sys/bus/pci/drivers/mt7603e/new_id
ash: write error: File exists

echo 14c3 7603 > /sys/bus/pci/drivers/mt7603e/unbind
ash: write error: No such device

echo 14c3 7603 > /sys/bus/pci/drivers/mt7603e/bind
ash: write error: No such device

cat /sys/bus/pci/devices/0000:01:00.0/enable - here is zero, and it should be 1
0

cat /sys/bus/pci/devices/0000:01:00.0/uevent - there is no entry "DRIVER=mt7603e" here

PCI_CLASS=28000
PCI_ID=14C3:7603
PCI_SUBSYS_ID=14C3:7603
PCI_SLOT_NAME=0000:01:00.0
MODALIAS=pci:v000014C3d00007603sv000014C3sd00007603bc02sc80i00

ls /sys/bus/pci/devices/0000:01:00.0/driver/
ls: /sys/bus/pci/devices/0000:01:00.0/driver/: No such file or directory

Test MT7612:

lspci -k

0000:00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2712 PCIe Bridge (rev 21)
        Kernel driver in use: pcieport
lspci: Unable to load libkmod resources: error -2
0000:01:00.0 Network controller: MEDIATEK Corp. MT7612E 802.11acbgn PCI Express Wireless Network Adapter
        Subsystem: MEDIATEK Corp. MT7612E 802.11acbgn PCI Express Wireless Network Adapter
0001:00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2712 PCIe Bridge (rev 21)
        Kernel driver in use: pcieport
0001:01:00.0 Ethernet controller: Raspberry Pi Ltd RP1 PCIe 2.0 South Bridge
        Kernel driver in use: rp1

opkg remove wpad*
opkg install kmod-mt76x2
dmesg

[  218.645611] kmodloader: loading kernel modules from /etc/modules.d/*
[  218.654506] mt76x2e 0000:01:00.0: enabling device (0000 -> 0002)
[  218.661202] mt76x2e 0000:01:00.0: ASIC revision: 76120044
[  219.315124] mt76x2e: probe of 0000:01:00.0 failed with error -12
[  219.321869] kmodloader: done loading kernel modules from /etc/modules.d/*

lspci -k

0000:00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2712 PCIe Bridge (rev 21)
        Kernel driver in use: pcieport
lspci: Unable to load libkmod resources: error -2
0000:01:00.0 Network controller: MEDIATEK Corp. MT7612E 802.11acbgn PCI Express Wireless Network Adapter
        Subsystem: MEDIATEK Corp. MT7612E 802.11acbgn PCI Express Wireless Network Adapter
0001:00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2712 PCIe Bridge (rev 21)
        Kernel driver in use: pcieport
0001:01:00.0 Ethernet controller: Raspberry Pi Ltd RP1 PCIe 2.0 South Bridge
        Kernel driver in use: rp1

Test MT7921:

lspci -k

0000:00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2712 PCIe Bridge (rev 21)
        Kernel driver in use: pcieport
lspci: Unable to load libkmod resources: error -2
0000:01:00.0 Network controller: MEDIATEK Corp. MT7921 802.11ax PCI Express Wireless Network Adapter
        Subsystem: MEDIATEK Corp. MT7921 802.11ax PCI Express Wireless Network Adapter
0001:00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2712 PCIe Bridge (rev 21)
        Kernel driver in use: pcieport
0001:01:00.0 Ethernet controller: Raspberry Pi Ltd RP1 PCIe 2.0 South Bridge
        Kernel driver in use: rp1

opkg remove wpad*
opkg install kmod-mt7921e
dmesg

[  131.729899] kmodloader: loading kernel modules from /etc/modules.d/*
[  131.739187] mt7921e 0000:01:00.0: enabling device (0000 -> 0002)
[  131.748991] mt7921e 0000:01:00.0: ASIC revision: 79610010
[  131.839817] mt7921e: probe of 0000:01:00.0 failed with error -12
[  131.846186] kmodloader: done loading kernel modules from /etc/modules.d/*

lspci -k

0000:00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2712 PCIe Bridge (rev 21)
        Kernel driver in use: pcieport
lspci: Unable to load libkmod resources: error -2
0000:01:00.0 Network controller: MEDIATEK Corp. MT7921 802.11ax PCI Express Wireless Network Adapter
        Subsystem: MEDIATEK Corp. MT7921 802.11ax PCI Express Wireless Network Adapter
0001:00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2712 PCIe Bridge (rev 21)
        Kernel driver in use: pcieport
0001:01:00.0 Ethernet controller: Raspberry Pi Ltd RP1 PCIe 2.0 South Bridge
        Kernel driver in use: rp1

Diffconfig

Image 24.10.0-rc5 is official OpenWRT release for Raspberry Pi 5

Terms

  • I am reporting an issue for OpenWrt, not an unsupported fork.

Metadata

Assignees

No one assigned

    Labels

    Official Imagebugissue report with a confirmed bugrelease/24.10pull request/issue targeted (also) for OpenWrt 24.10 releasetarget/bcm27xxpull request/issue for bcm27xx target

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions