From patchwork Fri Mar 15 06:46:54 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: 13593076 Received: from AUS01-ME3-obe.outbound.protection.outlook.com (mail-me3aus01olkn2156.outbound.protection.outlook.com [40.92.63.156]) (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 29D6A14A8D; Fri, 15 Mar 2024 06:46:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.92.63.156 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710485221; cv=fail; b=mvivbdbQvV38/mjdP2gnkoZZ4bAKfkd22UOgmYfkAzXiAN5icaMRKu6QFUrZZR9mEOCQ3xRt0zh2paF6SWAHQq3xmlneJP+6gB3kq4XpRU9Y1wFowMlVnBAKOpE2ftN7m4x7tMDwketc50MY3tZ+hVyABhWs3VF2FmOknN4rNB8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710485221; c=relaxed/simple; bh=jqcgRWk9IZu5cO9UUIlrrI0Tn5wUrQdQFo7LQe7iK8Q=; h=Date:From:To:Subject:Message-ID:Content-Type:Content-Disposition: MIME-Version; b=QG6nqDLjzfqViHPhXSK02xsnAv9Vf9COVXyuKgqssqeeFmbg7dsZmRl1c+/0wBAOIqwIA8PLhozlwgv3CzGQJwdrBGbHQPbYh3eHSrq0MA7W4k9ffHcIMB0Jf4FT8Y6KLP2B/AcGHO8Hp03xvvL+Pzur/6WDKhLaAgoNjR9lu08= 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=SIq9dseZ; arc=fail smtp.client-ip=40.92.63.156 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="SIq9dseZ" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Jswd6RNov73kHQj3R6ACIrfaf1U0BWrLfGKo984MdIsWu9axVI//YLIzx8dSnI6P6R6tGbd9+jIIjaE/n82qPAjf53ODokD3PsRoRVt4Mi/MRvtA43NnceDEmWX5esYwaMsezVWay8eEW5/quD2R0Te8GsJZ1wfvLAGt/7ctILyKdbW1WflmiRW/H18sI2DN/71k4A8DOcJjDDRIrgoKrWGUvN4FzwXTTT9fPUIV1yFdGP6jh11Gt5kank7LNE40gzXWdbkBucM/if63qqOd2hKnSnzMVR+32OjKzJZdZn/xPBuHrPkyyjojZvoGJ4Q6TbBWcqQTPRnJ/raVVFBtfQ== 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=F8CdwzIEJLHiBH+OocdnZTO+rbthnosdCtlGZ1P81s8=; b=JODDfY5eHcJ2fMgw6DCEXlU9IkKYqAHPM7JNA8H1xlDnkNCwbho48OK8pWgDL3bW/hbnIz5nggj+uARrn08QGsG3q8UzFw41rFNb5bA5wvXU+T+Yl60GozhVCM6270ZaPF0WfF2YbbIRfgw7D9MCdRpnxGC7BtSEzyKLtplO7t7QHVUYK/fva9QUZzPWH4e0Ci8JKIZc9W1AJTou/SY+j3wLUUDhCtomHuVYZOKlpHklE5Td1/9PqQiHF+JSepaoPAji/9K9rxA+TNajYTPoR8kiQZ6iJr+AVuPdiN1adiuMy3Yw7zjJa2OD6RmmjRX3+7veYiew28ZL1dcSdR8vLg== 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=F8CdwzIEJLHiBH+OocdnZTO+rbthnosdCtlGZ1P81s8=; b=SIq9dseZxWor3u4bLwfkk3zjF7jZEdu0ggnlOoYzNoxOiN/K0IPSBTTdFRvLTdHzrg8t5zc/U/todURgDuQ+hPYOCWPkt6/bWtFN+KM2T09NBPcUCyH/0s6Sb1YJAj3sdrCxuhrJ8W60If36Lvpty/yc8UQH4VAC1JvAsnwGeynSkNrzQTkdYwmd/skpK2JQzyJfuPGm29OVOs0PCBa7lGgELyQ/57VjNpYjBxLpwC0sJF6pB0bZbR6awuYstjWaK74hRjbWahS8e49YAoSWGzvPxR2wIg4/xm+ZfP7We0JoNeFMAR+fcmU+3q2/4YHeg6wyknPRHrM7ADX2S5C3Fg== Received: from SYYP282MB1197.AUSP282.PROD.OUTLOOK.COM (2603:10c6:10:b7::16) by ME4P282MB1205.AUSP282.PROD.OUTLOOK.COM (2603:10c6:220:92::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.21; Fri, 15 Mar 2024 06:46:55 +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 06:46:55 +0000 Date: Fri, 15 Mar 2024 17:46:54 +1100 From: Ian W MORRISON To: Marcel Holtmann , Luiz Augusto von Dentz , linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] Add support for MediaTek MT7922 Bluetooth device Message-ID: Content-Disposition: inline X-TMN: [/XuOPdRIUkKcdlB9GF7aZnI3PhEDJVnGO9tpggYMTik=] X-ClientProxiedBy: SY6PR01CA0113.ausprd01.prod.outlook.com (2603:10c6:10:1b8::16) To SYYP282MB1197.AUSP282.PROD.OUTLOOK.COM (2603:10c6:10:b7::16) X-Microsoft-Original-Message-ID: <20240315064654.GA11075@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_|ME4P282MB1205:EE_ X-MS-Office365-Filtering-Correlation-Id: 4c71803b-8a6d-438f-9699-08dc44bbb408 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bGrr7gygiT6f/YBXzD9lQGFMuRXCbVjfeCfJ0qGL2jf8mw856Tb2TJca9bpC9Z2nvoEHxvz1WSBrZz1yysovI0oLfj4TTS7H7qxLWNfB2KwFZZSqM5NK0PUrMqxs8fF4VAg/fN2K2/5zuRxhM2OTq5RVj921qOaEevJuu5E0MtWe+l8IW5tZlj/IVWUX1NGUhiBSA6H/XJQ8/AEU3M2x5DxshBA7d3UoRajU5NaM3gxj+NI4eTnOL2F2+0Z7GHmYRLcZlYi4tqX+tnJZa9o4M61ooaMRHLFHActrxZdzO8b5s+Ch6KSI1uZFqCVwn7vS1aZ8VJCnnrlUOkyIoMJKsTubH/XXyEihabo7I1ZWyrGtyqSy/PGouk0BVR8aouPTTHFTJ3ihu4eXPcOH1z/MK0Fdaul7TymmV915OKYF5A+QEQbOgioWetJUclgV7W+/0R41iyoNAYpAEUfa4vt4xULlFK2CYlSi97tfz27U5jup0oqd2F9YOnB0x0SUH6ggJsYDBE6uWfMuwmLyEYqE70iNwJUYMa3fZvCvmdMAMgJlIHqzAuNlHN+sy7wmX38N X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-M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LuxAxC46/rKUnL6PdW15lN1EmI0x1aSWOuQ51+fDwvIJoU8AKIBxTzW+KFDEzprbI3ARbRCegMEpCniG3oW0R8nOQepGvLBRQfpz0dIa0bK5vubAp8o318hmlfXshZYlZ3gsRGxk0/8fwLm29azot0YapXt076UkBkFkuVPKW3YIgbHdXfB0Lnjc1msnK5mufGhQ8SW6Q9xB77AKE4uuDzcMoc9KiEYX X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-746f3.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 4c71803b-8a6d-438f-9699-08dc44bbb408 X-MS-Exchange-CrossTenant-AuthSource: SYYP282MB1197.AUSP282.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Mar 2024 06:46:55.0812 (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: ME4P282MB1205 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 --- 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 |