linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 1/2] Bluetooth: dt-bindings: Realtek serial bluetooth
@ 2019-01-20 12:40 David Summers
  2019-01-20 12:40 ` [PATCH v3 2/2] " David Summers
  2019-01-21 15:28 ` [PATCH v3 1/2] " Rob Herring
  0 siblings, 2 replies; 4+ messages in thread
From: David Summers @ 2019-01-20 12:40 UTC (permalink / raw)
  To: robh+dt, mark.rutland, marcel, johan.hedberg
  Cc: David Summers, linux-bluetooth, devicetree

Since v2, the compatible binding names have been changed to end in
-bt, as requested by robh.

Signed-off-by: David Summers <beagleboard@davidjohnsummers.uk>
---
 drivers/bluetooth/hci_h5.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/drivers/bluetooth/hci_h5.c b/drivers/bluetooth/hci_h5.c
index 8eede1197cd2..056ab2decccc 100644
--- a/drivers/bluetooth/hci_h5.c
+++ b/drivers/bluetooth/hci_h5.c
@@ -925,6 +925,22 @@ static struct h5_vnd rtl_vnd = {
 };
 #endif
 
+#ifdef CONFIG_OF
+static const struct of_device_id h5_of_match[] = {
+#ifdef CONFIG_BT_HCIUART_RTL
+       { .compatible = "realtek,rtl8723as-bt"},
+       { .compatible = "realtek,rtl8723bs-bt"},
+       { .compatible = "realtek,rtl8723ds-bt"},
+       { .compatible = "realtek,rtl8761atv"},
+       { .compatible = "realtek,rtl8821as-bt"},
+       { .compatible = "realtek,rtl8821cs-bt"},
+       { .compatible = "realtek,rtl8822bs-bt"},
+#endif
+       { }
+};
+MODULE_DEVICE_TABLE(of, h5_of_match);
+#endif
+
 #ifdef CONFIG_ACPI
 static const struct acpi_device_id h5_acpi_match[] = {
 #ifdef CONFIG_BT_HCIUART_RTL
-- 
beagleboard@davidjohnsummers.uk


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

* [PATCH v3 2/2] Bluetooth: dt-bindings: Realtek serial bluetooth
  2019-01-20 12:40 [PATCH v3 1/2] Bluetooth: dt-bindings: Realtek serial bluetooth David Summers
@ 2019-01-20 12:40 ` David Summers
  2019-01-21 14:46   ` Marcel Holtmann
  2019-01-21 15:28 ` [PATCH v3 1/2] " Rob Herring
  1 sibling, 1 reply; 4+ messages in thread
From: David Summers @ 2019-01-20 12:40 UTC (permalink / raw)
  To: robh+dt, mark.rutland, marcel, johan.hedberg
  Cc: David Summers, linux-bluetooth, devicetree

Since v2, the compatible binding names have been changed to end in
-bt, as requested by robh. Also the example has been expanded.

As before, for these Realtek devices, are typicaly joint wifi and
bluetooth devices; with seperate interfaces which will be
independently wired to the cpu. For these devices wifi is sdio, whilst
bluetooth is a uart. This patchset just sets the device tree links for
the bluetooth interface.

The example device tree source code, alas hasn't been tested. It is a
copy of that used on the ASUS Tinker Board:

https://github.com/TinkerBoard/debian_kernel/commit/6a3128ade33f758887048578ada61a4b7ab8e678

If these patches are accepted, my next job will be to mainline the
rest of the Tinker Board patches - so if this element of the device
tree has to change, I will also update the example here.

Signed-off-by: David Summers <beagleboard@davidjohnsummers.uk>
---
 .../bindings/net/realtek-bluetooth-serial.txt | 32 +++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt

diff --git a/Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt b/Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt
new file mode 100644
index 000000000000..119f9db4f87f
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt
@@ -0,0 +1,32 @@
+Realtek bluetooth devices connected via a UART.
+These devices typically also have a wi-fi connected via sdio - the
+compatible described here is used just for referencing the bluetooth.
+
+- compatible: should be "realtek,<name>-bt"
+  except for "realtek,trl8761atv" - which only has a serial bluetooth connection
+       "realtek,rtl8723as-bt"
+       "realtek,rtl8723bs-bt"
+       "realtek,rtl8723ds-bt"
+       "realtek,rtl8761atv"
+       "realtek,rtl8821as-bt"
+       "realtek,rtl8821cs-bt"
+       "realtek,rtl8822bs-bt"
+
+Example:
+
+&uart0 {
+	status = "okay";
+	pinctrl-0 = <&uart0_xfer>, <&uart0_cts>;
+	bluetooth {
+		compatible = "realtek,rtl8723bs-bluetooth";
+		uart_rts_gpios = <&gpio4 19 GPIO_ACTIVE_LOW>;
+		pinctrl-names = "default","rts_gpio";
+		pinctrl-0 = <&uart0_rts>;
+		pinctrl-1 = <&uart0_gpios>;
+		BT,reset_gpio    = <&gpio4 29 GPIO_ACTIVE_HIGH>;
+		BT,wake_gpio     = <&gpio4 26 GPIO_ACTIVE_HIGH>;
+		BT,wake_host_irq = <&gpio4 31 GPIO_ACTIVE_HIGH>;
+	};
+};
+
+this ensures that the bluetooth device is tied to the correct uart
-- 
beagleboard@davidjohnsummers.uk


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

* Re: [PATCH v3 2/2] Bluetooth: dt-bindings: Realtek serial bluetooth
  2019-01-20 12:40 ` [PATCH v3 2/2] " David Summers
@ 2019-01-21 14:46   ` Marcel Holtmann
  0 siblings, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2019-01-21 14:46 UTC (permalink / raw)
  To: David Summers
  Cc: Rob Herring, Mark Rutland, Johan Hedberg, linux-bluetooth, devicetree

Hi David,

> Since v2, the compatible binding names have been changed to end in
> -bt, as requested by robh. Also the example has been expanded.
> 
> As before, for these Realtek devices, are typicaly joint wifi and
> bluetooth devices; with seperate interfaces which will be
> independently wired to the cpu. For these devices wifi is sdio, whilst
> bluetooth is a uart. This patchset just sets the device tree links for
> the bluetooth interface.
> 
> The example device tree source code, alas hasn't been tested. It is a
> copy of that used on the ASUS Tinker Board:
> 
> https://github.com/TinkerBoard/debian_kernel/commit/6a3128ade33f758887048578ada61a4b7ab8e678
> 
> If these patches are accepted, my next job will be to mainline the
> rest of the Tinker Board patches - so if this element of the device
> tree has to change, I will also update the example here.
> 
> Signed-off-by: David Summers <beagleboard@davidjohnsummers.uk>
> ---
> .../bindings/net/realtek-bluetooth-serial.txt | 32 +++++++++++++++++++
> 1 file changed, 32 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt
> 
> diff --git a/Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt b/Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt
> new file mode 100644
> index 000000000000..119f9db4f87f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt
> @@ -0,0 +1,32 @@
> +Realtek bluetooth devices connected via a UART.
> +These devices typically also have a wi-fi connected via sdio - the
> +compatible described here is used just for referencing the bluetooth.

If it is not in a file name or code, I prefer you write it Bluetooth since that is the approving naming in written text. Same as Wi-Fi and SDIO etc. The tendency to lower-case everything in written text is just bad style.

> +
> +- compatible: should be "realtek,<name>-bt"
> +  except for "realtek,trl8761atv" - which only has a serial bluetooth connection
> +       "realtek,rtl8723as-bt"
> +       "realtek,rtl8723bs-bt"
> +       "realtek,rtl8723ds-bt"
> +       "realtek,rtl8761atv"
> +       "realtek,rtl8821as-bt"
> +       "realtek,rtl8821cs-bt"
> +       "realtek,rtl8822bs-bt"
> +
> +Example:
> +
> +&uart0 {
> +	status = "okay";
> +	pinctrl-0 = <&uart0_xfer>, <&uart0_cts>;
> +	bluetooth {
> +		compatible = "realtek,rtl8723bs-bluetooth”;

I think you need to correct the example to also use -bt.

Regards

Marcel


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

* Re: [PATCH v3 1/2] Bluetooth: dt-bindings: Realtek serial bluetooth
  2019-01-20 12:40 [PATCH v3 1/2] Bluetooth: dt-bindings: Realtek serial bluetooth David Summers
  2019-01-20 12:40 ` [PATCH v3 2/2] " David Summers
@ 2019-01-21 15:28 ` Rob Herring
  1 sibling, 0 replies; 4+ messages in thread
From: Rob Herring @ 2019-01-21 15:28 UTC (permalink / raw)
  To: David Summers
  Cc: mark.rutland, marcel, johan.hedberg, linux-bluetooth, devicetree

On Sun, Jan 20, 2019 at 12:40:45PM +0000, David Summers wrote:
> Since v2, the compatible binding names have been changed to end in
> -bt, as requested by robh.

Now you have the same subject for 2 different patches. Again, use 
'git log --oneline drivers/bluetooth/hci_h5.c' and follow the subject 
pattern.

> Signed-off-by: David Summers <beagleboard@davidjohnsummers.uk>
> ---
>  drivers/bluetooth/hci_h5.c | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/drivers/bluetooth/hci_h5.c b/drivers/bluetooth/hci_h5.c
> index 8eede1197cd2..056ab2decccc 100644
> --- a/drivers/bluetooth/hci_h5.c
> +++ b/drivers/bluetooth/hci_h5.c
> @@ -925,6 +925,22 @@ static struct h5_vnd rtl_vnd = {
>  };
>  #endif
>  
> +#ifdef CONFIG_OF
> +static const struct of_device_id h5_of_match[] = {
> +#ifdef CONFIG_BT_HCIUART_RTL
> +       { .compatible = "realtek,rtl8723as-bt"},
> +       { .compatible = "realtek,rtl8723bs-bt"},
> +       { .compatible = "realtek,rtl8723ds-bt"},
> +       { .compatible = "realtek,rtl8761atv"},
> +       { .compatible = "realtek,rtl8821as-bt"},
> +       { .compatible = "realtek,rtl8821cs-bt"},
> +       { .compatible = "realtek,rtl8822bs-bt"},
> +#endif
> +       { }
> +};
> +MODULE_DEVICE_TABLE(of, h5_of_match);
> +#endif
> +
>  #ifdef CONFIG_ACPI
>  static const struct acpi_device_id h5_acpi_match[] = {
>  #ifdef CONFIG_BT_HCIUART_RTL
> -- 
> beagleboard@davidjohnsummers.uk
> 

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

end of thread, other threads:[~2019-01-21 15:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-20 12:40 [PATCH v3 1/2] Bluetooth: dt-bindings: Realtek serial bluetooth David Summers
2019-01-20 12:40 ` [PATCH v3 2/2] " David Summers
2019-01-21 14:46   ` Marcel Holtmann
2019-01-21 15:28 ` [PATCH v3 1/2] " Rob Herring

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).