devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <sean.wang@mediatek.com>
To: robh+dt@kernel.org, mark.rutland@arm.com, marcel@holtmann.org,
	johan.hedberg@gmail.com
Cc: devicetree@vger.kernel.org, linux-bluetooth@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
	Sean Wang <sean.wang@mediatek.com>
Subject: [PATCH v5 0/7] add support for Bluetooth on MT7622 SoC
Date: Mon, 9 Jul 2018 23:56:56 +0800	[thread overview]
Message-ID: <cover.1531150733.git.sean.wang@mediatek.com> (raw)

From: Sean Wang <sean.wang@mediatek.com>

v5 and changes since v4:
 - add Reviewed-by Tag from Ulf Hansson for patch 2.
 - remove default y in Kconfig for btmtkuart selection to avoid overkill for
   users which would like to have less an amount on stuff in kernel.
 - list header declarations in alphabetical order and add a proper blank line
   within.
 - remove unused macro.
 - use sizeof to calculate structure size instead of an aextra macro to hardcode.
 - use struct hci_dev * as input paraments for mtk_hci_wmt_sync and mtk_setup_fw
   for that can be reused in mtk bluetooth with other interfaces.
 - remove unused local variabled in mtk_btuart_recv.
 - remove superfluous :8 for dlen2 in struct mtk_stp_hdr definition.
 - give a reasonable naming for these labels and add a pm_runtime_put_noidle()
   in the path undoing failing pm_runtime_get_sync().
 - Turn __u8 into u8 in struct mtk_stp_hdr.
 - Change coding style for align 80-chars wrap

 Really thanks for these reviews by Johan Hovold and Andy Shevchenko

v4 and changes since v3:
 - refine patch 2 based on commit 919b7308fcc4 to allow that
   dev_pm_domain_attach() will return better error codes. 

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                          |  22 +
 drivers/bluetooth/Makefile                         |   3 +
 drivers/bluetooth/btmtkuart.c                      | 352 ++++++++++++++
 drivers/bluetooth/btmtkuart.h                      | 116 +++++
 drivers/bluetooth/btuart.c                         | 527 +++++++++++++++++++++
 drivers/bluetooth/btuart.h                         |  30 ++
 drivers/tty/serdev/core.c                          |  15 +-
 include/net/bluetooth/hci.h                        |   9 +
 net/bluetooth/hci_core.c                           |   3 +-
 11 files changed, 1118 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

             reply	other threads:[~2018-07-09 15:56 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-09 15:56 sean.wang [this message]
2018-07-09 15:56 ` [PATCH v5 1/7] dt-bindings: net: bluetooth: Add mediatek-bluetooth sean.wang
2018-07-14 16:26   ` Marcel Holtmann
2018-07-15  5:10     ` Sean Wang
2018-07-09 15:56 ` [PATCH v5 2/7] serdev: add dev_pm_domain_attach|detach() sean.wang
2018-07-14 16:27   ` Marcel Holtmann
2018-07-15  5:29     ` [SPAM]Re: " Sean Wang
2018-07-15  8:12       ` Greg Kroah-Hartman
2018-07-15  8:56   ` Johan Hovold
2018-07-16  9:50     ` Greg Kroah-Hartman
2018-07-09 15:56 ` [PATCH v5 3/7] Bluetooth: Add new serdev based driver for UART attached controllers sean.wang
     [not found] ` <cover.1531150733.git.sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2018-07-09 15:57   ` [PATCH v5 4/7] Bluetooth: Add new quirk for non-persistent setup settings sean.wang-NuS5LvNUpcJWk0Htik3J/w
2018-07-14 16:34     ` Marcel Holtmann
     [not found]       ` <2825B722-E75C-4A3C-8110-879205E46C0E-kz+m5ild9QBg9hUCZPvPmw@public.gmane.org>
2018-07-15  7:02         ` Sean Wang
2018-07-16 12:56           ` Marcel Holtmann
2018-07-16 16:05             ` Sean Wang
2018-07-16 16:15               ` [SPAM]Re: " Sean Wang
2018-07-18 12:14               ` Marcel Holtmann
2018-07-18 13:33                 ` Sean Wang
2018-07-09 15:57   ` [PATCH v5 7/7] MAINTAINERS: add an entry for MediaTek Bluetooth driver sean.wang-NuS5LvNUpcJWk0Htik3J/w
2018-07-09 15:57 ` [PATCH v5 5/7] Bluetooth: Extend btuart driver for join more vendor devices sean.wang
2018-07-14 16:44   ` Marcel Holtmann
2018-07-15  7:52     ` Sean Wang
2018-07-16 12:59       ` Marcel Holtmann
2018-07-16 15:29         ` Sean Wang
2018-07-18 12:23           ` Marcel Holtmann
2018-07-18 14:26             ` Sean Wang
2018-07-18 16:56               ` [SPAM]Re: " Sean Wang
2018-07-09 15:57 ` [PATCH v5 6/7] Bluetooth: mediatek: Add protocol support for MediaTek serial devices sean.wang
2018-07-14 16:32   ` Marcel Holtmann
2018-07-15  5:53     ` Sean Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1531150733.git.sean.wang@mediatek.com \
    --to=sean.wang@mediatek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=marcel@holtmann.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).