Skip to content

Commit

Permalink
Bluetooth: doc: Update documentation for the new HCI API
Browse files Browse the repository at this point in the history
Update references to devicetree chosen properties and how devicetree nodes
should be defined in order to enable the new HCI drivers.

Signed-off-by: Johan Hedberg <[email protected]>
  • Loading branch information
jhedberg authored and nashif committed Jun 11, 2024
1 parent 21356bc commit 0b8e561
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 12 deletions.
4 changes: 2 additions & 2 deletions doc/build/dts/api/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,8 @@ device.
:ref:`bluetooth-hci-uart-sample`
* - zephyr,bt-mon-uart
- Sets UART device used for the Bluetooth monitor logging
* - zephyr,bt-uart
- Sets UART device used by Bluetooth
* - zephyr,bt-hci
- Selects the HCI device used by the Bluetooth host stack
* - zephyr,canbus
- Sets the default CAN controller
* - zephyr,ccm
Expand Down
14 changes: 11 additions & 3 deletions samples/bluetooth/hci_uart/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -177,16 +177,24 @@ driver instead of the built-in controller:
CONFIG_BT_HCI=y
CONFIG_BT_CTLR=n
CONFIG_BT_H4=y
Similarly, the `zephyr,bt-uart` DTS property selects which uart to use:
Similarly, the `zephyr,bt-hci` DTS property selects which HCI instance to use.
The UART needs to have as its child node a HCI UART node:

.. code-block:: dts
/ {
chosen {
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,bt-uart = &uart1;
zephyr,bt-hci = &bt_hci_uart;
};
};
&uart1 {
status = "okay";
bt_hci_uart: bt_hci_uart {
compatible = "zephyr,bt-hci-uart";
status = "okay";
};
};
14 changes: 11 additions & 3 deletions samples/bluetooth/hci_uart_3wire/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -177,16 +177,24 @@ driver instead of the built-in controller:
CONFIG_BT_HCI=y
CONFIG_BT_CTLR=n
CONFIG_BT_H5=y
Similarly, the `zephyr,bt-uart` DTS property selects which uart to use:
Similarly, the `zephyr,bt-hci` DTS property selects which HCI instance to use.
The UART needs to have as its child node a HCI UART node:

.. code-block:: dts
/ {
chosen {
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,bt-uart = &uart1;
zephyr,bt-hci = &bt_hci_uart;
};
};
&uart1 {
status = "okay";
bt_hci_uart: bt_hci_uart {
compatible = "zephyr,bt-hci-3wire-uart";
status = "okay";
};
};
14 changes: 11 additions & 3 deletions samples/bluetooth/hci_uart_async/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -143,16 +143,24 @@ driver instead of the built-in controller:
CONFIG_BT_HCI=y
CONFIG_BT_CTLR=n
CONFIG_BT_H4=y
Similarly, the `zephyr,bt-uart` DTS property selects which uart to use:
Similarly, the `zephyr,bt-hci` DTS property selects which HCI instance to use.
The UART needs to have as its child node a HCI UART node:

.. code-block:: dts
/ {
chosen {
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,bt-uart = &uart1;
zephyr,bt-hci = &bt_hci_uart;
};
};
&uart1 {
status = "okay";
bt_hci_uart: bt_hci_uart {
compatible = "zephyr,bt-hci-uart";
status = "okay";
};
};
7 changes: 6 additions & 1 deletion tests/bluetooth/shell/boards/mimxrt1060_evk.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@

/ {
chosen {
zephyr,bt-uart = &lpuart3;
zephyr,bt-hci = &bt_hci_uart;
};
};

&lpuart3 {
status = "okay";
current-speed = <3000000>;
hw-flow-control;

bt_hci_uart: bt_hci_uart {
compatible = "zephyr,bt-hci-uart";
status = "okay";
};
};

0 comments on commit 0b8e561

Please sign in to comment.