Skip to content
Permalink
Browse files

Bluetooth: hci_uart: Use DT for the hci_uart UART

Use Device Tree,and in particular a new 'bt-c2h-uart' to select which
UART is being used to communicate with an external BLE Host when acting
as a Controller.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
  • Loading branch information...
carlescufi committed Jun 20, 2019
1 parent c063034 commit 3b3bbc1ee0f2218bbbdbdddc13484abe5707a14d
Showing with 27 additions and 2 deletions.
  1. +1 −0 boards/arm/96b_nitrogen/96b_nitrogen.dts
  2. +1 −0 boards/arm/bbc_microbit/bbc_microbit.dts
  3. +1 −0 boards/arm/bl652_dvk/bl652_dvk.dts
  4. +1 −0 boards/arm/bl654_dvk/bl654_dvk.dts
  5. +1 −0 boards/arm/curie_ble/curie_ble.dts
  6. +1 −0 boards/arm/nrf51_ble400/nrf51_ble400.dts
  7. +1 −0 boards/arm/nrf51_blenano/nrf51_blenano.dts
  8. +1 −0 boards/arm/nrf51_pca10028/nrf51_pca10028.dts
  9. +1 −0 boards/arm/nrf51_vbluno51/nrf51_vbluno51.dts
  10. +1 −0 boards/arm/nrf52810_pca10040/nrf52810_pca10040.dts
  11. +1 −0 boards/arm/nrf52811_pca10056/nrf52811_pca10056.dts
  12. +1 −0 boards/arm/nrf52832_mdk/nrf52832_mdk.dts
  13. +1 −0 boards/arm/nrf52840_blip/nrf52840_blip.dts
  14. +1 −0 boards/arm/nrf52840_mdk/nrf52840_mdk.dts
  15. +1 −0 boards/arm/nrf52840_papyr/nrf52840_papyr.dts
  16. +1 −0 boards/arm/nrf52840_pca10056/nrf52840_pca10056.dts
  17. +1 −0 boards/arm/nrf52840_pca10059/nrf52840_pca10059.dts
  18. +1 −0 boards/arm/nrf52_adafruit_feather/nrf52_adafruit_feather.dts
  19. +1 −0 boards/arm/nrf52_blenano2/nrf52_blenano2.dts
  20. +1 −0 boards/arm/nrf52_pca10040/nrf52_pca10040.dts
  21. +1 −0 boards/arm/nrf52_pca20020/nrf52_pca20020.dts
  22. +1 −0 boards/arm/nrf52_sparkfun/nrf52_sparkfun.dts
  23. +1 −0 boards/arm/nrf52_vbluno52/nrf52_vbluno52.dts
  24. +1 −0 boards/arm/reel_board/reel_board.dts
  25. +0 −1 samples/bluetooth/hci_uart/nrf52840_pca10090.conf
  26. +1 −1 samples/bluetooth/hci_uart/nrf52840_pca10090.overlay
  27. +1 −0 scripts/dts/extract/globals.py
  28. +1 −0 subsys/bluetooth/Kconfig
@@ -16,6 +16,7 @@
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,bt-mon-uart = &uart0;
zephyr,bt-c2h-uart = &uart0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
@@ -21,6 +21,7 @@
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,bt-mon-uart = &uart0;
zephyr,bt-c2h-uart = &uart0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
@@ -17,6 +17,7 @@
zephyr,shell-uart = &uart0;
zephyr,uart-mcumgr = &uart0;
zephyr,bt-mon-uart = &uart0;
zephyr,bt-c2h-uart = &uart0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
@@ -17,6 +17,7 @@
zephyr,shell-uart = &uart0;
zephyr,uart-mcumgr = &uart0;
zephyr,bt-mon-uart = &uart0;
zephyr,bt-c2h-uart = &uart0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
@@ -15,6 +15,7 @@
chosen {
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,bt-c2h-uart = &uart0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
};
@@ -15,6 +15,7 @@
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,bt-mon-uart = &uart0;
zephyr,bt-c2h-uart = &uart0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
};
@@ -16,6 +16,7 @@
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,bt-mon-uart = &uart0;
zephyr,bt-c2h-uart = &uart0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
};
@@ -17,6 +17,7 @@
zephyr,shell-uart = &uart0;
zephyr,uart-mcumgr = &uart0;
zephyr,bt-mon-uart = &uart0;
zephyr,bt-c2h-uart = &uart0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
@@ -16,6 +16,7 @@
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,bt-mon-uart = &uart0;
zephyr,bt-c2h-uart = &uart0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
};
@@ -19,6 +19,7 @@
zephyr,shell-uart = &uart0;
zephyr,uart-mcumgr = &uart0;
zephyr,bt-mon-uart = &uart0;
zephyr,bt-c2h-uart = &uart0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
@@ -17,6 +17,7 @@
zephyr,shell-uart = &uart0;
zephyr,uart-mcumgr = &uart0;
zephyr,bt-mon-uart = &uart0;
zephyr,bt-c2h-uart = &uart0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
@@ -18,6 +18,7 @@
zephyr,shell-uart = &uart0;
zephyr,uart-mcumgr = &uart0;
zephyr,bt-mon-uart = &uart0;
zephyr,bt-c2h-uart = &uart0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
@@ -20,6 +20,7 @@
zephyr,shell-uart = &uart0;
zephyr,uart-mcumgr = &uart0;
zephyr,bt-mon-uart = &uart0;
zephyr,bt-c2h-uart = &uart0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
};
@@ -17,6 +17,7 @@
zephyr,shell-uart = &uart0;
zephyr,uart-mcumgr = &uart0;
zephyr,bt-mon-uart = &uart0;
zephyr,bt-c2h-uart = &uart0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
@@ -17,6 +17,7 @@
zephyr,uart-mcumgr = &uart0;
zephyr,shell-uart = &uart0;
zephyr,bt-mon-uart = &uart0;
zephyr,bt-c2h-uart = &uart0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
};
@@ -17,6 +17,7 @@
zephyr,shell-uart = &uart0;
zephyr,uart-mcumgr = &uart0;
zephyr,bt-mon-uart = &uart0;
zephyr,bt-c2h-uart = &uart0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
@@ -18,6 +18,7 @@
zephyr,shell-uart = &uart0;
zephyr,uart-mcumgr = &uart0;
zephyr,bt-mon-uart = &uart0;
zephyr,bt-c2h-uart = &uart0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
@@ -18,6 +18,7 @@
zephyr,shell-uart = &uart0;
zephyr,uart-mcumgr = &uart0;
zephyr,bt-mon-uart = &uart0;
zephyr,bt-c2h-uart = &uart0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
@@ -16,6 +16,7 @@
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,bt-mon-uart = &uart0;
zephyr,bt-c2h-uart = &uart0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
@@ -18,6 +18,7 @@
zephyr,shell-uart = &uart0;
zephyr,uart-mcumgr = &uart0;
zephyr,bt-mon-uart = &uart0;
zephyr,bt-c2h-uart = &uart0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
@@ -18,6 +18,7 @@
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,bt-mon-uart = &uart0;
zephyr,bt-c2h-uart = &uart0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
@@ -17,6 +17,7 @@
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,bt-mon-uart = &uart0;
zephyr,bt-c2h-uart = &uart0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
@@ -16,6 +16,7 @@
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,bt-mon-uart = &uart0;
zephyr,bt-c2h-uart = &uart0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
};
@@ -18,6 +18,7 @@
zephyr,shell-uart = &uart0;
zephyr,uart-mcumgr = &uart0;
zephyr,bt-mon-uart = &uart0;
zephyr,bt-c2h-uart = &uart0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
@@ -23,4 +23,3 @@ CONFIG_BOARD_PCA10090_NRF52840_RESET_P1_02=y
CONFIG_UART_1_NRF_UARTE=y
CONFIG_UART_1_NRF_FLOW_CONTROL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_BT_CTLR_TO_HOST_UART_DEV_NAME="UART_1"
@@ -2,7 +2,7 @@

/ {
chosen {
zephyr,bt-uart=&uart1;
zephyr,bt-c2h-uart=&uart1;
};
};

@@ -31,6 +31,7 @@
'zephyr,console' : 'DT_UART_CONSOLE_ON_DEV_NAME',
'zephyr,shell-uart' : 'DT_UART_SHELL_ON_DEV_NAME',
'zephyr,bt-uart' : 'DT_BT_UART_ON_DEV_NAME',
'zephyr,bt-c2h-uart' : 'DT_BT_C2H_UART_ON_DEV_NAME',
'zephyr,uart-pipe' : 'DT_UART_PIPE_ON_DEV_NAME',
'zephyr,bt-mon-uart' : 'DT_BT_MONITOR_ON_DEV_NAME',
'zephyr,uart-mcumgr' : 'DT_UART_MCUMGR_ON_DEV_NAME'
@@ -130,6 +130,7 @@ endif # BT_CONN

config BT_CTLR_TO_HOST_UART_DEV_NAME
string "Device Name of UART Device to an external Bluetooth Host"
default "$(dt_str_val,DT_BT_C2H_UART_ON_DEV_NAME)" if HAS_DTS
default "UART_0"
depends on BT_HCI_RAW
help

0 comments on commit 3b3bbc1

Please sign in to comment.
You can’t perform that action at this time.