Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3653481imu; Fri, 18 Jan 2019 14:28:06 -0800 (PST) X-Google-Smtp-Source: ALg8bN4KoGw5T7Hr0Z9xr3fQ7oNe4nWdxWKHhG26qh2CBbf8lG01egg/MsOsJJSYdZ5PiEHkmAw7 X-Received: by 2002:a17:902:f20d:: with SMTP id gn13mr20171705plb.11.1547850486871; Fri, 18 Jan 2019 14:28:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547850486; cv=none; d=google.com; s=arc-20160816; b=aec1sEyct1f8y/TZBtbcyJ3FQ8ulKLi/6qnlWYKgUDppxA/ImuAvV3fTx0qc2huo78 dF0IR9x3IqfSRx+8lNaUkj8P6f1ljyD3T7saJ8AJFwg5PQ59VUbk7Oc58//LREiQTexH kjMJYbqiKJXCN27KojkawShWhxj6P8WRv1b8NLa4v/VEB53cJqNgFZa4jQ+F8QAoSFhm m0JgOLkmUl5gGa+oF8nje7dmsAD2SRK31Ch6mVRJlg+RQNrsQ34reie8MFvCZpf+CWhR YNc7/KJoIrXx5ONQKJ+autaQaqXWK7pP1f6kN3hKYi2O7mnLTGlt7KbgJc9e4CsI2Y/n ByxA== 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=/OzSdjRgMjjJ76/Thi1xYiM/vpLZbFGh1B2vyRFVYsA=; b=FdfvS4uCi8fFvorU97ScrQqBqPw/SYyPTsrlxJPjl9Fd9oNC8ejogeKeZNyYA0+tld USf/+Tx7mQigKK3lugD9U2kToLVdizDtw10lGsQdKoJmEgRRkIIkn3SRtwcsR5DFVTIV PuZAd9MezHUNQ32Jv1COK0mUCFUxZzvXq9OiIvj2QkG89ounwqwn4ngn8lnjAUJTNXZZ CKIlWyq3xEgSle9CVu7yV6jAZPRRqrCTIndiHO+IcJbtbV4iGlLqmuoDB8Jc6Bsym5s+ P2/jco/nGX6mKq9hKQo08BwbHKHhzXY9uwK1+k9rbC0+x83mlxQjyoMwh9X+I6FAm64x 7IRw== 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 t12si5299459plr.311.2019.01.18.14.27.50; Fri, 18 Jan 2019 14:28:06 -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 S1729950AbfARWYn (ORCPT + 99 others); Fri, 18 Jan 2019 17:24:43 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:15108 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1729955AbfARWYn (ORCPT ); Fri, 18 Jan 2019 17:24:43 -0500 X-UUID: 75af8fc2950940c59f3633b75f091b51-20190119 X-UUID: 75af8fc2950940c59f3633b75f091b51-20190119 Received: from mtkmrs01.mediatek.inc [(172.21.131.159)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 586277262; Sat, 19 Jan 2019 06:24:38 +0800 Received: from mtkcas09.mediatek.inc (172.21.101.178) by mtkmbs01n2.mediatek.inc (172.21.101.79) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Sat, 19 Jan 2019 06:24:36 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Sat, 19 Jan 2019 06:24:36 +0800 From: To: , CC: , , , Sean Wang Subject: [PATCH v5 2/2] Bluetooth: btusb: Add protocol support for MediaTek MT7663U USB devices Date: Sat, 19 Jan 2019 06:24:31 +0800 Message-ID: <11f545dcf82eb2e097354f2cb5df8e128b80786d.1547849398.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: 667F7A411AFB7690537A268DA5AB71D13432DE3399A547740DAC6A6841A76A442000: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 d2ac1912f968..d21bfcf2f95a 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 @@ -2836,6 +2837,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; @@ -2931,6 +2935,7 @@ static int btusb_mtk_shutdown(struct hci_dev *hdev) return 0; } +MODULE_FIRMWARE(FIRMWARE_MT7663); MODULE_FIRMWARE(FIRMWARE_MT7668); #endif -- 2.18.0