Skip to contentSkip to conversation

mt76: upstream support for MT6878 (CONNAC2 soc7_0) integrated Wi-Fi/BT

DISCUSSION Venkat Yadlapati 1 participant 1 message Nov 25 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hi all,

I am bringing up mainline Linux on a MediaTek MT6878 (Dimensity 7300) phone, the Lava Agni 3, and would like to ask how you would prefer the integrated connectivity block to be supported before I shape any patches.

The hardware is the CONNAC2 "soc7_0" WFSYS/BGFSYS with an MT6637 A-die. In the vendor tree it is driven by gen4m (chips/soc7_0, HIF AXI) and the conninfra/connv2 platform code. On this phone the bootloader (LK) loads the Wi-Fi, BT and GNSS firmware from the connsys_*_a partitions into the CONNSYS EMI region (CFG_WLAN_LK_FWDL_SUPPORT=1).

Current state, on next-20261123:

- CONNSYS power-on (conn_infra, A-die init, calibration, low-power setup) in a small drivers/soc/mediatek driver shared by BT and Wi-Fi.
- Bluetooth works: BGF power-on plus the BEIF shared-memory rings in EMI (H4 framing); hci0 comes up, LE scans find devices.
- Wi-Fi: WFDMA on AXI with an mt7921-based SoC bus glue. The firmware preloaded by LK starts with INIT_CMD_ID_FW_IMAGE_START, and the NIC capability, CHIP_CONFIG and several EXT commands get answers. wlan0 registers.

Along the way I found what looks like a generic mt76 bug:
mt76_set_irq_mask() writes the mask with mt76_mmio_wr() rather than through dev->bus->wr, so drivers that remap offsets in their bus ops end up writing the wrong register. I will send that fix separately.

Where I am stuck, and my questions:

1. Command set. The soc7_0 firmware does not seem to answer unified commands (MCU_UNI_CMD DEV_INFO_UPDATE gets no reply); gen4m enables CFG_SUPPORT_UNIFIED_COMMAND only for CONNAC3. Does this firmware support the EXT DEV_INFO/BSS_INFO/STA_REC_UPDATE commands, as used by mt7915, or only gen4m's legacy CMD_IDs (BSS_ACTIVATE_CTRL, SET_BSS_INFO, UPDATE_STA_RECORD, ...)? Depending on the answer, which would you prefer: a soc.c variant inside an existing family, as MT7622 and MT7986 are handled, or a separate driver directory with its own mcu.c, in the way mt7925 split from mt7921? Is there by any chance a soc7_0 firmware build with unified command support?

2. Regulatory commands. CE SET_CHAN_DOMAIN (0x0f) and SET_RATE_TX_POWER (0x5d), built as mt76 builds them for mt7921, make the firmware assert:
<ASSERT> wifi/open_core/wificore/rlm/domain.c #455 - prWifiCmd->u2Length == u4CmdSize
As far as I can tell, the payload layouts match gen4m's CMD_SET_DOMAIN_INFO_V2 and CMD_SET_TXPOWER_COUNTRY_TX_POWER_LIMIT_PER_RATE (161 SKU entries). Is a different length or command version expected for this firmware? A CE REG_READ query (0xc0) also never gets an answer.

3. Firmware. Could the soc7_0 Wi-Fi RAM code, the ROM EMI patch and the BT RAM code be submitted to linux-firmware, so the driver can load them itself and recover from a firmware crash? Until then, would a "firmware already loaded by the bootloader" path be acceptable upstream, if it is documented and detected at probe?

4. Integration. Would you be fine with a shared CONNSYS power provider (drivers/soc/mediatek, refcounted, used by the Bluetooth driver and by mt76), with the firmware areas described as reserved-memory regions in DT? Or is there an existing or planned conninfra abstraction upstream that I should follow?

I am happy to share the WIP branch, register dumps or logs if that helps. Thanks for any guidance.

Best regards,
Venkat Yadlapati