Skip to content

Commit 4a23ce9

Browse files
rtkbt-maxVudentz
authored andcommitted
Bluetooth: btrtl: Add the support for RTL8761CUV
Add support for RTL8761CUV BT controller on the USB interface. Do not apply IC_MATCH_FL_HCIVER when hci_ver is 0 in the ic_id_table. The device info from /sys/kernel/debug/usb/devices as below. T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 13 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=0bda ProdID=c761 Rev= 2.00 S: Manufacturer=Realtek S: Product=Bluetooth Controller S: SerialNumber=10000 C:* #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr=100mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 64 Ivl=1ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms I: If#= 1 Alt= 6 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 63 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 63 Ivl=1ms Signed-off-by: Max Chou <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent b8414ba commit 4a23ce9

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

drivers/bluetooth/btrtl.c

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ enum btrtl_chip_id {
7272
CHIP_ID_8851B = 36,
7373
CHIP_ID_8922A = 44,
7474
CHIP_ID_8852BT = 47,
75+
CHIP_ID_8761C = 51,
7576
};
7677

7778
struct id_table {
@@ -230,6 +231,14 @@ static const struct id_table ic_id_table[] = {
230231
.cfg_name = "rtl_bt/rtl8761bu_config",
231232
.hw_info = "rtl8761bu" },
232233

234+
/* 8761CU */
235+
{ IC_INFO(RTL_ROM_LMP_8761A, 0x0e, 0, HCI_USB),
236+
.config_needed = false,
237+
.has_rom_version = true,
238+
.fw_name = "rtl_bt/rtl8761cu_fw",
239+
.cfg_name = "rtl_bt/rtl8761cu_config",
240+
.hw_info = "rtl8761cu" },
241+
233242
/* 8822C with UART interface */
234243
{ IC_INFO(RTL_ROM_LMP_8822B, 0xc, 0x8, HCI_UART),
235244
.config_needed = true,
@@ -344,7 +353,8 @@ static const struct id_table *btrtl_match_ic(u16 lmp_subver, u16 hci_rev,
344353
(ic_id_table[i].hci_rev != hci_rev))
345354
continue;
346355
if ((ic_id_table[i].match_flags & IC_MATCH_FL_HCIVER) &&
347-
(ic_id_table[i].hci_ver != hci_ver))
356+
(ic_id_table[i].hci_ver != hci_ver) &&
357+
(ic_id_table[i].hci_ver != 0))
348358
continue;
349359
if ((ic_id_table[i].match_flags & IC_MATCH_FL_HCIBUS) &&
350360
(ic_id_table[i].hci_bus != hci_bus))
@@ -662,6 +672,7 @@ static int rtlbt_parse_firmware(struct hci_dev *hdev,
662672
{ RTL_ROM_LMP_8851B, 36 }, /* 8851B */
663673
{ RTL_ROM_LMP_8922A, 44 }, /* 8922A */
664674
{ RTL_ROM_LMP_8852A, 47 }, /* 8852BT */
675+
{ RTL_ROM_LMP_8761A, 51 }, /* 8761C */
665676
};
666677

667678
if (btrtl_dev->fw_len <= 8)
@@ -1305,6 +1316,7 @@ void btrtl_set_quirks(struct hci_dev *hdev, struct btrtl_device_info *btrtl_dev)
13051316
case CHIP_ID_8851B:
13061317
case CHIP_ID_8922A:
13071318
case CHIP_ID_8852BT:
1319+
case CHIP_ID_8761C:
13081320
hci_set_quirk(hdev, HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED);
13091321

13101322
/* RTL8852C needs to transmit mSBC data continuously without
@@ -1524,6 +1536,8 @@ MODULE_FIRMWARE("rtl_bt/rtl8761b_fw.bin");
15241536
MODULE_FIRMWARE("rtl_bt/rtl8761b_config.bin");
15251537
MODULE_FIRMWARE("rtl_bt/rtl8761bu_fw.bin");
15261538
MODULE_FIRMWARE("rtl_bt/rtl8761bu_config.bin");
1539+
MODULE_FIRMWARE("rtl_bt/rtl8761cu_fw.bin");
1540+
MODULE_FIRMWARE("rtl_bt/rtl8761cu_config.bin");
15271541
MODULE_FIRMWARE("rtl_bt/rtl8821a_fw.bin");
15281542
MODULE_FIRMWARE("rtl_bt/rtl8821a_config.bin");
15291543
MODULE_FIRMWARE("rtl_bt/rtl8821c_fw.bin");

0 commit comments

Comments
 (0)