From patchwork Fri Mar 15 07:48:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian W MORRISON X-Patchwork-Id: 13593139 Received: from AUS01-ME3-obe.outbound.protection.outlook.com (mail-me3aus01olkn2169.outbound.protection.outlook.com [40.92.63.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6E615134D1; Fri, 15 Mar 2024 07:48:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.92.63.169 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710488897; cv=fail; b=iHYdRHkyRP8SOn7l6woJGGYRchhwTx7VnKZ1gasXoXYFFqZV6HrbuH4E72+rnmLxQpprkUOSSic2SiyBaYZAhll0eV0Uf5787Sp5ANZPyXMc5LaTQ5KBZXptvrCiInqA3RuuPguXOjTMi+x6bOPNSfvPw/jX61nfUvylRrzaNoA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710488897; c=relaxed/simple; bh=21gtga73XTE3tIWZEXDRGJAjO8dassp5toqzMac4TVA=; h=Date:From:To:Subject:Message-ID:Content-Type:Content-Disposition: MIME-Version; b=dvlN81Bn5jSn4AZHECnJ9N7eJ9EDAYFmbMMc5kvIw+4K4/if9qD+OAVyiVbCTScv9Z6yjz9bmNOmBfMJU9LmDVMw6YcGdwkGSNxP+11O6WO/O+95Lyb0gLw+sDXZu7NKDdPsxFW198dcelxC8PAAx0GGqCnY9myp4fMseUQCywQ= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=live.com; spf=pass smtp.mailfrom=live.com; dkim=pass (2048-bit key) header.d=live.com header.i=@live.com header.b=ARnSYz4z; arc=fail smtp.client-ip=40.92.63.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=live.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=live.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=live.com header.i=@live.com header.b="ARnSYz4z" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b9oki90uxh9lSOnX8OJCV39TSz4zp5ZQK8Gl0qSjYPNJs+SkswwlL8/sD5DljR7uczrIuUen6GxJ7iwd0pDLEhhJKmjnln4xzrxjCeAXotOnV62josFpOioPswf/pPPsTtnReSM49watXrB2mZ2Q1n/67s+42fod1TaUExToRy4C0Lx4EI7SvXZ5YUOlhaOkPMvcTyhboSbsqBc9X/0XU8YL5hpnDbK18lc+0hWBALRFWzGwi5cMt2GjC13TKoc3ZEcO8/owY6xIkE/OPlWBJh/CnceXg/ooSeaOn9I4opMpQDd9+1MpICIQooDaENbcxhPix2KydXfkQ81mw8x1oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6X10VR7tABaYyHz6GMgO93RJn/SryIIITBBiSNZLTPs=; b=RJNKZuSQ9OjSGXTXBje+XXMfQjr4G8gn8TYeUUZWrB/IRP6aXwx9BSp7EuOe7MPhIpE1bvBZbcHVT8x1gp03lYrr2YHDz0/9tlE5tVXEmEs58+ThM6bfUpymWR4WW+n/5Xl81od8D5BCf9ZrwTUjYgNISW6XLEoPGQAjsmL1RaiCt79QO7RbgGJrAbV7kDonAdUu1QwpKL3yljRvYHV/xgiBSptCX1Dpi4I1Mt/4ygIe2dhNEFyYOVaA5kNDXIUzBKQlwVbc2bDBYg4uEQKwZ1bhSn00fqeOCTEIP2wwjpJJkrnHMyRvICXosl2xRJn0f4iP0ItCvMXel7FE3qUV3g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6X10VR7tABaYyHz6GMgO93RJn/SryIIITBBiSNZLTPs=; b=ARnSYz4zUomqOT1hy2GbPvVbIGsCbSyicD5vIbQoh6ORjmQ9gT+H4AtAHaXF20pLJn2JG3AJZfRlOd7N336GBRIwT7e6mjPbiyFVtAsF6qTnnt64VMDN3uyKvVwJGOGda6hr5DTeKI7SHVy1d5S7v2W1FT6V8XFQUGt0Rp2/qL4lwvXMMjjFZPybWnfFdEw55IVFj39tm1h+VKNLoLy4WpJ15rq0UJ9Oe1fL0OCropI3mEtjIB5OPwXXcrHFl4/857YfBX2KB2xTgmtWABwxLIv+CHhj/WhZH7CTMj2fe8xfEsb0msRfQxfl7zvtqvNaQTe8uuGHeDar1lD5HEWGyQ== Received: from SYYP282MB1197.AUSP282.PROD.OUTLOOK.COM (2603:10c6:10:b7::16) by SY4P282MB1355.AUSP282.PROD.OUTLOOK.COM (2603:10c6:10:a3::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.19; Fri, 15 Mar 2024 07:48:09 +0000 Received: from SYYP282MB1197.AUSP282.PROD.OUTLOOK.COM ([fe80::2e5e:c43:aa0e:168c]) by SYYP282MB1197.AUSP282.PROD.OUTLOOK.COM ([fe80::2e5e:c43:aa0e:168c%4]) with mapi id 15.20.7386.020; Fri, 15 Mar 2024 07:48:09 +0000 Date: Fri, 15 Mar 2024 18:48:08 +1100 From: Ian W MORRISON To: Marcel Holtmann , Luiz Augusto von Dentz , linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V2] Bluetooth: Add support for MediaTek MT7922 device Message-ID: Content-Disposition: inline X-TMN: [h8j9ANtOkhC75XUZDCSWsEovTYXsEP+a7wCDvKzYJow=] X-ClientProxiedBy: SY2PR01CA0018.ausprd01.prod.outlook.com (2603:10c6:1:14::30) To SYYP282MB1197.AUSP282.PROD.OUTLOOK.COM (2603:10c6:10:b7::16) X-Microsoft-Original-Message-ID: <20240315074808.GA11445@Desknuc.> Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SYYP282MB1197:EE_|SY4P282MB1355:EE_ X-MS-Office365-Filtering-Correlation-Id: 448a7e9f-762c-404b-8b67-08dc44c44233 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BsLoufGKsxV2+7STLEwp8KT8OuvOwnjrxrfgljauYRlfz2mblTgIusbIKxrctaSDcW5ttxMb6rulyt4kpjWbePPlc2PpXcWisG+XACPYMvjCcoatvQIi5mekE6LOnQpnd3o/zpFinhY/moycR1hdycn2aa2ZWrazAvA5SHB5iNt8crDozYNZlIYIGGFmNQuuLEJKR0gasJo8GJ9rJP8tp9awl9/Lco878RRQPI6gUxvtuvpzHRLPf/rsHvlWfQo7nSbtotbUv7ob41/Pr+sRgKk4DfF9W1iYyAQYPXXskc50f/rG3hAcaz442SMu0mMRlk7mkqjgFSKU9cwg16mH4fXt/rx+Rwmc9A9R26H0Q+3XZ77pGPitm8PuATw6T3MKtSu2AS0VajWBVQWoN/20Psg6Eph8kX1U+oGalDgkLrJplxfvU3qclUTDFCBNsUI2ELqMsP43AdLT5yaVpayVZJLPfCdNCZ99Q0GPYqBNTHm48jaLKbsTpTOwp1EsEcUGZPueqDtwwSzAps0xdD+AahE/YVusrAcy4FY5fczSguyBQ3oPrlZRzXlnnn8DcTLn X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +aIBdDYi+aNA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zvjvW4hTS4uL9H8giAFCAHBNx3AIhQTn7e5j+uBsCoYrDCIxHfUnnt2uptTPfFUbiR7u6aRuHUO6wUyTTQZNOTX4B3EwzE+tIsDsuLSP01D2XF1/L2Z6Z8n4+cFg3IGBxChGJ3+29RVnqbbCpzbAeh/tDQVRmjDcER4NDpanQXsBXJ2Q8l3q75Q56OFr30VbqcWrr4 X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-746f3.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 448a7e9f-762c-404b-8b67-08dc44c44233 X-MS-Exchange-CrossTenant-AuthSource: SYYP282MB1197.AUSP282.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Mar 2024 07:48:09.5863 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SY4P282MB1355 This patch adds support for the MediaTek MT7922 Bluetooth device. The information in /sys/kernel/debug/usb/devices about the MT7922 is as follows: T: Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=13d3 ProdID=3585 Rev= 1.00 S: Manufacturer=MediaTek Inc. S: Product=Wireless_Device S: SerialNumber=000000000 C:* #Ifs= 3 Cfg#= 1 Atr=e0 MxPwr=100mA A: FirstIf#= 0 IfCount= 3 Cls=e0(wlcon) Sub=01 Prot=01 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=125us E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 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 I:* If#= 2 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none) E: Ad=8a(I) Atr=03(Int.) MxPS= 64 Ivl=125us E: Ad=0a(O) Atr=03(Int.) MxPS= 64 Ivl=125us I: If#= 2 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none) E: Ad=8a(I) Atr=03(Int.) MxPS= 512 Ivl=125us E: Ad=0a(O) Atr=03(Int.) MxPS= 512 Ivl=125us Signed-off-by: Ian W MORRISON --- V1 -> V2: Added "Bluetooth: " prefix to the subject drivers/bluetooth/btusb.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 06e915b57283..c391e612b83b 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -617,6 +617,11 @@ static const struct usb_device_id quirks_table[] = { BTUSB_WIDEBAND_SPEECH | BTUSB_VALID_LE_STATES }, + /* MediaTek MT7922 Bluetooth devices */ + { USB_DEVICE(0x13d3, 0x3585), .driver_info = BTUSB_MEDIATEK | + BTUSB_WIDEBAND_SPEECH | + BTUSB_VALID_LE_STATES }, + /* MediaTek MT7922A Bluetooth devices */ { USB_DEVICE(0x0489, 0xe0d8), .driver_info = BTUSB_MEDIATEK | BTUSB_WIDEBAND_SPEECH |