1# Bluetooth drivers configuration options
2
3# Copyright (c) 2016 Intel Corporation
4# SPDX-License-Identifier: Apache-2.0
5
6comment "Bluetooth HCI Driver Options"
7
8config BT_UART
9	bool
10	select SERIAL
11	select UART_INTERRUPT_DRIVEN
12
13config BT_H4
14	bool "H:4 UART"
15	select BT_UART
16	default y
17	depends on DT_HAS_ZEPHYR_BT_HCI_UART_ENABLED
18	help
19	  Bluetooth H:4 UART driver. Requires hardware flow control
20	  lines to be available.
21
22config BT_H5
23	bool "H:5 UART [EXPERIMENTAL]"
24	select BT_UART
25	select EXPERIMENTAL
26	default y
27	depends on DT_HAS_ZEPHYR_BT_HCI_3WIRE_UART_ENABLED
28	help
29	  Bluetooth three-wire (H:5) UART driver. Implementation of HCI
30	  Three-Wire UART Transport Layer.
31
32config BT_HCI_IPC
33	bool
34	default y
35	depends on DT_HAS_ZEPHYR_BT_HCI_IPC_ENABLED
36	select BT_HAS_HCI_VS
37	select IPC_SERVICE
38	select MBOX
39	help
40	  Bluetooth HCI driver for communication with another CPU
41	  using the IPC subsystem.
42
43config BT_SPI
44	bool
45	select SPI
46	help
47	  Supports Bluetooth ICs using SPI as the communication protocol.
48	  HCI packets are sent and received as single Byte transfers,
49	  prepended after a known header. Headers may vary per device, so
50	  additional platform specific knowledge may need to be added as
51	  devices are.
52
53config BT_SPI_INIT_PRIORITY
54	int "BT SPI init priority"
55	depends on BT_SPI
56	default 75
57
58config BT_SPI_ZEPHYR
59	bool
60	default y
61	depends on DT_HAS_ZEPHYR_BT_HCI_SPI_ENABLED
62	select BT_SPI
63	help
64	  Bluetooth HCI over SPI driver for communication with Bluetooth
65	  controllers running Zephyr.
66
67config BT_SPI_BLUENRG
68	bool
69	default y
70	depends on DT_HAS_ST_HCI_SPI_V1_ENABLED || DT_HAS_ST_HCI_SPI_V2_ENABLED
71	select BT_SPI
72	help
73	  Bluetooth HCI over SPI driver for communication with
74	  STMicroelectronics BlueNRG devices.
75
76config BT_BLUENRG_ACI
77	bool "ACI message with BlueNRG-based devices"
78	depends on BT_SPI_BLUENRG
79	select BT_HCI_SET_PUBLIC_ADDR
80	help
81	  Enable support for devices compatible with the BlueNRG Bluetooth
82	  Stack. Current driver supports: ST BLUENRG-MS.
83
84config BT_STM32_IPM
85	bool
86	default y
87	depends on DT_HAS_ST_STM32WB_RF_ENABLED
88	select USE_STM32_HAL_CORTEX
89	select HAS_STM32LIB
90	select BT_HCI_SETUP
91	help
92	  TODO
93
94config BT_STM32WBA
95	bool
96	default y
97	depends on DT_HAS_ST_HCI_STM32WBA_ENABLED
98	depends on ZEPHYR_HAL_STM32_MODULE_BLOBS
99	select HAS_STM32LIB
100	select BT_HCI_SET_PUBLIC_ADDR if !BT_HCI_RAW
101	help
102	  ST STM32WBA HCI Bluetooth interface
103
104config BT_STM32WB0
105	bool "STM32WB0 HCI driver"
106	default y
107	depends on DT_HAS_ST_HCI_STM32WB0_ENABLED
108	depends on ZEPHYR_HAL_STM32_MODULE_BLOBS
109	select HAS_STM32LIB
110	select USE_STM32_HAL_PKA
111	select USE_STM32_HAL_CORTEX
112	select USE_STM32_HAL_GPIO
113	select USE_STM32_HAL_RADIO
114	select USE_STM32_HAL_RADIO_TIMER
115	help
116	  ST STM32WB0 HCI Bluetooth interface
117
118config BT_SILABS_EFR32
119	bool
120	default y
121	depends on DT_HAS_SILABS_BT_HCI_EFR32_ENABLED
122	depends on ZEPHYR_HAL_SILABS_MODULE_BLOBS || BUILD_ONLY_NO_BLOBS
123	depends on !PM || SOC_GECKO_PM_BACKEND_PMGR
124	select SOC_GECKO_USE_RAIL
125	select MBEDTLS
126	select MBEDTLS_PSA_CRYPTO_C
127	select MBEDTLS_ENTROPY_C
128	select HAS_BT_CTLR
129	select BT_CTLR_PHY_UPDATE_SUPPORT
130	select BT_CTLR_PER_INIT_FEAT_XCHG_SUPPORT
131	select BT_CTLR_DATA_LEN_UPDATE_SUPPORT
132	select BT_CTLR_EXT_REJ_IND_SUPPORT
133	select BT_CTLR_CHAN_SEL_2_SUPPORT
134	select BT_CTLR_CONN_RSSI_SUPPORT
135	select BT_CTLR_ADV_EXT_SUPPORT
136	help
137	  Use Silicon Labs binary Bluetooth library to connect to the
138	  controller.
139
140config BT_USERCHAN
141	bool
142	depends on (BOARD_NATIVE_POSIX || BOARD_NATIVE_SIM)
143	default y
144	depends on DT_HAS_ZEPHYR_BT_HCI_USERCHAN_ENABLED
145	help
146	  This driver provides access to the local Linux host's Bluetooth
147	  adapter using a User Channel HCI socket to the Linux kernel. It
148	  is only intended to be used with the native POSIX build of Zephyr.
149	  The Bluetooth adapter must be powered off in order for Zephyr to
150	  be able to use it.
151
152config BT_ESP32
153	bool
154	default y
155	depends on DT_HAS_ESPRESSIF_ESP32_BT_HCI_ENABLED
156	depends on ZEPHYR_HAL_ESPRESSIF_MODULE_BLOBS || BUILD_ONLY_NO_BLOBS
157	help
158	  Espressif HCI bluetooth interface
159
160config BT_PSOC6_BLESS
161	bool
162	default y
163	depends on DT_HAS_INFINEON_CAT1_BLESS_HCI_ENABLED
164	depends on ZEPHYR_HAL_INFINEON_MODULE_BLOBS
165	select BT_HCI_SETUP
166	help
167	  PSOC 6 BLESS driver with BLE Controller which operates in
168	  Single CPU mode.
169
170config BT_DA1453X
171	bool "DA1453x HCI driver"
172	default y
173	depends on DT_HAS_RENESAS_BT_HCI_DA1453X_ENABLED
174	select GPIO
175	help
176	  Bluetooth HCI driver for communication with controller
177	  running on DA1453x MCU.
178
179config BT_DA1469X
180	bool
181	default y
182	depends on DT_HAS_RENESAS_BT_HCI_DA1469X_ENABLED
183	help
184	  Bluetooth HCI driver for communication with CMAC core
185	  on DA1469x MCU.
186
187config BT_NXP
188	bool
189	default y
190	depends on DT_HAS_NXP_HCI_BLE_ENABLED
191	select BT_HCI_SETUP
192	help
193	  NXP HCI bluetooth interface
194
195config BT_CYW208XX
196	bool
197	default y
198	depends on DT_HAS_INFINEON_CYW208XX_HCI_ENABLED
199	select BT_HCI_SET_PUBLIC_ADDR
200	help
201	  Infineon CYW208XX HCI bluetooth interface
202
203config BT_AMBIQ_HCI
204	bool
205	default y
206	depends on DT_HAS_AMBIQ_BT_HCI_SPI_ENABLED
207	select SPI
208	select GPIO if SOC_SERIES_APOLLO4X
209	select CLOCK_CONTROL if SOC_SERIES_APOLLO4X
210	select BT_HCI_SETUP
211	help
212	  Supports Ambiq Bluetooth SoC using SPI as the communication protocol.
213	  HCI packets are sent and received as single Byte transfers.
214
215config BT_HCI_INIT_PRIORITY
216	int "BT HCI init priority"
217	default 75 if BT_AMBIQ_HCI
218	default KERNEL_INIT_PRIORITY_DEVICE
219	help
220	  The priority of BT HCI driver initialization.
221
222config BT_STM32_IPM_RX_STACK_SIZE
223	int "STM32 IPM stack size for RX thread"
224	depends on BT_STM32_IPM
225	default 512
226
227config BT_AIROC
228	bool "AIROC BT connectivity"
229	default y
230	select GPIO                          if BT_H4
231	select UART                          if BT_H4
232	select UART_USE_RUNTIME_CONFIGURE    if BT_H4
233	select BT_HCI_SETUP
234	select USE_INFINEON_ABSTRACTION_RTOS if BT_CYW208XX
235	select EVENTS                        if BT_CYW208XX
236	depends on DT_HAS_INFINEON_CYW43XXX_BT_HCI_ENABLED || DT_HAS_INFINEON_CYW208XX_HCI_ENABLED
237	help
238	  Infineon's AIROC™ Wi-Fi & combos portfolio integrates
239	  IEEE 802.11a/b/g/n/ac/ax Wi-Fi and Bluetooth® 5.2 in a single-chip
240	  solution to enable small-form-factor IoT designs.
241source "drivers/bluetooth/hci/Kconfig.esp32"
242source "drivers/bluetooth/hci/Kconfig.infineon"
243source "drivers/bluetooth/hci/Kconfig.nxp"
244
245config BT_DRIVER_QUIRK_NO_AUTO_DLE
246	bool "Host auto-initiated Data Length Update quirk"
247	depends on BT_AUTO_DATA_LEN_UPDATE
248	default y if BT_HCI_IPC || BT_ESP32
249	help
250	  Enable the quirk wherein BT Host stack will auto-initiate Data Length
251	  Update procedure for new connections for controllers that do not
252	  auto-initiate the procedure if the default data length parameters are
253	  not equal to the initial parameters.
254
255	  This has to be enabled when the BLE controller connected is Zephyr
256	  open source controller.
257
258config BT_HCI_SET_PUBLIC_ADDR
259	bool
260	select BT_HCI_SETUP
261	help
262	  Pass the controller's public address to the HCI driver in setup()
263
264	  This option should be enabled by drivers for controllers that support setting the
265	  public identity through vendor-specific commands. They can then implement the
266	  setup() HCI driver API function and get the address to set from the public_addr field.
267
268	  From the application side, the public address is set using the first call to
269	  bt_id_create(), before calling bt_enable().
270
271config BT_HCI_SETUP
272	bool
273	help
274	  Enable the HCI vendor-specific Setup function.
275
276	  This option has to be enabled when the BT Controller requires execution
277	  of the vendor-specific commands sequence to initialize the BT Controller
278	  before the BT Host executes a Reset sequence.
279
280	  The user should generally avoid changing it via menuconfig or in
281	  configuration files. This option are enabled by the vendor-specific
282	  HCI extension, where the Setup function is implemented.
283
284config BT_DRV_TX_STACK_SIZE
285	int
286	default 256
287	help
288	  Stack size for the HCI driver's TX thread.
289
290config BT_DRV_RX_STACK_SIZE
291	int
292	default 640 if (BT_SPI || BT_AMBIQ_HCI)
293	default BT_RX_STACK_SIZE if (BT_H4 || BT_HCI_RAW_H4)
294	default BT_STM32_IPM_RX_STACK_SIZE if BT_STM32_IPM
295	default HCI_NXP_RX_STACK_SIZE if HCI_NXP_RX_THREAD
296	default 256
297	help
298	  Stack size for the HCI driver's RX thread.
299
300config BT_SILABS_EFR32_BUFFER_MEMORY
301	int "Silicon Labs Bluetooth Library memory buffer size"
302	depends on BT_SILABS_EFR32
303	default 6144
304	help
305	  Select the size of allocated memory buffer for the Silicon Labs
306	  Bluetooth Library.
307
308config BT_H4_NXP_CTLR
309	bool "NXP Bluetooth Controller"
310	select GPIO
311	depends on BT_H4
312	select CRC
313	select BT_HCI_SETUP
314	default y
315	depends on DT_HAS_NXP_BT_HCI_UART_ENABLED
316	help
317	  Enables support for NXP Bluetooth Controller.
318	  More inforamtion about NXP Bluetooth profuct could be found on
319	  https://www.nxp.com/products/wireless-connectivity/wi-fi-plus-bluetooth-plus-802-15-4:WIFI-BLUETOOTH
320
321if BT_H4_NXP_CTLR
322
323config BT_H4_NXP_CTLR_WAIT_HDR_SIG_TIMEOUT
324	int "Timeout for waiting HDR Signure"
325	range 1000 60000
326	default 2500
327	help
328	  Timeout for waiting HDR Signure. Unit is millisecond.
329
330config BT_H4_NXP_CTLR_WAIT_TIME_AFTER_UPLOAD
331	int "Waiting time after firmware is uploaded"
332	range 1000 5000
333	default 1000
334	help
335	  Waiting time after firmware is uploaded. Unit is millisecond.
336
337config BT_H4_NXP_CTLR_WAIT_TIME_AFTER_BAUDRATE_UPDATE
338	int "Waiting time after controller baudrate is updated"
339	range 500 5000
340	default 500
341	help
342	  Waiting time after controller baudrate is updated. Unit is millisecond.
343
344endif #BT_H4_NXP_CTLR
345