Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1696945imm; Mon, 3 Sep 2018 07:11:47 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdao98H9hsWmKoX2bGKeDN2UdL8x2d1qSgzGTgayNQL8ifedRaKzItDMSQEQI9gMitbGk7IN X-Received: by 2002:a63:e318:: with SMTP id f24-v6mr24801472pgh.175.1535983907410; Mon, 03 Sep 2018 07:11:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535983907; cv=none; d=google.com; s=arc-20160816; b=Tq9sjaL32fD05BLYd+4c+zzZzhYznty+7H/MO483oPMFgzkQ2GGVKyWrtwecK4OB2r TvDQjQ8lMnIdkbXQq5deN+wGAio+6L2XIT/WB9UZXO0DU5vWsi59EiugHacCMn+j1k8h fol5dbdVXOuVvtUcUR3fqwEdu9KhJ9uyQSDIFr13D/s7/xSuwH6PHO6aCVSj4eBLswwD aK7aG3G9roxFH17oAtV8zwVBzuvGcUxmrwtvuZPI/A7emOMaYfvoByQ7re+VaGP1F6z2 HWqGUCwBY/fM0RLW8K4tzXPhuz+4vhx65k1AeSWOR14JHKG0UpKFOwlPaEDbw7TUUZhj Jl4Q== 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=rGfjbjGepiOvEav2SaH1gq5EKT2UiDaoaA03V5OKDlY=; b=cqiyk0J6KzfdoL/kHmeEAmmOc8jIyAMfG3DPSeRaueM1UBn7qUiDdYG0mXLFFxV3Gr nedP6Cb9gmAasorRw0Uk54j90bLdJJXXa85QYusGHep7pxgipU3VvtyPT6BHtUgKeV8z cwIzQAuHDanYfmb5XQZo8ga6SyDggut8umpLzUxkkrWssUp7/nGrvP0pZTpNpkrs3QIx Z28qLxZTCxuyuS9mD1CyAfH5CGh5j+Utnb6v2ZWEq2R77SiFR+xAzEfM5SOfb6CwUHtf 9IUOW7lQQLeBS/On7hfKmjUVtXEHW/Ecn2sxAr8WrYL4/jwAOf898sV0GZfd7VLN23He 5o2Q== 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 t190-v6si3859193pfb.344.2018.09.03.07.11.32; Mon, 03 Sep 2018 07:11:47 -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 S1727592AbeICS2y (ORCPT + 99 others); Mon, 3 Sep 2018 14:28:54 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:53530 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726763AbeICS2y (ORCPT ); Mon, 3 Sep 2018 14:28:54 -0400 X-UUID: e0829aea4b6840c68dfcc4d8d1da5287-20180903 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 2109329699; Mon, 03 Sep 2018 22:08:27 +0800 Received: from mtkcas09.mediatek.inc (172.21.101.178) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Mon, 3 Sep 2018 22:08:25 +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.1210.3 via Frontend Transport; Mon, 3 Sep 2018 22:08:25 +0800 From: To: , CC: , , , Sean Wang Subject: [PATCH v4 2/2] Bluetooth: mediatek: Add protocol support for MediaTek MT7663U USB devices Date: Mon, 3 Sep 2018 22:08:24 +0800 Message-ID: <6b4ba4e0dbcdcf3a40188e8b6a60228d529c31f6.1535983416.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 c29d12e..fd511a4 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -2409,6 +2409,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 HCI_WMT_MAX_EVENT_SIZE 64 @@ -2837,6 +2838,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; @@ -2932,6 +2936,7 @@ static int btusb_mtk_shutdown(struct hci_dev *hdev) return 0; } +MODULE_FIRMWARE(FIRMWARE_MT7663); MODULE_FIRMWARE(FIRMWARE_MT7668); #endif -- 2.7.4