Skip to contentSkip to conversation

bluetooth: realtek: devicetree: Add device tree description to bluetooth rtl drivers

PATCH In review David Summers 3 participants 10 messages Dec 29, 2018 – Jan 19, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bluetooth: realtek: devicetree: Add device tree description to bluetooth rtl drivers

This patch add the relevent device tree handles to the bluetooth driver for serial realtek devices.

Specifically it takes all devices listed in btrtk.c identifes from the realtek web site which are serial devices (this invariably means devices that end with and "s" in the device name).

Most of these devices are dual wifi and bluetooth, with wifi on and sdio connection, and bluetooth on a serial uart. As these two interfaces will need independent listings in the device tree, the nodes here have "-bluetooth" added. The only exception is the rtl8761atv device, which is bluetooth only - and only has a uart interface.

Can devicetree people revive the naming scheme used here, and confirm it is acceptable.

Marcel, if the device tree people are happy can you apply to the bluetooth tree.

Thanks,

David.

---
 drivers/bluetooth/hci_h5.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
drivers/bluetooth/hci_h5.c +14 -0
index 8eede1197cd2..61c9e729efc1 100644
@@ -925,6 +925,20 @@ static struct h5_vnd rtl_vnd = {
 };
 #endif
 
+#ifdef CONFIG_OF
+static const struct of_device_id h5_of_match[] = {
+       { .compatible = "realtek,rtl8723as-bluetoooth"},
+       { .compatible = "realtek,rtl8723bs-bluetoooth"},
+       { .compatible = "realtek,rtl8723ds-bluetoooth"},
+       { .compatible = "realtek,rtl8761atv"},
+       { .compatible = "realtek,rtl8821as-bluetoooth"},
+       { .compatible = "realtek,rtl8821cs-bluetoooth"},
+       { .compatible = "realtek,rtl8822bs-bluetoooth"},
+       { }
+};
+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
Signature · 7 lines
[email protected]


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#1 lore raw

And just looking at my patch, I remember I wrote this a month or so ago, thought it had been checked - but a couple of changes didn't make it in:

1) "bluetoooth" is spelled "bluetooth"
2) The realtek compatible should be wrapped in a "#ifdef CONFIG_BT_HCIUART_RTL" as hci_h5 needs that to have the realtek links in

I'll make these changes in a few days, but leave this patch here - in case there are any other comments.

Would hope to get basic nod by next week (yes know bad time for people over Christmas), as its free time I have to do the device tree that needs these in ...

Regards,

David.

Quoted 44 lines · David Summers

This patch add the relevent device tree handles to the bluetooth driver for serial realtek devices.

Specifically it takes all devices listed in btrtk.c identifes from the realtek web site which are serial devices (this invariably means devices that end with and "s" in the device name).

Most of these devices are dual wifi and bluetooth, with wifi on and sdio connection, and bluetooth on a serial uart. As these two interfaces will need independent listings in the device tree, the nodes here have "-bluetooth" added. The only exception is the rtl8761atv device, which is bluetooth only - and only has a uart interface.

Can devicetree people revive the naming scheme used here, and confirm it is acceptable.

Marcel, if the device tree people are happy can you apply to the bluetooth tree.

Thanks,

David.

---
  drivers/bluetooth/hci_h5.c | 14 ++++++++++++++
  1 file changed, 14 insertions(+)
drivers/bluetooth/hci_h5.c +7 -0
index 8eede1197cd2..61c9e729efc1 100644
@@ -925,6 +925,20 @@ static struct h5_vnd rtl_vnd = {
  };
  #endif
 
+#ifdef CONFIG_OF
+static const struct of_device_id h5_of_match[] = {
+       { .compatible = "realtek,rtl8723as-bluetoooth"},
+       { .compatible = "realtek,rtl8723bs-bluetoooth"},
+       { .compatible = "realtek,rtl8723ds-bluetoooth"},
+       { .compatible = "realtek,rtl8761atv"},
+       { .compatible = "realtek,rtl8821as-bluetoooth"},

drivers/bluetooth/hci_h5.c static struct h5_vnd rtl_vnd = { · line 944

Quoted 10 lines
drivers/bluetooth/hci_h5.c +7 -0
+       { .compatible = "realtek,rtl8821cs-bluetoooth"},
+       { .compatible = "realtek,rtl8822bs-bluetoooth"},
+       { }
+};
+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

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

maintainer
#2 lore raw
In reply to David Summers

Hi David,

Quoted 14 lines

This patch add the relevent device tree handles to the bluetooth driver for serial realtek devices.

Specifically it takes all devices listed in btrtk.c identifes from the realtek web site which are serial devices (this invariably means devices that end with and "s" in the device name).

Most of these devices are dual wifi and bluetooth, with wifi on and sdio connection, and bluetooth on a serial uart. As these two interfaces will need independent listings in the device tree, the nodes here have "-bluetooth" added. The only exception is the rtl8761atv device, which is bluetooth only - and only has a uart interface.

Quoted 5 lines

Can devicetree people revive the naming scheme used here, and confirm it is acceptable.

Marcel, if the device tree people are happy can you apply to the bluetooth tree.

where is the email from the DT people acking this and more important also documented it.

Regards

Marcel

#3 lore raw

PATCH v2 1/1 Description of the realtek bluetooth device tree hooks

In reply to David Summers

This adds the desrciption file that describes the hooks for the realtek bluetooth serial devices, as needed to refer to the interface in the device tree.

---
 .../bindings/net/realtek-bluetooth-serial.txt | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt
Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt new file +28 -0
new file mode 100644
index 000000000000..0aabca1fc002
@@ -0,0 +1,28 @@
+Realtek bluetooth devices connected via a UART
+
+- compatible: should be "realtek,<name>-bluetooth"
+  except for "realtek,trl8761atv" - which only has a serial bluetooth connection
+       "realtek,rtl8723as-bluetooth"
+       "realtek,rtl8723bs-bluetooth"
+       "realtek,rtl8723ds-bluetooth"
+       "realtek,rtl8761atv"
+       "realtek,rtl8821as-bluetooth"
+       "realtek,rtl8821cs-bluetooth"
+       "realtek,rtl8822bs-bluetooth"
+- These device are bluetooth devices, that connect via a uart
+- all devices (except for rtl8761atv) are also wifi devices, this is connected
+  seperatly via sdio - and is not covered by this compatible node
+- ideally these will be referenced in a device tree serial node via serdev
+ http://events17.linuxfoundation.org/sites/events/files/slides/serdev-elce-2017-2.pdf
+
+Example:
+
+&uart0 {
+	status = "okay";
+       	pinctrl-0 = <&uart0_xfer>, <&uart0_cts>;
+       	bluetooth {
+               	  compatible = "realtek,rtl8723bs-bluetooth";
+       	};
+};
+
+this ensures that the bluetooth device is tied to the correct uart
Signature · 1 line
[email protected]
#4 lore raw

PATCH v2 1/1 Patch to add the realtek bluetooth device tree refs to the code

This patch adds the necessary device tree hooks to the realtek bluetooth driver for serial connections.

The realtek devices that are listed btrtl.c are searched on the realtek web site for the version that have serial connections.

Most of these devices also have wi-fi connected via sdio, that is not covered by the bluetooth driver - but as that interface will also be needed in the device tree, the hocks here have "-bluetooth" added. The exception to this is the rtl8761atv, which only has a serial bluetooth.

---
 drivers/bluetooth/hci_h5.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
drivers/bluetooth/hci_h5.c +16 -0
index 8eede1197cd2..2fec7ff2ce7c 100644
@@ -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-bluetooth"},
+       { .compatible = "realtek,rtl8723bs-bluetooth"},
+       { .compatible = "realtek,rtl8723ds-bluetooth"},
+       { .compatible = "realtek,rtl8761atv"},
+       { .compatible = "realtek,rtl8821as-bluetooth"},
+       { .compatible = "realtek,rtl8821cs-bluetooth"},
+       { .compatible = "realtek,rtl8822bs-bluetooth"},
+#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
Signature · 1 line
[email protected]
maintainer
#5 lore raw

Re: [PATCHv2] Patch to add the realtek bluetooth device tree refs to the code

Hi David,

Quoted 26 lines

This patch adds the necessary device tree hooks to the realtek bluetooth driver for serial connections.

The realtek devices that are listed btrtl.c are searched on the realtek web site for the version that have serial connections.

Most of these devices also have wi-fi connected via sdio, that is not covered by the bluetooth driver - but as that interface will also be needed in the device tree, the hocks here have "-bluetooth" added. The exception to this is the rtl8761atv, which only has a serial bluetooth.

---
drivers/bluetooth/hci_h5.c | 16 ++++++++++++++++

1 file changed, 16 insertions(+)
drivers/bluetooth/hci_h5.c +1 -0
index 8eede1197cd2..2fec7ff2ce7c 100644
@@ -925,6 +925,22 @@ static struct h5_vnd rtl_vnd = {
 };
 #endif
 
+#ifdef CONFIG_OF

drivers/bluetooth/hci_h5.c static struct h5_vnd rtl_vnd = { · line 938

Quoted 10 lines
drivers/bluetooth/hci_h5.c +10 -0
+static const struct of_device_id h5_of_match[] = {
+#ifdef CONFIG_BT_HCIUART_RTL
+       { .compatible = "realtek,rtl8723as-bluetooth"},
+       { .compatible = "realtek,rtl8723bs-bluetooth"},
+       { .compatible = "realtek,rtl8723ds-bluetooth"},
+       { .compatible = "realtek,rtl8761atv"},
+       { .compatible = "realtek,rtl8821as-bluetooth"},
+       { .compatible = "realtek,rtl8821cs-bluetooth"},
+       { .compatible = "realtek,rtl8822bs-bluetooth"},
+#endif

I really need an Ack from Rob on the naming here.

Regards

Marcel

#6 lore raw

Re: [PATCHv2] Patch to add the realtek bluetooth device tree refs to the code

Hi Marcel,

Yes have been having an email conversation with Rob on the device tree email list.

he wants minor changes to the naming, which i agree with. So have much of a revised patch set read to send in. Just need to check some things.

Hopefully be able to send later this weekend, and it will replace the patch below.

Thanks,

David.

Quoted 44 lines · Marcel Holtmann

Hi David,

Quoted 26 lines

This patch adds the necessary device tree hooks to the realtek bluetooth driver for serial connections.

The realtek devices that are listed btrtl.c are searched on the realtek web site for the version that have serial connections.

Most of these devices also have wi-fi connected via sdio, that is not covered by the bluetooth driver - but as that interface will also be needed in the device tree, the hocks here have "-bluetooth" added. The exception to this is the rtl8761atv, which only has a serial bluetooth.

---
drivers/bluetooth/hci_h5.c | 16 ++++++++++++++++

1 file changed, 16 insertions(+)
drivers/bluetooth/hci_h5.c +1 -0
index 8eede1197cd2..2fec7ff2ce7c 100644
@@ -925,6 +925,22 @@ static struct h5_vnd rtl_vnd = {
 };
 #endif
 
+#ifdef CONFIG_OF

drivers/bluetooth/hci_h5.c static struct h5_vnd rtl_vnd = { · line 938

Quoted 10 lines
drivers/bluetooth/hci_h5.c +10 -0
+static const struct of_device_id h5_of_match[] = {
+#ifdef CONFIG_BT_HCIUART_RTL
+       { .compatible = "realtek,rtl8723as-bluetooth"},
+       { .compatible = "realtek,rtl8723bs-bluetooth"},
+       { .compatible = "realtek,rtl8723ds-bluetooth"},
+       { .compatible = "realtek,rtl8761atv"},
+       { .compatible = "realtek,rtl8821as-bluetooth"},
+       { .compatible = "realtek,rtl8821cs-bluetooth"},
+       { .compatible = "realtek,rtl8822bs-bluetooth"},
+#endif

I really need an Ack from Rob on the naming here.

Regards

Marcel

maintainer
#7 lore raw

Re: [PATCHv2] Description of the realtek bluetooth device tree hooks

In reply to David Summers
Quoted 3 lines · David Summers

This adds the desrciption file that describes the hooks for the realtek bluetooth serial devices, as needed to refer to the interface in the device tree.

Please follow conventions for patch subjects. 'git log --oneline --no-merges -- path/to/file' usually gives a good clue. In this case, something like:

dt-bindings: net: Add Realtek serial bluetooth binding

Quoted 14 lines
---
 .../bindings/net/realtek-bluetooth-serial.txt | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt
Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt new file +1 -0
new file mode 100644
index 000000000000..0aabca1fc002
@@ -0,0 +1,28 @@
+Realtek bluetooth devices connected via a UART

Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt line 11

Quoted 10 lines
Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt new file +10 -0
+
+- compatible: should be "realtek,<name>-bluetooth"
+  except for "realtek,trl8761atv" - which only has a serial bluetooth connection
+       "realtek,rtl8723as-bluetooth"
+       "realtek,rtl8723bs-bluetooth"
+       "realtek,rtl8723ds-bluetooth"
+       "realtek,rtl8761atv"
+       "realtek,rtl8821as-bluetooth"
+       "realtek,rtl8821cs-bluetooth"
+       "realtek,rtl8822bs-bluetooth"

Arguably, '-bluetooth' is not necessary as nothing else is attached to the serial port. At least shorten it to '-bt'.

Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt line 12

Quoted 1 line
Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt new file +1 -0
+- These device are bluetooth devices, that connect via a uart

s/device/devices/

Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt line 14

Quoted 2 lines
Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt new file +2 -0
+- all devices (except for rtl8761atv) are also wifi devices, this is connected
+  seperatly via sdio - and is not covered by this compatible node

Really, this should be up above the property list in a description of the device(s).

Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt line 15

Quoted 1 line
Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt new file +1 -0
+- ideally these will be referenced in a device tree serial node via serdev

Not ideally, but it is only valid for this to be a child of a UART.

serdev is a kernel thing, and shouldn't be part of the binding doc.

Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt line 16

Quoted 1 line
Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt new file +1 -0
+ http://events17.linuxfoundation.org/sites/events/files/slides/serdev-elce-2017-2.pdf

Useful, but again, not part of this binding.

There's no interrupts, GPIO control lines, power supplies, etc. for these chips? The binding should be complete even if your platform doesn't need these.

Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt line 21

Quoted 5 lines
Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt new file +5 -0
+
+Example:
+
+&uart0 {
+	status = "okay";

Don't show status in examples.

Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt line 25

Quoted 4 lines
Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt new file +4 -0
+       	pinctrl-0 = <&uart0_xfer>, <&uart0_cts>;
+       	bluetooth {
+               	  compatible = "realtek,rtl8723bs-bluetooth";
+       	};

Mixed tabs and spaces. Use tabs.

Quoted 6 lines
Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt new file +3 -0
+};
+
+this ensures that the bluetooth device is tied to the correct uart
Signature · 1 line
[email protected]
#8 lore raw

Re: [PATCHv2] Description of the realtek bluetooth device tree hooks

Thanks Rob,

I'll hopefully make those changes this weekend, and resubmit - just so next weekend can move onto the device tree.

Oh yes, on the "-bluetooth" or "-bt"; as these devices have both and sdio input for wifi, and uart for bluetooth; I guess they will need to be listed twice in a device tree, both under uart and sdio. Now as both these parts of the device tree will want to specify the driver used, and the driver is different for bluetooth and for wifi - doesn't that mean we should specify compatible differently? Otherwise how will the kernel know which driver to load for wifi and which for bluetooth?

So question is am I missing something here, and this could be simplified?

On the interrupts, GPIO control lines, power supplies, etc, on the ASUS code that I'm basing the patches on (for Tinker Board S) - these bits are freestanding in the device tree, and mainly go in with the wifi patch (and not bluetooth). I'll put some though into how this is best arranged when going mainline. I think if I'm honest, if I wait to get all these extras in the documentation, this will only get settled when I get the wifi into the device tree - as problem is more natural there. This though would delay the bluetooth patch probably a month. I'd prefer to get something out there - even if I have to return later to tidy the documentation.

Regards, and thanks for the helpful comments.

David.

Quoted 75 lines · Rob Herring
Quoted 3 lines · David Summers

This adds the desrciption file that describes the hooks for the realtek bluetooth serial devices, as needed to refer to the interface in the device tree.

Please follow conventions for patch subjects. 'git log --oneline --no-merges -- path/to/file' usually gives a good clue. In this case, something like:

dt-bindings: net: Add Realtek serial bluetooth binding

Quoted 13 lines
---
  .../bindings/net/realtek-bluetooth-serial.txt | 28 +++++++++++++++++++
  1 file changed, 28 insertions(+)

create mode 100644 Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt

Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt new file +1 -0
new file mode 100644
index 000000000000..0aabca1fc002
@@ -0,0 +1,28 @@
+Realtek bluetooth devices connected via a UART

Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt line 11

Quoted 10 lines
Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt new file +10 -0
+
+- compatible: should be "realtek,<name>-bluetooth"
+  except for "realtek,trl8761atv" - which only has a serial bluetooth connection
+       "realtek,rtl8723as-bluetooth"
+       "realtek,rtl8723bs-bluetooth"
+       "realtek,rtl8723ds-bluetooth"
+       "realtek,rtl8761atv"
+       "realtek,rtl8821as-bluetooth"
+       "realtek,rtl8821cs-bluetooth"
+       "realtek,rtl8822bs-bluetooth"

Arguably, '-bluetooth' is not necessary as nothing else is attached to the serial port. At least shorten it to '-bt'.

Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt line 12

Quoted 1 line
Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt new file +1 -0
+- These device are bluetooth devices, that connect via a uart

s/device/devices/

Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt line 14

Quoted 2 lines
Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt new file +2 -0
+- all devices (except for rtl8761atv) are also wifi devices, this is connected
+  seperatly via sdio - and is not covered by this compatible node

Really, this should be up above the property list in a description of the device(s).

Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt line 15

Quoted 1 line
Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt new file +1 -0
+- ideally these will be referenced in a device tree serial node via serdev

Not ideally, but it is only valid for this to be a child of a UART.

serdev is a kernel thing, and shouldn't be part of the binding doc.

Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt line 16

Quoted 1 line
Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt new file +1 -0
+ http://events17.linuxfoundation.org/sites/events/files/slides/serdev-elce-2017-2.pdf

Useful, but again, not part of this binding.

There's no interrupts, GPIO control lines, power supplies, etc. for these chips? The binding should be complete even if your platform doesn't need these.

Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt line 21

Quoted 5 lines
Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt new file +5 -0
+
+Example:
+
+&uart0 {
+	status = "okay";

Don't show status in examples.

Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt line 25

Quoted 4 lines
Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt new file +4 -0
+       	pinctrl-0 = <&uart0_xfer>, <&uart0_cts>;
+       	bluetooth {
+               	  compatible = "realtek,rtl8723bs-bluetooth";
+       	};

Mixed tabs and spaces. Use tabs.

Quoted 6 lines
Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt new file +3 -0
+};
+
+this ensures that the bluetooth device is tied to the correct uart
Signature · 1 line
[email protected]
maintainer
#9 lore raw

Re: [PATCHv2] Description of the realtek bluetooth device tree hooks

Quoted 14 lines · David Summers

Thanks Rob,

I'll hopefully make those changes this weekend, and resubmit - just so next weekend can move onto the device tree.

Oh yes, on the "-bluetooth" or "-bt"; as these devices have both and sdio input for wifi, and uart for bluetooth; I guess they will need to be listed twice in a device tree, both under uart and sdio. Now as both these parts of the device tree will want to specify the driver used, and the driver is different for bluetooth and for wifi - doesn't that mean we should specify compatible differently? Otherwise how will the kernel know which driver to load for wifi and which for bluetooth?

Quoted 1 line

So question is am I missing something here, and this could be simplified?

The compatibles don't really have to be different as the drivers will only bind based on the bus interface. But keeping a '-bt' suffix is fine.

Quoted 11 lines

On the interrupts, GPIO control lines, power supplies, etc, on the ASUS code that I'm basing the patches on (for Tinker Board S) - these bits are freestanding in the device tree, and mainly go in with the wifi patch (and not bluetooth). I'll put some though into how this is best arranged when going mainline. I think if I'm honest, if I wait to get all these extras in the documentation, this will only get settled when I get the wifi into the device tree - as problem is more natural there. This though would delay the bluetooth patch probably a month. I'd prefer to get something out there - even if I have to return later to tidy the documentation.

At least for all the combo chips to date, the BT and WiFi halves are pretty much independent. So we can get away with describing them separately. If there's a shared supply or clock then we can list them in both nodes and ref counting makes it all work fine. However, if you had for example, a single firmware image for both BT and WiFi, then we'd want to represent this as a single device (and driver with child drivers). So you need to know if there's any issue like this because that would affect how we do the BT binding.

Rob

Quoted 88 lines

Regards, and thanks for the helpful comments.

David.

Quoted 67 lines · Rob Herring
Quoted 3 lines · David Summers

This adds the desrciption file that describes the hooks for the realtek bluetooth serial devices, as needed to refer to the interface in the device tree.

Please follow conventions for patch subjects. 'git log --oneline --no-merges -- path/to/file' usually gives a good clue. In this case, something like:

dt-bindings: net: Add Realtek serial bluetooth binding

Quoted 13 lines
---
  .../bindings/net/realtek-bluetooth-serial.txt | 28 +++++++++++++++++++
  1 file changed, 28 insertions(+)

create mode 100644 Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt

Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt new file +1 -0
new file mode 100644
index 000000000000..0aabca1fc002
@@ -0,0 +1,28 @@
+Realtek bluetooth devices connected via a UART

Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt line 11

Quoted 10 lines
Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt new file +10 -0
+
+- compatible: should be "realtek,<name>-bluetooth"
+  except for "realtek,trl8761atv" - which only has a serial bluetooth connection
+       "realtek,rtl8723as-bluetooth"
+       "realtek,rtl8723bs-bluetooth"
+       "realtek,rtl8723ds-bluetooth"
+       "realtek,rtl8761atv"
+       "realtek,rtl8821as-bluetooth"
+       "realtek,rtl8821cs-bluetooth"
+       "realtek,rtl8822bs-bluetooth"

Arguably, '-bluetooth' is not necessary as nothing else is attached to the serial port. At least shorten it to '-bt'.

Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt line 12

Quoted 1 line
Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt new file +1 -0
+- These device are bluetooth devices, that connect via a uart

s/device/devices/

Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt line 14

Quoted 2 lines
Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt new file +2 -0
+- all devices (except for rtl8761atv) are also wifi devices, this is connected
+  seperatly via sdio - and is not covered by this compatible node

Really, this should be up above the property list in a description of the device(s).

Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt line 15

Quoted 1 line
Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt new file +1 -0
+- ideally these will be referenced in a device tree serial node via serdev

Not ideally, but it is only valid for this to be a child of a UART.

serdev is a kernel thing, and shouldn't be part of the binding doc.

Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt line 16

Quoted 1 line
Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt new file +1 -0
+ http://events17.linuxfoundation.org/sites/events/files/slides/serdev-elce-2017-2.pdf

Useful, but again, not part of this binding.

There's no interrupts, GPIO control lines, power supplies, etc. for these chips? The binding should be complete even if your platform doesn't need these.

Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt line 21

Quoted 5 lines
Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt new file +5 -0
+
+Example:
+
+&uart0 {
+    status = "okay";

Don't show status in examples.

Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt line 25

Quoted 4 lines
Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt new file +4 -0
+            pinctrl-0 = <&uart0_xfer>, <&uart0_cts>;
+            bluetooth {
+                      compatible = "realtek,rtl8723bs-bluetooth";
+            };
Quoted 8 lines

Mixed tabs and spaces. Use tabs.

Quoted 6 lines
Documentation/devicetree/bindings/net/realtek-bluetooth-serial.txt new file +3 -1
+};
+
+this ensures that the bluetooth device is tied to the correct uart
--

[email protected]

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel