Skip to content

Commit a30ce29

Browse files
rtkbt-maxVudentz
authored andcommitted
Bluetooth: btrtl: Add the support for RTL8922A
Add the support for RTL8922A BT controller on USB interface. The necessary firmware will be submitted to linux-firmware project. The device info from /sys/kernel/debug/usb/devices as below. T: Bus=01 Lev=02 Prnt=02 Port=02 Cnt=01 Dev#= 3 Spd=12 MxCh= 0 D: Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=0bda ProdID=8922 Rev= 0.00 S: Manufacturer=Realtek S: Product=Bluetooth Radio S: SerialNumber=00E04C885A01 C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 16 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=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=83(I) 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=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=83(I) 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=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=83(I) 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=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=83(I) 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=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=83(I) 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=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=83(I) 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=03(O) Atr=01(Isoc) MxPS= 63 Ivl=1ms E: Ad=83(I) 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 0519376 commit a30ce29

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

drivers/bluetooth/btrtl.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#define RTL_ROM_LMP_8822B 0x8822
3131
#define RTL_ROM_LMP_8852A 0x8852
3232
#define RTL_ROM_LMP_8851B 0x8851
33+
#define RTL_ROM_LMP_8922A 0x8922
3334
#define RTL_CONFIG_MAGIC 0x8723ab55
3435

3536
#define RTL_VSC_OP_COREDUMP 0xfcff
@@ -69,6 +70,7 @@ enum btrtl_chip_id {
6970
CHIP_ID_8852B = 20,
7071
CHIP_ID_8852C = 25,
7172
CHIP_ID_8851B = 36,
73+
CHIP_ID_8922A = 44,
7274
CHIP_ID_8852BT = 47,
7375
};
7476

@@ -309,6 +311,15 @@ static const struct id_table ic_id_table[] = {
309311
.cfg_name = "rtl_bt/rtl8851bu_config",
310312
.hw_info = "rtl8851bu" },
311313

314+
/* 8922A */
315+
{ IC_INFO(RTL_ROM_LMP_8922A, 0xa, 0xc, HCI_USB),
316+
.config_needed = false,
317+
.has_rom_version = true,
318+
.has_msft_ext = true,
319+
.fw_name = "rtl_bt/rtl8922au_fw",
320+
.cfg_name = "rtl_bt/rtl8922au_config",
321+
.hw_info = "rtl8922au" },
322+
312323
/* 8852BT/8852BE-VT */
313324
{ IC_INFO(RTL_ROM_LMP_8852A, 0x87, 0xc, HCI_USB),
314325
.config_needed = false,
@@ -655,6 +666,7 @@ static int rtlbt_parse_firmware(struct hci_dev *hdev,
655666
{ RTL_ROM_LMP_8852A, 20 }, /* 8852B */
656667
{ RTL_ROM_LMP_8852A, 25 }, /* 8852C */
657668
{ RTL_ROM_LMP_8851B, 36 }, /* 8851B */
669+
{ RTL_ROM_LMP_8922A, 44 }, /* 8922A */
658670
{ RTL_ROM_LMP_8852A, 47 }, /* 8852BT */
659671
};
660672

@@ -1255,6 +1267,7 @@ int btrtl_download_firmware(struct hci_dev *hdev,
12551267
case RTL_ROM_LMP_8852A:
12561268
case RTL_ROM_LMP_8703B:
12571269
case RTL_ROM_LMP_8851B:
1270+
case RTL_ROM_LMP_8922A:
12581271
err = btrtl_setup_rtl8723b(hdev, btrtl_dev);
12591272
break;
12601273
default:
@@ -1286,6 +1299,7 @@ void btrtl_set_quirks(struct hci_dev *hdev, struct btrtl_device_info *btrtl_dev)
12861299
case CHIP_ID_8852B:
12871300
case CHIP_ID_8852C:
12881301
case CHIP_ID_8851B:
1302+
case CHIP_ID_8922A:
12891303
case CHIP_ID_8852BT:
12901304
set_bit(HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED, &hdev->quirks);
12911305

@@ -1528,3 +1542,5 @@ MODULE_FIRMWARE("rtl_bt/rtl8852btu_config.bin");
15281542
MODULE_FIRMWARE("rtl_bt/rtl8852cu_fw.bin");
15291543
MODULE_FIRMWARE("rtl_bt/rtl8852cu_fw_v2.bin");
15301544
MODULE_FIRMWARE("rtl_bt/rtl8852cu_config.bin");
1545+
MODULE_FIRMWARE("rtl_bt/rtl8922au_fw.bin");
1546+
MODULE_FIRMWARE("rtl_bt/rtl8922au_config.bin");

drivers/bluetooth/btusb.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,17 @@ static const struct usb_device_id quirks_table[] = {
530530
/* Realtek 8852BT/8852BE-VT Bluetooth devices */
531531
{ USB_DEVICE(0x0bda, 0x8520), .driver_info = BTUSB_REALTEK |
532532
BTUSB_WIDEBAND_SPEECH },
533+
534+
/* Realtek 8922AE Bluetooth devices */
535+
{ USB_DEVICE(0x0bda, 0x8922), .driver_info = BTUSB_REALTEK |
536+
BTUSB_WIDEBAND_SPEECH },
537+
{ USB_DEVICE(0x13d3, 0x3617), .driver_info = BTUSB_REALTEK |
538+
BTUSB_WIDEBAND_SPEECH },
539+
{ USB_DEVICE(0x13d3, 0x3616), .driver_info = BTUSB_REALTEK |
540+
BTUSB_WIDEBAND_SPEECH },
541+
{ USB_DEVICE(0x0489, 0xe130), .driver_info = BTUSB_REALTEK |
542+
BTUSB_WIDEBAND_SPEECH },
543+
533544
/* Realtek Bluetooth devices */
534545
{ USB_VENDOR_AND_INTERFACE_INFO(0x0bda, 0xe0, 0x01, 0x01),
535546
.driver_info = BTUSB_REALTEK },

0 commit comments

Comments
 (0)