summaryrefslogtreecommitdiff
path: root/drivers/bluetooth/btqca.h
diff options
context:
space:
mode:
authorVenkata Lakshmi Narayana Gubba <gubbaven@codeaurora.org>2020-11-19 15:54:09 +0300
committerJohan Hedberg <johan.hedberg@intel.com>2020-12-07 17:59:55 +0300
commit059924fdf6c1c31a7c1aa1915884e23f4313dde2 (patch)
tree07d191cb4f8c7f969376bf2614f82679db6555d1 /drivers/bluetooth/btqca.h
parent353021588cb57db15d52f9b157ad6f2251250b50 (diff)
downloadlinux-059924fdf6c1c31a7c1aa1915884e23f4313dde2.tar.xz
Bluetooth: btqca: Use NVM files based on SoC ID for WCN3991
This change will allow to use different NVM file based on WCN3991 BT SoC ID.Need to use different NVM file based on fab location for WCN3991 BT SoC. Signed-off-by: Venkata Lakshmi Narayana Gubba <gubbaven@codeaurora.org> Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'drivers/bluetooth/btqca.h')
-rw-r--r--drivers/bluetooth/btqca.h22
1 files changed, 18 insertions, 4 deletions
diff --git a/drivers/bluetooth/btqca.h b/drivers/bluetooth/btqca.h
index d81b74c408a5..e73b8f8775bd 100644
--- a/drivers/bluetooth/btqca.h
+++ b/drivers/bluetooth/btqca.h
@@ -34,6 +34,18 @@
#define QCA_HCI_CC_OPCODE 0xFC00
#define QCA_HCI_CC_SUCCESS 0x00
+#define QCA_WCN3991_SOC_ID (0x40014320)
+
+/* QCA chipset version can be decided by patch and SoC
+ * version, combination with upper 2 bytes from SoC
+ * and lower 2 bytes from patch will be used.
+ */
+#define get_soc_ver(soc_id, rom_ver) \
+ ((le32_to_cpu(soc_id) << 16) | (le16_to_cpu(rom_ver)))
+
+#define QCA_FW_BUILD_VER_LEN 255
+
+
enum qca_baudrate {
QCA_BAUDRATE_115200 = 0,
QCA_BAUDRATE_57600,
@@ -136,9 +148,9 @@ enum qca_btsoc_type {
int qca_set_bdaddr_rome(struct hci_dev *hdev, const bdaddr_t *bdaddr);
int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
- enum qca_btsoc_type soc_type, u32 soc_ver,
+ enum qca_btsoc_type soc_type, struct qca_btsoc_version ver,
const char *firmware_name);
-int qca_read_soc_version(struct hci_dev *hdev, u32 *soc_version,
+int qca_read_soc_version(struct hci_dev *hdev, struct qca_btsoc_version *ver,
enum qca_btsoc_type);
int qca_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr);
int qca_send_pre_shutdown_cmd(struct hci_dev *hdev);
@@ -155,13 +167,15 @@ static inline int qca_set_bdaddr_rome(struct hci_dev *hdev, const bdaddr_t *bdad
}
static inline int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
- enum qca_btsoc_type soc_type, u32 soc_ver,
+ enum qca_btsoc_type soc_type,
+ struct qca_btsoc_version ver,
const char *firmware_name)
{
return -EOPNOTSUPP;
}
-static inline int qca_read_soc_version(struct hci_dev *hdev, u32 *soc_version,
+static inline int qca_read_soc_version(struct hci_dev *hdev,
+ struct qca_btsoc_version *ver,
enum qca_btsoc_type)
{
return -EOPNOTSUPP;