Kernel + DeviceTree changes for driving AW-CM276NF from imx7 EMMC

Hi all,

I have an imx7 EMMC and on my carrier board I have the same Wifi module as on the imx6ull AW-CM276NF.

Could somebody please describe the changes that I need to make to the Kernel and Device Tree to get this working? My device is connected to the SDIO interface on pins 190,192,49,51,53,47, I think it should be usdch3 in my device tree. I am using a 1.8V interface.

My device tree settings look like this so far:

  &usdhc1 {
     	status = "okay";  
             pinctrl-names = "default";
             pinctrl-0 = <&pinctrl_usdhc1>;
    	/*clock speed + 1.8v setting*/
    	assigned-clocks = <&clks IMX7D_USDHC1_ROOT_CLK>;
    	assigned-clock-rates = <400000000>;
    	non-removable;
    	cd-post;
    	pm-ignore-notify;
    	wifi-host; /* add hook for SD card detect mechanism for BCMDHD driver */
    	bus-width = <4>;
     };

I have also added a few bits to imx7_defconfig file for the kernel:

I added

CONFIG_NET_VENDOR_MARVELL=y
CONFIG_MWIFIEX=m
CONFIG_MWIFIEX_SDIO=m
CONFIG_CFG80211=m
CONFIG_CFG80211_WEXT=y
CONFIG_MAC80211=m

Can you anybody help me to push in the right direction?

When I run
root@colibri-imx7-emmc:~# cat /sys/kernel/debug/mmc1/ios

I get :

clock:          400000 Hz
actual clock:   383522 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:      0 (1 bits)
timing spec:    0 (legacy)
signal voltage: 0 (3.30 V)
driver type:    0 (driver type B)

BSP is Colibri-iMX7-eMMC_LXDE-Image 2.8b6.184 20190401
Kernel Version Linux colibri-imx7-emmc 4.9.166-dirty

Please update to our latest 2.8.7 maintenance release which integrates Linux Kernel 5.4 based backports greatly improving Wi-Fi performance.

As for the Wi-Fi module integration itself have a look here:

http://git.toradex.com/cgit/linux-toradex.git/tree/arch/arm/boot/dts/imx6ull-colibri-wifi.dtsi?h=toradex_4.9-2.3.x-imx

And to get 1.8 volt SDHCI working on the Colibri iMX7 find the following advice:

http://git.toradex.com/cgit/linux-toradex.git/tree/arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi?h=toradex_4.9-2.3.x-imx#n348

Please do not hesitate to contact us again should you have any further questions or comments. Thanks!

I have tried this today, with the newest Kernel my imx7 would boot fine and I could confirm which Kernel it was using, as soon as I deoplyed the device tree binary, after a reboot it would pause for around 60seconds in the middle, then continue. Here is the dmesg log:

link text

This is the point where it hangs for 60 seconds
[ 2.579092] imx_usb 30b20000.usb: No over current polarity defined
[ 2.591920] ci_hdrc ci_hdrc.0: EHCI Host Controller
[ 2.601027] ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1

uname -a :

root@colibri-imx7-emmc:~# uname -a
Linux colibri-imx7-emmc 5.4.43-21191-g6db84ce-dirty #1 SMP Mon Jul 13 01:13:31 PDT 2020 armv7l GNU/Linux