Skip to content

wilc1000 15.7: firmware fails to start sometimes #19

@ghost

Description

We are using firmware version 15.7 on a custom NXP imx8mn module. wilc1000 is connected via SDIO. Kernel is lf-5.15.71-2.2.0 from NXP, based on mainline 5.15.71.

The first start of the module is always successful:

$ modprobe wilc1000-sdio
[   16.674784] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[   16.694440] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[   16.740796] wilc1000_sdio mmc0:0001:1: Driver Initializing success
[   19.937483] wilc1000_sdio mmc0:0001:1 wlan0: Failed to get RSSI value
[   19.950898] wilc1000_sdio mmc0:0001:1: chipid (001003a0)
[   19.956295] wilc1000_sdio mmc0:0001:1: has_thrpt_enh3 = 1...
[   19.963458] wilc1000_sdio mmc0:0001:1 wlan0: ChipID [1003a0] loading firmware [atmel/wilc1000_wifi_firmware-1.bin]

When turning the interface off and on again, the firmware fails to start from time to time:

$ ip link set wlan0 down
[ 4371.596049] wilc1000_sdio mmc0:0001:1 wlan0: Deinitializing wilc1000...
$ ip link set wlan0 up
[ 4495.331578] wilc1000_sdio mmc0:0001:1: chipid (001003a0)
[ 4495.336963] wilc1000_sdio mmc0:0001:1: has_thrpt_enh3 = 1...
[ 4495.344340] wilc1000_sdio mmc0:0001:1 wlan0: ChipID [1003a0] loading firmware [atmel/wilc1000_wifi_firmware-1.bin]
[ 4500.073578] wilc1000_sdio mmc0:0001:1 wlan0: WLAN initialization FAILED
RTNETLINK answers: Timer expired

When checking the debug UART of the wilc module, we observed two different behaviors:
1. Firmware gets stuck with illegal_instruction_handler outputs.

r_stats: 0 0 (-)
rx_stats: 58 92 (63%)
ar_stats: 0 0 (-)
rx_stats: 48 71 (67%)
(1345)Got mac handler by driver handler i=1
(1345)[CFG]: type(W), id(00000056), len(57)
(1345)[Parese Write]: id (0000408b)
(1346)Got mac handler by driver handler i=1
(1346)[CFG]: type(W), id(00000057), len(5)
(1347)[Parese Write]: id (00000016)
(1347)del_sta_index = 19
(1347)Set mac handler BSSID i=1
(1347)mac state wlan0 -- 0
(1348)Sent MAC status: MAC_DISCONNECTED host 1 , reason = 2 , code = 0
(1348)No longer connected to e8:df:70 !!
Reseting global reset register
(0)Efuse_read: bank_idx = 1
(0)Efuse_read: MAC addr (used=1) = 60:8a:10:b6:da:f2
(0)Efuse_read: Freq Off (used=1) = 0
(0)Efuse_read: ADC Calib (used=0) = 0
(0)IQ Amp used: 0 val: 0, Phase used: 0, val: 0
                                               ����[illegal_instruction_handler ] - rtt: 81000002 - r15: 8000fe14
[illegal_instruction_handler ] - rtt: 81000002 - r15: 8000fe14
[illegal_instruction_handler ] - rtt: 81000002 - r15: 8000fe14
[illegal_instruction_handler ] - rtt: 81000002 - r15: 8000fe14
[illegal_instruction_handler ] - rtt: 81000002 - r15: 8000fe14
[illegal_instruction_handler ] - rtt: 81000002 - r15: 8000fe14
[illegal_instruction_handler ] - rtt: 81000002 - r15: 8000fe14
[illegal_instruction_handler ] - rtt: 81000002 - r15: 8000fe14
[illegal_instruction_handler ] - rtt: 81000002 - r15: 8000fe14
[illegal_instruction_handler ] - rtt: 81000002 - r15: 8000fe14
[illegal_instruction_handler ] - rtt: 81000002 - r15: 8000fe14
[illegal_instruction_handler ] - rtt: 81000002 - r15: 8000fe14
[illegal_instruction_handler ] - rtt: 81000002 - r15: 8000fe14
[illegal_instruction_handler ] - rtt: 81000002 - r15: 8000fe14
[illegal_instruction_handler ] - rtt: 81000002 - r15: 8000fe14
[illegal_instruction_handler ] - rtt: 81000002 - r15: 8000fe14
[illegal_instruction_handler ] - rtt: 81000002 - r15: 8000fe14

Issuing ip link set wlan0 up again after the kernel timed out brought the module back up.

[illegal_instruction_handler ] - rtt: 81000002 - r15: 8000fe14
[illegal_instruction_handler ] - rtt: 81000[ibus_illegal_isr_handler ] - rtt: 8000031c - r15: 800001b4, iBus: 80c3e03c
[dbus_illegal_isr_handler ] - rtt: 80000320 - r15: 800001b4 - dbus: 46100004
(0)Efuse_read: bank_idx = 1
(0)Efuse_read: MAC addr (used=1) = 60:8a:10:b6:da:f2
(0)Efuse_read: Freq Off (used=1) = 0
(0)Efuse_read: ADC Calib (used=0) = 0
(0)IQ Amp used: 0 val: 0, Phase used: 0, val: 0
>> Slp clk src <= Int. osc
chipid = 1003a0
turn on 3fff1fd 1ef5ff
(0)[set_mac_addr] mac address = 60:8a:10:b6:da:f2
(0)Set mac handler mac address i=1
(0)MAC 1
(0)[set_mac_addr] mac address = 62:8a:10:b6:da:f2
(0)Set mac handler mac address i=0
(0)MAC 0
>>>>>> SDIO - GPIO IRQ <<<<<<<<<<
(0)------------------------------------
(0)IP version information
(0)------------------------------------
(0)MAC Hardware version : 0.1.04.0E.00
(1)MAC Firmware version : WILC_WIFI_FW_REL_15_7 Build: 12977
(1)RF Version: 01.1
(2)Built at May  6 2022	15:27:06
(2)------------------------------------
(2)Sent MAC status: MAC_DISCONNECTED host 0 , reason = 1 , code = 0
(3)Got mac handler by driver handler i=0
(4)[CFG]: type(Q), id(00000058), len(2)
(4)[CFG]: type(W), id(00000059), len(187)
(5)Set WLAN_IFC[STA] driver handler 2
(5)Unknown operation mode

2. Firmware takes to long and restarts
Looks like the firmware starts twice, timeout in between starts ~20 seconds (haven't measured it yet).

(1109)Got mac handler by driver handler i=1
(1109)[CFG]: type(W), id(00000071), len(5)
(1110)[Parese Write]: id (00000016)
(1110)del_sta_index = 19
(1110)Set mac handler BSSID i=1
(1111)mac state wlan0 -- 0
(1111)Sent MAC status: MAC_DISCONNECTED host 1 , reason = 2 , code = 0
(1112)No longer connected to e8:df:70 !!
Reseting global reset register
(0)Efuse_read: bank_idx = 1
(0)Efuse_read: MAC addr (used=1) = 60:8a:10:b6:da:f2
(0)Efuse_read: Freq Off (used=1) = 0
(0)Efuse_read: ADC Calib (used=0) = 0
(0)IQ Amp used: 0 val: 0, Phase used: 0, val: 0����[ibus_illegal_isr_handler ] - rtt: 8000031c - r15: 800001b4, iBus: 901686c4
(0)Efuse_read: bank_idx = 1
(0)Efuse_read: MAC addr (used=1) = 60:8a:10:b6:da:f2
(0)Efuse_read: Freq Off (used=1) = 0
(0)Efuse_read: ADC Calib (used=0) = 0
(0)IQ Amp used: 0 val: 0, Phase used: 0, val: 0
>> Slp clk src <= Int. osc
chipid = 1003a0
turn on 3fff1fd 1ef5ff
(0)[set_mac_addr] mac address = 60:8a:10:b6:da:f2
(0)Set mac handler mac address i=1
(0)MAC 1
(0)[set_mac_addr] mac address = 62:8a:10:b6:da:f2
(0)Set mac handler mac address i=0
(0)MAC 0
>>>>>> SDIO - GPIO IRQ <<<<<<<<<<
(0)------------------------------------
(0)IP version information
(0)------------------------------------
(0)MAC Hardware version : 0.1.04.0E.00
(1)MAC Firmware version : WILC_WIFI_FW_REL_15_7 Build: 12977
(1)RF Version: 01.1
(2)Built at May  6 2022	15:27:06
(2)------------------------------------
(2)Sent MAC status: MAC_DISCONNECTED host 0 , reason = 1 , code = 0

Issuing the up command again brings the module back up most times, but not always.

One of the two issues arises approximately every second time.
Any debugging input is appreciated.
Drive strengths have been reduced and hardware design checked.

Device tree:

&usdhc1 {
	#address-cells = <1>;
	#size-cells = <0>;
	bus-width = <4>;

	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_wifi_clk_cmd_dat0 &pinctrl_wifi_dat1_3>;

	no-1-8-v;
	non-removable;

	mmc-pwrseq = <&wifi_pwrseq>;
	vmmc-supply = <&reg_usdhc1_vmmc>;
	vqmmc-supply = <&vcc_3v3_reg>;
	status = "okay";

	wilc_sdio@0 {
		compatible = "microchip,wilc1000";
		reg = <0>;

		interrupt-parent = <&gpio2>;
		interrupts = <8 IRQ_TYPE_LEVEL_LOW>;

		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_wifi_irq>;

		clocks = <&clk IMX8MN_CLK_32K>;
		clock-names = "rtc";
	};
};

wifi_pwrseq: wifi_pwrseq {
	compatible = "mmc-pwrseq-wilc1000";
	reset-gpios = <&gpio2 9 GPIO_ACTIVE_HIGH>;
	powerdown-gpios = <&gpio5 0 GPIO_ACTIVE_HIGH>;
	pinctrl-0 = <&pinctrl_wilc_pwrseq_default>;
	pinctrl-names = "default";
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions