summaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth
diff options
context:
space:
mode:
authorTamás Szűcs <tszucs@protonmail.ch>2019-04-14 14:38:14 -0400
committerMarcel Holtmann <marcel@holtmann.org>2019-04-23 13:01:45 -0400
commit73623340546cceff421c95b53abd8140d1f2b2a2 (patch)
treea2d69de357c85bc26c13c16542e0987e5d1fcbe3 /drivers/bluetooth
parent7f3c563c575e73c689fe2762c5ec61159caa1568 (diff)
Bluetooth: btmrvl: add support for SD8987 chipset
This patch adds support for Marvell 88W8987 chipset with SDIO interface. Register offsets and supported feature flags are updated. The corresponding firmware image file shall be "mrvl/sd8987_uapsta.bin". Signed-off-by: Tamás Szűcs <tszucs@protonmail.ch> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r--drivers/bluetooth/Kconfig4
-rw-r--r--drivers/bluetooth/btmrvl_sdio.c36
2 files changed, 38 insertions, 2 deletions
diff --git a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig
index b0f9a20401d6..b9c34ff9a0d3 100644
--- a/drivers/bluetooth/Kconfig
+++ b/drivers/bluetooth/Kconfig
@@ -336,7 +336,7 @@ config BT_MRVL
336 The core driver to support Marvell Bluetooth devices. 336 The core driver to support Marvell Bluetooth devices.
337 337
338 This driver is required if you want to support 338 This driver is required if you want to support
339 Marvell Bluetooth devices, such as 8688/8787/8797/8887/8897/8977/8997. 339 Marvell Bluetooth devices, such as 8688/8787/8797/8887/8897/8977/8987/8997.
340 340
341 Say Y here to compile Marvell Bluetooth driver 341 Say Y here to compile Marvell Bluetooth driver
342 into the kernel or say M to compile it as module. 342 into the kernel or say M to compile it as module.
@@ -350,7 +350,7 @@ config BT_MRVL_SDIO
350 The driver for Marvell Bluetooth chipsets with SDIO interface. 350 The driver for Marvell Bluetooth chipsets with SDIO interface.
351 351
352 This driver is required if you want to use Marvell Bluetooth 352 This driver is required if you want to use Marvell Bluetooth
353 devices with SDIO interface. Currently SD8688/SD8787/SD8797/SD8887/SD8897/SD8977/SD8997 353 devices with SDIO interface. Currently SD8688/SD8787/SD8797/SD8887/SD8897/SD8977/SD8987/SD8997
354 chipsets are supported. 354 chipsets are supported.
355 355
356 Say Y here to compile support for Marvell BT-over-SDIO driver 356 Say Y here to compile support for Marvell BT-over-SDIO driver
diff --git a/drivers/bluetooth/btmrvl_sdio.c b/drivers/bluetooth/btmrvl_sdio.c
index 047b75ce1deb..0f3a020703ab 100644
--- a/drivers/bluetooth/btmrvl_sdio.c
+++ b/drivers/bluetooth/btmrvl_sdio.c
@@ -235,6 +235,29 @@ static const struct btmrvl_sdio_card_reg btmrvl_reg_8977 = {
235 .fw_dump_end = 0xf8, 235 .fw_dump_end = 0xf8,
236}; 236};
237 237
238static const struct btmrvl_sdio_card_reg btmrvl_reg_8987 = {
239 .cfg = 0x00,
240 .host_int_mask = 0x08,
241 .host_intstatus = 0x0c,
242 .card_status = 0x5c,
243 .sq_read_base_addr_a0 = 0xf8,
244 .sq_read_base_addr_a1 = 0xf9,
245 .card_revision = 0xc8,
246 .card_fw_status0 = 0xe8,
247 .card_fw_status1 = 0xe9,
248 .card_rx_len = 0xea,
249 .card_rx_unit = 0xeb,
250 .io_port_0 = 0xe4,
251 .io_port_1 = 0xe5,
252 .io_port_2 = 0xe6,
253 .int_read_to_clear = true,
254 .host_int_rsr = 0x04,
255 .card_misc_cfg = 0xd8,
256 .fw_dump_ctrl = 0xf0,
257 .fw_dump_start = 0xf1,
258 .fw_dump_end = 0xf8,
259};
260
238static const struct btmrvl_sdio_card_reg btmrvl_reg_8997 = { 261static const struct btmrvl_sdio_card_reg btmrvl_reg_8997 = {
239 .cfg = 0x00, 262 .cfg = 0x00,
240 .host_int_mask = 0x08, 263 .host_int_mask = 0x08,
@@ -312,6 +335,15 @@ static const struct btmrvl_sdio_device btmrvl_sdio_sd8977 = {
312 .supports_fw_dump = true, 335 .supports_fw_dump = true,
313}; 336};
314 337
338static const struct btmrvl_sdio_device btmrvl_sdio_sd8987 = {
339 .helper = NULL,
340 .firmware = "mrvl/sd8987_uapsta.bin",
341 .reg = &btmrvl_reg_8987,
342 .support_pscan_win_report = true,
343 .sd_blksz_fw_dl = 256,
344 .supports_fw_dump = true,
345};
346
315static const struct btmrvl_sdio_device btmrvl_sdio_sd8997 = { 347static const struct btmrvl_sdio_device btmrvl_sdio_sd8997 = {
316 .helper = NULL, 348 .helper = NULL,
317 .firmware = "mrvl/sd8997_uapsta.bin", 349 .firmware = "mrvl/sd8997_uapsta.bin",
@@ -343,6 +375,9 @@ static const struct sdio_device_id btmrvl_sdio_ids[] = {
343 /* Marvell SD8977 Bluetooth device */ 375 /* Marvell SD8977 Bluetooth device */
344 { SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, 0x9146), 376 { SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, 0x9146),
345 .driver_data = (unsigned long)&btmrvl_sdio_sd8977 }, 377 .driver_data = (unsigned long)&btmrvl_sdio_sd8977 },
378 /* Marvell SD8987 Bluetooth device */
379 { SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, 0x914A),
380 .driver_data = (unsigned long)&btmrvl_sdio_sd8987 },
346 /* Marvell SD8997 Bluetooth device */ 381 /* Marvell SD8997 Bluetooth device */
347 { SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, 0x9142), 382 { SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, 0x9142),
348 .driver_data = (unsigned long)&btmrvl_sdio_sd8997 }, 383 .driver_data = (unsigned long)&btmrvl_sdio_sd8997 },
@@ -1797,4 +1832,5 @@ MODULE_FIRMWARE("mrvl/sd8797_uapsta.bin");
1797MODULE_FIRMWARE("mrvl/sd8887_uapsta.bin"); 1832MODULE_FIRMWARE("mrvl/sd8887_uapsta.bin");
1798MODULE_FIRMWARE("mrvl/sd8897_uapsta.bin"); 1833MODULE_FIRMWARE("mrvl/sd8897_uapsta.bin");
1799MODULE_FIRMWARE("mrvl/sd8977_uapsta.bin"); 1834MODULE_FIRMWARE("mrvl/sd8977_uapsta.bin");
1835MODULE_FIRMWARE("mrvl/sd8987_uapsta.bin");
1800MODULE_FIRMWARE("mrvl/sd8997_uapsta.bin"); 1836MODULE_FIRMWARE("mrvl/sd8997_uapsta.bin");