Hi All
Our custom product is refer to i.MX6Q SABRE and we are porting wifi module to Android 5.1 which use 3.14.52 kernel.
We just encounter a problem: our wifi module is ap6335 which is soldered into the board, Theoretically,there is no need to handle card detect / write protect on this port.
but ,without cd_gpio and wp_gpio configuration in dts file, we just can't load this wifi's driver:
======== bcm_wlan_set_plat_data ========
GPIO(WL_HOST_WAKE) = GPIO_4_25
host_oob_irq: 281
host_oob_irq_flags=4
dhd_wifi_platform_load: Enter
Power-up adapter 'DHD generic adapter'
wifi_platform_set_power = 1
wifi_platform_bus_enumerate device present 1
======== Card detection to detect SDIO card! ========
failed to power up DHD generic adapter, 3 retry left
wifi_platform_set_power = 0
wifi_platform_bus_enumerate device present 0
======== Card detection to remove SDIO card! ========
wifi_platform_set_power = 1
wifi_platform_bus_enumerate device present 1
======== Card detection to detect SDIO card! ========
failed to power up DHD generic adapter, 2 retry left
wifi_platform_set_power = 0
wifi_platform_bus_enumerate device present 0
======== Card detection to remove SDIO card! ========
wifi_platform_set_power = 1
wifi_platform_bus_enumerate device present 1
======== Card detection to detect SDIO card! ========
failed to power up DHD generic adapter, 1 retry left
wifi_platform_set_power = 0
wifi_platform_bus_enumerate device present 0
======== Card detection to remove SDIO card! ========
wifi_platform_set_power = 1
We have ported this wifi module on Android 4.4.2 before ,which use 3.0.35 kernel ,the solution to this problem was to make cd_gpio = -EINVAL, like this:
/*connect to wifi module*/
static const struct esdhc_platform_data mx6q_sabresd_sd2_data __initconst = {
.cd_gpio = -EINVAL,
.wp_gpio = -EINVAL,
.keep_power_at_suspend = 1,
.support_8bit = 0,
.delay_line = 0,
.cd_type = ESDHC_CD_CONTROLLER,
.always_present=1,
.runtime_pm = 1,
};
....
static void __init mx6_sabresd_board_init(void)
{
....
imx6q_add_sdhci_usdhc_imx(1, &mx6q_sabresd_sd2_data);
...
}
now, in android 5.1, we try to configure dts file like this in 3.14.52 kernel:
&usdhc2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usdhc2>;
bus-width = <4>;
//cd-gpios = <&gpio5 16 0>;
//wp-gpios = <&gpio5 13 0>;
no-1-8-v;
non-removable;
wifi-host;
pm-ignore-notify;
keep-power-in-suspend;
//enable-sdio-wakeup;
status = "okay";
};
but they don't seem to help.
our question is : how can we configure these two gpios (without using cd_gpio and wp_gpio) in 3.14.52 kernel to solve our wifi driver load problem?
Hi li
i.MX6Q Sabre board uses emmc on SD4 as non-removable media, imx6qdl-sabresd.dtsi
linux-2.6-imx.git - Freescale i.MX Linux Tree
In general one can debug drivers/mmc/host//sdhci-esdhc-imx.c,
please also check attached Linux Manual Chapter 47 Wi-Fi BCM4339 Driver,
Chapter 33 MMC/SD/SDIO Host Driver
http://wireless.murata.com/datasheet?/RFM/data/murata_quick_start_guide_linux.pdf
http://wireless.murata.com/datasheet?/RFM/data/murata_quick_start_guide_android.pdf
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------