WIFI module interface with Nano

Hello,
I was working on Azurewave CM358 WIFI bluetooth module. It consist of NXP chip 88W8987.
I am trying to Interface it with Nano on my custom carrier board.
I already successfully interface with this module with TX2 NX.
Following is the configuration in dtsi,

sdhci@3440000 {
status = “okay”;
nvidia,ddr-tap-delay = <0xb>;
nvidia,en-periodic-calib;
cap-mmc-highspeed;
compatible = “nvidia,tegra186-sdhci”;
cap-sd-highspeed;
mmc-ocr-mask = <0x0>;
uhs-mask = <0x60>;
disable-wp;
mmc-ddr-1_8v;
mmc-hs200-1_8v;
only-1-8-v;
nvidia,is-sdio;
nvidia,disable-rtpm;
vmmc-supply = <&spmic_sd3>;
bus_width = <0x04>;
non-removable;
force-non-removable-rescan;
max-clk-limit = <50000000>;
/delete-property/ ddr-clk-limit;
/delete-property/ iommus;
};
cm358: cm358_wlan {
compatible = “marvell,sd8987”;
reg=<1>;
fw_path = “/lib/firmware/nxp/sduart8987.bin”;
sdhci-host = <&sdmmc3>;
pwr-retry-cnt = <3>;
status = “okay”;
};

 And I got following results on ios 

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 same thing I was trying with Nano but its not working.
I added few more parameter but still its not working

sdhci@700b0400{

	status = "okay";
	nvidia,ddr-tap-delay = <0xb>;
	nvidia,en-periodic-calib;
	cap-mmc-highspeed;
	compatible = "nvidia,tegra210-sdhci";
	fixed-clock-freq = <25500000 25500000 24000000 47000000 24000000 47000000 94000000 200000000 0 0 0>;
	nvidia,vqmmc-always-on; 
	nvidia,vmmc-always-on;
	cd-inverted;
	wp-inverted;
	built-in;
	wp-inverted;
	built-in;
	cap-sd-highspeed;
	mmc-ocr-mask = <0x0>;
	uhs-mask = <0x60>;
	disable-wp;
	mmc-ddr-1_8v;
	mmc-hs200-1_8v;
	only-1-8-v;
	nvidia,is-sdio;
	nvidia,disable-rtpm;
	sd-uhs-sdr104;
	sd-uhs-sdr50;
	sd-uhs-sdr25;
	sd-uhs-sdr12;
	bus_width = <0x04>;
	non-removable;
	force-non-removable-rescan; 
	max-clk-limit = <50000000>;
	/delete-property/ ddr-clk-limit;	
};



cm358: cm358_wlan {
	compatible = "marvell,sd8987";
	reg=<1>;
	fw_path = "/lib/firmware/nxp/sduart8987.bin";
	sdhci-host = <&sdmmc3>;
	pwr-retry-cnt = <3>;
	status = "okay";
	};

But I got following result

user@user-desktop:~$ sudo dmesg | grep sdhci
[sudo] password for user:
[ 0.000000] Kernel command line: tegraid=21.1.2.0.0 ddr_die=4096M@2048M section=512M memtype=0 vpr_resize usb_port_owner_info=0 lane_owner_info=0 emc_max_dvfs=0 touch_id=0@63 video=tegrafb no_console_suspend=1 console=ttyS0,115200n8 debug_uartport=lsport,4 earlyprintk=uart8250-32bit,0x70006000 maxcpus=4 usbcore.old_scheme_first=1 lp0_vec=0x1000@0xff780000 core_edp_mv=1075 core_edp_ma=4000 gpt tegra_fbmem=0x3a0000@0x92cb4000 is_hdmi_initialised=1 earlycon=uart8250,mmio32,0x70006000 root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 sdhci_tegra.en_boot_part_access=1 root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 sdhci_tegra.en_boot_part_access=1
[ 0.532657] iommu: Adding device sdhci-tegra.3 to group 31
[ 0.532721] platform sdhci-tegra.3: domain=ffffffc0f956ee58 allocates as[0]=ffffffc0f9430520
[ 0.533189] iommu: Adding device sdhci-tegra.2 to group 32
[ 0.533307] platform sdhci-tegra.2: domain=ffffffc0f95790d8 allocates as[0]=ffffffc0f9430588
[ 3.909647] sdhci: Secure Digital Host Controller Interface driver
[ 3.909648] sdhci: Copyright(c) Pierre Ossman
[ 3.909650] sdhci-pltfm: SDHCI platform and OF driver helper
[ 3.910000] sdhci-tegra sdhci-tegra.3: Client registration for eMC Successful
[ 3.914581] sdhci-tegra sdhci-tegra.2: runtime pm disabled
[ 3.914866] sdhci-tegra sdhci-tegra.2: Client registration for eMC Successful
[ 3.955309] mmc0: SDHCI controller on sdhci-tegra.3 [sdhci-tegra.3] using ADMA 64-bit with 64 bit addr
[ 3.963292] mmc1: SDHCI controller on sdhci-tegra.2 [sdhci-tegra.2] using ADMA 64-bit with 64 bit addr

user@user-desktop:~$ sudo dmesg | grep mmc1
[ 0.642438] tegra210_dvfs: no clock found for sdmmc1_ddr
[ 3.963292] mmc1: SDHCI controller on sdhci-tegra.2 [sdhci-tegra.2] using ADMA 64-bit with 64 bit addr

user@user-desktop:~$ sudo cat /sys/kernel/debug/mmc1/ios
clock: 0 Hz
actual clock: 99221 Hz
vdd: 0 (invalid)
bus mode: 2 (push-pull)
chip select: 0 (don’t care)
power mode: 0 (off)
bus width: 0 (1 bits)
timing spec: 0 (legacy)
signal voltage: 1 (1.80 V)
driver type: 0 (driver type B)
user@user-desktop:~$

As such from debug it looks like its not getting sdmmc1_ddr clock and because of that its failing.

Please guide me on this issue.

Hello,

Today I checked the Nano SDIO port functionality.
I can able to interface with SD card.
But still I am not able to detect WIFI module with port.
Please guide me on this.

Hello,
Any update on the query.

Hello,

Any update on the query.

The phandles are probably different. You need to compare the device trees for TX2 NX and Nano to get the right values for each node.

Hello,
Thanks a lot for reply.
I will check phandle for both the cases.
There is one more thing I observed that when I was interfacing WIFI module with TX2NX I am getting continueous clock of approx. 45MHz.

But with Nano I am getting discontinuous clock

I m missing something in clock setting?

Sorry I don’t know. Did you try changing the phandles?

Hello,

Thanks a lot reply.

I tried to search something on phandle.
But I cant find any reference on this. Still I am searching on that.
One more thing I want mention here that with same device tree changes  I can successfully communicate with
SD card this time this phandles configuration work properly.
One thing I want ask here that shall we need to use interrupt pins?
Because in this connection I never used any card detect pin.
 Is it compulsory that we need to configure detect pin for wifi module?

Try setting uhs-mask = <0x8>

Hello All,

Sorry for delayed reply.

Actually I was experimenting different configuration of uhs-mask and other parameters.
I kept value uhs-mask=0x08 but still I cant able to detect WIFI module.
But one thing I found  that when I tried multiple time ios command some time I got tuned frequency.
Please check below attachment.
 I am trying few more configuration,If you have any suggestion please let me know.

nano_uhs_mask_0x8.txt (3.1 KB)

try bus-width = <0x4>
or uhs-mask = <0x10> for SDR104

Hello,

Sorry for delayed reply.

I was trying different combination of different parameter related to sdmmc3.
Actually I got following link from Nvidia forum

I tried to get more debug log so I add mmc_debug in kconfig.
I tried few combination with reference to above link but still I am getting same clock as shown above.
I did following dtsi changes.

sdmmc3: sdhci@700b0400{
status = “okay”;
id = <0>;
nvidia,is-sdio;
nvidia,runtime-pm-type = <0x00>;
max-clk-limit = <208000000>;
uhs-mask = <0x10>;
only-1-8-v;
nvidia,disable-rtpm;
force-non-removable-rescan;
vqmmc-supply = <&max77620_ldo6>;
vmmc-supply = <&p3448_vdd_3v3_sys>;
nvidia,vqmmc-always-on;
nvidia,vmmc-always-on;
built-in;
wakeup-source;
cap-sdio-irq;

cm358: cm358_wlan {
	compatible = "marvell,sd8987";
	reg=<1>;
	fw_path = "/lib/firmware/nxp/sduart8987.bin";
	sdhci-host = <&sdmmc3>;
	pwr-retry-cnt = <3>;
	status = "okay";
	};
};

I have attached dts file and dmesg log.
dmesg1608.txt (49.2 KB)
dtc1608.dts (319.6 KB)

Here I had two queries

  1. Do we need to give some interrupt to Nano SOM for module to get detected?
  2. Do we need to do some pinmuxing in Nano SOM for interfacing with module?
    Please guide me on this.
    Please

Really I am not the one to be asking. I am just curious.

Is this what you’re using? SOP (azurewave.com)

StreamUnlimited/marvell-sd-uapsta-8987: GPL marvell drivers for 88W8987 (github.com)

You should configure gpio for sdmmc_vdd_en and sdmmc_cd like in the design guide. I think other people have managed to get a card working without them though. You can search the forum for sd card bring u.

Maybe sharing your schematic would help. Also take a look at the TX1 device tree for reference. I have no idea what a lot of those changes you made are for. Did you have to recompile Nano kernel? How did figure out the values for TX2?

Hello,

Thanks a lot for reply.

Yes, its same chip module 88W8987 based Azurewave module I am using in my on going project.
I made customized board of this module which can be pluged to our carrier board.
Please check attached schematic for reference.

SOMCONNECTION.doc (200 KB)
INTERFACE.pdf (372.7 KB)
WIFI_BLE.pdf (364.4 KB)

As such same module with same carrier board works fine with TX2 NX.
In TX2-NX interface I have never used any interrupt but still it get detected.
But in Nano same configuration is not working.

Currently I try to figure out that at least module should get detected by Nano. Even in same configuration SD card get detected and interfaced properly in Nano.

Here I have one query that, Is sdmmc driver code for Nano and TX2-NX is same?
Where I should find this in source?
Please guide me on this.

The Nano is more similar to TX1 so maybe check out the device tree for that since it already has wifi built in.

Hello,

I checked final dtb once again.
There I have found something in final dtb where no sdio flag get set.
I removed that property and now WIFI works on Nano.

Thanks a lot for support.

Now same WIFI module I am trying to interface with Jetson Xavier NX SOM.
I will update you once I get some output.

Thanks

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.