4 Replies Latest reply on Aug 9, 2017 2:08 PM by ghouse

    Bringup wifi module Type 1DX EVB ES2.0 with TI Sitara AM57xx

    vinaykumar.shettar_2291891

      We are using Murata wifi module Type 1DX EVB ES2.0 with TI Sitara AM57xx chipset with Linux kernel version 4.x ( currently using 4.1.18)

       

      1. 1. Compile the kernel with :
      • → Device Drivers
      •   → Network device support
      •     → Wireless LAN
        • [*] Broadcom devices
          • <M> Broadcom 43xx wireless support (mac80211 stack)
          •             Supported bus types (BCMA and SSB) --->        
          • [*] Broadcom 43xx SDIO device support
          • <M> Broadcom 43xx-legacy wireless support (mac80211 stack) 
          • <M> Broadcom IEEE802.11n embedded FullMAC WLAN driver
          • [*] SDIO bus interface support for FullMAC driver

       

      [*] Networking support --->

         -*- Wireless  --->

      <M>   cfg80211 - wireless configuration API

          [ ]     cfg80211 wireless extensions compatibility   Is this required ?

       

      And got the following modules and inserted into kernel:

      drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko

      drivers/net/wireless/broadcom/brcm80211/brcmutil/brcmutil.ko

      drivers/net/wireless/broadcom/b43/b43.ko

      drivers/net/wireless/broadcom/b43legacy/b43legacy.ko

      net/wireless/cfg80211.ko

      net/mac80211/mac80211.ko

      drivers/ssb/ssb.ko

      drivers/char/hw_random/rng-core.ko

       

      we kept the nvram file Type1DX_Final_nvram2.txt shared to us renamed and kept in /lib/firmware/brcmfmac43430-sdio.txt.

      and firmware file also renamed as brcmfmac43430-sdio.bin and kept in /lib/firmware/ path in target.

       

      Initially got the error while loding firmware file:

      insmod brcmfmac.ko
      root@am57xx-evm:~# [  520.943826] brcmf_sdio_drivestrengthinit: No SDIO Drive strength init done for chip 43430 rev 1 pmurev 24
      [  520.958225] brcmfmac_sdio mmc0:0001:1: firmware, attempted to load /lib/firmware/brcm/brcmfmac43430-sdio.bin, but failed with error -2
      [  520.971542] brcmfmac_sdio mmc0:0001:1: Direct firmware load for brcm/brcmfmac43430-sdio.bin failed with error -22
      [  520.982053] brcmfmac_sdio mmc0:0001:1: Falling back to user helper

       

       

      I copied the firmware files from raspi 3.0 board. Now firmware loading is successful and got the wlan0 interface. But could not do scan and getting errors:

       

      1. Following are the logs which I got while insmod the modules:

        root@am57xx-evm:# insmod brcmfmac.ko
        root@am57xx-evm:# [ 82.074362] brcmf_sdio_drivestrengthinit: No SDIO Drive strength init done for chip 43430 rev 1 pmurev 24   
        à Is this a Error/Warning ? what need to be done to resolve this?
        [ 82.258763] brcmf_c_preinit_dcmds: Firmware version = wl0: May 27 2016 00:13:38 version 7.45.41.26 (r640327) FWID 01-df77e4a7
        [ 82.570740] brcmf_cfg80211_reg_notifier: not a ISO3166 code

      Following are the errors logs:

      root@am57xx-evm:# ifconfig -a

      wlan0 Link encap:Ethernet HWaddr FC:DB:B3:80:17:E0
      BROADCAST MULTICAST MTU:1500 Metric:1
      RX packets:0 errors:0 dropped:0 overruns:0 frame:0
      TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000
      RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

      root@am57xx-evm:# iw dev
      phy#0
      Interface wlan0
      ifindex 4
      wdev 0x1
      addr fc:db:b3:80:17:e0
      type managed

      root@am57xx-evm:# ip link show wlan0
      4: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
      link/ether fc:db:b3:80:17:e0 brd ff:ff:ff:ff:ff:ff

      root@am57xx-evm:# ip link set wlan0 up
      [ 298.688553] brcmf_sdio_bus_rxctl: resumed on timeout
      [ 299.902064] brcmf_add_if: ERROR: netdev:wlan0 already exists
      [ 299.907758] brcmf_add_if: ignore IF event
      root@am57xx-evm:# [ 301.972010] omap_hsmmc 4809c000.mmc: MMC start dma failure
      [ 301.977538] brcmf_sdiod_sglist_rw: CMD53 sg block write failed -22
      [ 301.983949] brcmf_sdio_txfail: sdio error, abort command and terminate frame



      root@am57xx-evm:# ip link show wlan0
      4: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 1000
      link/ether fc:db:b3:80:17:e0 brd ff:ff:ff:ff:ff:ff


      root@am57xx-evm:# ifconfig wlan0 up
      root@am57xx-evm:# [ 1186.948553] brcmf_sdio_bus_rxctl: resumed on timeout
      [ 1186.957006] _brcmf_set_multicast_list: Setting mcast_list failed, -52
      [ 1188.958549] brcmf_sdio_bus_rxctl: resumed on timeout
      [ 1188.966976] _brcmf_set_multicast_list: Setting allmulti failed, -52
      [ 1190.968549] brcmf_sdio_bus_rxctl: resumed on timeout
      [ 1190.976966] _brcmf_set_multicast_list: Setting BRCMF_C_SET_PROMISC failed, -52



      run the following command:
      root@am57xx-evm:# wpa_supplicant -B -D nl80211 -i wlan0 -c /etc/wpa_supplicant.conf

      [ 6015.508551] brcmf_p2p_set_firmware: failed to update device address ret -52
      [ 6017.508554] brcmf_p2p_create_p2pdev: set p2p_disc error
      Failed to create interface p2p-dev-wlan0: -52 (Invalid exchange)
      nl80211: Failed to create a P2P Device interface p2p-dev-wlan0
      P2P: Failed to enable P2P Device interface

      [ 6019.508552] brcmf_do_escan: error (-52)
      [ 6019.512407] brcmf_cfg80211_scan: scan error (-52)
      [ 6022.508551] brcmf_do_escan: error (-52)
      [ 6022.512406] brcmf_cfg80211_scan: scan error (-52)

      I have the following open points which need clarification:

      1. Do we have to apply the kernel patch files to get this working? In that case please send me the kernel patch files.
      2. Is there any changes to be done in Device tree files(DTS) ? if yes please provide me the details on what changes to be done.
      3. Is the firmware files I have used from raspi board are ok  ? else please send me the latest firmware files.
      4. When I compare the code, there are some changes in drivers/mmc/host/sdhci-esdhc-imx.c file which is specific to IMX board and which will compile only if we enable architecture support for IMX. Do we need similar changes for TI also?