Hello all,
I am currently working on Nvidia Jetson TX2 - NX platform,which is using Nvidia Ubuntu 18.0 Linux OS and Kernel 4.9.
We made custom carrier board for this SOM and we want WIFI+BLE connectivity on that, for that we used NXP 88W8987 based Azurewave AW-CM358 module.
We made following device tree changes in SOM,
After this dtsi changes when I connect this module to the SDIO port its been get detected as mmc device,
user@user-desktop:~$ sudo dmesg | grep mmc1
[ 0.501198] vddio-sdmmc1: 1800 <--> 3300 mV at 3300 mV
[ 1.458204] mmc1: SDHCI controller on 3440000.sdhci [3440000.sdhci] using ADMA 64-bit with 64 bit addr
[ 1.655813] mmc1: hw tuning done ...
[ 1.657889] mmc1: new ultra high speed SDR104 SDIO card at address 0001
[ 31.818349] vddio-sdmmc1: disabling
Also I checked with ios command I got following details.
user@user-desktop:~$ sudo cat /sys/kernel/debug/mmc1/ios
[sudo] password for user:
clock: 208000000 Hz
vdd: 21 (3.3 ~ 3.4 V)
bus mode: 2 (push-pull)
chip select: 0 (don't care)
power mode: 2 (on)
bus width: 2 (4 bits)
timing spec: 6 (sd uhs SDR104)
signal voltage: 1 (1.80 V)
driver type: 0 (driver type B)
I got this modules drivers from Azure wave , basically they are for NXP iMX8 platform but by changing tool chain I can able to compile it on Nvidia Jetson TX2-NX platform.
I got mlan.ko and moal.ko objects.
That I have inserted in OS by using following commands,
user@user-desktop:~/bin_wlan$ ls
config load mlan.ko mlanutl moal.ko README_MLAN unload
user@user-desktop:~/bin_wlan$ sudo modprobe cfg80211
user@user-desktop:~/bin_wlan$ sudo insmod mlan.ko
user@user-desktop:~/bin_wlan$ sudo insmod moal.ko drv_mode=1 cfg80211_wext=0xf cal_data_cfg=none max_vir_bss=1 ps_mode=1 auto_ds=1 host_mime=1 fw_name=~/sduart8987_combo.bin
user@user-desktop:~/bin_wlan$
But this I checked dmesg log so I found following error,
user@user-desktop:~$ sudo dmesg | grep -E "sdhc|mmc"
[ 0.000000] Kernel command line: console=ttyS0,115200 root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 isolcpus=1-2 video=tegrafb earlycon=uart8250,mmio32,0x3100000 nvdumper_reserved=0x1772e0000 gpt rootfs.slot_suffix= tegra_fbmem=0x3a0000@0x96085000 lut_mem=0x2008@0x96081000 usbcore.old_scheme_first=1 tegraid=18.1.2.0.0 maxcpus=6 no_console_suspend boot.slot_suffix= boot.ratchetvalues=0.2031647.1 vpr_resize bl_prof_dataptr=0x10000@0x175840000 sdhci_tegra.en_boot_part_access=1 quiet root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 isolcpus=1-2
[ 0.405733] iommu: Adding device 3460000.sdhci to group 0
[ 0.406139] iommu: Adding device 3440000.sdhci to group 1
[ 0.513204] vddio-sdmmc1: 1800 <--> 3300 mV at 3300 mV
[ 1.453464] sdhci: Secure Digital Host Controller Interface driver
[ 1.453465] sdhci: Copyright(c) Pierre Ossman
[ 1.453467] sdhci-pltfm: SDHCI platform and OF driver helper
[ 1.454437] sdhci-tegra 3460000.sdhci: Client registration for eMC Successful
[ 1.456374] sdhci-tegra 3440000.sdhci: runtime pm disabled
[ 1.460432] sdhci-tegra 3440000.sdhci: Client registration for eMC Successful
[ 1.496639] mmc0: SDHCI controller on 3460000.sdhci [3460000.sdhci] using ADMA 64-bit with 64 bit addr
[ 1.504784] mmc1: SDHCI controller on 3440000.sdhci [3440000.sdhci] using ADMA 64-bit with 64 bit addr
[ 1.542561] mmc0: mmc_decode_ext_csd: CMDQ supported: depth: 31, cmdq_support: 1
[ 1.557418] mmc0: periodic cache flush enabled
[ 1.557428] mmc0: new HS400 Enhanced strobe MMC card at address 0001
[ 1.561795] mmcblk0: mmc0:0001 DG4016 14.7 GiB
[ 1.565939] mmcblk0boot0: mmc0:0001 DG4016 partition 1 4.00 MiB
[ 1.570064] mmcblk0boot1: mmc0:0001 DG4016 partition 2 4.00 MiB
[ 1.574191] mmcblk0rpmb: mmc0:0001 DG4016 partition 3 4.00 MiB
[ 1.610760] mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17 p18 p19 p20 p21 p22 p23 p24 p25 p26 p27 p28 p29 p30 p31 p32 p33
[ 1.699926] mmc1: hw tuning done ...
[ 1.701948] mmc1: new ultra high speed SDR104 SDIO card at address 0001
[ 1.713921] mmcblk mmc0:0001: Card claimed for testing.
[ 1.759993] Root device found: mmcblk0p1
[ 1.761100] Found dev node: /dev/mmcblk0p1
[ 1.779969] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null)
[ 1.781766] Rootfs mounted over mmcblk0p1
[ 2.174759] EXT4-fs (mmcblk0p1): re-mounted. Opts: (null)
[ 31.817823] vddio-sdmmc1: disabling
[ 132.460966] wlan_sdio mmc1:0001:1: Direct firmware load for /home/user/sduart8987_combo.bin failed with error -2
[ 132.460969] wlan_sdio mmc1:0001:1: Falling back to user helper
[ 132.465147] wlan_sdio: probe of mmc1:0001:1 failed with error -1
It indicate that there is an issue with bin file loading.
Mostly it indicate that there is an issue with SDIO communication between SOM and module.
I am trying to find out driver code related to SDIO communication but I am not getting it.
Please guide me on this issue.
Is there is any document of adapting 88W8987 chip drivers for different platform?
Hi, @Jtac
Thanks for the detailed information.
Please check where you put the FW.
I saw in your dts that mentioned, FW path is:fw_path = "/lib/firmware/nxp/sduart8987_combo.bin";
But when you are loading Wi-Fi driver, FW path is: fw_name=~/sduart8987_combo.bin
Please correct it as below:
Firstly, put FW to /lib/firmware/nxp/sduart8987_combo.bin
Then, load Wi-Fi driver as below:
sudo insmod moal.ko drv_mode=1 cfg80211_wext=0xf cal_data_cfg=none max_vir_bss=1 ps_mode=1 auto_ds=1 host_mime=1 fw_name=nxp/sduart8987_combo.bin
And about the document of adapting 88W8987 chip drivers for Linux, please refer to below link:
Best regards,
Christine.
Hello Christine,
Thanks a lot for suggestion.
I have corrected error and also refer your given link, It help me lot.
I made some dtsi changes in device tree (please check attachment) and when I connect AW-CM358 modules its been detect (connected and reboot system).
user@user-desktop:~$ sudo dmesg | grep mmc1
[sudo] password for user:
[ 0.505702] vddio-sdmmc1: 1800 <--> 3300 mV at 3300 mV
[ 1.485640] mmc1: SDHCI controller on 3440000.sdhci [3440000.sdhci] using ADMA 64-bit with 64 bit addr
[ 1.675121] mmc1: Applying tuning correction
[ 1.675140] mmc1: Tap value after applying correction 156
[ 1.675148] mmc1: hw tuning done ...
[ 1.677387] mmc1: new ultra high speed SDR104 SDIO card at address 0001
[ 31.818644] vddio-sdmmc1: disabling
Also I checked mmc1 device properties,
user@user-desktop:~$ sudo cat /sys/kernel/debug/mmc1/ios
clock: 208000000 Hz
actual clock: 45333334 Hz
vdd: 21 (3.3 ~ 3.4 V)
bus mode: 2 (push-pull)
chip select: 0 (don't care)
power mode: 2 (on)
bus width: 2 (4 bits)
timing spec: 6 (sd uhs SDR104)
signal voltage: 1 (1.80 V)
driver type: 0 (driver type B)
Now I insert compiled mlan.ko and moal.ko kernel object using following commands
user@user-desktop:~/bin_wlan$ sudo modprobe cfg80211
user@user-desktop:~/bin_wlan$ sudo insmod mlan.ko
user@user-desktop:~/bin_wlan$ sudo insmod moal.ko drv_mode=1 cfg80211_wext=0xf cal_data_cfg=none max_vir_bss=1 ps_mode=1 auto_ds=1 fw_name= nxp/sduart8987_combo.bin
After that module WIFI enabled and I can able to observe available networks but I cant able to connect any of that networks.
Its gives an error : mlan0: link is not ready
Please check attached dmesg log.
What might be the issue?
Please guide me on this.
With regards,
Rahul.
Hi, @Jtac
The log: "wlan0: link is not ready" is normal, and can be ignored.
From your given log, I see that "wlan: mlan0 START SCAN" it means mlan0 is working now.
You can also check the WiFi interface status by : "ifconfig -a " and check whether can connect AP with wpa_supplicant when 88W8987 working as a STA.
Verify the Wi-Fi interfaces:
root@imx8mqevk:~# ifconfig -a
Command output example:
eth0 Link encap:Ethernet HWaddr 00:04:9f:06:c5:a5
inet addr:169.254.130.90 Bcast:169.254.255.255
Mask:255.255.0.0
inet6 addr: fe80::204:9fff:fe06:c5a5/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:89 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:30164 (29.4 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:458 errors:0 dropped:0 overruns:0 frame:0
TX packets:458 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:29156 (28.4 KiB) TX bytes:29156 (28.4 KiB)
mlan0 Link encap:Ethernet HWaddr 70:66:55:9b:3a:95
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
p2p0 Link encap:Ethernet HWaddr 72:66:55:9b:3a:95
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
uap0 Link encap:Ethernet HWaddr 70:66:55:9b:3b:95
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Best regards,
Christine.
Hello Christine,
Hi, @Jtac
Great job and congratulations for the successful bring-up of Wi-Fi.
Then, if you want to implement HDMI cable replacement with WIFI network, you will need use the Wi-Fi direct function with p2p0 interface.
Please refer to
Chapter 3.6 Configure and test Wi-Fi direct in Page 25.
And this will be another topic other than the current "88W8987 WIFI+Bluetooth module interface". If follow above user manual there is still issue about Wi-Fi direct, please create a new case to us and close the current one. So that we can better track every case's root case and solution.
Thanks for your understanding.
Have a nice day~
Best regards,
Christine.
Hello Christine,
Thanks a lot for support.
I am closing this case and creating a new case for HDMI cable wireless replacement.