Cypress FMAC linux driver release cannot detect BCM43362/Murata-sn8000 power off

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
JoCh_4082611
Level 1
Level 1

We have a custom iMX6DL board with Linux 3.14 using Murata sn8000 module. This board is working fine, but we need to upgrade to the latest Cypress Linux driver because of all the security patches and enhancements.

The compiled FMAC kernel module is working fine in general. However, I notice the new driver cannot release the SDIO interface when the sn8000 module is turned off by the onboard PMIC. With the old driver, I have the following message.

mmc2: card 0001 removed

But not with the new driver. Because the new driver does not release / turn-off  the sdio interface. The driver cannot recognize the sn8000 module when I try to turn on the module again with the PMIC.

It seems like the Wi-Fi module detection algorithm is modified in the new driver. I have spent sometime to investigate in the device tree and the FMAC, mmc/sdio driver code. But cannot fully understand how it works. Can someone help me understand the mechanism and point me to the direction that can allow the driver to detect the power off of the module.

Help is much appreciated.

JC

0 Likes
1 Solution

With the brcmfmac driver in the Linux 3.14.28 version, I get the following message when I turned off the sn8000 module with a PMIC.

mmc2: card 0001 removed

(Please note that the driver has no access to the power/reset pin to the module)

After some digging, I realize the following function in the latest FMAC bcmsdh.c makes the difference.

1034 static void brcmf_sdiod_host_fixup(struct mmc_host *host)

1035 {

1036/ * runtime-pm powers off the device */

1037 pm_runtime_forbid(host->parent);

1038 /* avoid removal detection upon resume */

1039 host->caps |= MMC_CAP_NONREMOVABLE;

1040 }

If I comment out this function in the new FMAC, I can turn off the sn8000 module and I get the message.

mmc2: card 0001 removed

I can also turn on the module successfully afterward,

This function seems to handle suspend / resume scenario and prevent resetting the SDIO host. I cannot fully understand the logic behind this. Anyone can help me understand this part of the code?

Maybe, commenting out this function is the best solution?

Thanks,

View solution in original post

0 Likes
2 Replies
VinayakS_26
Moderator
Moderator
Moderator
100 replies posted 50 replies posted 25 replies posted

Hi,

Which is the version of the fmac that you are getting the message

mmc2: card 0001 removed

Regards,

Vinayak

With the brcmfmac driver in the Linux 3.14.28 version, I get the following message when I turned off the sn8000 module with a PMIC.

mmc2: card 0001 removed

(Please note that the driver has no access to the power/reset pin to the module)

After some digging, I realize the following function in the latest FMAC bcmsdh.c makes the difference.

1034 static void brcmf_sdiod_host_fixup(struct mmc_host *host)

1035 {

1036/ * runtime-pm powers off the device */

1037 pm_runtime_forbid(host->parent);

1038 /* avoid removal detection upon resume */

1039 host->caps |= MMC_CAP_NONREMOVABLE;

1040 }

If I comment out this function in the new FMAC, I can turn off the sn8000 module and I get the message.

mmc2: card 0001 removed

I can also turn on the module successfully afterward,

This function seems to handle suspend / resume scenario and prevent resetting the SDIO host. I cannot fully understand the logic behind this. Anyone can help me understand this part of the code?

Maybe, commenting out this function is the best solution?

Thanks,

0 Likes