We've discovered that the MT7927 is architecturally identical to the MT7925 (which has full Linux support since kernel 6.7) except for 320MHz channel width capability. This means we can adapt the existing mt7925 driver rather than writing one from scratch!
Working: Custom driver successfully binds to MT7927 hardware and loads firmware
Next Step: Implement DMA firmware transfer to activate the chip
I have other projects that I am working on, so I probably won't continue work on this one. I'm sharing my work in case anyone finds it useful.
# Check kernel version (need 6.7+ for mt7925 base)
uname -r # Should show 6.7 or higher
# Verify MT7927 device is present
lspci -nn | grep 14c3:7927 # Should show your device# Download MT7925 firmware (compatible with MT7927!)
mkdir -p ~/mt7927_firmware
cd ~/mt7927_firmware
wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/mediatek/mt7925/WIFI_MT7925_PATCH_MCU_1_1_hdr.bin
wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/mediatek/mt7925/WIFI_RAM_CODE_MT7925_1_1.bin
# Install firmware
sudo mkdir -p /lib/firmware/mediatek/mt7925
sudo cp *.bin /lib/firmware/mediatek/mt7925/
sudo update-initramfs -u# Clone and build
git clone https://github.com/[your-username]/mt7927-linux-driver
cd mt7927-linux-driver
make clean && make tests
# Load the driver
sudo insmod tests/04_risky_ops/mt7927_init.ko
# Check status
sudo dmesg | tail -20
lspci -k | grep -A 3 "14c3:7927" # Should show "Kernel driver in use: mt7927_init"- Chip: MediaTek MT7927 WiFi 7 (802.11be)
- PCI ID: 14c3:7927 (vendor: MediaTek, device: MT7927)
- Architecture: Same as MT7925 except supports 320MHz channels
- Current State: FW_STATUS: 0xffff10f1 (waiting for DMA firmware transfer)
- MT7925 firmware is compatible - No need to wait for MediaTek
- Driver binding works - Custom driver successfully claims device
- Clear path forward - Just need to implement DMA transfer mechanism
- PCI enumeration and BAR mapping
- Driver successfully binds to device
- Firmware files load into kernel memory
- All hardware registers accessible
- Chip is stable and responsive
- DMA firmware transfer to chip (main blocker)
- Memory activation at 0x000000
- WiFi network interface creation
The firmware loads into kernel memory but isn't transferred to the chip via DMA. We need to:
- Set up DMA descriptors properly
- Copy firmware with correct headers to DMA buffer
- Trigger MCU to read from DMA buffer
- Wait for firmware acknowledgment
mt7927-linux-driver/
βββ README.md # This file (main documentation)
βββ Makefile # Build system
βββ tests/
β βββ 04_risky_ops/
β β βββ mt7927_wrapper.c # β
Basic driver (binds successfully)
β β βββ mt7927_init.c # π§ Current driver (loads firmware)
β β βββ test_mt7925_firmware.c # β
Firmware compatibility test
β βββ Kbuild # Kernel build config
βββ src/ # Future production driver location
- Bind driver to device
- Load firmware files
- Implement DMA transfer β Current focus
- Activate chip memory
- Create network interface
- Port full mt7925 functionality
- Add 320MHz channel support
- Integrate with mac80211
- Implement WiFi 7 features
- Clean up code for upstream
- Submit to linux-wireless
- Get merged into mainline kernel
- DMA Implementation - Study mt7925 source in
drivers/net/wireless/mediatek/mt76/mt7925/ - Testing - Try the driver on your MT7927 hardware
- Documentation - Improve this README with your findings
# Main mt7925 driver files (your reference implementation)
drivers/net/wireless/mediatek/mt76/mt7925/
βββ pci.c # PCI probe and initialization sequence
βββ mcu.c # MCU communication and firmware loading
βββ init.c # Hardware initialization
βββ dma.c # DMA setup and transfer
# Shared mt76 infrastructure
drivers/net/wireless/mediatek/mt76/
βββ dma.c # Generic DMA implementation
βββ mt76_connac_mcu.c # MCU interface for Connac chips
βββ util.c # Utility functions- mt7925 on GitHub: Linux kernel source
- mt76 framework: OpenWrt repository
- Our working code:
tests/04_risky_ops/mt7927_init.c
# Check for conflicts
lsmod | grep mt79
sudo rmmod mt7921e mt7925e # Remove any conflicting drivers
# Check kernel messages
sudo dmesg | grep -E "mt7927|0a:00"# If chip shows 0xffffffff, reset via PCI
echo 1 | sudo tee /sys/bus/pci/devices/0000:0a:00.0/remove
sleep 2
echo 1 | sudo tee /sys/bus/pci/rescan# Verify firmware is installed
ls -la /lib/firmware/mediatek/mt7925/
# Should show WIFI_MT7925_PATCH_MCU_1_1_hdr.bin and WIFI_RAM_CODE_MT7925_1_1.bin- Hardware Detection: PCI enumeration works perfectly
- Driver Binding: Custom driver claims device successfully
- Firmware Compatibility: MT7925 firmware loads without errors
- Register Access: All BAR2 control registers accessible
- Chip Stability: No crashes or lockups during testing
- DMA Transfer: Firmware not reaching chip memory
- Memory Activation: Main memory at 0x000000 still shows 0x00000000
- Network Interface: Requires successful initialization first
Q: Why not just use the mt7925e driver?
A: The mt7925e driver refuses to bind to MT7927's PCI ID (14c3:7927) and adding the ID via new_id fails with "Invalid argument".
Q: Is this safe to test?
A: Yes, we're using proven MT7925 code paths. The worst case is the driver doesn't fully initialize (current state).
Q: Will this support full WiFi 7 320MHz channels?
A: Initially it will work like MT7925 (160MHz). Adding 320MHz support will come after basic functionality works.
Q: When will this be in the mainline kernel?
A: Once we have a working driver, submission typically takes 2-3 kernel cycles (3-6 months).
GPL v2 - Intended for upstream Linux kernel submission
- GitHub Issues: Report bugs and discuss development
- Linux Wireless: Mailing list for upstream discussion
Status as of 2025-08-18: Driver successfully binds and loads firmware. Implementing DMA transfer to complete initialization. This is no longer a reverse engineering project - we're adapting proven MT7925 code to support MT7927's PCI ID and eventually its 320MHz capability.