Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1598800imm; Thu, 14 Jun 2018 00:17:14 -0700 (PDT) X-Google-Smtp-Source: ADUXVKK/wfKiGsKl+Qazw/JX0p38YbUwGM9t/RoBcWa+cAtJIxjXK1xMrjuEYfg3cASm5vfbXEd7 X-Received: by 2002:a17:902:854a:: with SMTP id d10-v6mr1687869plo.106.1528960634577; Thu, 14 Jun 2018 00:17:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528960634; cv=none; d=google.com; s=arc-20160816; b=MqCur8opo2yu4Xb8YQGdd3mUYSKT8R6RPPOQUv0bjozluGDCJNR6OxVw51RxlVHPz1 eD/YCALKAbBuaNv/N74solmYC3qNSVUETUDmZJSQV7xGfrQ5PiyRyvdddMQ2IDBkhUyO GFSxrNcvKDbJLwYQalQubVVX1+7CTw/A+MHIcDTKQTlNUpXqLt41liE63aPfe9SGHj3Y JC0oQXCPR8XY9tSIKqOquo4//aAo86UONt0Fr1xdrJ3vKPE6Z2jDOc4MSux6KHM1ueZL lmfPHH3InGzoUPvPH+TO60XLzsrgGIb41u2M9XdaiO9AHZJ2id1bEYseE+dFMFWu5e58 XWig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=uz7iUZTGN7CubbcC7BvC5jwgbx66L6dwk2X2l5wVu4Y=; b=PEXZVD9nPWO6mCeXtmDvVomM6ZH64r7FPdhKInRj1UoSGxYSPWJJnyr7dJnYo7C9++ 67x9zl+c8br3yOTQfFzDAagjEQaWAZV4Y6x7kVZzRUq+rZYs6/WqwHPmcrojEPPvqER5 Fb9evjE00H9IMFL7/YgHUfrI0jKDcMNKc1fSdiVitwqElVfimNSuiEUw+hWTw7aFsiPH mPdWU0vn2UuaJ9dHglaniCKx6RsbRnq6yfe1/3TiEmY3INPVEl1XTM7bCNxJxhUO+Zn+ 0kCIHtfRPtIddAr04I4YvvzExiSDFHdfED7V1mRUHfu0pQDehQ8ek6uciLHPiUBEcv+p NNKg== 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 w3-v6si3843235pgc.645.2018.06.14.00.17.00; Thu, 14 Jun 2018 00:17:14 -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 S1754743AbeFNHOn (ORCPT + 99 others); Thu, 14 Jun 2018 03:14:43 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:46168 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1753009AbeFNHOj (ORCPT ); Thu, 14 Jun 2018 03:14:39 -0400 X-UUID: 23e7db0be7c648f3baaefdb17d0cbe2c-20180614 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 730357532; Thu, 14 Jun 2018 15:14:35 +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; Thu, 14 Jun 2018 15:14:33 +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; Thu, 14 Jun 2018 15:14:33 +0800 From: To: , , , CC: , , , , , Sean Wang Subject: [PATCH v3 0/7] add support for Bluetooth on MT7622 SoC Date: Thu, 14 Jun 2018 15:14:22 +0800 Message-ID: X-Mailer: git-send-email 1.7.9.5 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 v3 and changes since v2 * all changes happen on patch 6 - fix up SPDX license style for btmtkuart.h. - change firmware download from in ACL data to in HCI commands and then remove unused mtk_acl_wmt_sync and related code. - add a workaround replacing bad vendor event id 0xe4 with 0xff every vendor should use. - add a sanity check for mtk_hci_wmt_sync to verifying if input parameters are valid. - add an atomic_inc(&bdev->hdev->cmd_cnt) for __hci_cmd_sync_ev. - be changed to use firmware with a header called mt7622pr2h.bin. v2 and changes since v1 - Dropped patches already being applied - Rewirte the whole driver using btuart [1], and add slight extension of btuart to fit into btmtkuart driver. Beware that [1] is also pulled into one part of the series for avoiding any breakage when the patchset is being compiled. [1] btuart https://www.spinics.net/lists/linux-bluetooth/msg74918.html v1: Hi, This patchset introduces built-in Bluetooth support on MT7622 SoC. And, it should be simple to make an extension to support other MediaTek SoCs with adjusting a few of changes on the initialization sequence of the device. Before the main driver is being introduced, a few of things about power-domain management should be re-worked for serdev core and MediaTek SCPSYS to allow the Bluetooth to properly power up. Patch 2: add a generic way attaching power domain to serdev Patch 3 and 4: add cleanups with reuse APIs from Linux core Patch 5: fix a limitation about power enablement Bluetooth depends on Patch 1, 6 and 7: the major part of adding Bluetooth support to MT7622 Sean Marcel Holtmann (1): Bluetooth: Add new serdev based driver for UART attached controllers Sean Wang (6): dt-bindings: net: bluetooth: Add mediatek-bluetooth serdev: add dev_pm_domain_attach|detach() Bluetooth: Add new quirk for non-persistent setup settings Bluetooth: Extend btuart driver for join more vendor devices Bluetooth: mediatek: Add protocol support for MediaTek serial devices MAINTAINERS: add an entry for MediaTek Bluetooth driver .../devicetree/bindings/net/mediatek-bluetooth.txt | 35 ++ MAINTAINERS | 8 + drivers/bluetooth/Kconfig | 23 + drivers/bluetooth/Makefile | 3 + drivers/bluetooth/btmtkuart.c | 355 ++++++++++++++ drivers/bluetooth/btmtkuart.h | 119 +++++ drivers/bluetooth/btuart.c | 527 +++++++++++++++++++++ drivers/bluetooth/btuart.h | 30 ++ drivers/tty/serdev/core.c | 14 +- include/net/bluetooth/hci.h | 9 + net/bluetooth/hci_core.c | 3 +- 11 files changed, 1124 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/mediatek-bluetooth.txt create mode 100644 drivers/bluetooth/btmtkuart.c create mode 100644 drivers/bluetooth/btmtkuart.h create mode 100644 drivers/bluetooth/btuart.c create mode 100644 drivers/bluetooth/btuart.h -- 2.7.4