summaryrefslogtreecommitdiff
path: root/recipes-bsp/wl12xx-firmware
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-bsp/wl12xx-firmware')
-rw-r--r--recipes-bsp/wl12xx-firmware/wl12xx-firmware/LICENSE72
-rw-r--r--recipes-bsp/wl12xx-firmware/wl12xx-firmware/TIInit_7.6.15.btsbin0 -> 50770 bytes
-rwxr-xr-xrecipes-bsp/wl12xx-firmware/wl12xx-firmware/calibrate-wifi159
-rw-r--r--recipes-bsp/wl12xx-firmware/wl12xx-firmware/wl1271-nvs.binbin0 -> 912 bytes
-rw-r--r--recipes-bsp/wl12xx-firmware/wl12xx-firmware/wl127x-fw-5-mr.binbin0 -> 356280 bytes
-rw-r--r--recipes-bsp/wl12xx-firmware/wl12xx-firmware/wl127x-fw-5-plt.binbin0 -> 352588 bytes
-rw-r--r--recipes-bsp/wl12xx-firmware/wl12xx-firmware/wl127x-fw-5-sr.binbin0 -> 364028 bytes
-rw-r--r--recipes-bsp/wl12xx-firmware/wl12xx-firmware_r6.bb52
8 files changed, 283 insertions, 0 deletions
diff --git a/recipes-bsp/wl12xx-firmware/wl12xx-firmware/LICENSE b/recipes-bsp/wl12xx-firmware/wl12xx-firmware/LICENSE
new file mode 100644
index 0000000..29ed482
--- /dev/null
+++ b/recipes-bsp/wl12xx-firmware/wl12xx-firmware/LICENSE
@@ -0,0 +1,72 @@
+TEXAS INSTRUMENTS TEXT FILE LICENSE
+
+
+Copyright (c) 2008 – 2013 Texas Instruments Incorporated
+
+All rights reserved not granted herein.
+
+Limited License.
+
+If you download and use any version of this software from www.github.com, you
+acknowledge and agree that the terms and conditions of this license control and any
+previous licenses under which this software may have been provided on www.github.com
+are superseded and replaced by the terms and conditions of this license.
+
+Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive
+license under copyrights and patents it now or hereafter owns or controls to make,
+have made, use, import, offer to sell and sell ("Utilize") this software subject
+to the terms herein. With respect to the foregoing patent license, such license
+is granted solely to the extent that any such patent is necessary to Utilize the
+software alone. The patent license shall not apply to any combinations which
+include this software, other than combinations with devices manufactured by or
+for TI (“TI Devices”). No hardware patent is licensed hereunder.
+
+Redistributions must preserve existing copyright notices and reproduce this license
+(including the above copyright notice and the disclaimer and (if applicable) source
+code license limitations below) in the documentation and/or other materials provided
+with the distribution
+
+Redistribution and use in binary form, without modification, are permitted provided
+that the following conditions are met:
+
+* No reverse engineering, decompilation, or disassembly of this software is permitted
+ with respect to any software provided in binary form.
+
+* any redistribution and use are licensed by TI for use only with TI Devices.
+
+* Nothing shall obligate TI to provide you with source code for the software
+ licensed and provided to you in object code.
+
+If software source code is provided to you, modification and redistribution of the
+source code are permitted provided that the following conditions are met:
+
+* any redistribution and use of the source code, including any resulting
+ derivative works, are licensed by TI for use only with TI Devices.
+
+* any redistribution and use of any object code compiled from the source
+ code and any resulting derivative works, are licensed by TI for use only
+ with TI Devices.
+
+Neither the name of Texas Instruments Incorporated nor the names of its suppliers
+may be used to endorse or promote products derived from this software without specific
+prior written permission.
+
+DISCLAIMER.
+
+THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS
+OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
+NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+BY UTILIZING THIS SOFTWARE TO ENABLE ANT CODE EMBEDDED ON TI DEVICES, YOU
+AGREE THAT NOTHING IN THIS LICENSE GIVES RISE TO ANY WARRANTY OR OTHER
+OBLIGATIONS BY TI OR ITS LICENSORS WITH RESPECT TO THE ANT CODE EMBEDDED
+ON TI DEVICES AND ENABLED BY THE SOFTWARE UNDER THIS LICENSE. FURTHER, YOU
+AGREE THAT NOTHING IN THIS LICENSE GIVES RISE TO ANY RIGHT TO REVERSE ENGINEER,
+DECOMPILE OR DISASSEMBLE THE ANT CODE EMBEDDED ON THE TI DEVICES.
diff --git a/recipes-bsp/wl12xx-firmware/wl12xx-firmware/TIInit_7.6.15.bts b/recipes-bsp/wl12xx-firmware/wl12xx-firmware/TIInit_7.6.15.bts
new file mode 100644
index 0000000..ed733bc
--- /dev/null
+++ b/recipes-bsp/wl12xx-firmware/wl12xx-firmware/TIInit_7.6.15.bts
Binary files differ
diff --git a/recipes-bsp/wl12xx-firmware/wl12xx-firmware/calibrate-wifi b/recipes-bsp/wl12xx-firmware/wl12xx-firmware/calibrate-wifi
new file mode 100755
index 0000000..319e481
--- /dev/null
+++ b/recipes-bsp/wl12xx-firmware/wl12xx-firmware/calibrate-wifi
@@ -0,0 +1,159 @@
+#!/bin/bash
+#Calibrates wl1271 Wifi Chip and Sets Power Levels
+
+OEM_DIR="/var/oem"
+NVS_DIR="mts"
+NVS_OEM_FILE="$OEM_DIR/$NVS_DIR/wl1271-nvs.bin"
+NVS_OEM_INI="$OEM_DIR/$NVS_DIR/TQS_S_2.6.ini"
+NVS_FILE="/lib/firmware/ti-connectivity/wl1271-nvs.bin"
+NVS_DEFAULT_FILE="$NVS_FILE.factory"
+NVS_DEFAULT_INI="/usr/share/ti/wifi-utils/ini_files/127x/TQS_S_2.6.ini"
+WIFI_PWR_LINE_B="FEM1_TxPerChannelPowerLimits_2_4G_11b ="
+WIFI_PWR_LINE_OFDM="FEM1_TxPerChannelPowerLimits_2_4G_OFDM ="
+WIFI_PWR_ARR_SIZE=14
+WIFI_PWR_INDEX_START=2
+WIFI_PWR_INDEX_END=$(( $WIFI_PWR_INDEX_START + $WIFI_PWR_ARR_SIZE))
+WIFIMAC=$(mts-io-sysfs show mac-wifi)
+CHANNEL="ALL"
+
+# Reset in case getopts has been used previously in the shell.
+OPTIND=1
+
+function show_help() {
+ echo "Usage: $0 -m <WIFI MAC> -c <CHANNEL> <POWER LIMIT mBm>"
+ echo " Example: $0 -c 1 1250"
+ echo " Sets max transmit power to 12.5 dBm on channel 1"
+ echo "Note: Using no options will calibrate to factory settings"
+}
+
+while getopts "h?c:m:" opt; do
+ case "$opt" in
+ h|\?)
+ show_help
+ exit 0
+ ;;
+ c) CHANNEL=$OPTARG
+ ;;
+ m) WIFIMAC=$OPTARG
+ ;;
+ esac
+done
+
+shift $((OPTIND-1))
+[ "$1" = "--" ] && shift
+
+POWER=$1
+
+regexIsNumber='^[0-9]+$'
+
+if [ "$POWER" != "" ]; then
+ if ! [[ $POWER =~ $regexIsNumber ]] ; then
+ echo "Error: Power is Not a Number" >&2; exit 1
+ fi
+ if [ $POWER -lt 0 ]; then
+ echo "Error: Minimum power lvl is 0 mBm" >&2; exit 1
+ fi
+ if [ $POWER -gt 3000 ]; then
+ echo "Error: Maximum power lvl is 3000 mBm" >&2; exit 1
+ fi
+fi
+
+if [ "$CHANNEL" != "ALL" ]; then
+ if ! [[ $CHANNEL =~ $regexIsNumber ]] ; then
+ echo "Error: Channel is Not a Number" >&2; exit 1
+ fi
+ if [ $CHANNEL -gt 14 ] || [ $CHANNEL -lt 1 ]; then
+ echo "Error: Valid Channels are 1-14" >&2; exit 1
+ fi
+fi
+
+echo "starting wifi calibration..."
+
+/etc/init.d/wifi stop >/dev/null 2>&1
+
+mts-io-sysfs store wlan-enabled 0
+sleep 1
+mts-io-sysfs store wlan-enabled 1
+sleep 1
+
+modprobe atmel_mci
+sleep 5
+
+mount -o remount,rw /var/oem
+echo "removing $NVS_OEM_FILE"
+# WARNING: need remove file after 'modprobe atmel_mci'
+rm -f $NVS_OEM_FILE
+mkdir -p $OEM_DIR/$NVS_DIR
+
+if [ ! -f $NVS_OEM_INI ]; then
+ cp $NVS_DEFAULT_INI $NVS_OEM_INI
+fi
+
+#Pull Applicable Fields
+lineB=$(grep "$WIFI_PWR_LINE_B" $NVS_OEM_INI) #GET B TX PWR LMT LINE
+lineOFDM=$(grep "$WIFI_PWR_LINE_OFDM" $NVS_OEM_INI) #GET OFDM TX PWR LMT LINE
+lineB=${lineB%%#*} #REMOVE TRAILING COMMENT LINE
+lineOFDM=${lineOFDM%%#*} #REMOVE TRAILING COMMENT LINE
+
+if [ "$POWER" != "" ]; then
+ POWER=$((($POWER * 2) / 100 )) #POWER NEEDS TO BE IN 1/2 dB
+
+ if [ "$CHANNEL" == "ALL" ]; then
+ echo "setting power levels on all channels..."
+ for ((i=$WIFI_PWR_INDEX_START; i < $WIFI_PWR_INDEX_END; i++)); do
+ pwrLine="$pwrLine $POWER"
+ done
+ else
+ echo "setting power level on channel $CHANNEL..."
+ channelIndex=$(( $WIFI_PWR_INDEX_START + $CHANNEL - 1 ))
+ IFS=', ' read -a array <<< "$lineB"
+ for ((i=$WIFI_PWR_INDEX_START; i < $WIFI_PWR_INDEX_END; i++)); do
+ if [ "$i" == "$channelIndex" ]; then
+ pwr=$POWER
+ else
+ pwr=${array[$i]}
+ fi
+ pwrLine="$pwrLine $pwr"
+ done
+ fi
+ newLineB="$WIFI_PWR_LINE_B $pwrLine"
+ newLineOFDM="$WIFI_PWR_LINE_OFDM $pwrLine"
+ sed -i "s/$lineB/$newLineB/g" "$NVS_OEM_INI"
+ sed -i "s/$lineOFDM/$newLineOFDM/g" "$NVS_OEM_INI"
+else
+ #FACTORY SETTINGS
+ #960 mBm WAS MEASURED IN LAB TO PRODUCE 12.5 dBm on DEC2013
+ #960 mBm => 19 steps in 1/2 dB
+ POWER=19
+ echo "setting power levels to factory settings..."
+ channel=1
+ for ((i=$WIFI_PWR_INDEX_START; i < $WIFI_PWR_INDEX_END; i++)); do
+ if [ $channel -gt 11 ]; then
+ #Set Channels 12 - 14 to zero power output
+ pwrLine="$pwrLine 0"
+ else
+ pwrLine="$pwrLine $POWER"
+ fi
+ let channel=channel+1
+ done
+ newLineB="$WIFI_PWR_LINE_B $pwrLine"
+ newLineOFDM="$WIFI_PWR_LINE_OFDM $pwrLine"
+ sed -i "s/$lineB/$newLineB/g" "$NVS_OEM_INI"
+ sed -i "s/$lineOFDM/$newLineOFDM/g" "$NVS_OEM_INI"
+fi
+
+sync
+
+echo "calibrating..."
+calibrator plt autocalibrate wlan0 \
+ /lib/modules/$(uname -r)/kernel/drivers/net/wireless/ti/wlcore/wlcore_sdio.ko \
+ $NVS_OEM_INI \
+ $NVS_FILE $WIFIMAC
+
+sync
+
+/etc/init.d/wifi restart >/dev/null 2>&1
+
+mount -o remount,ro /var/oem
+
+echo "...calibration finished"
diff --git a/recipes-bsp/wl12xx-firmware/wl12xx-firmware/wl1271-nvs.bin b/recipes-bsp/wl12xx-firmware/wl12xx-firmware/wl1271-nvs.bin
new file mode 100644
index 0000000..91978f9
--- /dev/null
+++ b/recipes-bsp/wl12xx-firmware/wl12xx-firmware/wl1271-nvs.bin
Binary files differ
diff --git a/recipes-bsp/wl12xx-firmware/wl12xx-firmware/wl127x-fw-5-mr.bin b/recipes-bsp/wl12xx-firmware/wl12xx-firmware/wl127x-fw-5-mr.bin
new file mode 100644
index 0000000..a6279ed
--- /dev/null
+++ b/recipes-bsp/wl12xx-firmware/wl12xx-firmware/wl127x-fw-5-mr.bin
Binary files differ
diff --git a/recipes-bsp/wl12xx-firmware/wl12xx-firmware/wl127x-fw-5-plt.bin b/recipes-bsp/wl12xx-firmware/wl12xx-firmware/wl127x-fw-5-plt.bin
new file mode 100644
index 0000000..1f6249f
--- /dev/null
+++ b/recipes-bsp/wl12xx-firmware/wl12xx-firmware/wl127x-fw-5-plt.bin
Binary files differ
diff --git a/recipes-bsp/wl12xx-firmware/wl12xx-firmware/wl127x-fw-5-sr.bin b/recipes-bsp/wl12xx-firmware/wl12xx-firmware/wl127x-fw-5-sr.bin
new file mode 100644
index 0000000..ffc9594
--- /dev/null
+++ b/recipes-bsp/wl12xx-firmware/wl12xx-firmware/wl127x-fw-5-sr.bin
Binary files differ
diff --git a/recipes-bsp/wl12xx-firmware/wl12xx-firmware_r6.bb b/recipes-bsp/wl12xx-firmware/wl12xx-firmware_r6.bb
new file mode 100644
index 0000000..ed7fe36
--- /dev/null
+++ b/recipes-bsp/wl12xx-firmware/wl12xx-firmware_r6.bb
@@ -0,0 +1,52 @@
+DESCRIPTION = "TI wl1271 firmware"
+HOMEPAGE = "http://processors.wiki.ti.com/index.php/ARM_Processor_Open_Source_Wireless_Connectivity"
+LICENSE = "Proprietary"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=1c9961176d6529283e0d0c983be41b45"
+PR="r9"
+
+# bluetooth firmware from TI-ECS on github.com:
+# https://github.com/TI-ECS/bt-firmware.git
+# revision 3c0e4752ba91be195ac05226725428dfdc1a4759
+# Last file log message: "Updated to service pack 2.14"
+# file: am335x/TIInit_7.6.15.bts
+# md5sum: a46c46104c7fab23bb9ebfae1633a3af
+# wifi firmware from Wkennington on github.com
+# https://github.com/wkennington/linux-firmware/tree/master/ti-connectivity
+# revision 6d3bc8886517d171068fd1263176b8b5c51df204
+# Last file log message: "Fix permissions on ti-connectivity firmware from 05e9fe5 Signed-off-by: Kyle McMartin <kyle@kernel.org>"
+# file: ti-connectivity/wl127x-fw-5-sr.bin
+# file: ti-connectivity/wl127x-fw-5-mr.bin
+# file: ti-connectivity/wl127x-fw-5-plt.bin
+
+SRC_URI = "file://wl127x-fw-5-mr.bin \
+ file://wl127x-fw-5-plt.bin \
+ file://wl127x-fw-5-sr.bin \
+ file://TIInit_7.6.15.bts \
+ file://wl1271-nvs.bin \
+ file://calibrate-wifi \
+ file://LICENSE "
+
+# nothing to compile
+do_configure() {
+}
+
+do_compile() {
+}
+
+do_install() {
+ install -d ${D}/lib/firmware
+ install -d ${D}/sbin
+ install -d ${D}/lib/firmware/ti-connectivity
+ # wifi firmware
+ install ${WORKDIR}/wl127x-fw-*-*.bin ${D}/lib/firmware/ti-connectivity
+ # uncalibrated nvs file
+ # use local copy since the one in hw/firmware dir is *wrong*
+ install ${WORKDIR}/wl1271-nvs.bin ${D}/lib/firmware/ti-connectivity/wl1271-nvs.bin.factory
+ # link to nvs file with mac address set
+ ln -sf /var/oem/mts/wl1271-nvs.bin ${D}/lib/firmware/ti-connectivity/wl127x-nvs.bin
+ install ${WORKDIR}/calibrate-wifi ${D}/sbin
+ # bluetooth firmware
+ install ${WORKDIR}/TIInit_7.6.15.bts ${D}/lib/firmware/ti-connectivity/TIInit_7.6.15.bts
+}
+
+FILES_${PN} = "/lib/firmware /sbin"