Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2458350ybi; Sat, 1 Jun 2019 17:04:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqytlA/ZNrv2zGATY9PoR9Hzi1XyQPkmpU8Q/8L/oMcGZ9ShqEqVTi71E+HvcbrfQ8fWndMi X-Received: by 2002:a63:295:: with SMTP id 143mr18304008pgc.279.1559433869422; Sat, 01 Jun 2019 17:04:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559433869; cv=none; d=google.com; s=arc-20160816; b=DgNsQaKMG976InbvqGC0Vsj3uNOGHUpKgmL6g+AN8cEwPe87rygPHN8kJS+f9a9A7W sLRqpteO03rJr5XVjbripcMcXjxMcnJreoJB9Wh4g9v6GTGiQzSomnChC0+DLoWhisjp XNp/2Zn9g9VnoO+a0aSJg0V+ryEzK72w9cyggCPlyO30Wcy2mbTEDFGZQpeDT8SZqYyA s6Zxfd+wrOfRgTg7/5iMz5mpDBAvcyk1IgzPkQckWKLe9VZUEVy8casPyCgQ3K5vYhEi drJLvpUkYLDCxWEwjiaOw4AZROfVr7YvVz5Zu/pxyYi5DkuagckcvZddvcQ+v2wYe9ae ylNg== 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=nHpONGrvoV19eViSH3r8SnU7DzPvFvBauaXfFMysPC8=; b=QRYHNbSeEuRLIr8n6jMUoHtoiNDe7FfMCIE6XtjBpoHXyItaMiHACPEXdJM5FpAHDE 9kxIwgAZAzjLcfJHVmdRaUrMi2SJ1yl9ofF2K54xghhAxQbni5dTuZuEKbWq0PEPurOO 6MBH96hdQK1FN+8uk57IYNKrlNztHlDHsUGcEnTCp88qxFNsDavbpGtr4C5rM2F0kqFp ljNb8QTnbP99+0NrdTqFiZeSoYO+ZDGzHg3ZCLErZEh60N5yKwdYBPaBCB/qSCIdJTzz QALN108IyfovuXaVR0RVShfd33IlPp7yCLNaNi3mJ+WMMyov3cNS1V8bf28xeqiNUyTf AUQQ== 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 a3si12275750pjv.64.2019.06.01.17.04.11; Sat, 01 Jun 2019 17:04:29 -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 S1726749AbfFBADC (ORCPT + 99 others); Sat, 1 Jun 2019 20:03:02 -0400 Received: from mailgw01.mediatek.com ([216.200.240.184]:59097 "EHLO mailgw01.mediatek.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726343AbfFBADB (ORCPT ); Sat, 1 Jun 2019 20:03:01 -0400 X-UUID: 4c28cb44c3044b0693bbde2c97d87ccf-20190601 X-UUID: 4c28cb44c3044b0693bbde2c97d87ccf-20190601 Received: from mtkcas68.mediatek.inc [(172.29.94.19)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 1656217114; Sat, 01 Jun 2019 16:02:56 -0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Sat, 1 Jun 2019 17:02:54 -0700 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; Sun, 2 Jun 2019 08:02:54 +0800 From: To: , CC: , , , Sean Wang Subject: [PATCH v7 2/2] Bluetooth: btusb: Add protocol support for MediaTek MT7663U USB devices Date: Sun, 2 Jun 2019 08:02:49 +0800 Message-ID: <1559433769-23749-3-git-send-email-sean.wang@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1559433769-23749-1-git-send-email-sean.wang@mediatek.com> References: <1559433769-23749-1-git-send-email-sean.wang@mediatek.com> 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 91b4ac7cb203..31cec3657916 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -2463,6 +2463,7 @@ static int btusb_shutdown_intel_new(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 @@ -2904,6 +2905,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; @@ -3015,6 +3019,7 @@ static int btusb_mtk_shutdown(struct hci_dev *hdev) return 0; } +MODULE_FIRMWARE(FIRMWARE_MT7663); MODULE_FIRMWARE(FIRMWARE_MT7668); #endif -- 2.17.1