MT7921 Module


This chapter describes module-dependent information and instructions. For example, you will get different benchmark results on different module on different platforms.

For general usage of Wi-Fi, such as command to configure DHCP or static IP and so on, please refer to Wi-Fi chapter.

Note

Command operations and test results presented in Wi-Fi chapter are based on the IoT Yocto v23.0.


MT7921 - the Combo Connectivity Solution for Wi-Fi 6 and BT 5.2

The MediaTek MT7921 solution supports various kinds of form factors. Currently IoT Yocto supports the MT7921L (PCIE+USB) and MT7921S (SDIO) combo modules made by Azurewave. Both solutions are high-performance wireless modules that provide robust Wi-Fi and Bluetooth connectivity.

The MT7921L leverages the PCIe interface for Wi-Fi and the USB interface for Bluetooth. It supports the latest Wi-Fi 6 standard, offering faster and more reliable connections compared to previous Wi-Fi standards. It also supports the latest Bluetooth 5.2 standard for fast and reliable connections to a wide range of Bluetooth devices. On the other hand, the MT7921S uses the SDIO interface, which is a type of interface that allows peripherals and memory cards to be connected to the embedded platform.

Important

There are 2 types of MT7921 modules made by Azurewave.
  • AW-XB468NF: a MT7921L module that uses the PCIe interface for Wi-Fi and the USB interface for Bluetooth.

  • AW-XB554NF: a MT7921S module where both Wi-Fi and Bluetooth share the SDIO interfaces.

The pin assignment of MT7921L M.2 module AW-XB468NF is compatible with standard M.2 E Key. However, the pin assignment of MT7921S M.2 module AW-XB554NF is not compatible with the standard M.2 E Key.

Kernel Configurations for MT7921

IoT Yocto applies kernel configurations of MT7921 families as a common setting for supporting platforms: Genio 700-EVK and Genio 1200-EVK. User can find the Kernel configurations file of MT7921 in meta-mediatek-bsp layer: mt7921.cfg. The settings are listed separately, noting that MT792L is also compatible with MT7921E.

# common
CONFIG_UHID=y
CONFIG_BT_MTK=m

# mt7921e
CONFIG_BT_HCIBTUSB=m
CONFIG_BT_HCIBTUSB_MTK=y
CONFIG_MT7921E=m

# mt7921s
CONFIG_BT_MTKSDIO=m
CONFIG_MT7921S=m

Configuration for MT7921L in DTS

The MT7921L module, being compatible with the standard M.2 PCIe slot, is straightforward to use and requires only minimal DTS configurations. You can refer to the configurations of the Genio 1200-EVK or Genio 700-EVK for guidance.

The provided dts nodes for the MT7921L PCIE M.2 module are used to configure the hardware settings of the module on the Genio 1200-EVK platform. Here’s a brief explanation of each node:

wifi_pwr_fixed_3v3: This node is used to configure a fixed regulator that provides a 3.3V power supply to the Wi-Fi module. The gpio property is set to GPIO 135, which is presumably used to control the power supply. The regulator-always-on property indicates that the regulator is always on.

wifi_pwr_fixed_3v3: wifi-pwr-fixed-3v3 {
        compatible = "regulator-fixed";
        regulator-name = "wifi_pwr_fixed_3v3";
        regulator-min-microvolt = <3300000>;
        regulator-max-microvolt = <3300000>;
        gpio = <&pio 135 GPIO_ACTIVE_HIGH>;
        enable-active-high;
        regulator-always-on;
};

pcie0_pins_default: This node defines the default pin configuration for the PCIe interface. The pinmux property is set to three different functions: WAKEN, PERSTN, and CLKREQN, which are presumably used for wake-up, reset, and clock request signals, respectively. The bias-pull-up property indicates that these pins have a pull-up resistor.

pcie0_pins_default: pcie0default {
        pins {
                pinmux = <PINMUX_GPIO19__FUNC_WAKEN>,
                        <PINMUX_GPIO20__FUNC_PERSTN>,
                        <PINMUX_GPIO21__FUNC_CLKREQN>;
                bias-pull-up;
        };
};

pcie0_pins_idle: This node defines the idle pin configuration for the PCIe interface. The pinmux property is set to GPIO 20, which is presumably used when the interface is idle. The bias-disable and output-low properties indicate that the pin has no bias and is driven low when idle.

pcie0_pins_idle: pcie0idle {
        pins {
                pinmux = <PINMUX_GPIO20__FUNC_GPIO20>;
                bias-disable;
                output-low;
        };
};

&pcie0: This node is used to configure the PCIe interface. The pinctrl-names property defines two states: “default” and “idle”. The pinctrl-0 and pinctrl-1 properties link to the pcie0_pins_default and pcie0_pins_idle nodes, respectively. The status property set to “okay” indicates that the interface is enabled. Don’t forget to enable &pciephy.

&pcie0 {
        pinctrl-names = "default", "idle";
        pinctrl-0 = <&pcie0_pins_default>;
        pinctrl-1 = <&pcie0_pins_idle>;
        status = "okay";
};

&pciephy {
        status = "okay";
};

Configuration for MT7921S in DTS

MT7921S can be installed and probed on Genio 700-EVK without any modification for dts file genio-700-evk.dts. However, only basic Wi-Fi and bluetooth functions are supported. Advanced system related functions such as module reset, BT SCO, and Wake on wireless are not supported.

Important

Please note that the SDIO pin assignment of the MT7921S is not fully compatible with the Genio 700-EVK. As a result, certain functionalities, such as module reset, BT SCO, and wake on wireless, cannot not work as expected. Modifications for both the board and dts may be required to enable these functionalities. Please double check the customized hardware schematic and dts assignment with hardware engineer very carefully.

Note

The functionalities of module reset, BT SCO, and wake on wireless are not included in the scope of the IoT Yocto v23.1 release. However, it’s important to reserve the circuits and pin definitions in your design in advance for these features.

To fully support all system-related functions, customized boards and dts files are necessary. The provided dts nodes serve as an example for configuring the hardware settings of the MT7921S SDIO module. However, attempting to apply these modifications to the Genio 700-EVK without any hardware modifications will not be successful.

Note

The provided DTS example demonstrates the usage of MT7921S from the Chromebook mt8186-corsola.dts

Here are some important dts nodes that can serve as a reference for porting MT7921S.

wifi_pwrseq: This node is used to configure the power sequence for the Wi-Fi module. The reset-gpios property is used to reset the chip.

wifi_pwrseq: wifi-pwrseq {
        compatible = "mmc-pwrseq-simple";
        pinctrl-names = "default";
        pinctrl-0 = <&wifi_pins_pwrseq>;
        post-power-on-delay-ms = <50>;
        /* Toggle WLAN_MODULE_RST_L to reset the chip */
        reset-gpios = <&pio 54 1>;
};

wifi_wakeup: This node is used to configure the wake-up functionality for the Wi-Fi module. The gpios property is used for the Wake on WiFi feature.

wifi_wakeup: wifi-wakeup {
        compatible = "gpio-keys";
        pinctrl-names = "default";
        pinctrl-0 = <&wifi_pins_wakeup>;
        wowlan {
                label = "Wake on WiFi";
                gpios = <&pio 7 GPIO_ACTIVE_LOW>;
                linux,code = <KEY_WAKEUP>;
                wakeup-source;
        };
};

&mmc1: This node is used to configure the MMC interface for the SDIO module (it should be &mmc2 on Genio 700-EVK). Various properties are set to configure the interface, including the sdio_wakeup, wifi_pwrseq, and bt_reset. The mmc-pwrseq property links to the wifi_pwrseq node.

&mmc2 {
        status = "okay";
        ...
        interrupt-names = "msdc", "sdio_wakeup";
        interrupts-extended = <&gic GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH 0>,
                                <&pio 87 IRQ_TYPE_LEVEL_LOW>;
        ...
        wakeup-source;
        ...
        mmc-pwrseq = <&wifi_pwrseq>;
        bt_reset: bt-reset {
                compatible = "mediatek,mt7921s-bluetooth";
                pinctrl-names = "default";
                pinctrl-0 = <&bt_pins_reset>;
                reset-gpios = <&pio 155 GPIO_ACTIVE_LOW>;
        };
};

wifi_pins_pwrseq, wifi_pins_wakeup, and bt_pins_reset: These nodes define the pin configurations for the Wi-Fi power sequence, Wi-Fi wake-up, and Bluetooth reset functionalities, respectively.

wifi_pins_pwrseq: wifipwrseq {
        pins-wifi-enable {
                pinmux = <PINMUX_GPIO54__FUNC_GPIO54>;
        };
};
wifi_pins_wakeup: wifi-pins-wakeup {
        pins-wifi-wakeup {
                pinmux = <PINMUX_GPIO7__FUNC_GPIO7>;
                input-enable;
        };
};
bt_pins_reset: bt-pins-reset {
        pins_bt_reset {
                pinmux = <PINMUX_GPIO155__FUNC_GPIO155>;
                output-high;
        };
};

mt6366_vcn33_bt_reg and mt6366_vcn33_wifi_reg: These nodes are used to configure the voltage regulators for the Bluetooth and Wi-Fi functionalities, respectively.

mt6366_vcn33_bt_reg: ldo_vcn33_bt {
        regulator-name = "vcn33_bt";
        regulator-min-microvolt = <3300000>;
        regulator-max-microvolt = <3500000>;
        regulator-enable-ramp-delay = <270>;
};
mt6366_vcn33_wifi_reg: ldo_vcn33_wifi {
        regulator-name = "vcn33_wifi";
        regulator-min-microvolt = <3300000>;
        regulator-max-microvolt = <3500000>;
        regulator-enable-ramp-delay = <270>;
};

btsco: This node is used to enable the Bluetooth SCO (Synchronous Connection Oriented) link, which is used for voice communication over Bluetooth.

btsco: bt-sco {
        status = "okay";
        compatible = "linux,bt-sco";
};

Note

Interface name in Linux OS may be different by modules. It should be wlp1s0 for MT7921L PCIe module, and wlan0 for MT7921L SDIO module.