Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wilc_sdio_cmd52..failed, err(-84) #107

Open
hberg539 opened this issue Sep 30, 2020 · 0 comments
Open

wilc_sdio_cmd52..failed, err(-84) #107

hberg539 opened this issue Sep 30, 2020 · 0 comments

Comments

@hberg539
Copy link

hberg539 commented Sep 30, 2020

Hello,

i'm having issues including the wilc driver for our WILC 1000 chip over SDIO. The SDIO detection seems to work fine, the driver can be loaded and the device shows up. But when trying to enable the device (ip link set dev wlan0 up), there seems to be a communication issue.

Driver version: 20ab626 (git master branch)
CPU: STM32MP1

The device tree:

&sdmmc3 {
        status = "okay";
        pinctrl-names = "default", "opendrain", "sleep";
        pinctrl-0 = <&sdmmc3_pins_mx>;
        pinctrl-1 = <&sdmmc3_opendrain_pins_mx>;
        pinctrl-2 = <&sdmmc3_sleep_pins_mx>;
        non-removable;
        no-sd;
        st,neg-edge;
        bus-width = <4>;
        vmmc-supply = <&v3v3>;
        vqmmc-supply = <&v3v3>;
        max-frequency = <1000000>;

        wilc_sdio0: wilc_sdio@0 {
                compatible = "microchip,wilc1000", "microchip,wilc3000";
                irq-gpios = <&gpioh 7 0>;
                reset-gpios = <&gpioh 6 0>;
                chip_en-gpios = <&gpiob 1 0>;
                status = "okay";
                reg = <0>;
                bus-width = <4>;
        };
};

dmesg log on boot:

[    3.141439] mmc0: new high speed SDIO card at address 0001

Now i load the device driver with modprobe wilc_sdio which seems fine:

[  110.691525] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[  110.723744] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[  110.729148] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[  110.737711] cfg80211: failed to load regulatory.db
[  110.766282] wilc_sdio: module is from the staging directory, the quality is unknown, you have been warned.
[  110.784806] Registering wifi device
[  110.786962] Max scan ids= 10,Max scan IE len= 1000,Signal Type= 1,Interface Modes= 844
[  110.795468] Initializing Locks ...
[  110.816657] wifi_pm : 0
[  110.818643] wilc_sdio mmc0:0001:1: succesfully got gpio_reset
[  110.823556] wilc_sdio mmc0:0001:1: succesfully got gpio_chip_en
[  110.843048] wifi_pm : 1
[  110.844149] wilc_sdio mmc0:0001:1: succesfully got gpio_reset
[  110.859751] wilc_sdio mmc0:0001:1: succesfully got gpio_chip_en
[  110.890856] wilc_sdio mmc0:0001:1: Driver Initializing success

Now i enable the device with ip link set dev wlan0 up:

[  170.706116] wilc_sdio mmc0:0001:1 wlan0: INFO [wilc_mac_open]MAC OPEN[07a597ef] wlan0
[  170.712689] WILC POWER UP
[  170.715139] wilc_sdio mmc0:0001:1 wlan0: INFO [wilc_init_host_int]Host[07a597ef][e5193910]
[  170.723518] wilc_sdio mmc0:0001:1 wlan0: INFO [wilc_mac_open]*** re-init ***
[  170.730620] wilc_sdio mmc0:0001:1 wlan0: INFO [wilc_wlan_init]Initializing WILC_Wlan
[  170.738344] wilc_sdio mmc0:0001:1: SDIO speed: 1000000
[  170.743829] wilc_sdio mmc0:0001:1: wilc_sdio_cmd52..failed, err(-84)
[  170.749953] wilc_sdio mmc0:0001:1: Fail cmd 52, enable csa...
[  170.755589] wilc_sdio mmc0:0001:1 wlan0: ERR [wilc_wlan_initialize:905] Initializing WILC_Wlan FAILED
[  170.764920] wilc_sdio mmc0:0001:1 wlan0: ERR [wilc_mac_open:1029] Failed to initialize wilc

Trace-Log directly after enabling the device:

<idle>-0     [000] d.h2   235.746466: mmc_request_done: mmc0: end struct mmc_request[da9ef1e4]: cmd_opcode=52 cmd_err=-84 cmd_resp=0x0 0x0 0x0 0x0 cmd_retries=0 stop_opcode=0 stop_err=0 stop_resp=0x0 0x0 0x0 0x0 stop_retries=0 sbc_opcode=0 sbc_err=0 sbc_resp=0x0 0x0 0x0 0x0 sbc_retries=0 bytes_xfered=0 data_err=0 tag=0 can_retune=0 doing_retune=0 retune_now=0 need_retune=0 hold_retune=1 retune_period=0
<idle>-0     [000] dnh2   235.746544: mmc_request_done: mmc0: end struct mmc_request[c01d60f2]: cmd_opcode=52 cmd_err=-84 cmd_resp=0x0 0x0 0x0 0x0 cmd_retries=0 stop_opcode=0 stop_err=0 stop_resp=0x0 0x0 0x0 0x0 stop_retries=0 sbc_opcode=0 sbc_err=0 sbc_resp=0x0 0x0 0x0 0x0 sbc_retries=0 bytes_xfered=0 data_err=0 tag=0 can_retune=0 doing_retune=0 retune_now=0 need_retune=0 hold_retune=1 retune_period=0

The CMD line looks like this directly after enabling the device:
grafik
It looks like it does some sending, then floats and waits for an response from the wilc module.

Maybe some one has an idea what could be wrong?

I appreciate any help, thank you.

Best regards,
Kevin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant