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,
status = "okay";
mmc-ocr-mask = <0x3>;
uhs-mask = <0x60>;
disable-wp;
sd-uhs-sdr104;
sd-uhs-sdr50;
sd-uhs-sdr25;
sd-uhs-sdr12;
mmc-ddr-1_8v;
mmc-hs200-1_8v;
vmmc-supply = <&spmic_sd3>;
non-removable;
force-non-removable-rescan;
max-clk-limit = <200000000>;
nvidia,is-sdio;
nvidia,no-mmc;
nvidia,vmmc-always-on;
cap-mmc-highspeed;
cap-sd-highspeed;
only-1-8-v;
nvidia,disable-rtpm;
cm358: cm358_wlan {
compatible = "marvell,sd8987";
reg=<1>;
fw_path = "/lib/firmware/nxp/sduart8987_combo.bin";
sdhci-host = <&sdmmc3>;
pwr-retry-cnt = <3>;
bus-width=<4>;
status = "okay";
};};};
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?