linux4wilc / driver

DEPRECATED: Updated Linux drivers for the ATWILC1000/ATWILC3000 products are located at https://github.com/linux4microchip/linux/tree/master/drivers/net/wireless/microchip/wilc1000. To simplify development, the legacy Linux4WILC was merged into the Linux4Microchip repo where driver development continues (Please refer latest ATWILC1000/ATWILC 3000 Wi-Fi Link Controller Linux User Guide) Driver code for Microchip ATWILC Wireless Devices (ATWILC1000 & ATWILC3000)
https://www.microchip.com/wwwproducts/en/ATWILC1000
32 stars 19 forks source link

WILC3000 : Failed reset after firmware loaded #118

Open guilig opened 3 years ago

guilig commented 3 years ago

Hello,

We have a custom board based on iMX6 with Wilc3000 link by SPI. Kernel is 5.4

Our devicetree is : &ecspi3 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_ecspi3_wilc>; status = "okay"; num-cs = <1>; cs-gpios = <&gpio4 12 GPIO_ACTIVE_LOW>;

wilc_spi@0 {
    compatible = "microchip,wilc1000", "microchip,wilc3000";
    spi-max-frequency = <24000000>;
    reg = <0>;
    irq-gpios = <&gpio4 24 GPIO_ACTIVE_HIGH>;
    reset-gpios = <&gpio4 22 GPIO_ACTIVE_HIGH>; 
    chip_en-gpios = <&gpio4 23 GPIO_ACTIVE_HIGH>;
    status = "okay";
};

};

After load the firmware on the wilc, the driver shows this error :

[ 48.491056] WILC_SPI spi2.0 wlan0: INFO [wilc_mac_open]MAC OPEN[5a4a6b63] wlan0 [ 48.498406] WILC POWER UP [ 48.507819] WILC_SPI spi2.0 wlan0: INFO [wilc_init_host_int]Host[5a4a6b63][f4a8db24] [ 48.519121] WILC_SPI spi2.0 wlan0: INFO [wilc_mac_open] re-init [ 48.529351] WILC_SPI spi2.0 wlan0: INFO [wilc_wlan_init]Initializing WILC_Wlan [ 48.541399] WILC_SPI spi2.0 wlan0: INFO [init_chip]Bootrom sts = c [ 48.547861] WILC_SPI spi2.0 wlan0: INFO [wilc_wlan_initialize]WILC Initialization done [ 48.560299] WILC_SPI spi2.0 wlan0: INFO [wlan_initialize_threads]Initializing Threads ... [ 48.568518] WILC_SPI spi2.0 wlan0: INFO [wlan_initialize_threads]Creating kthread for transmission [ 48.586411] WILC_SPI spi2.0 wlan0: INFO [wlan_initialize_threads]Creating kthread for Debugging [ 48.599020] WILC_SPI spi2.0: got gpio_irq successfully [ 48.608519] WILC_SPI spi2.0 wlan0: INFO [init_irq]IRQ request succeeded IRQ-NUM= 172 [ 48.619892] WILC_SPI spi2.0 wlan0: INFO [wilc_wlan_get_firmware]Detect chip WILC3000 [ 48.631444] WILC_SPI spi2.0 wlan0: INFO [wilc_wlan_get_firmware]loading firmware mchp/wilc3000_wifi_firmware.bin [ 48.645330] WILC_SPI spi2.0 wlan0: INFO [wilc_wlan_get_firmware]WLAN firmware: mchp/wilc3000_wifi_firmware.bin [ 48.678540] WILC_SPI spi2.0 wlan0: INFO [wilc_firmware_download]Downloading Firmware ... [ 48.686763] wilc_wlan_firmware_downloadDownloading firmware size = 140208 [ 48.857512] wilc_wlan_firmware_download Offset = 120764 [ 48.891428] wilc_wlan_firmware_download Offset = 140208 [ 48.896703] WILC_SPI spi2.0 wlan0: INFO [wilc_firmware_download]Download Succeeded [ 48.908865] WILC_SPI spi2.0 wlan0: INFO [wilc_start_firmware]Starting Firmware ... [ 48.921377] WILC_SPI spi2.0 wlan0: INFO [wilc_start_firmware]Waiting for FW to get ready ... [ 49.020717] WILC_SPI spi2.0: buffer overrun when reading data. [ 49.026591] WILC_SPI spi2.0: Failed cmd, read reg (00000001)... [ 49.033899] WILC_SPI spi2.0: Failed cmd response, cmd (cf), resp (00) [ 49.040471] WILC_SPI spi2.0: Failed cmd reset [ 49.044853] WILC_SPI spi2.0: Reset and retry 10 1 [ 49.050858] WILC_SPI spi2.0: buffer overrun when reading data. [ 49.056730] WILC_SPI spi2.0: Failed cmd, read reg (00000001)... [ 49.064055] WILC_SPI spi2.0: Failed cmd response, cmd (cf), resp (00) [ 49.070643] WILC_SPI spi2.0: Failed cmd reset [ 49.075026] WILC_SPI spi2.0: Reset and retry 9 1 [ 49.080967] WILC_SPI spi2.0: buffer overrun when reading data. [ 49.086841] WILC_SPI spi2.0: Failed cmd, read reg (00000001)... [ 49.094218] WILC_SPI spi2.0: Failed cmd response, cmd (cf), resp (00) [ 49.100800] WILC_SPI spi2.0: Failed cmd reset [ 49.105181] WILC_SPI spi2.0: Reset and retry 8 1 [ 49.111112] WILC_SPI spi2.0: buffer overrun when reading data. [ 49.116986] WILC_SPI spi2.0: Failed cmd, read reg (00000001)... [ 49.124338] WILC_SPI spi2.0: Failed cmd response, cmd (cf), resp (00)

power management on the kernel config is disable.

Any sugestion ? or idea ?

Thanks for your help.