Marvell WIFI SDIO Device does not respond

Hi all,

I’m currently working on integrating my H&D wireless Module into my System. After Installing the Driver and rebooting i get the following error message with dmesg:

[   22.232774] mmc2: Timeout waiting for hardware cmd interrupt.
[   22.238540] sdhci: =========== REGISTER DUMP (mmc2)===========
[   22.244378] sdhci: Sys addr: 0x00000000 | Version:  0x00000002
[   22.250214] sdhci: Blk size: 0x00000000 | Blk cnt:  0x00000001
[   22.256050] sdhci: Argument: 0x80000c08 | Trn mode: 0x00000000
[   22.261884] sdhci: Present:  0x01f88009 | Host ctl: 0x00000001
[   22.267717] sdhci: Power:    0x00000000 | Blk gap:  0x00000080
[   22.273552] sdhci: Wake-up:  0x00000008 | Clock:    0x000010ff
[   22.279385] sdhci: Timeout:  0x00000080 | Int stat: 0x00000000
[   22.285219] sdhci: Int enab: 0x007f1003 | Sig enab: 0x007f1003
[   22.291053] sdhci: AC12 err: 0x00000000 | Slot int: 0x00000103
[   22.296888] sdhci: Caps:     0x07eb0000 | Caps_1:   0x0000a007
[   22.302722] sdhci: Cmd:      0x0000341a | Max curr: 0x00ffffff
[   22.308555] sdhci: Host ctl2: 0x00000000
[   22.312480] sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0x00000000
[   22.318313] sdhci: ===========================================

i figured that it probably has something to do with the device tree configuration, so i added:

/* WLAN */
&usdhc2 {
        label = "WLAN";
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_usdhc2>;
        non-removable;
        bus-width = <4>;
        no-1-8-v;
	pm-ignore-notify;
        status = "okay";        
     
};

and

 usdhc2 {
                pinctrl_mmc2_cd: gpio_mmc2_cd {
                        fsl,pins = <
                            MX6QDL_PAD_GPIO_4__SD2_CD_B    PAD_CTRL_NO  /* MMC2 CD */
                        >;
                };
		pinctrl_usdhc2: wifigrp {
			fsl,pins = <
				MX6QDL_PAD_SD2_CMD__SD2_CMD    0x17071
				MX6QDL_PAD_SD2_CLK__SD2_CLK    0x10071
				MX6QDL_PAD_SD2_DAT0__SD2_DATA0 0x17071
				MX6QDL_PAD_SD2_DAT1__SD2_DATA1 0x17071
				MX6QDL_PAD_SD2_DAT2__SD2_DATA2 0x17071
				MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x17071
			>;
		};
	};

to the imx6qdl-colibri.dtsi and loaded it into the kernel but it didn’t change the outcome. I’m very inexperienced when it comes to Device tree files so the issue might lie within those files.

Does someone know how to fix this?

(related Question: Marvell WIFI driver cannot be loaded into Kernel - Toradex Community)

Best regards

Michael

Hi @MichaelS

Could you provide the Software of your module?
Which carrier board are you using?

What changes have you done to the Software (kernel, devicetree, …) ? Could you provide the complete dmesg log in a file?

Best regards,
Jaski

hi @jaski.tx,

I’m using Module Driver provided by H&D wireless and build via virtual kernel in yocto (see related question).
The carrier Board is custom made by our Client, therefore the complete devicetree and kernel is customly configured. Do you require any specific information apart from the information i mentioned above? i attached the complete dmesg starting from boot to the comment.

Thank you very much in advance!

Best regards,

Michael

dmesg

Thanks for the files. Could you provide the datasheet of H&D wireless chip and the schematic of the connection to Colibri_iMX6?

Could you provide the kernelconfig (.config) and devicetree information regarding the usdhc2?

Thanks and best regards,
Jaski

hi @jaski.tx

here are the schematics, all configured devicetree files and the kernelconfig

best regards
Michael

hi @MichaelS

Sorry for the delayed response.
Thanks for the files. The schematic, kernelconfig and devicetree seem to be correct.

What is output of lsmod?

Hi @jaski.tx,

no problem, here is the lsmod output:

Module                  Size  Used by
bluetooth             304209  2
compat                 14894  1 bluetooth
usb_f_rndis            11166  2
u_ether                 8661  1 usb_f_rndis
mxc_v4l2_capture       25492  0
ipu_bg_overlay_sdc      5297  1 mxc_v4l2_capture
ipu_still               1763  1 mxc_v4l2_capture
ipu_prp_enc             5763  1 mxc_v4l2_capture
ipu_csi_enc             3417  1 mxc_v4l2_capture
ipu_fg_overlay_sdc      5936  1 mxc_v4l2_capture
adv7280_tvin           10388  0
v4l2_int_device         1883  2 adv7280_tvin,mxc_v4l2_capture
sd8xxx                413418  0
mlan                  396915  1 sd8xxx
cfg80211              201085  1 sd8xxx
libcomposite           34073  10 usb_f_rndis
configfs               23662  3 usb_f_rndis,libcomposite
galcore               331780  0

Thanks. Could you flash a regular Bsp 2.8b5 release without any changes and check what is the output there?
Please share the dmesg log for this too.

Hi @jaski.tx,
sorry for the late response, i was really busy.
I can’t flash another image onto the device that easily, but i found out that there’s something off with my SD2 clock.

the amplitude switches between 3.3V and 2.5V instead of 3.3V and GND. I tried 3 different carrier Boards, but got the same outcome every time.

hi @MichaelS

Could you share your devicetree and the schematic of the SD Interface?
Thanks.

hi @jaski.tx,
i already shared those files, please have a look at the comments above.

Hi @jaski.tx,

that solved the issue, WLAN works now!

Thank you very much.

kind regards

Michael Schuberth

Perfect that it works. Thanks for the feedback.

hi @MichaelS

Yes, you are right.

Actually according to Figure 4 on the Page 21 of the datasheet of Colibri iMX6, you need to drive the Pin MX6QDL_PAD_RGMII_TD3__GPIO6_IO23 to high using sysfs.

Best regards,
Jaski