Skip to main content

M.2 Key E Connector

The M.2 Key E connector on the COM Carrier Board V2 has three interfaces: SDIO, PCIe and UART with the goal of supporting wireless M.2 modules. The very basic use case of detecting PCIe is covered in the PCI section.

For a more comprehensive description of the M.2 modules, see Wireless

BoardPCIeSDIOBluetooth UART
iMX6 SoloX COMmx6sxea-com-kit_v2-pcie.dtbimx6sxea-com-kit_v2.dtb/dev/ttymxc1
iMX6 Quad COMimx6qea-com-kit_v2-pcie.dtbimx6qea-com-kit_v2.dtb/dev/ttymxc4
iMX6 DualLite COMimx6dlea-com-kit_v2-pcie.dtbimx6dlea-com-kit_v2.dtb/dev/ttymxc4
iMX6 UltraLite COMNot supportedimx6ulea-com-kit_v2.dtb/dev/ttymxc1
iMX7 Dual COMimx7dea-com-kit_v2-pcie.dtbimx7dea-com-kit_v2.dtb/dev/ttymxc1
iMX7 Dual uCOMimx7dea-ucom-kit_v2-pcie.dtbimx7dea-ucom-kit_v2.dtb/dev/ttymxc1
iMX7ULP uCOMNot supportedimx7ulpea-ucom-kit_v2.dtb/dev/ttyLP2
iMX7ULP uCOM with 1LVNot supportedimx7ulpea-ucom-ptp-1lv.dtb/dev/ttyLP2
iMX8M Quad COMfsl-imx8mq-ea-com-kit_v2-pcie.dtbfsl-imx8mq-ea-com-kit_v2.dts/dev/ttymxc1
iMX8M Mini uCOMfsl-imx8mm-ea-ucom-kit_v2-pcie.dtbfsl-imx8mm-ea-ucom-kit_v2.dtb/dev/ttymxc0
iMX8M Mini uCOM with 1MWNot supportedfsl-imx8mm-ea-ucomkit_v2-1mw.dtb/dev/ttymxc0
iMX8M Nano uCOMNot supportedfsl-imx8mn-ea-ucom-kit_v2.dtb/dev/ttymxc0
iMX8M Nano uCOM with 1MWNot supportedfsl-imx8mn-ea-ucom-kit_v2-1mw.dtb/dev/ttymxc0
note

Note that the fsl- prefix has been removed from the file names starting with Linux 5.4.24.

Testing the PCIe interface requires a 1CX M.2 module.

Testing the SDIO interface requires either a 1DX, 1LV or 1MW M.2 module.

Similar testing can be done with the 1XA, 1YM and 1ZM modules but requires different setup. See the Getting Started with M.2 modules and i.MX 6/7/8 document for details.

U-Boot

There is no support for using the M.2 modules in the U-Boot. However, the U-Boot is used to configure if the SDIO or PCI interface (on the M.2 connector) shall be active. This is done by selecting which device tree file to use.

When using a module with PCIe interface (for example the 1CX M.2 module) run the following commands in the U-Boot, substituting the filename based on the COM board being used.

setenv fdt_file imx6qea-com-kit_v2-pcie.dtb
saveenv

When using a module with SDIO interface (for example the 1DX M.2 module) run the following commands in the U-Boot, substituting the filename based on the COM board being used.

setenv fdt_file imx6qea-com-kit_v2.dtb
saveenv

Linux - Wi-Fi

Start by checking that the module has been detected (exact text depends on M.2 module connected).

dmesg | grep brcmf_c
brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: May 14
2018 04:48:55 version 13.10.271.107 (r689896) FWID 01-9d634183

Configure the SSID and password of your wifi network by editing /etc/wpa_supplicant.conf so that it looks like this (but with your wifi settings instead).

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
update_config=1

network={
ssid="EA Guest"
psk="My password"
}

Now connect to that network.

ifconfig wlan0 up
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready

#wpa_supplicant -i wlan0 -D nl80211 -c /etc/wpa_supplicant.conf -B
Successfully initialized wpa_supplicant
rfkill: Cannot open RFKILL control device
rfkill: Cannot get wiphy information

After a couple of seconds the module should be connected to the network and then the following will be printed in the terminal.

IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

If that doesn't happen then check the settings in /etc/wpa_supplicant.conf, reboot and test again.

Request an IP number from the network.

udhcpc -i wlan0
udhcpc: started, v1.27.2
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending select for 192.168.1.147
udhcpc: lease of 192.168.1.147 obtained, lease time 86400
/etc/udhcpc.d/50default: Adding DNS 192.168.1.1

Use any tool that would work on a wired network to test the Wi-Fi connection, e.g. ping and iperf3. See the Network section.

Linux - Bluetooth

Start by checking that the module has been detected.

dmesg | grep brcmf_c
brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: May 14
2018 04:48:55 version 13.10.271.107 (r689896) FWID 01-9d634183

Start by initializing the UART (pick the UART in the table above according to you COM board).

hciattach /dev/ttymxc1 bcm43xx 3000000 flow -t 20
bcm43xx_init
Set Controller UART speed to 3000000 bit/s
Flash firmware /etc/firmware/BCM43012C0.1LV.hcd
Set Controller UART speed to 3000000 bit/s
Setting TTY to N_HCI line discipline
Device setup complete

The output from the hciattach command will show the module name (in the case above a 1LV M.2 module was used). If the M.2 module is not inserted or it cannot be communicated with then the hciattach command will timeout after 20 seconds.

Get some basic information.

hciconfig -a
hci0: Type: Primary Bus: UART
BD Address: 44:91:60:9A:7B:3D ACL MTU: 1021:8 SCO MTU:64:1
DOWN
RX bytes:708 acl:0 sco:0 events:38 errors:0
TX bytes:446 acl:0 sco:0 commands:38 errors:0
Features: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH SNIFF
Link mode: SLAVE ACCEPT

Open and initialize the hci device.

hciconfig hci0 up

Enable page and inquiry scan.

hciconfig hci0 piscan

Scan for other Bluetooth devices in range.

hcitool scan
Scanning ...
94:87:0B:35:F2:19 Samsung Galaxy S7