Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3701315pxb; Mon, 9 Nov 2020 19:39:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJx43TsPnIabwN2GaMf+UT1bRw56AlBtBs0qj+SnXy0e4/sOykTabLgYQZebuAhKDVtdirJU X-Received: by 2002:a17:906:158e:: with SMTP id k14mr17602049ejd.496.1604979590549; Mon, 09 Nov 2020 19:39:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604979590; cv=none; d=google.com; s=arc-20160816; b=cmWcV8nk4qr0tF4JEToV1tC1q4mbJTg/mbHSTjzVH0dJDSpg1G8/1a++S/xGF8hM5M fGc9/Oe2RA1flPo+2b5KKnqwhJt4oq7AApDxUSP2b/g23IrmP4cAdMgNttmyKKFtM1vI PCe6ckimboCdChVmBP7Dv79IqarweWkh5OYRRKTASOZz6Im7y0Cjlv+K6ZRcTrUYa9fB M/cOFCLCmWURVKW6u8R0nGk5MUjHpGpBsZd+b7RtcMGReDwyZ+cU6YJUTGOTHBls6FKg oMiyhkX6bHZDaUF9H31oANaFZeRCxLEG9qk1YrR7/+s9Z80YifuJtHQxpQvCXkUa2vQ6 mBXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :authenticated-by; bh=5z+ex8y2k6VDUDRT1lpWJwvLwcPCZnOdVGRfytNCFMk=; b=ckhnLCIlnBV1GfO9MUiAEDli95H2QUF5xrufQ9TCbjm9bRaaY+7/uHWVaWE1wg8ivU bCEwGZuoXW87R7KjGnSeAQMuKsWcmh3v57iCEO4UGuCx+CV9KoL2fJEVuq/tNrhnpBBG 14nLFam0TIzaBWjyYys/TJ+KH3cI4qIAY05tRr/hxVL0+rXzZMYtL/Ymr6Etf9rEQWzS cI7pVjb6LIBRAHzuroI5BRcWtXPd6taeEXpNDmsa7h2SGx/FXIYRADJmXDwI4w1Ni7b4 2D/ta4SmhtMVNsT9XqJWDXgddh1aTSBT81GMiqB8E3edjjUpAqsY86d3dDOoWn0tHJQ1 DMZg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dk22si8329154edb.19.2020.11.09.19.39.10; Mon, 09 Nov 2020 19:39:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729706AbgKJDjH (ORCPT + 99 others); Mon, 9 Nov 2020 22:39:07 -0500 Received: from rtits2.realtek.com ([211.75.126.72]:42966 "EHLO rtits2.realtek.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729452AbgKJDjG (ORCPT ); Mon, 9 Nov 2020 22:39:06 -0500 Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.73 with qID 0AA3cgXV3008619, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexmb03.realtek.com.tw[172.21.6.96]) by rtits2.realtek.com.tw (8.15.2/2.70/5.88) with ESMTPS id 0AA3cgXV3008619 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Tue, 10 Nov 2020 11:38:42 +0800 Received: from RTEXMBS03.realtek.com.tw (172.21.6.34) by RTEXMB03.realtek.com.tw (172.21.6.96) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2044.4; Tue, 10 Nov 2020 11:38:42 +0800 Received: from localhost.localdomain (172.21.132.186) by RTEXMBS03.realtek.com.tw (172.21.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Tue, 10 Nov 2020 11:38:42 +0800 From: To: , , , , , , , , , CC: Subject: [PATCH] Bluetooth: btusb: btrtl: Add support for RTL8852A Date: Tue, 10 Nov 2020 11:38:37 +0800 Message-ID: <20201110033837.19373-1-max.chou@realtek.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.21.132.186] X-ClientProxiedBy: RTEXMB03.realtek.com.tw (172.21.6.96) To RTEXMBS03.realtek.com.tw (172.21.6.34) Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Max Chou Add the support for RTL8852A 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=02 Lev=02 Prnt=02 Port=05 Cnt=01 Dev#= 10 Spd=12 MxCh= 0 D: Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=0bda ProdID=c852 Rev= 0.00 S: Manufacturer=Realtek S: Product=Bluetooth Radio S: SerialNumber=00e04c000001 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 Signed-off-by: Max Chou --- drivers/bluetooth/btrtl.c | 12 ++++++++++++ drivers/bluetooth/btusb.c | 4 ++++ 2 files changed, 16 insertions(+) diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c index 0ac0f8874ef7..e47736a12f77 100644 --- a/drivers/bluetooth/btrtl.c +++ b/drivers/bluetooth/btrtl.c @@ -23,6 +23,7 @@ #define RTL_ROM_LMP_8821A 0x8821 #define RTL_ROM_LMP_8761A 0x8761 #define RTL_ROM_LMP_8822B 0x8822 +#define RTL_ROM_LMP_8852A 0x8852 #define RTL_CONFIG_MAGIC 0x8723ab55 #define IC_MATCH_FL_LMPSUBV (1 << 0) @@ -143,6 +144,13 @@ static const struct id_table ic_id_table[] = { .has_rom_version = true, .fw_name = "rtl_bt/rtl8822b_fw.bin", .cfg_name = "rtl_bt/rtl8822b_config" }, + + /* 8852A */ + { IC_INFO(RTL_ROM_LMP_8852A, 0xa, 0xb, HCI_USB), + .config_needed = false, + .has_rom_version = true, + .fw_name = "rtl_bt/rtl8852au_fw.bin", + .cfg_name = "rtl_bt/rtl8852au_config" }, }; static const struct id_table *btrtl_match_ic(u16 lmp_subver, u16 hci_rev, @@ -250,6 +258,7 @@ static int rtlbt_parse_firmware(struct hci_dev *hdev, { RTL_ROM_LMP_8821A, 10 }, /* 8821C */ { RTL_ROM_LMP_8822B, 13 }, /* 8822C */ { RTL_ROM_LMP_8761A, 14 }, /* 8761B */ + { RTL_ROM_LMP_8852A, 18 }, /* 8852A */ }; min_size = sizeof(struct rtl_epatch_header) + sizeof(extension_sig) + 3; @@ -679,6 +688,7 @@ int btrtl_download_firmware(struct hci_dev *hdev, case RTL_ROM_LMP_8821A: case RTL_ROM_LMP_8761A: case RTL_ROM_LMP_8822B: + case RTL_ROM_LMP_8852A: return btrtl_setup_rtl8723b(hdev, btrtl_dev); default: rtl_dev_info(hdev, "assuming no firmware upload needed"); @@ -854,3 +864,5 @@ MODULE_FIRMWARE("rtl_bt/rtl8821a_fw.bin"); MODULE_FIRMWARE("rtl_bt/rtl8821a_config.bin"); MODULE_FIRMWARE("rtl_bt/rtl8822b_fw.bin"); MODULE_FIRMWARE("rtl_bt/rtl8822b_config.bin"); +MODULE_FIRMWARE("rtl_bt/rtl8852au_fw.bin"); +MODULE_FIRMWARE("rtl_bt/rtl8852au_config.bin"); diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 4a1f877616d6..1ff9e2840b89 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -386,6 +386,10 @@ static const struct usb_device_id blacklist_table[] = { { USB_DEVICE(0x0bda, 0xb00c), .driver_info = BTUSB_REALTEK | BTUSB_WIDEBAND_SPEECH }, + /* Realtek 8852AE Bluetooth devices */ + { USB_DEVICE(0x0bda, 0xc852), .driver_info = BTUSB_REALTEK | + BTUSB_WIDEBAND_SPEECH }, + /* Realtek Bluetooth devices */ { USB_VENDOR_AND_INTERFACE_INFO(0x0bda, 0xe0, 0x01, 0x01), .driver_info = BTUSB_REALTEK }, -- 2.17.1