Wl12xx driver

From ArmadeusWiki
Revision as of 14:24, 15 September 2015 by JulienB (Talk | contribs) (Daily use)

Jump to: navigation, search

The wl12xx driver is used by the Wi-Fi/Bluetooth chip present on the APF6 module. Before using the Wi-Fi, you have to calibrate the chip. This page details how to do it.

Installation

  • On APF6, all needed tools/drivers are installed by default. You can directly switch to calibration.

Linux

  • Be sure to have CONFIG_NL80211_TESTMODE enabled.
Networking support --->
 Wireless --->
  <*> cfg80211 - wireless configuration API
   [*] nl80211 testmode command

Buildroot

  • You need the calibrator tool from the ti-utils package.
Target package --->
 Hardware handling --->
  [*] ti-utils

Calibration

Note Note: Following instructions are only needed the first time after you flashed your rootfs.
  • Poweroff then on your board. You have limited time to execute the following commands so don't be lazy ;-).
  • Use the calibrator tool to generate the new calibration data. This will generate a file called new-nvs.bin.
# calibrator set ref_nvs /usr/share/ti-utils/ini_files/127x/TQS_S_2.6.ini
  • Copy the file to the right place.
# cp new-nvs.bin /lib/firmware/ti-connectivity/wl1271-nvs.bin
  • Set a MAC address (here for example an Armadeus Systems one).
# calibrator set nvs_mac /lib/firmware/ti-connectivity/wl1271-nvs.bin 00:1E:AC:00:51:22
  • Load the wl12xx driver.
# modprobe wl12xx
# modprobe wlcore_sdio
wl1271_sdio mmc0:0001:2: legacy platform data not found, trying device tree
...
wlcore: loaded
  • Calibrate the chip.
# calibrator plt calibrate dual
wlcore: power up
wlcore: firmware booted in PLT mode PLT_ON (PLT 6.3.10.0.133)
wlcore: testmode cmd: radio status=0

The path to NVS file not provided, use default (/lib/firmware/ti-connectivity/wl1271-nvs.bin)
wlcore: power down
  • Reset the chip. (or reboot the board)
# echo 40 > /sys/class/gpio/export
# echo out > /sys/class/gpio/gpio40/direction
# echo 0 > /sys/class/gpio/gpio40/value; sleep 1
# echo 1 > /sys/class/gpio/gpio40/value
  • Congratulations ! Your chip is calibrated. :)

Daily use

  • Reset the chip: (or reboot the board)
# echo 40 > /sys/class/gpio/export
# echo out > /sys/class/gpio/gpio40/direction
# echo 0 > /sys/class/gpio/gpio40/value; sleep 1
# echo 1 > /sys/class/gpio/gpio40/value
  • Load the wl12xx driver:
# modprobe wl12xx
# modprobe wlcore_sdio
wl1271_sdio mmc0:0001:2: legacy platform data not found, trying device tree
...
wlcore: loaded
  • Power up the wireless interface:
# ifconfig wlan0 up
wlcore: firmware booted (Rev 6.3.10.0.133)
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready

Going further

Links