firmware-qualcomm: add support for QCA6574 in ConnectCore 8X

The firmware-qualcomm recipe now provides the Bluetooh and WiFi firmware
for QCA6564 (CC6UL, CC6PLUS) and QCA6574 (CC8X).

The Bluetooth firmware is the same for both chip models.

Regarding the Wifi firmware:
- If using the QCA6564, the proprietary firmware is used.
- If using the QCA6574, the recipe allows to select between the proprietary
  or the community driver (via QUALCOMM_WIFI_DRIVER), and will install the
  associated firmware. For the community driver, the firmware files have
  been copied from linux-firmware repo at SHA1 7518922bd5b9, except for
  the file 'board.bin' which needs to be substituted with the proprietary
  one by Qualcomm. Default, is to use the community driver.

The do_install() has been improved for re-using the variables with the list
of files.

The package has been renamed basing on the QCA_MODEL variable which can
be set per platform.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
This commit is contained in:
Hector Palacios 2018-05-31 19:46:38 +02:00
parent 871da6f0d6
commit 9650efe7e0
11 changed files with 3543 additions and 27 deletions

View File

@ -17,8 +17,8 @@ MACHINE_EXTRA_RRECOMMENDS += " \
" "
# Firmware # Firmware
MACHINE_FIRMWARE_append = " ${@base_conditional('HAVE_BT', '1', 'firmware-qualcomm-qca6564-bt', '', d)}" MACHINE_FIRMWARE_append = " ${@base_conditional('HAVE_BT', '1', 'firmware-qualcomm-qca6574-bt', '', d)}"
MACHINE_FIRMWARE_append = " ${@base_conditional('HAVE_WIFI', '1', 'firmware-qualcomm-qca6564-wifi', '', d)}" MACHINE_FIRMWARE_append = " ${@base_conditional('HAVE_WIFI', '1', 'firmware-qualcomm-qca6574-wifi', '', d)}"
# U-Boot configurations # U-Boot configurations
# Last one is the default (the one the symlinks point at) # Last one is the default (the one the symlinks point at)

View File

@ -1,18 +1,23 @@
# Copyright (C) 2016,2017 Digi International. # Copyright (C) 2016-2018 Digi International.
SUMMARY = "Qualcomm firmware files for Digi's platforms." SUMMARY = "Qualcomm firmware files for Digi's platforms."
SECTION = "base" SECTION = "base"
LICENSE = "Proprietary" LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://${DIGI_EULA_FILE};md5=8c0ad592dd48ace3d25eed5bbb26ba78" LIC_FILES_CHKSUM = "file://${DIGI_EULA_FILE};md5=8c0ad592dd48ace3d25eed5bbb26ba78"
FW_QCA6564-BT = " \ # Selects whether to use proprietary or community driver
QUALCOMM_WIFI_DRIVER ?= "proprietary"
QUALCOMM_WIFI_DRIVER_ccimx8x = "community"
FW_QUALCOMM_BT = " \
file://qca/nvm_tlv_3.0.bin \ file://qca/nvm_tlv_3.0.bin \
file://qca/nvm_tlv_3.2.bin \ file://qca/nvm_tlv_3.2.bin \
file://qca/rampatch_tlv_3.0.tlv \ file://qca/rampatch_tlv_3.0.tlv \
file://qca/rampatch_tlv_3.2.tlv \ file://qca/rampatch_tlv_3.2.tlv \
" "
FW_QCA6564-WIFI = " \ # Firmware files for QCA6564 (Qualcomm proprietary driver)
FW_QCA6564_WIFI_PROPRIETARY = " \
file://bdwlan30_US.bin \ file://bdwlan30_US.bin \
file://LICENCE.atheros_firmware \ file://LICENCE.atheros_firmware \
file://otp30.bin \ file://otp30.bin \
@ -20,39 +25,72 @@ FW_QCA6564-WIFI = " \
file://utf30.bin \ file://utf30.bin \
" "
# Firmware files for QCA6574 (Qualcomm proprietary driver)
FW_QCA6574_WIFI_PROPRIETARY = " \
file://LICENCE.atheros_firmware \
file://qca6574_proprietary/athwlan.bin \
file://qca6574_proprietary/fakeboar.bin \
file://qca6574_proprietary/otp.bin \
"
# Firmware files for QCA6574 (Qualcomm community driver)
# NOTE: the community file 'board.bin' must be substituted by proprietary
# 'fakeboar.bin'
FW_QCA6574_WIFI_COMMUNITY = " \
file://qca6574_community/board-2.bin \
file://qca6574_community/firmware-4.bin \
file://qca6574_community/firmware-6.bin \
file://qca6574_community/notice_ath10k_firmware-4.txt \
file://qca6574_community/notice_ath10k_firmware-6.txt \
file://qca6574_proprietary/fakeboar.bin \
"
FW_QUALCOMM_WIFI ?= "${FW_QCA6564_WIFI_PROPRIETARY}"
FW_QUALCOMM_WIFI_ccimx8x = "${@base_conditional('QUALCOMM_WIFI_DRIVER', 'community', '${FW_QCA6574_WIFI_COMMUNITY}', '${FW_QCA6574_WIFI_PROPRIETARY}', d)}"
SRC_URI = " \ SRC_URI = " \
${FW_QCA6564-BT} \ ${FW_QUALCOMM_BT} \
${FW_QCA6564-WIFI} \ ${FW_QUALCOMM_WIFI} \
" "
S = "${WORKDIR}" S = "${WORKDIR}"
do_install() { do_install() {
# BT firmware # BT firmware (remove 'file://' from variable with files list)
BT_FW_FILES=$(echo ${FW_QUALCOMM_BT} | sed -e 's,file\:\/\/,,g')
install -d ${D}${base_libdir}/firmware/qca install -d ${D}${base_libdir}/firmware/qca
install -m 0644 \ install -m 0644 ${BT_FW_FILES} ${D}${base_libdir}/firmware/qca
qca/nvm_tlv_3.0.bin \
qca/nvm_tlv_3.2.bin \
qca/rampatch_tlv_3.0.tlv \
qca/rampatch_tlv_3.2.tlv \
${D}${base_libdir}/firmware/qca
# Wifi firmware # Wifi firmware
install -d ${D}${base_libdir}/firmware if [ "${QUALCOMM_WIFI_DRIVER}" = "community" ]; then
install -m 0644 \ WIFI_FW_PATH="${D}${base_libdir}/firmware/ath10k/QCA6174/hw3.0"
bdwlan30_US.bin \ else
LICENCE.atheros_firmware \ WIFI_FW_PATH="${D}${base_libdir}/firmware"
otp30.bin \ fi
qwlan30.bin \ install -d ${WIFI_FW_PATH}
utf30.bin \ # Remove preceeding 'file://' from variable with files list
${D}${base_libdir}/firmware FW_WIFI_FILES="$(echo ${FW_QUALCOMM_WIFI} | sed -e 's,file\:\/\/,,g')"
install -m 0644 ${FW_WIFI_FILES} ${WIFI_FW_PATH}
cd ${WIFI_FW_PATH}
if [ "${QUALCOMM_WIFI_DRIVER}" = "community" ]; then
# If using community driver, create symlink 'board.bin' to
# proprietary 'fakeboar.bin'
ln -s fakeboar.bin board.bin
else
if [ "${FW_QUALCOMM_WIFI}" = "${FW_QCA6574_WIFI_PROPRIETARY}" ]; then
ln -s athwlan.bin qwlan30.bin
fi
fi
} }
# Do not create empty debug and development packages (PN-dbg PN-dev PN-staticdev) QCA_MODEL ?= "qca6564"
PACKAGES = "${PN}-qca6564-bt ${PN}-qca6564-wifi" QCA_MODEL_ccimx8x = "qca6574"
FILES_${PN}-qca6564-bt = "/lib/firmware/qca" # Do not create empty debug and development packages (PN-dbg PN-dev PN-staticdev)
FILES_${PN}-qca6564-wifi = "/lib/firmware" PACKAGES = "${PN}-${QCA_MODEL}-bt ${PN}-${QCA_MODEL}-wifi"
FILES_${PN}-${QCA_MODEL}-bt = "/lib/firmware/qca"
FILES_${PN}-${QCA_MODEL}-wifi = "/lib/firmware"
PACKAGE_ARCH = "${MACHINE_ARCH}" PACKAGE_ARCH = "${MACHINE_ARCH}"
COMPATIBLE_MACHINE = "(ccimx6qpsbc|ccimx6ul)" COMPATIBLE_MACHINE = "(ccimx6qpsbc|ccimx6ul|ccimx8x)"