Hi
I have got an 88W8997 (AW-CM276MA from AzureWave) module and I am trying to interface it with IMX8QXPC0-MEK through PCIe slot. The Linux kernel version I am trying to use is 5.15.71_2.2.1 which I got for the IMX board from the NXP website. I have also got the 88W8997 PCIe driver from the NXP website(PCIE-WLAN-UART-BT-8997-LNX_5_15_71-IMX8-16.92.21.p55.3-16.92.21.p55.3-MM5X16366.P5-MGPL). While trying to cross compile the driver, as per the guide I am following, I am supposed to get an mlan.ko and a pcie8xxx.ko files. But I am only getting the mlan.ko file. Am I doing anything wrong here?
Note: Since I was not able to find any specific guide for imx8qxpmek and 88W8997, I am refering to a guide for interfacing 88W8997 with iMX8MM-EVK & L5.4.24_2.1.0.
已解决! 转到解答。
Refer to the user guide,
The wireless driver supports wpa_supplicant, which is a WEP/WPA/WPA2/WPA3
encryption authenticated tool.
• Wi-Fi driver: supports NXP 88W8987-based modules with SDIO interface, NXP
88W9098-based modules with PCIe and SDIO interfaces, NXP 88W8997-based
modules with PCIe and SDIO interfaces, NXP IW416-based modules with SDIO
interface, NXP 88W8801-based modules with SDIO interface, and NXP IW612-based
modules with SDIO interface.
• Firmware
The NXP release package already includes all NXP, Wi-Fi/Bluetooth firmware. It
requires to accept NXP license.
To run Wi-Fi, execute the following commands first and follow common commands
below:
# For all the other Wi-Fi modules:
modprobe moal mod_para=nxp/wifi_mod_para.conf
$connmanctl
connmanctl> enable wifi
connmanctl> scan wifi
connmanctl> services /* This should list of the network. For
example wifi_c0e4347f5053_4a62726f_managed_psk*/
connmanctl> agent on
connmanctl> connect wifi_c0e4347f5053_4a62726f_managed_psk /*
Enter Passphrase */
Agent RequestInput wifi_c0e4347f5053_4a62726f_managed_psk
Passphrase = [ Type=psk, Requirement=mandatory ]
Passphrase?
connmanctl> quit
current bsp should already have the firmware, you don't need compile it again, you can try to use the command directly I attached the user guide for more detailed information
Update: Solved the issue!
It turns out the module I had was not based on 88W8997 at all. It said AW-CM276MA on the PCB and I believed it. The actual module on top of the PCB was AW-CM421 which is based on Realtek RTL8822CE. Turns out I was trying to interface the wrong module the whole time! After I added the configurations for the correct driver and loaded the correct firmware, everything worked fine and I was able to get the module up and running. Thanks @joanxie for your help. I was able to get a lot of helpful information from this even though the issue was completely different.
On a separate note, I was able to get the WiFi up and running and connect to my phone's hotspot. However, I am still getting some issues with Bluetooth connection. As per the User's Guide, I need to run the command for hciattach but I am getting some issues while doing this. I am still working out what the issue might be. Adding the logs below. Any idea what this might be about?
root@imx8qxpc0mek:~# hciattach /dev/ttyLP1 any 115200 flow
Setting TTY to N_HCI line discipline
Device setup complete
root@imx8qxpc0mek:~# [ 27.759812] Bluetooth: hci0: command 0x1003 tx timeout
[ 29.775806] Bluetooth: hci0: command 0x1001 tx timeout
[ 31.791809] Bluetooth: hci0: command 0x1009 tx timeoutroot@imx8qxpc0mek:~# hciconfig hci0 up
[ 41.039808] Bluetooth: hci0: command 0x1003 tx timeout
[ 43.055814] Bluetooth: hci0: command 0x1001 tx timeout
[ 45.071806] Bluetooth: hci0: command 0x1009 tx timeout
Can't init device hci0: Connection timed out (110)
Refer to the user guide,
The wireless driver supports wpa_supplicant, which is a WEP/WPA/WPA2/WPA3
encryption authenticated tool.
• Wi-Fi driver: supports NXP 88W8987-based modules with SDIO interface, NXP
88W9098-based modules with PCIe and SDIO interfaces, NXP 88W8997-based
modules with PCIe and SDIO interfaces, NXP IW416-based modules with SDIO
interface, NXP 88W8801-based modules with SDIO interface, and NXP IW612-based
modules with SDIO interface.
• Firmware
The NXP release package already includes all NXP, Wi-Fi/Bluetooth firmware. It
requires to accept NXP license.
To run Wi-Fi, execute the following commands first and follow common commands
below:
# For all the other Wi-Fi modules:
modprobe moal mod_para=nxp/wifi_mod_para.conf
$connmanctl
connmanctl> enable wifi
connmanctl> scan wifi
connmanctl> services /* This should list of the network. For
example wifi_c0e4347f5053_4a62726f_managed_psk*/
connmanctl> agent on
connmanctl> connect wifi_c0e4347f5053_4a62726f_managed_psk /*
Enter Passphrase */
Agent RequestInput wifi_c0e4347f5053_4a62726f_managed_psk
Passphrase = [ Type=psk, Requirement=mandatory ]
Passphrase?
connmanctl> quit
current bsp should already have the firmware, you don't need compile it again, you can try to use the command directly I attached the user guide for more detailed information
Hi,
Thanks for the reply. I have tried following your instructions but ran into issues again. The logs are as follows:
root@imx8qxpc0mek:# modprobe moal mod_para=nxp/wifi_mod_para.conf
[ 155.546304] mlan: loading out-of-tree module taints kernel.
[ 155.599479] wlan: Loading MWLAN driver
[ 155.603947] wlan: Register to Bus Driver...
[ 155.608371] wlan: Register to Bus Driver Done
[ 155.612831] wlan: Driver loaded successfully
root@imx8qxpc0mek:# connmanctl
connmanctl> enable wifi
wifi is not available
conmannctl technologies lists only ethernet and no wifi.
root@imx8qxpc0mek:~# connmanctl technologies
/net/connman/technology/ethernet
Name = Wired
Type = ethernet
Powered = True
Connected = False
Tethering = False
TetheringFreq = 2412
root@imx8qxpc0mek:~#
Could this be a hardware issue? Or am I missing something else here?
Hi,
From what I found out, the dts file imx8qxp-mek-pcie-ep.dts is being selected..The contents are as follows:
Edit: on further digging, the above was wrong. The dts file with pcieb node was imx8-ss-hsio.dtsi and imx8x-mek.dtsi. The contents are:
From imx8-ss-hsio.dtsi:
pcieb: pcie@0x5f010000 {
compatible = "fsl,imx8qm-pcie","snps,dw-pcie";
reg = <0x5f010000 0x10000>, /* Controller reg */
<0x7ff00000 0x80000>, /* PCI cfg space */
<0x5f080000 0xf0000>; /* lpcg, csr, msic, gpio */
reg-names = "dbi", "config", "hsio";
#address-cells = <3>;
#size-cells = <2>;
device_type = "pci";
bus-range = <0x00 0xff>;
ranges = <0x81000000 0 0x00000000 0x7ff80000 0 0x00010000 /* downstream I/O */
0x82000000 0 0x70000000 0x70000000 0 0x0ff00000>; /* non-prefetchable memory */
num-lanes = <1>;
num-viewport = <4>;
interrupts = <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>; /* eDMA */
interrupt-names = "msi", "dma";
#interrupt-cells = <1>;
interrupt-map-mask = <0 0 0 0x7>;
interrupt-map = <0 0 0 1 &gic 0 105 4>,
<0 0 0 2 &gic 0 106 4>,
<0 0 0 3 &gic 0 107 4>,
<0 0 0 4 &gic 0 108 4>;
clocks = <&pcieb_lpcg 0>,
<&pcieb_lpcg 1>,
<&pcieb_lpcg 2>,
<&phyx1_lpcg 0>,
<&phyx1_crr1_lpcg 0>,
<&pcieb_crr3_lpcg 0>,
<&misc_crr5_lpcg 0>;
clock-names = "pcie", "pcie_bus", "pcie_inbound_axi",
"pcie_phy", "phy_per", "pcie_per", "misc_per";
power-domains = <&pd IMX_SC_R_PCIE_B>,
<&pd IMX_SC_R_SERDES_1>,
<&pd IMX_SC_R_HSIO_GPIO>;
power-domain-names = "pcie", "pcie_phy", "hsio_gpio";
fsl,max-link-speed = <3>;
hsio-cfg = <PCIEAX2PCIEBX1>;
local-addr = <0x80000000>;
status = "disabled";
};
From imx8x-mek.dtsi:
&pcieb{
compatible = "fsl,imx8qxp-pcie","snps,dw-pcie";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pcieb>;
disable-gpio = <&pca9557_a 2 GPIO_ACTIVE_LOW>;
reset-gpio = <&lsio_gpio4 0 GPIO_ACTIVE_LOW>;
ext_osc = <1>;
status = "okay";
};
I found out that for imx8qxp-mek, only pcieb is available. Is there I need to add to the dts file? Also, since my need is to interface WiFi and Bluetooth, is there any additional dts/driver modifications I need to make? I have tried with the existing kernel modules as well as the moal.ko and mlan.ko files compiled from the PCIe driver downoaded from NXP. I am still getting the "wifi is not available" print when trying to enable wifi through connmanctl.
I am not sure whether this is an issue from PCIe side or the WiFi driver side. Or could this be something else entirely?
dmesg prints related to "pci" are attached.