All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC v2 0/9] Realtek Bluetooth serdev support (H5 protocol)
@ 2018-01-01 20:42 ` Martin Blumenstingl
  0 siblings, 0 replies; 123+ messages in thread
From: Martin Blumenstingl @ 2018-01-01 20:42 UTC (permalink / raw)
  To: robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-bluetooth-u79uwXL29TY76Z2rM5mHXA,
	linux-serial-u79uwXL29TY76Z2rM5mHXA
  Cc: mark.rutland-5wv7dgnIgG8, marcel-kz+m5ild9QBg9hUCZPvPmw,
	gustavo-THi1TnShQwVAfugRpC6u6w,
	johan.hedberg-Re5JQEeQqe8AvxtiuMwx3w,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, jslaby-IBi9RG/b67k,
	johan-DgEjT+Ai2ygdnm+yROfE0A,
	linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ,
	carlo-6IF/jdPJHihWk0Htik3J/w, drake-6IF/jdPJHihWk0Htik3J/w,
	Martin Blumenstingl

Hello,

I am sending this series because I want to get feedback.
please don't expect it to be perfect (yet). especially since it's
touching parts of the kernel I've not worked with before.

my goal was NOT to use the user-space initialization tool for the
Bluetooth part of one of my devices (which uses a Realtek RTL8723BS).
my hope was that I only had to hook up serdev support to hci_h5 and
re-use the setup function provided by btrtl. unfortunately it wasn't
that easy.

there are no datasheets for the RTL8723BS or RTL8723DS out there.
however, there are some userspace tools which go through the whole
initialization process - this is what I used as reference:
- RTL8723BS Bluetooth sources from [0]
- RTL8723DS Bluetooth sources from [1]

These modules require a firmware and a config file (both don't seem
to be compatible with what we have in linux-firmware at the moment).

since it's an RFC I also have some questions:
- who can help testing that I didn't break any USB based Realtek
  Bluetooth chips? I only have UART (embedded into the SDIO RTL8723BS
  and RTL8723DS) ones
- what about the Bluetooth firmware and config blobs? how to get them
  into the linux-firmware tree? maybe Larry Finger can help here :)
- what are <your name here> comments about this series?


Changes since RFC v1 at [2]:
- fixed compile error in PATCH #1 if CONFIG_SERIAL_DEV_BUS is disabled
  (spotted by Intel's kbuild test robot - many thanks!)
- renamed "disable-gpios" to "enable-gpios" in the dt-bindings and
  hci_h5 patches
- added a "realtek,config-data" property to devicetree which can be used
  to provide the "config"-blob. I did not find a way to auto-generate
  that blob. a similar property is described by "marvell-bt-8xxx.txt".
  This affects the dt-bindings (Documentation) patch and introduces a
  new patch for btrtl.c.
- guard against the vendor_setup callback being NULL (thanks Marcel
  Holtmann for suggesting this in the review of RFC 1) in the hci_h5
  patch
- added comments where the msleep() times are coming from in the hci_h5
  patch
- dropped an unnecessary msleep() after sending the "change baudrate"
  command (thanks Marcel Holtmann for spotting this)
- entirely drop HCI_UART_INIT_PENDING instead of just ignoring it in
  hci_serdev


[0] https://github.com/lwfinger/rtl8723bs_bt
[1] https://github.com/NextThingCo/rtl8723ds_bt
[2] https://www.spinics.net/lists/linux-bluetooth/msg72862.html


Martin Blumenstingl (9):
  serdev: implement parity configuration
  dt-bindings: net: bluetooth: add support for Realtek Bluetooth chips
  Bluetooth: btrtl: add MODULE_FIRMWARE declarations
  Bluetooth: btrtl: split the device initialization into smaller parts
  Bluetooth: btrtl: add support for retrieving the UART settings
  Bluetooth: btrtl: add support for the RTL8723BS and RTL8723DS chips
  bluetooth: btrtl: load the config blob from devicetree when available
  Bluetooth: drop HCI_UART_INIT_PENDING support
  Bluetooth: hci_h5: add support for Realtek UART Bluetooth modules

 .../devicetree/bindings/net/realtek-bluetooth.txt  |  41 ++
 drivers/bluetooth/Kconfig                          |   1 +
 drivers/bluetooth/btrtl.c                          | 461 ++++++++++++++++-----
 drivers/bluetooth/btrtl.h                          |  46 ++
 drivers/bluetooth/hci_h5.c                         | 206 ++++++++-
 drivers/bluetooth/hci_ldisc.c                      |  38 --
 drivers/bluetooth/hci_serdev.c                     |   3 -
 drivers/bluetooth/hci_uart.h                       |   4 +-
 drivers/tty/serdev/core.c                          |  12 +
 drivers/tty/serdev/serdev-ttyport.c                |  21 +
 include/linux/serdev.h                             |   5 +
 11 files changed, 678 insertions(+), 160 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/net/realtek-bluetooth.txt

-- 
2.15.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 123+ messages in thread

end of thread, other threads:[~2018-01-09 15:26 UTC | newest]

Thread overview: 123+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-01 20:42 [RFC v2 0/9] Realtek Bluetooth serdev support (H5 protocol) Martin Blumenstingl
2018-01-01 20:42 ` Martin Blumenstingl
2018-01-01 20:42 ` Martin Blumenstingl
     [not found] ` <20180101204217.26165-1-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2018-01-01 20:42   ` [RFC v2 1/9] serdev: implement parity configuration Martin Blumenstingl
2018-01-01 20:42     ` Martin Blumenstingl
2018-01-01 20:42     ` Martin Blumenstingl
     [not found]     ` <20180101204217.26165-2-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2018-01-02 11:16       ` Marcel Holtmann
2018-01-02 11:16         ` Marcel Holtmann
2018-01-02 11:16         ` Marcel Holtmann
     [not found]         ` <4FDCB65A-641A-4134-BAF1-4A777012FDE7-kz+m5ild9QBg9hUCZPvPmw@public.gmane.org>
2018-01-02 21:16           ` Martin Blumenstingl
2018-01-02 21:16             ` Martin Blumenstingl
2018-01-02 21:16             ` Martin Blumenstingl
     [not found]             ` <CAFBinCCq9mYBhzoL1XBVQNGxALg8oK5GB7Md9HJf_mchEMu3-A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-02 21:34               ` Martin Blumenstingl
2018-01-02 21:34                 ` Martin Blumenstingl
2018-01-02 21:34                 ` Martin Blumenstingl
     [not found]                 ` <CAFBinCD=iuE+ho22kihCFG=AJV5t+JtjRww8PLuq-cAJ2RkAHQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-03  9:06                   ` Johan Hovold
2018-01-03  9:06                     ` Johan Hovold
2018-01-03  9:06                     ` Johan Hovold
2018-01-03 12:37                   ` Marcel Holtmann
2018-01-03 12:37                     ` Marcel Holtmann
2018-01-03 12:37                     ` Marcel Holtmann
2018-01-01 20:42   ` [RFC v2 2/9] dt-bindings: net: bluetooth: add support for Realtek Bluetooth chips Martin Blumenstingl
2018-01-01 20:42     ` Martin Blumenstingl
2018-01-01 20:42     ` Martin Blumenstingl
     [not found]     ` <20180101204217.26165-3-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2018-01-02 11:16       ` Marcel Holtmann
2018-01-02 11:16         ` Marcel Holtmann
2018-01-02 11:16         ` Marcel Holtmann
     [not found]         ` <2A1D60F1-F86F-4A2B-A43A-F3419506DE99-kz+m5ild9QBg9hUCZPvPmw@public.gmane.org>
2018-01-02 21:10           ` Martin Blumenstingl
2018-01-02 21:10             ` Martin Blumenstingl
2018-01-02 21:10             ` Martin Blumenstingl
     [not found]             ` <CAFBinCBNro18Ak3h1fHFpAioDzimh5KcUeOE8PjQr_CCkAs7PA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-03 19:07               ` Rob Herring
2018-01-03 19:07                 ` Rob Herring
2018-01-03 19:07                 ` Rob Herring
2018-01-01 20:42   ` [RFC v2 3/9] Bluetooth: btrtl: add MODULE_FIRMWARE declarations Martin Blumenstingl
2018-01-01 20:42     ` Martin Blumenstingl
2018-01-01 20:42     ` Martin Blumenstingl
2018-01-01 20:42   ` [RFC v2 4/9] Bluetooth: btrtl: split the device initialization into smaller parts Martin Blumenstingl
2018-01-01 20:42     ` Martin Blumenstingl
2018-01-01 20:42     ` Martin Blumenstingl
2018-01-01 20:42   ` [RFC v2 5/9] Bluetooth: btrtl: add support for retrieving the UART settings Martin Blumenstingl
2018-01-01 20:42     ` Martin Blumenstingl
2018-01-01 20:42     ` Martin Blumenstingl
2018-01-01 20:42   ` [RFC v2 6/9] Bluetooth: btrtl: add support for the RTL8723BS and RTL8723DS chips Martin Blumenstingl
2018-01-01 20:42     ` Martin Blumenstingl
2018-01-01 20:42     ` Martin Blumenstingl
2018-01-01 20:42   ` [RFC v2 7/9] bluetooth: btrtl: load the config blob from devicetree when available Martin Blumenstingl
2018-01-01 20:42     ` Martin Blumenstingl
2018-01-01 20:42     ` Martin Blumenstingl
     [not found]     ` <20180101204217.26165-8-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2018-01-02 11:11       ` Marcel Holtmann
2018-01-02 11:11         ` Marcel Holtmann
2018-01-02 11:11         ` Marcel Holtmann
     [not found]         ` <563D6F9F-8495-40D4-BE56-5338ED2B9B99-kz+m5ild9QBg9hUCZPvPmw@public.gmane.org>
2018-01-02 11:15           ` Carlo Caione
2018-01-02 11:15             ` Carlo Caione
2018-01-02 11:15             ` Carlo Caione
     [not found]             ` <CAL9uMOEMDup4hRkxD-tM8R0YirGs5uQi31AjJUnFCPNMKUdRHg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-02 11:19               ` Marcel Holtmann
2018-01-02 11:19                 ` Marcel Holtmann
2018-01-02 11:19                 ` Marcel Holtmann
     [not found]                 ` <E8E39477-CF1A-4A3E-84C5-830E182C2266-kz+m5ild9QBg9hUCZPvPmw@public.gmane.org>
2018-01-02 11:31                   ` Carlo Caione
2018-01-02 11:31                     ` Carlo Caione
2018-01-02 11:31                     ` Carlo Caione
     [not found]                     ` <CAL9uMOH0N-4jgQncmPjK-KyU0vY9Q0ZnHYSAGgz3z3ywzc8Avw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-02 11:38                       ` Marcel Holtmann
2018-01-02 11:38                         ` Marcel Holtmann
2018-01-02 11:38                         ` Marcel Holtmann
     [not found]                         ` <F38429FB-2D20-4EF7-8547-E5A5D67D1618-kz+m5ild9QBg9hUCZPvPmw@public.gmane.org>
2018-01-02 21:43                           ` Martin Blumenstingl
2018-01-02 21:43                             ` Martin Blumenstingl
2018-01-02 21:43                             ` Martin Blumenstingl
2018-01-02 21:46                       ` Martin Blumenstingl
2018-01-02 21:46                         ` Martin Blumenstingl
2018-01-02 21:46                         ` Martin Blumenstingl
     [not found]                         ` <CAFBinCBB=SmviOMRHGDH6vzjTjV-mrtQEc8nBUhDbJGs9SBpgw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-02 23:06                           ` Carlo Caione
2018-01-02 23:06                             ` Carlo Caione
2018-01-02 23:06                             ` Carlo Caione
     [not found]                             ` <CAL9uMOFyfr_qGf5BeTojkMeWeH8LqPoKj=LrdgEMB2wmhGBxmA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-03 20:50                               ` Martin Blumenstingl
2018-01-03 20:50                                 ` Martin Blumenstingl
2018-01-03 20:50                                 ` Martin Blumenstingl
     [not found]                                 ` <CAFBinCAFsDRpp=4We1hQPiutM1Q0MrqebPLyS3e2_e+JcBoSmg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-04  9:46                                   ` Carlo Caione
2018-01-04  9:46                                     ` Carlo Caione
2018-01-04  9:46                                     ` Carlo Caione
     [not found]                                     ` <CAL9uMOGkZefjD_JNxjf4yJ0ATFtOG5Cm_XQq1fy0VQDjiMFBmg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-05 14:57                                       ` Marcel Holtmann
2018-01-05 14:57                                         ` Marcel Holtmann
2018-01-05 14:57                                         ` Marcel Holtmann
     [not found]                                         ` <EC216531-81EC-4EE8-BAC4-C6954C222092-kz+m5ild9QBg9hUCZPvPmw@public.gmane.org>
2018-01-05 16:15                                           ` Marcel Holtmann
2018-01-05 16:15                                             ` Marcel Holtmann
2018-01-05 16:15                                             ` Marcel Holtmann
     [not found]                                             ` <1F394D8B-CFB8-48BA-BC6B-15D1EE51DB08-kz+m5ild9QBg9hUCZPvPmw@public.gmane.org>
2018-01-05 20:44                                               ` Marcel Holtmann
2018-01-05 20:44                                                 ` Marcel Holtmann
2018-01-05 20:44                                                 ` Marcel Holtmann
     [not found]                                                 ` <41669609-3E28-473D-8616-71B9D0EEDCDF-kz+m5ild9QBg9hUCZPvPmw@public.gmane.org>
2018-01-07 20:07                                                   ` Martin Blumenstingl
2018-01-07 20:07                                                     ` Martin Blumenstingl
2018-01-07 20:07                                                     ` Martin Blumenstingl
     [not found]                                                     ` <CAFBinCBasb-WkLngxL2RAk9YMihC437ZgPKSkOd7Fm0RHG_aTw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-09 15:26                                                       ` Marcel Holtmann
2018-01-09 15:26                                                         ` Marcel Holtmann
2018-01-09 15:26                                                         ` Marcel Holtmann
2018-01-01 20:42   ` [RFC v2 8/9] Bluetooth: drop HCI_UART_INIT_PENDING support Martin Blumenstingl
2018-01-01 20:42     ` Martin Blumenstingl
2018-01-01 20:42     ` Martin Blumenstingl
     [not found]     ` <20180101204217.26165-9-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2018-01-02 11:04       ` Marcel Holtmann
2018-01-02 11:04         ` Marcel Holtmann
2018-01-02 11:04         ` Marcel Holtmann
     [not found]         ` <5F8922BB-5A97-43B1-88D5-591EB76FF787-kz+m5ild9QBg9hUCZPvPmw@public.gmane.org>
2018-01-02 21:06           ` Martin Blumenstingl
2018-01-02 21:06             ` Martin Blumenstingl
2018-01-02 21:06             ` Martin Blumenstingl
     [not found]             ` <CAFBinCAxUmxivp_PWkoydha84LbJi-GGv6Uhs6cKR+D_8c8QCw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-03 17:14               ` Loic Poulain
2018-01-03 17:14                 ` Loic Poulain
2018-01-03 17:14                 ` Loic Poulain
     [not found]                 ` <CAMZdPi9KkPZvuvrNgfGmRksJnR0cFti8P5XC-HTFeUfkFbCZ_g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-03 20:30                   ` Martin Blumenstingl
2018-01-03 20:30                     ` Martin Blumenstingl
2018-01-03 20:30                     ` Martin Blumenstingl
2018-01-03 18:38       ` Rob Herring
2018-01-03 18:38         ` Rob Herring
2018-01-03 18:38         ` Rob Herring
     [not found]         ` <CAL_JsqLB9aem0TXZyUvFpsfXP4p++oukPmQzGEYxkVwZt+bdvw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-03 20:38           ` Martin Blumenstingl
2018-01-03 20:38             ` Martin Blumenstingl
2018-01-03 20:38             ` Martin Blumenstingl
2018-01-01 20:42   ` [RFC v2 9/9] Bluetooth: hci_h5: add support for Realtek UART Bluetooth modules Martin Blumenstingl
2018-01-01 20:42     ` Martin Blumenstingl
2018-01-01 20:42     ` Martin Blumenstingl
     [not found]     ` <20180101204217.26165-10-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2018-01-02 11:11       ` Marcel Holtmann
2018-01-02 11:11         ` Marcel Holtmann
2018-01-02 11:11         ` Marcel Holtmann
     [not found]         ` <A32FB2B7-C20D-4E65-A353-1F7B89D9C702-kz+m5ild9QBg9hUCZPvPmw@public.gmane.org>
2018-01-02 21:27           ` Martin Blumenstingl
2018-01-02 21:27             ` Martin Blumenstingl
2018-01-02 21:27             ` Martin Blumenstingl

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.