UPSTREAM: ath10k: Use bdf calibration variant for snoc targets

Board Data File (BDF) is loaded upon driver boot-up procedure.
The right board data file is identified using bus and qmi-board-id.

The problem, however, can occur when the (default) board data
file cannot fulfill with the vendor requirements and it is
necessary to use a different board data file.

Also using the chip_id for identifying the board data helps
in dealing with different variants of the board data file based
on the RF card. If the chip_id is not programmed, a default value
of 0xff will be used for parsing the board data file.

Add the support to get the variant field from DTSI and
use this information along with the chip_id to load the vendor
specific BDF.

The device tree requires addition strings to define the variant name

    wifi@a000000 {
            status = "okay";
            qcom,ath10k-calibration-variant = "xyz-v2";
    };

    wifi@a800000 {
            status = "okay";
            qcom,ath10k-calibration-variant = "xyz-v1";
    };

This would create the boarddata identifiers for the board-2.bin search

 *  bus=snoc,qmi-board-id=16,qmi-chip-id=0,variant=xyz-v1
 *  bus=snoc,qmi-board-id=17,qmi-chip-id=0,variant=xyz-v2

Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.3.1-01040-QCAHLSWMTPLZ-1

Signed-off-by: Rakesh Pillai <pillair@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1600157948-2042-1-git-send-email-pillair@codeaurora.org
(cherry picked from commit 4e938105654720489a645b0e25c64a44d2315a19)

BUG=b:170303031
TEST=The right board gets loaded

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Change-Id: I4c3843caad7cf2c9a44dd8f46ec596749e6afad7
Disallow-Recycled-Builds: hatch-arc-r-cq
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2481549
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Abhishek Kumar <kuabhs@chromium.org>
3 files changed