Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Bluetooth: btmrvl: support Marvell Bluetooth device SD8897

The register offsets have been changed in SD8897 and newer chips.
Define a new btmrvl_sdio_card_reg map for SD88xx.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Frank Huang <frankh@marvell.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Bing Zhao and committed by
John W. Linville
22f2efed 757aee0f

+30 -2
+2 -2
drivers/bluetooth/Kconfig
··· 201 201 The core driver to support Marvell Bluetooth devices. 202 202 203 203 This driver is required if you want to support 204 - Marvell Bluetooth devices, such as 8688/8787/8797. 204 + Marvell Bluetooth devices, such as 8688/8787/8797/8897. 205 205 206 206 Say Y here to compile Marvell Bluetooth driver 207 207 into the kernel or say M to compile it as module. ··· 214 214 The driver for Marvell Bluetooth chipsets with SDIO interface. 215 215 216 216 This driver is required if you want to use Marvell Bluetooth 217 - devices with SDIO interface. Currently SD8688/SD8787/SD8797 217 + devices with SDIO interface. Currently SD8688/SD8787/SD8797/SD8897 218 218 chipsets are supported. 219 219 220 220 Say Y here to compile support for Marvell BT-over-SDIO driver
+28
drivers/bluetooth/btmrvl_sdio.c
··· 82 82 .io_port_2 = 0x7a, 83 83 }; 84 84 85 + static const struct btmrvl_sdio_card_reg btmrvl_reg_88xx = { 86 + .cfg = 0x00, 87 + .host_int_mask = 0x02, 88 + .host_intstatus = 0x03, 89 + .card_status = 0x50, 90 + .sq_read_base_addr_a0 = 0x60, 91 + .sq_read_base_addr_a1 = 0x61, 92 + .card_revision = 0xbc, 93 + .card_fw_status0 = 0xc0, 94 + .card_fw_status1 = 0xc1, 95 + .card_rx_len = 0xc2, 96 + .card_rx_unit = 0xc3, 97 + .io_port_0 = 0xd8, 98 + .io_port_1 = 0xd9, 99 + .io_port_2 = 0xda, 100 + }; 101 + 85 102 static const struct btmrvl_sdio_device btmrvl_sdio_sd8688 = { 86 103 .helper = "mrvl/sd8688_helper.bin", 87 104 .firmware = "mrvl/sd8688.bin", ··· 120 103 .sd_blksz_fw_dl = 256, 121 104 }; 122 105 106 + static const struct btmrvl_sdio_device btmrvl_sdio_sd8897 = { 107 + .helper = NULL, 108 + .firmware = "mrvl/sd8897_uapsta.bin", 109 + .reg = &btmrvl_reg_88xx, 110 + .sd_blksz_fw_dl = 256, 111 + }; 112 + 123 113 static const struct sdio_device_id btmrvl_sdio_ids[] = { 124 114 /* Marvell SD8688 Bluetooth device */ 125 115 { SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, 0x9105), ··· 140 116 /* Marvell SD8797 Bluetooth device */ 141 117 { SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, 0x912A), 142 118 .driver_data = (unsigned long) &btmrvl_sdio_sd8797 }, 119 + /* Marvell SD8897 Bluetooth device */ 120 + { SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, 0x912E), 121 + .driver_data = (unsigned long) &btmrvl_sdio_sd8897 }, 143 122 144 123 { } /* Terminating entry */ 145 124 }; ··· 1221 1194 MODULE_FIRMWARE("mrvl/sd8688.bin"); 1222 1195 MODULE_FIRMWARE("mrvl/sd8787_uapsta.bin"); 1223 1196 MODULE_FIRMWARE("mrvl/sd8797_uapsta.bin"); 1197 + MODULE_FIRMWARE("mrvl/sd8897_uapsta.bin");