bcmdhd wifi driver not working on imx6solo hw [linux:3.10.17]

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

bcmdhd wifi driver not working on imx6solo hw [linux:3.10.17]

12,272 Views
anilhani
Contributor II

Hello,

Environment: Linux:3.10.17, imx6solo processor host

I trying to bring WiFi module BCM89335 (similar to bcm 4335) on imx6solo platform.

The wifi module is connected to sd2/mmc2 controller.

The bcm reset(wlreg_on) line is connected to gpio1_30 and bcm driver uses the in-band interrupts.

The below changes are in dts file and added mmc rescan patch in mmc host driver.

In dts file:

&usdhc2 {

        pinctrl-names = "default";

        pinctrl-0 = <&pinctrl_usdhc2_2>;

        non-removable;

        no-1-8-v;

        keep-clock;

        keep-power-in-suspend;

        status = "okay";

};

  wlreg_on: fixedregulator@2 {
            compatible = "regulator-fixed";
            regulator-name = "wlreg_on";
            gpio = <&gpio1 30 0>;
            startup-delay-us = <600000>;
            enable-active-high;
   };
  /* Added a dummy gpio pin as gpio6_28 to keep bcmdhd driver happy */
   bcmdhd_wlan_0: bcmdhd_wlan@0 {
           compatible = "android,bcmdhd_wlan";
           gpios = <&gpio6 28 0>;
           wlreg_on-supply = <&wlreg_on>;
   };

             /* To configure the gpio1_30 */

   &iomuxc {
   pinctrl-names = "default";
   pinctrl-0 = <&pinctrl_hog_1>;
   hog {
           pinctrl_hog_1: hoggrp-1 {
                   fsl,pins = <
  ...
  MX6QDL_PAD_ENET_TXD0__GPIO1_IO30 0x80000000

When I try to insert the bcmdhd driver, it fails to load.

The bcmdhd driver will enable the reset line(wlreg_on regulator) while driver loading.

The two options tried while loading the wifi driver and collected the logs.

Case 1:  'enable-active-high' set in wlreg_on regulator node in dts;

Here the gpio1_30 line default state is low(0v) on target power up.

The case1_dmesg logs shows the bcm chip power reset fails.

I confirmed that the reset(gpio1_30) line set to 3.3v while driver loading.

case 2: no 'enable-active-high' defined in wlreg_on regulator node in dts

IThe gpio1_30 line default state is high(3.3v) on target power up.

The case2_dmesg logs shows the bcm driver fails due bcmsdh_sdmmc probe failed.

In either case the wifi driver fails to load and logs are attached(sdhc2 shown as mmc0 node).

Let me know before the bcm driver loading first time, the reset(wlreg_on) line state should be set to high or low?

Please suggest if you have any additional pointers or any reasons for this failure.

Original Attachment has been moved to: Logs_nPatch.zip

Labels (3)
Tags (3)
13 Replies

3,915 Views
anilhani
Contributor II

Now we are migrating to kernel-4.1.15. A few issues are found while loading the bcmdhd driver on kernel-4.1.15. A new bcmdhd drop is received for 4.1 kernel but fails to load.  As per custom hw, we gpio1_30 is connected to WLAN_PD and gpio5_26 connected to WLAN_HOST_WAKE, which is used for interrupt source. In way, we use an OOB interrupt mode.

I could see see the chip gets power up, driver detects the bcmdhd chip and loads the FW file. But fails to get an ioctl response from FW. PFA dmesg logs. What could be the reason for the driver load failure.

Hardware : Freescale i.MX6 Quad/DualLite (Device Tree)

OS: Linux kernel- 4.1.15

Chipset: BCM89335

IMX6QDL: DTS Modifications:

/ {

       regulators {

               wlreg_on: fixedregulator@100 {

                        compatible = "regulator-fixed";

                        regulator-name = "wlreg_on";

                        gpio = <&gpio1 30 0>;

                        startup-delay-us = <100>;

                        enable-active-high;

                };

       };

       bcmdhd_wlan_0: bcmdhd_wlan@0 {

                compatible = "android,bcmdhd_wlan";

                interrupt-parent = <&gpio5>;

                interrupts = <26 0>;

                gpios = <&gpio5 26 0>;

                wlreg_on-supply = <&wlreg_on>;

       };

};

&iomuxc {

                  pinctrl_hog_1: hoggrp-1 {

                        fsl,pins = <

                             MX6QDL_PAD_ENET_TXD0__GPIO1_IO30   0x80000000

                             MX6QDL_PAD_CSI0_DAT8__GPIO5_IO26     0x80000000

                             ..

                        >;

                };

} ;

IMX6QDL: DTSI Modifications:

&usdhc2 {

        pinctrl-names = "default";

        pinctrl-0 = <&pinctrl_usdhc2>;

        bus-width = <4>;

        non-removable;

        no-1-8-v;

        cd-post;

        pm-ignore-notify;

        wifi-host;

        status = "okay";

};

&iomuxc {

                pinctrl_usdhc2: usdhc2grp {

                        fsl,pins = <

                                MX6QDL_PAD_SD2_CMD__SD2_CMD             0x17059

                                MX6QDL_PAD_SD2_CLK__SD2_CLK               0x10059

                                MX6QDL_PAD_SD2_DAT0__SD2_DATA0          0x17059

                                MX6QDL_PAD_SD2_DAT1__SD2_DATA1          0x17059

                                MX6QDL_PAD_SD2_DAT2__SD2_DATA2          0x17059

                                MX6QDL_PAD_SD2_DAT3__SD2_DATA3          0x17059

                        >;

                };

};  

In kernel defconfig:

CONFIG_BCMDHD=m

CONFIG_BCMDHD_SDIO=y

CONFIG_BCM4339=y

dmesg:

[   65.383345] dhdcdc_cmplt: Enter

[   65.386512] dhd_bus_rxctl: Enter

[   65.449751] dhdsdio_clk_devsleep_iovar: clk before sleep: 0xc2

[   65.455756] dhd_os_wd_timer: Enter

[   70.389636] dhd_bus_rxctl: resumed on timeout, INT status=0x208000C0

[   70.396059] dhdsdio_checkdied: Enter

[   70.400603] dhd_bus_rxctl: rxcnt_timeout=1, rxlen=0

[   70.405564] dhd_wl_ioctl: 'resumed on timeout' error is occurred before the interface does not bring up

[   70.415049] dhdsdio_probe: dhd_bus_start failed

[   70.419605] dhdsdio_release: Enter

[   70.423062] dhd_detach: Enter state 0x2ee

[   70.427116] dhd_bus_detach: Enter

[   70.430490] dhd_wlfc_deinit():3256, Already disabled!

3,914 Views
joealtmaier
Contributor I

I too am having the identical problem - the radio comes up on a cold start, but turning it off and on (unloading and reloading) and it discovers the sdio device, loads the firmware reads it back, but never gets any data - the radio is stillborn. Is this some strapping issue? Does this device need power supply to be cycled to restart properly?

0 Kudos

3,915 Views
minluo
Contributor I

hello

Anilkumar Hanimanale

 

i have same problem with u,do u solved this issue ?

this my debug log:

pastedImage_5.png

0 Kudos

3,915 Views
anilhani
Contributor II

Hello All,

On kernel-3.14, this issue get resolved by using a workaround method, using power up 'wlan_reg' from the dts file and commented the wlan_reg access from bcmdhd driver. Due to this wlan_reg set to high on power up and bcmdhd driver loads once correctly but unload and reload driver will not work with this.

0 Kudos

3,915 Views
igorpadykov
NXP Employee
NXP Employee

Hi Anilkumar

for WiFi BCM modules drivers and additional support one can look at

Wi-Fi Bluetooth for Freescale i.MX | RF Modules | Wireless Products | Murata Manufacturing

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

3,915 Views
anilhani
Contributor II

Hello Igor,

Thanks for this forum information.

I could not able to login using my currently registered mail id(anilkumar.hanimanale@xxxxxx.com) used in this imx6solo forum.

My question is mainly to imx6 community, so I sent my mail to imxfaq@murata.com​.

When I try to access the below link, it denied access to me.

https://community.freescale.com/groups/murata-imx

The link shows as "Unauthorized" with the below message.

'Access to this place or content is restricted. If you think this is a mistake, please contact your administrator or the person who directed you here.'

My question is related to MMC subsystem and regulators used in imx6 kernel.

Can I get the support in this current forum as well?

Regards,

Anil

0 Kudos

3,915 Views
scottkerr
Contributor V

hi Anil,

I can grant you access today to the imx-murata group.  We are supporting 3.14.38 currently.  However I originally tested on 3.10 kernel so very few mods will be necessary to backport some bcmdhd driver source to 3.10.17.  What module are you working with? Also is that target MPU i.MX 6SoloLite?

Thanks,

Scott

0 Kudos

3,915 Views
anilhani
Contributor II

Hello Scott,

Thanks for information and invitation.

At our HW,

CPU: imx6solo

Module: WiFi module over sdio bus (bcm89335)

Currently I am migrating from 3.10 to 3.14 Linux kernel.

I mean directly the bring up will be done on 3.14 Kernel and again changes need to be done dts/dtsi file.

I don't what other changes are required. Please add your suggestion.

0 Kudos

3,915 Views
igorpadykov
NXP Employee
NXP Employee

Hi Anilkumar

for obtaining access to this "Unauthorized" link you can try to ask your local fae.

For WiFi BCM modules drivers and additional support one can look at below link,

it shows procedure for requesting support

Wi-Fi Bluetooth for Freescale i.MX | RF Modules | Wireless Products | Murata Manufacturing

Best regards

igor

0 Kudos

3,915 Views
westbrook
Contributor III

Hi Anikumar,

   I am now using BCM89335 module on Renesas platform, Linux 3.10.31, I got broadcom driver for BCM4354. I have not proceed to your steps, now I am trying to use this driver source code. I want to know, how did you use your BCM89335 driver source code, did you use compat-wireless(backports), or you use your kernel(linux 3.10.17)?

    Thank you in advance!

0 Kudos

3,915 Views
anilhani
Contributor II

I think its common source for bcm4339 and bcm4354 chip, at least these two bcm chips are defined in makefile. I heard that the bcm89335 is same as bcm4339, so I defined 4339 in bcm driver Makefile.

The BCM89335 driver source(common driver source) build as a external module and update the kernel path in Makefile. I use the kernel 3.10.17 and could not see the compat-wireless enabled in kernel config. Additional info: bcm driver uses the inband interrupt, so the oob interrupt as a dummy gpio line(

gpio6_28) is used.

Could you able to bring up the bcm89335 driver on Renesas platform?

What is the initial state of wlreg reset line connected to bcm chip before the driver loads?

Anyone has tried to bring up the bcm driver on imx6 platform, please add your suggestion.

3,915 Views
anilhani
Contributor II

In the attachement, a mmc rescan related patch is used in mmc host driver and bcmdhd driver.

0 Kudos

3,915 Views
wangyilong
Contributor III

Hi, Anikumar

Have u solved this issue?

I am porting bcm89335 too and met the similar question with u.

Hope to get ur reply soon, Tks!

PS.ur error code is -110, which is SDIO bus error. How u modify it,plz?

0 Kudos