Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3646694imm; Mon, 20 Aug 2018 02:14:36 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwlpQPUMRcWQZJHEQzLsojVjJ0g0Z5g5ZY650Nc3JOX0ZpYhvXhT7R2ZlRe1vo468bp31n7 X-Received: by 2002:a62:586:: with SMTP id 128-v6mr47551829pff.80.1534756476250; Mon, 20 Aug 2018 02:14:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534756476; cv=none; d=google.com; s=arc-20160816; b=y2Zt6VRWw6AL2bmVZWhI08OZEqGhBR6RsPpJK0O6fGBNB+gq8iYmOzbkhkwwcDSIoh CD8EmcltnhOC8ZIsMmus6kecR//UwZZcBjn/TbaK3G32zfd2MdceoPhGPCkNrmYUAXPE uw4J2rUkHwkqiyQb8AAVciFzFk77GH5mW5QmGXLTNlVYOoT5q2ZHzrh2YKohrznUQJ9P +Ka874rqUddTRQnkIAKJOdpzruiTSqGA2eGMp6lhGsgUpOcKTI/41qtnVgO6N1LfLBG8 JTrlu+JeyVgD8uh8BJgiEZA7TO+XQ3H2KHfMuyLy5HFbVXGOP+iwuAS0idY9AcN3uVmm gwjw== 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:arc-authentication-results; bh=FTXmj8kJtdo0RFVCeGl/drqFNHR+eOYOtLt91yfcEyo=; b=hW5dxRV5Tpid7acdWgsUeoh++J4eMla7RQYJxU9Z8nW+i4S/3u75lGXb0/y4tEW0Ph 8PG9DvAqhgP7R0/mZB4ZjVJu7KDdxHrHqzF39bWveoHGThW0w467//xpbeMoiOCa6IzL 5UxNY55fL4r9oLz9baPjjyGkqk3vDcOY3IW44aH9z692OGqQKEDcLpaZ3gSO6Th9pHzO U2gb7voGoXj9sU383d64lIHBd38wkxwEbFUlnUg1y8CiBdLNHBJwuk4IPkUmOcMumxDa IrTshoPMXhsA0sPWDuFJ4Qi20PamUVbPpN0HEUpWvbYJVr40C5KYNiY4EzYPTw2AT9Ub aKyA== 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 q4-v6si3790576plr.127.2018.08.20.02.14.21; Mon, 20 Aug 2018 02:14:36 -0700 (PDT) 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 S1726562AbeHTM1y (ORCPT + 99 others); Mon, 20 Aug 2018 08:27:54 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:28538 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726010AbeHTM1x (ORCPT ); Mon, 20 Aug 2018 08:27:53 -0400 X-UUID: 4fd946433235492983af336944f474b9-20180820 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 989111970; Mon, 20 Aug 2018 17:12:59 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Mon, 20 Aug 2018 17:12:57 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Mon, 20 Aug 2018 17:12:57 +0800 From: To: , CC: , , , Sean Wang Subject: [PATCH v2 2/2] Bluetooth: mediatek: Add protocol support for MediaTek MT7663U USB devices Date: Mon, 20 Aug 2018 17:12:55 +0800 Message-ID: <3f43f8211428c059eb642a0f08b7b7af6296193f.1534752578.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-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 4ebfb77..b362a64 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -2358,6 +2358,7 @@ static int btusb_shutdown_intel(struct hci_dev *hdev) #ifdef CONFIG_BT_HCIBTUSB_MTK +#define FIRMWARE_MT7663 "mt7663pr2h.bin" #define FIRMWARE_MT7668 "mt7668pr2h.bin" #define BTMTKUSB_TX_WAIT_VND_EVT 1 @@ -2751,6 +2752,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; @@ -2882,6 +2886,7 @@ static int btusb_mtk_recv_event(struct hci_dev *hdev, struct sk_buff *skb) return err; } +MODULE_FIRMWARE(FIRMWARE_MT7663); MODULE_FIRMWARE(FIRMWARE_MT7668); #endif -- 2.7.4