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

Issues in Wilc3000 integarte with BBB #122

Open 20023356 opened 1 year ago

20023356 commented 1 year ago

I am integrating wilc3000 with BBB using Kernel 5.10 ([Debian: Getting Started with the BeagleBone Black]. This version Pin numbers are different from 4.19 kernel version. In 5.10 kernel SPI pin numbers are gpio-78 (P9_31 [spi1_sclk] |P9_31 ) out lo gpio-79 (P9_29 [spi1_d0] |P9_29 ) out lo gpio-80 (P9_30 [spi1_d1] |P9_30 ) in lo gpio-81 (P9_28 [spi1_cs0] |P9_28 ) out lo while booting and insmod wilc-spi.ko i got the following errors

ebian@beaglebone:~$ sudo ifconfig wlan0 up [ 996.034137] power up request for already powered up source Wifi [ 996.044941] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (00) [ 996.059352] WILC_SPI spi1.0: Failed internal read cmd... [ 996.068919] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (00) [ 996.083265] WILC_SPI spi1.0: Failed cmd reset [ 996.091484] WILC_SPI spi1.0: Reset and retry 10 24

- [ 997.003210] WILC_SPI spi1.0: Reset and retry 1 24 [ 997.014504] WILC_SPI spi1.0: Failed internal read protocol... [ 997.023888] WILC_SPI spi1.0 wlan0: ERR [wilc_wlan_initialize:905] Initializing WILC_Wlan FAILED [ 997.036400] WILC_SPI spi1.0 wlan0: ERR [wilc_mac_open:1029] Failed to initialize wilc SIOCSIFFLAGS: Input/output error

Please help me to resolve this issue and what could be the issue. Regards Ravi V

ajaykathat commented 1 year ago

Apart from SPI pins connection, the WILC's RESET_N and CHIP_EN pins should be connected with host GPIO's for the power-up sequence. Assuming the SPI is correctly configured, this failure could be because the WILC power-up sequence is not triggered by the host. The details about the power sequence are captured in "4.1 ATWILC Power Control" section of wilc1000/3000 porting guide which can be referred from the link. Host, BBB in this case, GPIO's should be connect to WILC's RESET_N and CHIP_EN pin for chip power-up sequence. Please try connecting the host GPIO's to RESET_N and CHIP_EN if it helps to overcome this issue.

20023356 commented 1 year ago

overlays/BB-SPIDEV1-00A0.dts

&am33xx_pinmux { bb_spi1_pins: pinmux_bb_spi1_pins { pinctrl-single,pins = < / P9_31: mcasp0_aclkx.spi1_sclk / BONE_P9_31 (PIN_INPUT_PULLUP | MUX_MODE3) / P9_29: mcasp0_fsx.spi1_d0 / BONE_P9_29 (PIN_INPUT_PULLUP | MUX_MODE3) / P9_30: mcasp0_axr0.spi1_d1 / BONE_P9_30 (PIN_OUTPUT_PULLUP | MUX_MODE3) / P9_29: mcasp0_ahclkr.spi1_cs0 / BONE_P9_28 (PIN_OUTPUT_PULLUP | MUX_MODE3)
BONE_P8_14 (PIN_INPUT_PULLDOWN | MUX_MODE7) /AM335X_PIN_GPMC_AD10 gpmc.ad10 -> WL_IRQ, gpio3 122/ BONE_P9_12 (PIN_OUTPUT_PULLUP | MUX_MODE7) /AM335X_PIN_GPMC_BEN1 gpmc_bein -> WL_EN, gpio1 28/ BONE_P9_23 (PIN_OUTPUT_PULLUP | MUX_MODE7) /AM335X_PIN_GPMC_A1 gpmc_a1 -> RESET, gpio1 17/

; }; };

&spi1 {

address-cells = <1>;

#size-cells = <0>;

status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&bb_spi1_pins>;
/*ti,pindir-d0-out-d1-in = <1>;
cs-gpios = <&gpio3 17 0>;*/

/*
 * Select the D0 pin as output and D1 as
 * input. The default is D0 as input and
 * D1 as output.
 */
//ti,pindir-d0-out-d1-in;

wilc_spi: wilc_spi@0 {
    compatible = "microchip,wilc1000", "microchip,wilc3000";
    /*symlink = "bone/spi/1.0";
    pinctrl-0 = <&bb_spi1_wilc_pins>;*/
        reg = <0>;
        spi-max-frequency = <48000000>;

    interrupt-parent = <&gpio3>;
    /*interrupts = <122 IRQ_TYPE_EDGE_FALLING>;*/

    irq-gpios = <&gpio3 26 GPIO_ACTIVE_HIGH>;
    reset-gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
    chip_en-gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
        status = "okay";
};  

/*channel@0 {
    #address-cells = <1>;
    #size-cells = <0>;

    compatible = "rohm,dh2228fv";
    symlink = "bone/spi/1.0";

    reg = <0>;
    spi-max-frequency = <16000000>;
    spi-cpha;
};*/

channel@1 {
    #address-cells = <1>;
    #size-cells = <0>;

    compatible = "rohm,dh2228fv";
    symlink = "bone/spi/1.1";

    reg = <1>;
    spi-max-frequency = <16000000>;
};

};

/**/

debian@beaglebone:~$ ifconfig -a can0: flags=128 mtu 16 unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 10 (UNSPEC) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 44

can1: flags=128 mtu 16 unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 10 (UNSPEC) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 45

eth0: flags=-28669<UP,BROADCAST,MULTICAST,DYNAMIC> mtu 1500 ether f4:b8:98:86:65:be txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 1000 (Local Loopback) RX packets 1680 bytes 118160 (115.3 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 1680 bytes 118160 (115.3 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

usb0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.7.2 netmask 255.255.255.0 broadcast 192.168.7.255 inet6 fe80::94fc:e4ff:fe9d:2623 prefixlen 64 scopeid 0x20 ether 96:fc:e4:9d:26:23 txqueuelen 1000 (Ethernet) RX packets 57 bytes 8791 (8.5 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 60 bytes 10284 (10.0 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlan0: flags=-28670<BROADCAST,MULTICAST,DYNAMIC> mtu 1500 inet 192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255 ether 00:00:00:00:00:00 txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

debian@beaglebone:~$ sudo ifconfig wlan0 192.168.1.1 netmask 255.255.255.0 up [ 666.183404] power up request for already powered up source Wifi [ 666.194123] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (ff) [ 666.207147] WILC_SPI spi1.0: Failed internal read cmd... [ 666.220261] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (ff) [ 666.231490] WILC_SPI spi1.0: Failed cmd reset [ 666.239407] WILC_SPI spi1.0: Reset and retry 10 24 [ 666.248858] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (ff) [ 666.258978] WILC_SPI spi1.0: Failed internal read cmd... [ 666.269036] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (ff) [ 666.278940] WILC_SPI spi1.0: Failed cmd reset [ 666.286736] WILC_SPI spi1.0: Reset and retry 9 24 [ 666.296217] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (ff) [ 666.306186] WILC_SPI spi1.0: Failed internal read cmd... [ 666.316413] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (ff) [ 666.323012] WILC_SPI spi1.0: Failed cmd reset [ 666.333339] WILC_SPI spi1.0: Reset and retry 8 24 [ 666.342815] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (ff) [ 666.352894] WILC_SPI spi1.0: Failed internal read cmd... [ 666.363220] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (ff) [ 666.369747] WILC_SPI spi1.0: Failed cmd reset [ 666.379021] WILC_SPI spi1.0: Reset and retry 7 24 [ 666.389606] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (ff) [ 666.399768] WILC_SPI spi1.0: Failed internal read cmd... [ 666.409794] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (ff) [ 666.420105] WILC_SPI spi1.0: Failed cmd reset [ 666.428092] WILC_SPI spi1.0: Reset and retry 6 24 [ 666.437493] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (ff) [ 666.447620] WILC_SPI spi1.0: Failed internal read cmd... [ 666.457701] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (ff) [ 666.467634] WILC_SPI spi1.0: Failed cmd reset [ 666.475598] WILC_SPI spi1.0: Reset and retry 5 24 [ 666.485312] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (ff) [ 666.495235] WILC_SPI spi1.0: Failed internal read cmd... [ 666.505663] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (ff) [ 666.515759] WILC_SPI spi1.0: Failed cmd reset [ 666.523563] WILC_SPI spi1.0: Reset and retry 4 24 [ 666.533115] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (ff) [ 666.543114] WILC_SPI spi1.0: Failed internal read cmd... [ 666.553106] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (ff) [ 666.563132] WILC_SPI spi1.0: Failed cmd reset [ 666.570955] WILC_SPI spi1.0: Reset and retry 3 24 [ 666.580313] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (ff) [ 666.590157] WILC_SPI spi1.0: Failed internal read cmd... [ 666.600363] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (ff) [ 666.610255] WILC_SPI spi1.0: Failed cmd reset [ 666.618016] WILC_SPI spi1.0: Reset and retry 2 24 [ 666.627479] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (ff) [ 666.634006] WILC_SPI spi1.0: Failed internal read cmd... [ 666.646447] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (ff) [ 666.656363] WILC_SPI spi1.0: Failed cmd reset [ 666.664348] WILC_SPI spi1.0: Reset and retry 1 24 [ 666.673706] WILC_SPI spi1.0: Failed read with CRC on, retrying with CRC off [ 666.684377] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (ff) [ 666.694403] WILC_SPI spi1.0: Failed internal read cmd... [ 666.704509] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (ff) [ 666.714294] WILC_SPI spi1.0: Failed cmd reset [ 666.722205] WILC_SPI spi1.0: Reset and retry 10 24 [ 666.731647] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (ff) [ 666.738230] WILC_SPI spi1.0: Failed internal read cmd... [ 666.750779] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (ff) [ 666.760707] WILC_SPI spi1.0: Failed cmd reset [ 666.768694] WILC_SPI spi1.0: Reset and retry 9 24 [ 666.778158] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (ff) [ 666.788169] WILC_SPI spi1.0: Failed internal read cmd... [ 666.798389] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (ff) [ 666.808400] WILC_SPI spi1.0: Failed cmd reset [ 666.816149] WILC_SPI spi1.0: Reset and retry 8 24 [ 666.825727] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (ff) [ 666.835793] WILC_SPI spi1.0: Failed internal read cmd... [ 666.845819] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (ff) [ 666.855963] WILC_SPI spi1.0: Failed cmd reset [ 666.863921] WILC_SPI spi1.0: Reset and retry 7 24 [ 666.873293] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (ff) [ 666.883556] WILC_SPI spi1.0: Failed internal read cmd... [ 666.893687] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (ff) [ 666.903603] WILC_SPI spi1.0: Failed cmd reset [ 666.911574] WILC_SPI spi1.0: Reset and retry 6 24 [ 666.921084] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (ff) [ 666.930989] WILC_SPI spi1.0: Failed internal read cmd... [ 666.941005] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (ff) [ 666.951293] WILC_SPI spi1.0: Failed cmd reset [ 666.959221] WILC_SPI spi1.0: Reset and retry 5 24 [ 666.968609] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (ff) [ 666.978583] WILC_SPI spi1.0: Failed internal read cmd... [ 666.988699] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (ff) [ 666.998479] WILC_SPI spi1.0: Failed cmd reset [ 667.006341] WILC_SPI spi1.0: Reset and retry 4 24 [ 667.015767] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (ff) [ 667.022348] WILC_SPI spi1.0: Failed internal read cmd... [ 667.034764] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (ff) [ 667.044698] WILC_SPI spi1.0: Failed cmd reset [ 667.052708] WILC_SPI spi1.0: Reset and retry 3 24 [ 667.062179] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (ff) [ 667.072069] WILC_SPI spi1.0: Failed internal read cmd... [ 667.082211] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (ff) [ 667.092190] WILC_SPI spi1.0: Failed cmd reset [ 667.099955] WILC_SPI spi1.0: Reset and retry 2 24 [ 667.109524] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (ff) [ 667.119584] WILC_SPI spi1.0: Failed internal read cmd... [ 667.129763] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (ff) [ 667.140041] WILC_SPI spi1.0: Failed cmd reset [ 667.147995] WILC_SPI spi1.0: Reset and retry 1 24 [ 667.157317] WILC_SPI spi1.0: Failed internal read protocol... [ 667.166561] WILC_SPI spi1.0 wlan0: ERR [wilc_wlan_initialize:905] Initializing WILC_Wlan FAILED [ 667.178706] WILC_SPI spi1.0 wlan0: ERR [wilc_mac_open:1029] Failed to initialize wilc SIOCSIFFLAGS: Input/output error[ 667.190544] power up request for already powered up source Wifi

[ 667.203951] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (ff) [ 667.219044] WILC_SPI spi1.0: Failed internal read cmd... [ 667.232314] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (ff) [ 667.242683] WILC_SPI spi1.0: Failed cmd reset [ 667.250506] WILC_SPI spi1.0: Reset and retry 10 24 [ 667.259916] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (ff) [ 667.266442] WILC_SPI spi1.0: Failed internal read cmd... [ 667.279131] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (ff) [ 667.288604] WILC_SPI spi1.0: Failed cmd reset [ 667.296612] WILC_SPI spi1.0: Reset and retry 9 24 [ 667.306071] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (ff) [ 667.316377] WILC_SPI spi1.0: Failed internal read cmd... [ 667.326526] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (ff) [ 667.336590] WILC_SPI spi1.0: Failed cmd reset [ 667.344770] WILC_SPI spi1.0: Reset and retry 8 24 [ 667.354320] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (ff) [ 667.364653] WILC_SPI spi1.0: Failed internal read cmd... [ 667.374638] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (ff) [ 667.384723] WILC_SPI spi1.0: Failed cmd reset [ 667.392752] WILC_SPI spi1.0: Reset and retry 7 24 [ 667.402367] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (ff) [ 667.412565] WILC_SPI spi1.0: Failed internal read cmd... [ 667.422572] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (ff) [ 667.432817] WILC_SPI spi1.0: Failed cmd reset [ 667.440901] WILC_SPI spi1.0: Reset and retry 6 24 [ 667.450484] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (ff) [ 667.460697] WILC_SPI spi1.0: Failed internal read cmd... [ 667.470680] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (ff) [ 667.480914] WILC_SPI spi1.0: Failed cmd reset [ 667.488856] WILC_SPI spi1.0: Reset and retry 5 24 [ 667.498767] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (ff) [ 667.508914] WILC_SPI spi1.0: Failed internal read cmd... [ 667.519241] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (ff) [ 667.525814] WILC_SPI spi1.0: Failed cmd reset [ 667.535028] WILC_SPI spi1.0: Reset and retry 4 24 [ 667.545781] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (ff) [ 667.556029] WILC_SPI spi1.0: Failed internal read cmd... [ 667.566121] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (ff) [ 667.576384] WILC_SPI spi1.0: Failed cmd reset [ 667.584438] WILC_SPI spi1.0: Reset and retry 3 24 [ 667.594011] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (ff) [ 667.604240] WILC_SPI spi1.0: Failed internal read cmd... [ 667.614396] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (ff) [ 667.624490] WILC_SPI spi1.0: Failed cmd reset [ 667.632580] WILC_SPI spi1.0: Reset and retry 2 24 [ 667.642270] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (ff) [ 667.652381] WILC_SPI spi1.0: Failed internal read cmd... [ 667.662558] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (ff) [ 667.672793] WILC_SPI spi1.0: Failed cmd reset [ 667.680775] WILC_SPI spi1.0: Reset and retry 1 24 [ 667.690231] WILC_SPI spi1.0: Failed read with CRC on, retrying with CRC off [ 667.701064] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (ff) [ 667.710968] WILC_SPI spi1.0: Failed internal read cmd... [ 667.721015] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (ff) [ 667.731151] WILC_SPI spi1.0: Failed cmd reset [ 667.739028] WILC_SPI spi1.0: Reset and retry 10 24 [ 667.748483] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (ff) [ 667.758553] WILC_SPI spi1.0: Failed internal read cmd... [ 667.768944] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (ff) [ 667.778963] WILC_SPI spi1.0: Failed cmd reset [ 667.786965] WILC_SPI spi1.0: Reset and retry 9 24 [ 667.796293] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (ff) [ 667.806130] WILC_SPI spi1.0: Failed internal read cmd... [ 667.816410] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (ff) [ 667.826379] WILC_SPI spi1.0: Failed cmd reset [ 667.834124] WILC_SPI spi1.0: Reset and retry 8 24 [ 667.843671] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (ff) [ 667.850190] WILC_SPI spi1.0: Failed internal read cmd... [ 667.860749] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (ff) [ 667.871938] WILC_SPI spi1.0: Failed cmd reset [ 667.879941] WILC_SPI spi1.0: Reset and retry 7 24 [ 667.889338] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (ff) [ 667.899648] WILC_SPI spi1.0: Failed internal read cmd... [ 667.909827] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (ff) [ 667.919714] WILC_SPI spi1.0: Failed cmd reset [ 667.927694] WILC_SPI spi1.0: Reset and retry 6 24 [ 667.937196] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (ff) [ 667.947093] WILC_SPI spi1.0: Failed internal read cmd... [ 667.957261] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (ff) [ 667.967276] WILC_SPI spi1.0: Failed cmd reset [ 667.974987] WILC_SPI spi1.0: Reset and retry 5 24 [ 667.984564] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (ff) [ 667.994515] WILC_SPI spi1.0: Failed internal read cmd... [ 668.004529] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (ff) [ 668.014491] WILC_SPI spi1.0: Failed cmd reset [ 668.022282] WILC_SPI spi1.0: Reset and retry 4 24 [ 668.031724] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (ff) [ 668.038335] WILC_SPI spi1.0: Failed internal read cmd... [ 668.051114] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (ff) [ 668.060496] WILC_SPI spi1.0: Failed cmd reset [ 668.068370] WILC_SPI spi1.0: Reset and retry 3 24 [ 668.077913] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (ff) [ 668.087901] WILC_SPI spi1.0: Failed internal read cmd... [ 668.097926] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (ff) [ 668.108042] WILC_SPI spi1.0: Failed cmd reset [ 668.115946] WILC_SPI spi1.0: Reset and retry 2 24 [ 668.125322] WILC_SPI spi1.0: Failed cmd response, cmd (c4), resp (ff) [ 668.135445] WILC_SPI spi1.0: Failed internal read cmd... [ 668.145536] WILC_SPI spi1.0: Failed cmd response, cmd (cf), resp (ff) [ 668.155449] WILC_SPI spi1.0: Failed cmd reset [ 668.163446] WILC_SPI spi1.0: Reset and retry 1 24 [ 668.172874] WILC_SPI spi1.0: Failed internal read protocol... [ 668.181994] WILC_SPI spi1.0 wlan0: ERR [wilc_wlan_initialize:905] Initializing WILC_Wlan FAILED [ 668.194202] WILC_SPI spi1.0 wlan0: ERR [wilc_mac_open:1029] Failed to initialize wilc SIOCSIFFLAGS: Input/output error debian@beaglebone:~$

20023356 commented 1 year ago

Thanks Ajay, still am facing the same issue. could you please help me to resolve this issue Also pls find the conf file i have addded

dhcpd.conf:

option domain-name "domain.name"; option domain-name-servers 192.168.0.1; default-lease-time 1440; max-lease-time 1440; authoritative;

subnet 192.168.0.1 netmask 255.255.255.0 { option routers 192.168.0.1; option subnet-mask 255.255.255.0; option domain-search "domain.name"; option domain-name-servers 192.168.0.1; range 192.168.0.10 192.168.0.100; range 192.168.0.110 192.168.0.200; }

wilc_wpa_supplicant.conf

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1

network={ ssid="D-Link_HBIO" psk="hbio2ltts" proto=RSN key_mgmt=WPA-PSK pairwise=CCMP auth_alg=OPEN }

wilc_hostapd_wpa.conf:

interface=wlan0 driver=nl80211 ctrl_interface=/var/run/hostapd ssid=wilc_OpenAP dtim_period=2 beacon_int=100 channel=7 hw_mode=g max_num_sta=8 ap_max_inactivity=300

wilc_hostapd_wep.conf:

interface=wlan0 driver=nl80211 ctrl_interface=/var/run/hostapd ssid=wilc_WepAP dtim_period=2 beacon_int=100 channel=7 hw_mode=g max_num_sta=8 ap_max_inactivity=300 ieee80211n=1 auth_algs=1

######### WEP ########### wep_default_key=0 wep_key0=1234567890 wep_key1="vwxyz" wep_key2=0102030405060708090a0b0c0d wep_key3=".2.4.6.8.0.23" wep_key_len_broadcast=5 wep_key_len_unicast=5 wep_rekey_period=300

/etc/network/interfaces:

allow-hotplug wlan0 auto wlan0 iface wlan0 inet manual wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf iface default inet dhcp

20023356 commented 1 year ago

Thanks Ajay

Still the problem is not resolved. I have shared the details in git hub.

So, could you please give me suggestion to resolve this issue. it would you be very much appreciate.

Regards Ravi V

From: Ajay @.> Sent: Monday, June 19, 2023 11:01 PM To: linux4wilc/driver @.> Cc: Ravi Varadarajan @.>; Author @.> Subject: Re: [linux4wilc/driver] Issues in Wilc3000 integarte with BBB (Issue #122)

CAUTION: This email is from an external source. Please do not open attachments or click links from an unknown or suspicious origin. Phishing attempts can be reported by using the report message button in Outlook or sending them as an attachment to @.**@.>. Thank you

Apart from SPI pins connection, the WILC's RESET_N and CHIP_EN pins should be connected with host GPIO's for the power-up sequence. Assuming the SPI is correctly configured, this failure could be because the WILC power-up sequence is not triggered by the host. The details about the power sequence are captured in "4.1 ATWILC Power Control" section of wilc1000/3000 porting guide which can be referred from the linkhttp://ww1.microchip.com/downloads/en/DeviceDoc/ATWILC1000-ATWILC3000-ATWILC-Devices-Linux-Porting-Guide-User-Guide-DS70005329C.pdf. Host, BBB in this case, GPIO's should be connect to WILC's RESET_N and CHIP_EN pin for chip power-up sequence. Please try connecting the host GPIO's to RESET_N and CHIP_EN if it helps to overcome this issue.

- Reply to this email directly, view it on GitHubhttps://github.com/linux4wilc/driver/issues/122#issuecomment-1597526234, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AV36TLX66MPDF46X4PGRE3LXMCEE3ANCNFSM6AAAAAAZK55FRE. You are receiving this because you authored the thread.Message ID: @.**@.>>

L&T Technology Services Ltd

www.LTTS.com

L&T Technology Services Limited (LTTS) is committed to safeguard your privacy. Read the appropriate privacy noticehttps://www.ltts.com/privacy-policies-notices applicable to you to know more about how LTTS collects, uses and stores your personal data. Please visit our privacy policyhttps://www.ltts.com/data-privacy-policy available on our website www.Ltts.com for more information about our commitment towards data privacy under applicable data protection laws. This email may contain confidential or privileged information for the intended recipient(s). If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system.

ajaykathat commented 1 year ago

It looks like the first SPI command from the host to the WILC has failed. First, check if the SPI bus communication is working fine. Either validate the Device Tree node entry for BBB SPI device or, If possible, use the SPI bus analyzer to probe the Host(BBB) SPI pins to check whether the command is going out correctly. After the chip ID read is successful, the firmware gets downloaded to the WILC and, then the actual WLAN functionality starts.

Since the first command to read the chip ID failed, just using "ifconfig wlan0 up" should be enough to test this.
Procedure to test: $load driver if its loadable module $ifconfig wlan0 up

If you continue to face issue intergrating WILC with BBB, please open a ticket on Microchip's salesforce portal http://microchipsupport.force.com/ so that respective team can help further.