Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1642126imm; Mon, 3 Sep 2018 05:55:13 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZOvb2cJEyVFM4hwJUlNWBzbVyLznwMoRhyaDELwBEFmOTUpMFc8Sq4Bo8sgNR0TcGGRpEk X-Received: by 2002:a65:5304:: with SMTP id m4-v6mr26743727pgq.250.1535979313487; Mon, 03 Sep 2018 05:55:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535979313; cv=none; d=google.com; s=arc-20160816; b=cRwxTJ84oKculvm2CwuLMcb+AnFp5mRsOQCctWOXKEefn6dxia5ga2xfEx5T965vbQ riqyQjyl85DURZadFVuRYZ3qWQxB4hiRu3iCgL0vz8uVxvw/82Dycp57B+Y4tymLk1dX sfhezye2WRwY4JBwKDM7AIPfVJvoiQhCCvN9anO9fHoUZEVlagU0M0Hd5re/Ij5gAj3e WUKeD4x5YRCeM2mjlAGk3JLW//a74ALyIamJ3E+66X8KOYEWq+ZgJlu16ne7M+z4OFRr qju46j9ewEJ0qFbE9/CJ7NJQXqP+VGLcbRC5UHcv/4mL4MsepY0XSKocTLqa1gm0d9ET QpIw== 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=3b8Gn2UliYgTf81fuVOB3xlVrlt7ykmQxg72CNRMnSs=; b=mF6rYLQoEg1C3xQc/aQ5txsEJvHZghvnGsfcJCr/j6yjJJlUVGeMo9WqoXZN0XlEoT 9WwJHQOn/Zvzpyc/+b8L4RHgMh1PbPzpJ94WEBCAojvShmGRPPSPr73KbXE+YxrwA7sJ VMogowKjTtAbP5BxHxdUWteQr6B6h2tAXZPFHCCUrPmhvvjInFJmHBpJZKSae+FLM/wx S1Uu0Q2kqX8xujU+DvKZnTGPDhmcUmIfDJhPYGA1xseYFNa0tFJc/OGzM675u525KKBc rA0LcD/CytxzmC2vSkXslNs5um4xbu6zNlQ5utBdozAL+D4Xeo/TIRJM4sbUWxj6AbKw vcAQ== 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 k18-v6si18055144pgm.102.2018.09.03.05.54.58; Mon, 03 Sep 2018 05:55:13 -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 S1727368AbeICRNv (ORCPT + 99 others); Mon, 3 Sep 2018 13:13:51 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:19759 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725984AbeICRNv (ORCPT ); Mon, 3 Sep 2018 13:13:51 -0400 X-UUID: 6a596f8cab9945c38389fb582b83f63f-20180903 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 320368671; Mon, 03 Sep 2018 20:53:43 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Mon, 3 Sep 2018 20:53:41 +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.1210.3 via Frontend Transport; Mon, 3 Sep 2018 20:53:41 +0800 From: To: , CC: , , , Sean Wang Subject: [PATCH v3 2/2] Bluetooth: mediatek: Add protocol support for MediaTek MT7663U USB devices Date: Mon, 3 Sep 2018 20:53:40 +0800 Message-ID: <3d04befe2071d1c0665a5f9d81e685d208fc056f.1535978548.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 811c337..4340c1e 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -2357,6 +2357,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 @@ -2786,6 +2787,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; @@ -2881,6 +2885,7 @@ static int btusb_mtk_shutdown(struct hci_dev *hdev) return 0; } +MODULE_FIRMWARE(FIRMWARE_MT7663); MODULE_FIRMWARE(FIRMWARE_MT7668); #endif -- 2.7.4