How to enable usdhc2 (mmc1) SDIO in IMX7D for WF200 wifi module

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to enable usdhc2 (mmc1) SDIO in IMX7D for WF200 wifi module

2,410 Views
javerv
Contributor I

Hello,

Good day!

I'm trying to enable SDIO in usdhc2 in imx7d.

I'm currently using Yocto Zeus BSP.

Below is my device tree configuration.

{

wfx_pwrseq: wfx_pwrseq {

compatible = "mmc-pwrseq-simple";

pinctrl-names = "default";

pinctrl-0 = <&wfx_reset>;

reset-gpios = <&gpio5 11 GPIO_ACTIVE_LOW>;

};

}

&usdhc2 {

pinctrl-names = "default", "state_100mhz", "state_200mhz";

pinctrl-0 = <&pinctrl_usdhc2>;

pinctrl-1 = <&pinctrl_usdhc2_100mhz>;

pinctrl-2 = <&pinctrl_usdhc2_200mhz>;

enable-sdio-wakeup;

keep-power-in-suspend;

non-removable;

cd-post;

pm-ignore-notify;

wifi-host;

status = "okay";

mmc-pwrseq = <&wfx_pwrseq>;

#address-size = <1>;

#size = <0>;

// usdhc@1 {

mmc@1 {

compatible = "silabs,wfx-sdio";

reg = <1>;

pinctrl-names = "default";

pinctrl-0 = <&wfx_wakeup>;

wakeup-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;

};

};

wfx_wakeup: wfx_wakeupgrp {

fsl,pins = <

MX7D_PAD_GPIO1_IO09__GPIO1_IO9 0x00000001 //0x1b0b0

>;

};

pinctrl_usdhc2: usdhc2grp {

fsl,pins = <

MX7D_PAD_SD2_CMD__SD2_CMD 0x59

MX7D_PAD_SD2_CLK__SD2_CLK 0x19

MX7D_PAD_SD2_DATA0__SD2_DATA0 0x59

MX7D_PAD_SD2_DATA1__SD2_DATA1 0x59

MX7D_PAD_SD2_DATA2__SD2_DATA2 0x59

MX7D_PAD_SD2_DATA3__SD2_DATA3 0x59

>;

};

I downloaded and compiled the driver as a module as instructed in the link below.

All necessary firmware and pds are also in place.

https://www.silabs.com/community/wireless/wi-fi/knowledge-base.entry.html/2019/01/09/wf200_drivers_a... 

When I boot our board, all I can see pertaining to usdhc2 (mmc1) is the yellow highlighted line below.

Is there any configuration I need to modify to properly enable usdhc2?

root@zzzz:~# dmesg | grep mmc

Kernel command line: console=ttymxc0,115200 root=/dev/mmcblk2p2 rootwait rw

mmc0: SDHCI controller on 30b40000.usdhc [30b40000.usdhc] using ADMA

sdhci-esdhc-imx 30b50000.usdhc: allocated mmc-pwrseq

mmc1: SDHCI controller on 30b50000.usdhc [30b50000.usdhc] using ADMA

mmc2: SDHCI controller on 30b60000.usdhc [30b60000.usdhc] using ADMA

mmc2: mmc_select_hs200 failed, error -74

mmc2: new MMC card at address 0001

mmcblk2: mmc2:0001 008GB0 7.28 GiB

mmcblk2boot0: mmc2:0001 008GB0 partition 1 4.00 MiB

mmcblk2boot1: mmc2:0001 008GB0 partition 2 4.00 MiB

mmcblk2rpmb: mmc2:0001 008GB0 partition 3 4.00 MiB

mmcblk2: p1 p2

EXT4-fs (mmcblk2p2): couldn't mount as ext3 due to feature incompatibilities

EXT4-fs (mmcblk2p2): mounted filesystem with ordered data mode. Opts: (null)

EXT4-fs (mmcblk2p2): re-mounted. Opts: data=ordered

When I load the wfx module all I can see is the 2 lines below.

No indication that the driver is properly loaded/called.

root@zzzz:~# modprobe wfx

wfx: module is from the staging directory, the quality is unknown, you have bee.

wfx: Silicon Labs WFX_2.3.5

Hope someone can check.

Thanks,

Javer

Labels (2)
0 Kudos
4 Replies

2,324 Views
jamesbone
NXP TechSupport
NXP TechSupport

I don´t see any error in the DTB, I recommend you that you check in your schematics, if any pin of the SDIO it is being used by another peripheral, some cases show errors in the LCD.

0 Kudos

2,324 Views
javerv
Contributor I

I inspected the dtb and the dtsi and I can confirm that the SDIO pin for usdh2 was not used by any peripherals.

Is there any particular code we can check to see if the SDIO is properly initialized.

Based on the app notes of WF200 (wifi we are trying to integrate) we need to see below lines before loading the wf200 driver.

Is there anything we can check to initialize the below line?

mmcX new high speed SDIO card at address 0001

Snippet from app note:

pastedImage_1.png

0 Kudos

1,931 Views
malj
Contributor I

Hello,

 

Did you manage to solve this issues? I have the same problem. SD-card is working though.

0 Kudos

2,324 Views
jamesbone
NXP TechSupport
NXP TechSupport

You can try using an SDCARD, just to test, that the SDIO driver it is working correctly. And then we can move into the WLAN driver.  Or you can measure with an oscilloscope to see if there is activity in the port at least in the clock when send the first commands .

0 Kudos