Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2568973imu; Thu, 24 Jan 2019 15:27:29 -0800 (PST) X-Google-Smtp-Source: ALg8bN5i5qtA7Obrt+d0SErea2ap1TTtdKLj7dRfojt2OFX0isE0MLrNh8aksYEFAyF63Jl0tYT3 X-Received: by 2002:a17:902:541:: with SMTP id 59mr8663450plf.88.1548372448976; Thu, 24 Jan 2019 15:27:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548372448; cv=none; d=google.com; s=arc-20160816; b=hCgkauAfsfvc2bP7Cf9d+WNdJSx6Ad6MPROukDxNpZBxTx/a91f9LzjY80UOxZBEJ7 5fT2R3VQpOGINZRfQ4wbmMQ986yvRzguiA+8h3F1zYoWoahBs+Ry9huSpIDy3UaOVSwS 32OuID1EdpPqW/v0wFFQokpZpYSOvBtEjAus9rMYQ2vxDr4jmqSN5ATFZfYf4xvglqfz 3dAC0+5kU/xDdV9h4W6Ert1QfoTrw6jzrwad5N/w021t0HuvRIbdUj8imlJr0jaVr7/I ityWrwYhNNNRD0zd3hgpopGjzOP5KnSstxQJK1dC0ZHZWhb5a1Q+fJouO4OdVwZnlVlh lWqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=1hEEu3WyV1GTJOa+MR/H5IJsGwlsjU22OJqR1Pg5C4E=; b=kfLnjBsynwoh8Kj1z9Xb9FvBMda7lqALsVTwpiUF0sfUMOyg+XKt4/uFIy38lhZ4L9 L5yYOosyt0NOaflLMRBRDyAGrdUT3kdMn6NgWZKbYZ+f8h+iazPlZpep4h2LbcX7qeic XWTPyDt5BXteKOIXtC5c0Py1c8bs4+cnWsaRR1cYMTeG+NoaoI2DFMHOiUidNgm9kzE2 gm3XH2+YZXU+v17BR2Ec1DUPd3Fm4hZQifd1+o6HGMz11gT9dhtcEdcInHdSbzcfsIj/ OYLtteYNvvt441/Skvv5MZJBaigAOliAYHTwu+Bo4e0CfAAl0+2uIoS684VUm+MXJ8Bu SsEg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o7si23428183pgl.42.2019.01.24.15.27.11; Thu, 24 Jan 2019 15:27:28 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728052AbfAXX1F (ORCPT + 99 others); Thu, 24 Jan 2019 18:27:05 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:15015 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726147AbfAXX1D (ORCPT ); Thu, 24 Jan 2019 18:27:03 -0500 X-UUID: 2e184b65650d4b9d8c627019e74d9279-20190125 X-UUID: 2e184b65650d4b9d8c627019e74d9279-20190125 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1587781733; Fri, 25 Jan 2019 07:26:59 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs01n2.mediatek.inc (172.21.101.79) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 25 Jan 2019 07:26:57 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Fri, 25 Jan 2019 07:26:57 +0800 From: To: , CC: , , , Sean Wang Subject: [PATCH v6 2/2] Bluetooth: btusb: Add protocol support for MediaTek MT7663U USB devices Date: Fri, 25 Jan 2019 07:26:48 +0800 Message-ID: <8d26f2845f83a387ad10a445969318a967ab1b3b.1548371338.git.sean.wang@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 4B53339ECEF8759AE0B0118DF5A197F330289B1C4DB08DC281A6BC9F0674CC842000:8 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sean Wang This adds the support of enabling MT7663U Bluetooth function running on the top of btusb driver. The information in /sys/kernel/debug/usb/devices about the Bluetooth device is listed as the below. T: Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 5 Spd=5000 MxCh= 0 D: Ver= 3.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS= 9 #Cfgs= 1 P: Vendor=0e8d ProdID=7663 Rev= 1.00 S: Manufacturer=MediaTek Inc. S: Product=Wireless_Device S: SerialNumber=000000000 C:* #Ifs= 3 Cfg#= 1 Atr=a0 MxPwr=160mA A: FirstIf#= 0 IfCount= 2 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=1024 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS=1024 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 Signed-off-by: Sean Wang --- drivers/bluetooth/btusb.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index fc8bc0d9c49d..77b201f3391b 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -2408,6 +2408,7 @@ static int btusb_shutdown_intel(struct hci_dev *hdev) #ifdef CONFIG_BT_HCIBTUSB_MTK +#define FIRMWARE_MT7663 "mediatek/mt7663pr2h.bin" #define FIRMWARE_MT7668 "mediatek/mt7668pr2h.bin" #define HCI_WMT_MAX_EVENT_SIZE 64 @@ -2849,6 +2850,9 @@ static int btusb_mtk_setup(struct hci_dev *hdev) } switch (dev_id) { + case 0x7663: + fwname = FIRMWARE_MT7663; + break; case 0x7668: fwname = FIRMWARE_MT7668; break; @@ -2960,6 +2964,7 @@ static int btusb_mtk_shutdown(struct hci_dev *hdev) return 0; } +MODULE_FIRMWARE(FIRMWARE_MT7663); MODULE_FIRMWARE(FIRMWARE_MT7668); #endif -- 2.18.0