From patchwork Mon Jun 6 07:16:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AceLan Kao X-Patchwork-Id: 1639142 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=l9Jove2J; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LGlD75qzwz9s2R for ; Mon, 6 Jun 2022 17:16:55 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1ny6ym-0008UX-6s; Mon, 06 Jun 2022 07:16:48 +0000 Received: from mail-pl1-f182.google.com ([209.85.214.182]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1ny6yj-0008RQ-8J for kernel-team@lists.ubuntu.com; Mon, 06 Jun 2022 07:16:45 +0000 Received: by mail-pl1-f182.google.com with SMTP id d22so11440006plr.9 for ; Mon, 06 Jun 2022 00:16:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XSZqL+DbCawATon9VKdRsPQp+7w6sf1eQTjc+kl2FMQ=; b=l9Jove2J6fML+X5kaxJa4BLettFOYEHIPJVkBCW0l1zxEJVr3x+2y9oUFiJwO2F/U2 RxUtaHXYKRP5Pa9RFOjfAVE3PWCvzPqOJgV1ICFYZ8w23nFNgK9lvbFpgBIFBmNiX2eK 39N/Jr5fr5BamtUm+fbYfNlwgLuQ9w8gxLT6vCEUug+CppnxuaaaaUQhNCin2thdXP14 7lGrigbuaWX9/KUDAtpFR1sB66RVTYV6gZeCKuakMhxVM2x2Xn/28v7rC8KfyrEZDqK5 AbCcxumbI69u7XDq/O3sRLxcMgPumjWi0oWMdVEo9XIiZGBjxFWI7iTtLhxJSOiS6Oh1 FiLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=XSZqL+DbCawATon9VKdRsPQp+7w6sf1eQTjc+kl2FMQ=; b=gaMdssLc0Wv7gDdKSYyXvlHLuGhUUcyZP9FUhlvsvRwl2PT9D3Pr9tSKQNn9MPj7KA 3oTPSJowhDGg2fNOQsov/hOs/mGTnxDShkVKf1Z4ZrMFlsAItIXhoxM+z03fVmda4aov imkL3FEu0/d5slU/edszqybOi2gmtOppb7+HJWDYhlkKdjr5F7fiqxicT3CtLb2fiMof P9vGVxroqLrdYF3PAK7FXivPncDuOjRb5sDYgXGNMZbdHlQxjeBXlHz5XIeqzph7szGX TrJyLImj0vwwlQV2L2XkKzbp2xcL99iVz6HE3LJeiwbLqbuaTXzgGaDasa03OAMbC+PH AYzw== X-Gm-Message-State: AOAM533SyI0t0Ohzio0u6ikGIZrbeAym1aYq9tZa+KybKWBTOA5/TGsY P0YS1bpCyGOg66Q82vb1AAeqDK0Gkt4= X-Google-Smtp-Source: ABdhPJzdtQRtTy9iMAf3vbbN6GxdTlnw0tzx9OzNhi0bU5tBEegFHi+mrs9uZ2ZyqkUrVQmctEkUoA== X-Received: by 2002:a17:902:7594:b0:15e:bbac:8d49 with SMTP id j20-20020a170902759400b0015ebbac8d49mr22645244pll.124.1654499802500; Mon, 06 Jun 2022 00:16:42 -0700 (PDT) Received: from localhost (220-135-95-34.hinet-ip.hinet.net. [220.135.95.34]) by smtp.gmail.com with ESMTPSA id o5-20020a170903300500b0015e8d4eb2e0sm9622411pla.298.2022.06.06.00.16.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 00:16:41 -0700 (PDT) From: AceLan Kao To: kernel-team@lists.ubuntu.com Subject: [PATCH 2/3][SRU][Focal] Bluetooth: btrtl: Add support for RTL8761B Date: Mon, 6 Jun 2022 15:16:30 +0800 Message-Id: <20220606071631.3065428-3-acelan.kao@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220606071631.3065428-1-acelan.kao@canonical.com> References: <20220606071631.3065428-1-acelan.kao@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.214.182; envelope-from=acelan@gmail.com; helo=mail-pl1-f182.google.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: "Ziqian SUN (Zamir)" BugLink: https://bugs.launchpad.net/bugs/1976613 Add new compatible device RTL8761B. RTL8761B is a USB Bluetooth device, with support of BLE and BR/EDR. The USB info is T: Bus=03 Lev=04 Prnt=04 Port=00 Cnt=01 Dev#= 29 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=0bda ProdID=8771 Rev= 2.00 S: Manufacturer=Realtek S: Product=Bluetooth Radio S: SerialNumber=XXXXXXXXXXXX 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: Ziqian SUN (Zamir) Signed-off-by: Marcel Holtmann (backported from commit 04896832c94aae4842100cafb8d3a73e1bed3a45) Signed-off-by: Chia-Lin Kao (AceLan) --- drivers/bluetooth/btrtl.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c index 995a89876a60c..5a25611260325 100644 --- a/drivers/bluetooth/btrtl.c +++ b/drivers/bluetooth/btrtl.c @@ -131,12 +131,19 @@ static const struct id_table ic_id_table[] = { .cfg_name = "rtl_bt/rtl8821c_config" }, /* 8761A */ - { IC_MATCH_FL_LMPSUBV, RTL_ROM_LMP_8761A, 0x0, + { IC_INFO(RTL_ROM_LMP_8761A, 0xa), .config_needed = false, .has_rom_version = true, .fw_name = "rtl_bt/rtl8761a_fw.bin", .cfg_name = "rtl_bt/rtl8761a_config" }, + /* 8761B */ + { IC_INFO(RTL_ROM_LMP_8761A, 0xb), + .config_needed = false, + .has_rom_version = true, + .fw_name = "rtl_bt/rtl8761b_fw.bin", + .cfg_name = "rtl_bt/rtl8761b_config" }, + /* 8822C with USB interface */ { IC_INFO(RTL_ROM_LMP_8822B, 0xc), .config_needed = false, @@ -256,6 +263,7 @@ static int rtlbt_parse_firmware(struct hci_dev *hdev, { RTL_ROM_LMP_8723B, 9 }, /* 8723D */ { RTL_ROM_LMP_8821A, 10 }, /* 8821C */ { RTL_ROM_LMP_8822B, 13 }, /* 8822C */ + { RTL_ROM_LMP_8761A, 14 }, /* 8761B */ }; min_size = sizeof(struct rtl_epatch_header) + sizeof(extension_sig) + 3;