1# Zephyr Bluetooth Controller configuration options
2
3# Copyright (c) 2016-2017 Nordic Semiconductor ASA
4# SPDX-License-Identifier: Apache-2.0
5
6if BT_LL_SW_SPLIT
7
8config BT_LLL_VENDOR_NORDIC
9	bool "Use Nordic LLL"
10	depends on SOC_COMPATIBLE_NRF
11	depends on !$(dt_nodelabel_enabled,timer0)
12	depends on !$(dt_nodelabel_enabled,rtc0)
13
14	select BT_CTLR_ENTROPY_SUPPORT
15	select ENTROPY_NRF5_RNG if BT_CTLR_ENTROPY && !SOC_COMPATIBLE_NRF54LX
16	select ENTROPY_NRF5_BIAS_CORRECTION if ENTROPY_NRF5_RNG
17	select EXPERIMENTAL if !ENTROPY_HAS_DRIVER
18
19	select BT_HAS_HCI_VS
20	select BT_CTLR_CRYPTO_SUPPORT
21	select BT_CTLR_LE_ENC_SUPPORT if BT_CTLR_CRYPTO_SUPPORT && \
22					 !BT_CTLR_DATA_LENGTH_CLEAR && \
23					 !BT_CTLR_PHY_2M_NRF
24	select BT_CTLR_PRIVACY_SUPPORT if BT_CTLR_CRYPTO_SUPPORT && \
25					  !SOC_SERIES_NRF51X && \
26					  !SOC_COMPATIBLE_NRF54LX
27	select BT_CTLR_CONN_PARAM_REQ_SUPPORT
28	select BT_CTLR_EXT_REJ_IND_SUPPORT
29	select BT_CTLR_PER_INIT_FEAT_XCHG_SUPPORT
30	select BT_CTLR_DATA_LEN_UPDATE_SUPPORT if !BT_CTLR_LE_ENC_SUPPORT || \
31						  HAS_HW_NRF_CCM_LFLEN_8BIT || \
32						  SOC_COMPATIBLE_NRF54LX || \
33						  BT_CTLR_DATA_LENGTH_CLEAR
34	select BT_CTLR_EXT_SCAN_FP_SUPPORT
35	select BT_CTLR_PHY_2M_SUPPORT if HAS_HW_NRF_RADIO_BLE_2M || \
36					 BT_CTLR_PHY_2M_NRF
37	select BT_CTLR_PHY_CODED_SUPPORT if HAS_HW_NRF_RADIO_BLE_CODED
38	select BT_CTLR_PHY_UPDATE_SUPPORT if BT_CTLR_PHY_2M_SUPPORT || \
39					     BT_CTLR_PHY_CODED_SUPPORT
40	select BT_CTLR_ADV_EXT_SUPPORT
41	select BT_CTLR_ADV_PERIODIC_SUPPORT
42	select BT_CTLR_SYNC_PERIODIC_SUPPORT
43	select BT_CTLR_ADV_ISO_SUPPORT
44	select BT_CTLR_SYNC_ISO_SUPPORT
45	select BT_CTLR_BROADCAST_ISO_ENC_SUPPORT
46	select BT_CTLR_CENTRAL_ISO_SUPPORT
47	select BT_CTLR_PERIPHERAL_ISO_SUPPORT
48	select BT_CTLR_DF_SUPPORT if HAS_HW_NRF_RADIO_DFE
49	select BT_CTLR_CTEINLINE_SUPPORT if HAS_HW_NRF_RADIO_DFE
50	select BT_CTLR_CHAN_SEL_2_SUPPORT
51	select BT_CTLR_MIN_USED_CHAN_SUPPORT
52	select BT_CTLR_SCA_UPDATE_SUPPORT
53	select BT_CTLR_SYNC_TRANSFER_RECEIVER_SUPPORT
54	select BT_CTLR_SYNC_TRANSFER_SENDER_SUPPORT
55	select BT_CTLR_DTM_HCI_SUPPORT
56	select BT_CTLR_CONN_RSSI_SUPPORT
57
58	select BT_CTLR_XTAL_ADVANCED_SUPPORT
59	select BT_CTLR_SCHED_ADVANCED_SUPPORT
60	select BT_CTLR_TIFS_HW_SUPPORT
61	select BT_CTLR_ULL_LLL_PRIO_SUPPORT
62
63	select BT_TICKER_REMAINDER_SUPPORT if !SOC_COMPATIBLE_NRF54LX
64	select BT_TICKER_UPDATE if BT_BROADCASTER || BT_CONN || \
65				   (BT_OBSERVER && BT_CTLR_ADV_EXT)
66	select BT_TICKER_START_REMAINDER if BT_TICKER_REMAINDER_SUPPORT && BT_CTLR_CENTRAL_ISO
67	select BT_TICKER_REMAINDER_GET if BT_TICKER_REMAINDER_SUPPORT && \
68					  (BT_BROADCASTER && BT_CTLR_ADV_EXT)
69	select BT_TICKER_LAZY_GET if BT_CTLR_ADV_PERIODIC || BT_CTLR_CONN_ISO || BT_CTLR_SYNC_TRANSFER_SENDER
70
71	select BT_TICKER_PREFER_START_BEFORE_STOP if BT_TICKER_SLOT_AGNOSTIC
72
73	default y
74	help
75	  Use Nordic Lower Link Layer implementation.
76
77config BT_LLL_VENDOR_OPENISA
78	bool "Use OpenISA LLL"
79	depends on SOC_OPENISA_RV32M1
80
81	select BT_HAS_HCI_VS
82	select BT_CTLR_ENTROPY_SUPPORT
83	select BT_CTLR_CRYPTO_SUPPORT
84	select BT_CTLR_LE_ENC_SUPPORT if BT_CTLR_CRYPTO_SUPPORT && \
85					 !BT_CTLR_DATA_LENGTH_CLEAR
86	select BT_CTLR_PRIVACY_SUPPORT if BT_CTLR_CRYPTO_SUPPORT
87	select BT_CTLR_PHY_UPDATE_SUPPORT
88	select BT_CTLR_EXT_REJ_IND_SUPPORT
89
90	select BT_TICKER_REMAINDER_SUPPORT
91	select BT_TICKER_UPDATE if BT_BROADCASTER || BT_CONN
92
93	default y
94	help
95	  Use OpenISA Lower Link Layer implementation.
96
97# BT_CTLR_DF_SUPPORT is a wrapper for all DF features. Here we select features that are supported by
98# Zephyr's Bluetooth LE Controller.
99config BT_CTLR_DF_SUPPORT
100	depends on BT_LL_SW_SPLIT && !BT_CTLR_TIFS_HW
101	select BT_CTLR_DF_CTE_TX_SUPPORT
102	select BT_CTLR_DF_ANT_SWITCH_2US_SUPPORT
103	select BT_CTLR_DF_ANT_SWITCH_1US_SUPPORT
104	select BT_CTLR_DF_CTE_RX_SUPPORT
105	select BT_CTLR_DF_CTE_RX_SAMPLE_1US_SUPPORT
106
107config BT_CTLR_XTAL_ADVANCED_SUPPORT
108	bool
109
110config BT_CTLR_SCHED_ADVANCED_SUPPORT
111	bool
112
113config BT_CTLR_TIFS_HW_SUPPORT
114	bool
115
116config BT_CTLR_ULL_LLL_PRIO_SUPPORT
117	bool
118
119config BT_CTLR_RX_POLL
120	# Hidden, Enable Async I/O Framework, i.e. k_poll
121	bool
122	depends on BT_HCI_RAW || BT_HCI_ACL_FLOW_CONTROL
123	select POLL
124	default y
125
126config BT_CTLR_RX_PRIO_STACK_SIZE
127	# Hidden
128	int
129	depends on !BT_HCI_RAW
130	default 448
131	help
132	  Controller's Co-Operative high priority Rx thread stack size.
133
134	  Rx priority thread is used in Combined Host plus Controller builds to
135	  prioritize Number of Completed Packets event and Disconnect Event
136	  towards the Host while already enqueued ACL and ISO Data are blocked
137	  in the normal Rx thread waiting for free Tx buffer be available.
138
139	  Rx priority thread is redundant in a Controller-only build.
140
141config BT_CTLR_RX_STACK_SIZE
142	# Hidden, Controller's Co-Operative Rx thread stack size.
143	int
144	default 896
145
146config BT_CTLR_SETTINGS
147	bool "Settings System"
148	depends on SETTINGS
149	help
150	  Enable use of settings system in controller.
151
152config BT_CTLR_VERSION_SETTINGS
153	bool "Version Settings"
154	depends on BT_CTLR_SETTINGS
155	help
156	  Make the controller's Company Id and Subversion Number configurable
157	  through settings system.
158
159config BT_CTLR_COMPANY_ID
160	hex "Controller Company Id"
161	default BT_COMPANY_ID
162	range 0x0000 0xFFFF
163	help
164	  Set the Bluetooth Company Identifier that will be used in
165	  the VERSION_IND PDU. Uses BT_COMPANY_ID by default, although
166	  silicon vendors and hardware manufacturers can set their own
167	  Company Identifier for the controller. The full list of Bluetooth
168	  Company Identifiers can be found here:
169	  https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers
170
171config BT_CTLR_SUBVERSION_NUMBER
172	hex "Subversion Number"
173	default 0xFFFF
174	range 0x0000 0xFFFF
175	help
176	  Set the Subversion Number that will be used in VERSION_IND PDU.
177
178config BT_CTLR_AD_DATA_BACKUP
179	bool "Legacy AD Data backup"
180	depends on BT_PERIPHERAL || BT_CTLR_ADV_EXT
181	default y
182	help
183	  Backup Legacy Advertising Data when switching to Legacy Directed or
184	  to Extended Advertising mode, and restore it when switching back to
185	  Legacy Non-Directed Advertising mode.
186	  Application can disable this feature if not using Directed
187	  Advertising or switch between Legacy and Extended Advertising.
188
189config BT_CTLR_HCI_ADV_HANDLE_MAPPING
190	bool "Advertising set handle mapping between HCI and LL"
191	depends on BT_CTLR_ADV_EXT
192	default y if BT_HCI_RAW
193	help
194	  Enable mapping of advertising set handles between HCI and LL when
195	  using external host since it can use arbitrary numbers as set handles
196	  (as defined by Core specification) as opposed to LL which always uses
197	  zero-based numbering. When using with Zephyr host this option can be
198	  disabled to remove extra mapping logic.
199
200config BT_CTLR_MESH_SCAN_FILTERS
201	int "Number of Mesh scan filters"
202	depends on BT_HCI_MESH_EXT
203	default 1
204	range 1 15
205	help
206	  Set the number of unique Mesh Scan Filters available as part of
207	  the Intel Mesh Vendor Specific Extensions.
208
209config BT_CTLR_MESH_SF_PATTERNS
210	int "Number of Mesh scan filter patterns"
211	depends on BT_HCI_MESH_EXT
212	default 15
213	range 1 15
214	help
215	  Set the number of unique Mesh Scan Filter patterns available per
216	  Scan Filter as part of the Intel Mesh Vendor Specific Extensions.
217
218config BT_CTLR_CHECK_SAME_PEER_CONN
219	bool
220	depends on BT_CONN
221	default BT_MAX_CONN > 1 && !BT_CTLR_ALLOW_SAME_PEER_CONN
222
223if BT_CTLR_ADV_EXT
224
225config BT_CTLR_ADV_EXT_RX_PDU_LEN_MAX
226	int "Maximum Advertising Extensions Receive PDU Length"
227	depends on BT_OBSERVER
228	range $(UINT8_MAX) $(UINT8_MAX) if BT_HCI_RAW
229	range 31 $(UINT8_MAX)
230	default $(UINT8_MAX)
231	help
232	  Maximum Advertising Extensions Receive PDU Length.
233
234config BT_CTLR_SCAN_DATA_LEN_MAX
235	int "Maximum Extended Scanning Data Length"
236	depends on BT_OBSERVER
237	range 31 1650
238	help
239	  Maximum Extended Scanning Data Length.
240
241config BT_CTLR_CHECK_SAME_PEER_SYNC
242	# Hidden Kconfig to add same peer synchronization check
243	bool
244	depends on BT_CTLR_SYNC_PERIODIC
245	default BT_PER_ADV_SYNC_MAX > 1
246
247endif # BT_CTLR_ADV_EXT
248
249module = BT_CTLR_ISOAL
250module-str = "Bluetooth Controller ISO-AL"
251source "subsys/logging/Kconfig.template.log_config_inherit"
252
253config BT_CTLR_ISOAL_LOG_DBG_VERBOSE
254	bool "ISO-AL verbose debug logging"
255	depends on BT_CTLR_ISOAL_LOG_LEVEL = 4
256	default n
257	help
258	  Use this option to enable ISO-AL verbose debug logging.
259
260config BT_CTLR_ISO_TX_SEG_PLAYLOAD_MIN
261	int "Minimum number of playload data bytes in a new segment"
262	depends on BT_CTLR_ADV_ISO || BT_CTLR_CONN_ISO
263	default 1
264	range 1 64
265	help
266	  Minimum number of payload bytes that would make inserting a new
267	  segment into a PDU worthwhile.
268
269config BT_CTLR_CONN_ISO_HCI_DATAPATH_SKIP_INVALID_DATA
270	bool "Do not pass invalid SDUs on HCI datapath"
271	depends on BT_CTLR_CONN_ISO
272	help
273	  This allows for applications to decide whether to
274	  forward invalid SDUs through HCI upwards.
275
276config BT_CTLR_CONN_ISO_AVOID_SEGMENTATION
277	bool "Avoid SDU fragmentation for framed mode"
278	depends on BT_CTLR_CENTRAL_ISO
279	help
280	  When creating a CIG, the Max_PDU size is calculated according to BT
281	  Core 5.4 Vol 6, Part G, Section 2.2. However, HAP specifies a need for
282	  avoiding segmentation by forcing the Max_PDU to the appropriate value.
283	  Since there is no way to control the Max_PDU using the non-test
284	  interface, the config provides a way to force the Max_PDU to Max_SDU +
285	  5 (header + offset).
286
287choice
288	prompt "CIS Creation Policy Selection"
289	default BT_CTLR_CONN_ISO_RELIABILITY_POLICY
290
291config BT_CTLR_CONN_ISO_RELIABILITY_POLICY
292	bool "CIS creation policy for reliability"
293	depends on BT_CTLR_CENTRAL_ISO
294	help
295	  Select this option to use reliability policy for CIS creation. This
296	  favors a CIS layout/configuration which utilizes the full range of the
297	  Max_Transmission_Latency for maximum retransmission and payload
298	  recovery.
299
300config BT_CTLR_CONN_ISO_LOW_LATENCY_POLICY
301	bool "CIS creation policy for low latency"
302	depends on BT_CTLR_CENTRAL_ISO
303	help
304	  Select this option to use low latency policy for CIS creation. This
305	  favors a CIS layout/configuration which compacts payload transmission
306	  for lowest possible latency.
307endchoice
308
309config BT_CTLR_TEST
310	bool "Run in-system unit tests"
311	help
312	  Run in-system unit tests
313
314config BT_CTLR_ADVANCED_FEATURES
315	bool "Show advanced features"
316	help
317	  Makes advanced features visible to controller developers.
318
319menu "Advanced features"
320	visible if BT_CTLR_ADVANCED_FEATURES
321
322config BT_CTLR_SW_DEFERRED_PRIVACY
323	bool "LE Controller-based Software Privacy"
324	depends on BT_CTLR_PRIVACY
325	help
326	  Enable support for software based deferred privacy calculations.
327
328config BT_CTLR_RPA_CACHE_SIZE
329	int "LE Controller-based Software Privacy Resolving List size"
330	depends on BT_CTLR_SW_DEFERRED_PRIVACY
331	default 8
332	range 1 64
333	help
334	  Set the size of the Known Unknown Resolving List for LE
335	  Controller-based Software deferred Privacy.
336
337config BT_CTLR_TRPA_CACHE_SIZE
338	int "LE Controller-based Software Privacy target RPA cache size"
339	depends on BT_CTLR_SW_DEFERRED_PRIVACY
340	default 4
341	range 1 64
342	help
343	  Set the size of the Known Unknown Target RPA Resolving List for LE
344	  Controller-based Software deferred Privacy.
345
346config BT_CTLR_DATA_LENGTH_CLEAR
347	bool "Data Length Support (Cleartext only)"
348	depends on SOC_SERIES_NRF51X
349	help
350	  Enable support for Bluetooth v4.2 LE Data Length Update procedure, up to
351	  251 byte cleartext payloads in the Controller. Encrypted connections
352	  are not supported.
353
354
355config BT_CTLR_PHY_2M_NRF
356	bool "2Mbps Nordic Semiconductor PHY Support (Cleartext only)"
357	depends on SOC_SERIES_NRF51X
358	select BT_CTLR_PHY_2M
359	help
360	  Enable support for Nordic Semiconductor proprietary 2Mbps PHY in the
361	  Controller. Encrypted connections are not supported.
362
363config BT_CTLR_ADV_AUX_SET
364	int "LE Extended Advertising Auxiliary Sets"
365	depends on BT_BROADCASTER && BT_CTLR_ADV_EXT
366	range 0 BT_CTLR_ADV_SET
367	default BT_CTLR_ADV_SET
368	help
369	  Maximum supported advertising auxiliary channel sets.
370
371config BT_CTLR_ADV_SYNC_SET
372	int "LE Periodic Advertising Sets"
373	depends on BT_CTLR_ADV_PERIODIC
374	range 1 BT_CTLR_ADV_AUX_SET
375	default 1
376	help
377	  Maximum supported periodic advertising sets.
378
379config BT_CTLR_ADV_DATA_CHAIN
380	bool "Advertising Data chaining [EXPERIMENTAL]"
381	select EXPERIMENTAL
382	help
383	  Enable support for Advertising Data chaining in Extended
384	  (non-connectable) and Periodic Advertising. This will allow to have
385	  Advertising Data Length up to 1650 bytes.
386
387	  This is experimental and work in progress, does not implement
388	  recombining the AD Data and could return BT_HCI_ERR_PACKET_TOO_LONG
389	  when a chain PDU needs its AD data overflow into a new chain PDU.
390	  I.e. AD data in the last PDU could overflow due to the need to add
391	  Aux Pointer field, and if this overflow bytes plus the next AD data
392	  fragment length could be over 255 bytes needing additional chain PDU.
393	  This is not implemented.
394
395config BT_CTLR_ADV_PDU_LINK
396	# Enables extra space in each advertising PDU to allow linking PDUs.
397	# This is required to enable advertising data trains (i.e. transmission
398	# of AUX_CHAIN_IND).
399	bool
400
401config BT_CTLR_ADV_AUX_PDU_LINK
402	# Enable chaining in Extended Advertising
403	bool
404	select BT_CTLR_ADV_PDU_LINK
405
406config BT_CTLR_ADV_AUX_PDU_BACK2BACK
407	bool "Back-to-back transmission of extended advertising trains"
408	depends on BT_BROADCASTER && BT_CTLR_ADV_EXT
409	select BT_CTLR_ADV_AUX_PDU_LINK
410	default y if BT_CTLR_ADV_DATA_LEN_MAX > 191
411	help
412	  Enables transmission of AUX_CHAIN_IND in extended advertising train by
413	  sending each AUX_CHAIN_IND one after another back-to-back.
414
415config BT_CTLR_ADV_AUX_PDU_BACK2BACK_AFS
416	int "AUX Frame Space for back-to-back transmission of extended advertising trains"
417	depends on BT_CTLR_ADV_AUX_PDU_BACK2BACK
418	range 300 1000
419	default 300
420	help
421	  Specific AUX Frame Space to be used for back-to-back transmission of
422	  extended advertising trains. Time specified in microseconds.
423
424config BT_CTLR_ADV_SYNC_PDU_LINK
425	bool
426	depends on BT_CTLR_ADV_PERIODIC
427	select BT_CTLR_ADV_PDU_LINK
428
429config BT_CTLR_ADV_SYNC_PDU_BACK2BACK
430	bool "Back-to-back transmission of periodic advertising trains"
431	depends on BT_CTLR_ADV_PERIODIC
432	select BT_CTLR_ADV_SYNC_PDU_LINK
433	help
434	  Enables transmission of AUX_CHAIN_IND in periodic advertising train by
435	  sending each AUX_CHAIN_IND one after another back-to-back.
436	  Note, consecutive AUX_CHAIN_IND packets are not scheduled but sent at
437	  a constant offset on a best effort basis. This means advertising train can
438	  be preempted by other event at any time.
439
440config BT_CTLR_ADV_SYNC_PDU_BACK2BACK_AFS
441	int "AUX Frame Space for back-to-back transmission of periodic advertising trains"
442	depends on BT_CTLR_ADV_SYNC_PDU_BACK2BACK
443	range 300 1000
444	default 300
445	help
446	  Specific AUX Frame Space to be used for back-to-back transmission of
447	  periodic advertising trains. Time specified in microseconds.
448
449config BT_CTLR_ADV_RESERVE_MAX
450	bool "Use maximum Advertising PDU size time reservation"
451	depends on BT_BROADCASTER && BT_CTLR_ADV_EXT
452	default y
453	help
454	  Use the maximum advertising PDU size time reservation considering the
455	  Advertising Data could be updated from zero to maximum support size.
456	  If maximum time reservation is disabled then time reservation
457	  corresponding to the Advertising Data present at the time of the
458	  start/enable of Advertising is used.
459
460config BT_CTLR_ADV_AUX_SLOT_WINDOW_DRIFT
461	bool "Drift Extended Advertising Auxiliary PDUs within a slot window"
462	depends on BT_TICKER_EXT && \
463		   BT_BROADCASTER && \
464		   BT_CTLR_ADV_EXT
465	default y if BT_CTLR_SYNC_ISO || BT_CTLR_CONN_ISO
466	help
467	  Drift Extended Advertising Auxiliary PDUs within a slot window to
468	  avoid overlapping with other periodically scheduled states/roles; and
469	  be placed before or after such overlapping states/roles.
470
471config BT_CTLR_ADV_ISO_RESERVE_MAX
472	bool "Use maximum Broadcast ISO event time reservation"
473	depends on BT_CTLR_ADV_ISO
474	default y
475	help
476	  Use maximum Broadcast ISO event time reservation. If disabled, then
477	  time reservation does not include the pre-transmissions of the last
478	  BIS and any Control subevents. This will allow extended or periodic
479	  advertising events to preempt the BIG events but allow higher radio
480	  utilizations by allowing larger BIG events when not overlapping with
481	  extended or periodic advertising.
482
483config BT_CTLR_ADV_AUX_SYNC_OFFSET
484	int "Pre-defined offset between AUX_ADV_IND and AUX_SYNC_IND"
485	depends on BT_CTLR_ADV_PERIODIC
486	range 0 4000000
487	default 0
488	help
489	  Define an offset between AUX_ADV_IND and AUX_SYNC_IND when using
490	  Advertising Interval for the Extended Advertising and Periodic
491	  Advertising that are same or multiple of each other, respectively.
492	  Note, to get advertising intervals that are same or multiple,
493	  the Periodic Advertising Interval shall be 10 millisecond more than
494	  the Extended Advertising Interval; this is because the AUX_ADV_IND
495	  PDUs are scheduled as periodic events of Extended Advertising
496	  Interval plus 10 milliseconds (Advertising Random Delay) as the
497	  periodic interval.
498	  The offset is in microseconds, limited to an experimental maximum
499	  value of 4 seconds.
500
501config BT_CTLR_ADV_DATA_BUF_MAX
502	int "Advertising Data Maximum Buffers"
503	depends on BT_BROADCASTER
504	range 1 64 if BT_CTLR_ADV_EXT
505	range 1 1 if !BT_CTLR_ADV_EXT
506	default 2 if BT_CTLR_ADV_PERIODIC
507	default 1
508	help
509	  Maximum number of buffered Advertising Data payload across enabled
510	  advertising sets.
511
512config BT_CTLR_ADV_EXT_PDU_EXTRA_DATA_MEMORY
513	bool
514	depends on BT_CTLR_ADV_EXT
515	help
516	  Add additional memory to advertising PDU storage. The memory is a
517	  general purpose storage for data that should be send from ULL to LLL.
518	  The data stored in the memory are in synchronization with content
519	  of PDU memory.
520
521	  For example, the extra data memory is used for storage for parameters
522	  to configure Radio peripheral to transmit CTE. The configuration data
523	  must be synchronized with CTEInfo field in extended advertising header
524	  that is part of PDU data.
525
526config BT_CTRL_ADV_ADI_IN_SCAN_RSP
527	bool "Include ADI in AUX_SCAN_RSP PDU [DEPRECATED]"
528	depends on BT_BROADCASTER && BT_CTLR_ADV_EXT
529	select BT_CTLR_ADV_ADI_IN_SCAN_RSP
530	select DEPRECATED
531	help
532	  DEPRECATED: Renamed as BT_CTLR_ADV_ADI_IN_SCAN_RSP.
533
534	  Enable ADI field in AUX_SCAN_RSP PDU.
535
536config BT_CTLR_ADV_ADI_IN_SCAN_RSP
537	bool "Include ADI in AUX_SCAN_RSP PDU"
538	depends on BT_BROADCASTER && BT_CTLR_ADV_EXT
539	help
540	  Enable ADI field in AUX_SCAN_RSP PDU.
541
542config BT_CTLR_SCAN_AUX_USE_CHAINS
543	bool "Use new chains based implementation for following advertising chains"
544	depends on BT_OBSERVER && BT_CTLR_ADV_EXT
545	help
546	  Use the new chains based implementation of following advertising chains
547	  instead of the old sets based one. The new implementation has a much lighter
548	  footprint, since it limits allocations per advertising chain to the bare
549	  minimum and only uses one ticker
550
551config BT_CTLR_SCAN_AUX_SET
552	int "LE Extended Scanning Auxiliary Sets"
553	depends on BT_OBSERVER && BT_CTLR_ADV_EXT && !BT_CTLR_SCAN_AUX_USE_CHAINS
554	range 1 64
555	default 1
556	help
557	  Maximum supported auxiliary channel scan sets.
558
559config BT_CTLR_SCAN_AUX_CHAIN_COUNT
560	int "LE Extended Scanning Auxiliary Chains"
561	depends on BT_OBSERVER && BT_CTLR_ADV_EXT && BT_CTLR_SCAN_AUX_USE_CHAINS
562	range 1 64
563	default 3
564	help
565	  Maximum number of extended/periodic advertising chains that can be
566	  followed simultaneously
567
568config BT_CTLR_SCAN_AUX_SYNC_RESERVE_MIN
569	bool "Use minimal Scan Auxiliary and Periodic Sync PDU time reservation"
570	depends on (BT_OBSERVER && BT_CTLR_ADV_EXT) || BT_CTLR_SYNC_PERIODIC
571	default y
572	help
573	  Use minimal time reservation for Auxiliary and Periodic Sync PDU
574	  reception. A peer device could scheduling multiple advertising sets
575	  in a short duration with small PDUs hence using the minimal time
576	  reservation would avoid skipping closely scheduled reception of
577	  multiple Auxiliary or Periodic Sync PDUs.
578
579config BT_CTLR_SYNC_PERIODIC_SKIP_ON_SCAN_AUX
580	bool "Skip Periodic Sync event on overlap with Extended Scan Event"
581	depends on BT_CTLR_SYNC_PERIODIC
582	help
583	  When AUX_ADV_IND or AUX_CHAIN_IND auxiliary channel PDU scan radio
584	  event overlaps Periodic Sync radio event in unreserved time space,
585	  let the Periodic Sync radio event be aborted so that the auxiliary
586	  channel PDU can be received to generate Extended Advertising Reports.
587
588	  By default we want Periodic Advertising Sync Events to take priority
589	  over any overlapping Extended Advertising Primary and Auxiliary
590	  channel PDU reception in order to not skip Periodic Advertising Report
591	  generation.
592
593	  But under simultaneous multiple Periodic Advertising Sync support with
594	  small Periodic Advertising Intervals where there will be a lot of
595	  overlapping Periodic Advertising Sync events, it is desirable to
596	  permit Extended Advertising auxiliary PDU reception be allowed in a
597	  round robin scheduling to skip the overlapping Periodic Advertising
598	  Sync event. This permits new Periodic Advertising peers be discovered.
599
600config BT_CTLR_SYNC_ISO_RESERVE_MAX
601	bool "Use maximum ISO Synchronized Receiver event time reservation"
602	depends on BT_CTLR_SYNC_ISO
603	default y
604	help
605	  Use maximum ISO Synchronized Receiver event time reservation. If
606	  disabled, then time reservation does not include the pre-transmissions
607	  and any Control subevents.
608
609config BT_CTLR_ADV_ENABLE_STRICT
610	bool "Enforce Strict Advertising Enable/Disable"
611	depends on BT_BROADCASTER
612	help
613	  Enforce returning HCI Error Command Disallowed on enabling/disabling
614	  already enabled/disabled advertising.
615
616config BT_CTLR_SCAN_ENABLE_STRICT
617	bool "Enforce Strict Scan Enable/Disable"
618	depends on BT_OBSERVER
619	help
620	  Enforce returning HCI Error Command Disallowed on enabling/disabling
621	  already enabled/disabled scanning.
622
623config BT_CTLR_CIS_ACCEPT_MIN_OFFSET_STRICT
624	bool "Enforce Strict CIS Minimum Offset Check"
625	depends on BT_CTLR_PERIPHERAL_ISO
626	help
627	  Enforce strict check of CIS minimum offset accepted by the peripheral
628	  considering that there will be no overlap of ACL connection with the
629	  CIG events. Radio and CPU overheads for an ACL connection event is
630	  considered and checks the CIS minimum offset is greater than the time
631	  reservation for the ACL connection.
632
633config BT_CTLR_ISOAL_SN_STRICT
634	bool "Enforce Strict Tx ISO Data Sequence Number use"
635	depends on !BT_CTLR_ISOAL_PSN_IGNORE && (BT_CTLR_ADV_ISO || \
636						 BT_CTLR_CONN_ISO)
637	default y
638	help
639	  Enforce strict sequencing of released payloads based on the TX SDU's
640	  packet sequence number. This will be effective when fragmenting an
641	  SDU into unframed PDUs.
642
643	  When enabled, this could result in an SDU being fragmented into
644	  payload numbers that are expired (will be dropped), if the TX SDU
645	  packet sequence numbers do not increment according to the SDU interval
646	  and delivery of SDUs to the ISO-AL do not strictly follow the SDU
647	  interval.
648
649	  When disabled, TX SDUs could be shifted from their stream aligned
650	  position and fragmented into payloads that are less likely to be
651	  dropped. This will result in better delivery of data to the receiver
652	  but at the cost of creating skews in the received stream of SDUs.
653
654config BT_CTLR_ISOAL_PSN_IGNORE
655	bool "Ignore Tx ISO Data Packet Sequence Number use"
656	depends on BT_CTLR_ADV_ISO || BT_CTLR_CONN_ISO
657	help
658	  Ignore the use of Tx ISO Data Packet Sequence Number.
659
660config BT_CTLR_ISOAL_FRAMED_BIS_OFFSET_MARGIN
661	int "Margin (in microseconds) to be used in framed time offset for BIS"
662	depends on BT_CTLR_ADV_ISO || BT_CTLR_CONN_ISO
663	default 2000
664	range 0 10000
665	help
666	  Needed margin for reliable delivery of payloads will vary, but should
667	  generally be EVENT_OVERHEAD_START_US + a small margin to cover ISOAL
668	  processing overhead
669
670config BT_CTLR_ISOAL_FRAMED_CIS_OFFSET_MARGIN
671	int "Margin (in microseconds) to be used in framed time offset for CIS"
672	depends on BT_CTLR_ADV_ISO || BT_CTLR_CONN_ISO
673	default 0
674	range 0 10000
675	help
676	  Note: Usually no margin is needed for CIS as null PDUs can be used if a payload
677	  is too late for the first subevent
678
679config BT_CTLR_ZLI
680	bool "Use Zero Latency IRQs"
681	depends on ZERO_LATENCY_IRQS
682	default y
683	help
684	  Enable support for use of Zero Latency IRQ feature. Note, applications
685	  shall not use Zero Latency IRQ themselves when this option is selected,
686	  else will impact controller stability.
687
688config BT_CTLR_DYNAMIC_INTERRUPTS
689	bool "Use Dynamic Interrupts allocation only"
690	depends on DYNAMIC_INTERRUPTS
691	help
692	  Allocate all Controller required interrupts dynamically. This makes
693	  sure that interrupts are properly connected when the Controller is
694	  initialized and not only during the system startup. Thanks to that
695	  application is able to enable Controller and its ISR at runtime, and
696	  permit use of SoC's peripheral for custom use when Bluetooth is not
697	  enabled.
698
699choice BT_CTLR_OPTIMIZE
700	prompt "Optimization options"
701	depends on !LTO
702	default BT_CTLR_OPTIMIZE_FOR_SPEED
703
704config BT_CTLR_OPTIMIZE_FOR_APP_DEFAULT
705	bool "Optimize for application defaults"
706	help
707	  Optimize compilation of Controller for application's default.
708
709config BT_CTLR_OPTIMIZE_FOR_SIZE
710	bool "Optimize for space"
711	help
712	  Optimize compilation of Controller for code size.
713
714	  This is the Zephyr project default, but is overridden to use optimize
715	  for speed when compiling the Controller to reduce application's ISR
716	  and thread latencies.
717
718config BT_CTLR_OPTIMIZE_FOR_SPEED
719	bool "Optimize for Speed"
720	help
721	  Optimize compilation of Controller for execution speed. As the
722	  Controller's Upper Link Layer and Lower Link Layer execute in ISRs,
723	  use of speed optimizations reduces application's ISR and thread
724	  latencies.
725
726endchoice
727
728config BT_CTLR_XTAL_ADVANCED
729	bool "Advanced event preparation"
730	depends on BT_CTLR_XTAL_ADVANCED_SUPPORT
731	default y
732	help
733	  Enables advanced event preparation offset ahead of radio tx/rx, taking
734	  into account predictive processing time requirements in preparation to
735	  the event, like control procedure handling and CPU execution speeds.
736	  Crystal oscillator is retained between closely spaced consecutive
737	  radio events to reduce the overall number of crystal settling current
738	  consumptions.
739
740	  This feature maximizes radio utilization in an average role event
741	  timeslice when they are closely spaced by using a reduced offset
742	  between preparation and radio event.
743
744	  By disabling this feature, the controller will use a constant offset
745	  between the preparation and radio event. The controller will toggle
746	  crystal oscillator between two closely spaced radio events leading to
747	  higher average current due to increased number of crystal settling
748	  current consumptions.
749
750config BT_CTLR_XTAL_THRESHOLD
751	int "Crystal shutdown threshold in uS"
752	depends on BT_CTLR_XTAL_ADVANCED
753	default 1500
754	help
755	  Configure the optimal delta in micro seconds between two consecutive
756	  radio events, event done to next preparation, below which (active
757	  clock) crystal will be retained. This value is board dependent.
758
759config BT_CTLR_SCHED_ADVANCED
760	bool "Advanced scheduling"
761	depends on BT_CTLR_SCHED_ADVANCED_SUPPORT && \
762		   (BT_CONN || \
763		    (BT_CTLR_ADV_EXT && (BT_CTLR_ADV_AUX_SET > 0)) || \
764		    BT_CTLR_ADV_ISO)
765	select BT_TICKER_NEXT_SLOT_GET
766	default y if BT_CENTRAL || (BT_BROADCASTER && BT_CTLR_ADV_EXT) || BT_CTLR_ADV_ISO
767	help
768	  Enable non-overlapping placement of observer, initiator and central
769	  roles in timespace. Uses window offset in connection updates and uses
770	  connection parameter request in peripheral role to negotiate
771	  non-overlapping placement with active central roles to avoid peripheral
772	  roles drifting into active central roles in the local controller.
773
774	  This feature maximizes the average data transmission amongst active
775	  concurrent central and peripheral connections while other observer,
776	  initiator, central or peripheral roles are active in the local controller.
777
778	  Disabling this feature will lead to overlapping role in timespace
779	  leading to skipped events amongst active roles.
780
781config BT_CTLR_ASSERT_OVERHEAD_START
782	bool "Assert on Prepare Latency"
783	default y
784	help
785	  Assert on increased Radio Event Prepare callback latencies due to
786	  CPU usage overheads in the Controller implementation.
787
788	  Disabling this option permits the Controller to gracefully skip radio
789	  events that are delayed due to CPU usage latencies; as long as the
790	  radio event skips are not for every consecutive radio event interval,
791	  otherwise leading to remote supervision timeout and possible missing
792	  local disconnect events.
793
794config BT_CTLR_ASSERT_VENDOR
795	bool "Vendor Defined Assertion Information Handler"
796	help
797	  This option enables a vendor specific sink for the controller assertion
798	  mechanism, where parameter information is provided. This must be defined in
799	  vendor debug HAL interface as \"BT_ASSERT_VND(cond, param1, param2)\", and
800	  will be invoked whenever the controller code encounters an unrecoverable error
801	  with parameter information. Implementation shall include the equivalent of
802	  BT_ASSERT_DIE for halting the kernel.
803
804config BT_CTLR_CENTRAL_SPACING
805	int "Central Connection Spacing"
806	depends on BT_CTLR_SCHED_ADVANCED
807	default 0
808	range 0 $(UINT16_MAX)
809	help
810	  The preferred connection spacing between multiple simultaneous central
811	  roles in microseconds. The Controller will calculate the required time
812	  reservation using the data length and PHY currently in use. The
813	  greater of the preferred spacing and the calculated time reservation
814	  will be used.
815	  The precision is determined by the resolution of the platform
816	  dependent ticker clock.
817	  The upper range is a ceil value permitting any tuning of Controller's
818	  radio handling overheads and to allow Coded PHY S8 coding scheme PDU
819	  time, i.e. radio event overheads + 17040 (PDU Tx) + 150 (tIFS) + 4
820	  (active clock jitter) + 17040 (PDU rx) = (radio event overheads +
821	  34234) microseconds.
822
823config BT_CTLR_CENTRAL_RESERVE_MAX
824	bool "Use maximum data PDU size time reservation for Central"
825	depends on BT_CENTRAL
826	default y
827	help
828	  Use the maximum data PDU size time reservation considering the Data
829	  length could be updated from default 27 bytes to maximum support size.
830	  If maximum time reservation is disabled then time reservation
831	  corresponding to the default data length at the time of the
832	  start/enable of Central role is used.
833
834	  Note, currently this value is only used to space multiple central
835	  connections and not for actual ticker time reservations.
836
837config BT_CTLR_PERIPHERAL_RESERVE_MAX
838	bool "Use maximum data PDU size time reservation for Peripheral"
839	depends on BT_PERIPHERAL
840	default y
841	help
842	  Use the maximum data PDU size time reservation considering the Data
843	  length could be updated from default 27 bytes to maximum support size.
844
845	  If maximum time reservation is disabled then time reservation required
846	  for empty PDU transmission is used. Overlapping radio events will use
847	  the is_abort_cb mechanism to decide on continuation of the connection
848	  event.
849
850config BT_CTLR_PERIPHERAL_ISO_RESERVE_MAX
851	bool "Use maximum data PDU size time reservation for Peripheral"
852	depends on BT_CTLR_PERIPHERAL_ISO
853	default y
854	help
855	  Use the maximum Peripheral CIG event time reservation.
856
857	  If maximum Peripheral CIG event time reservation is not enabled, then
858	  only time required to transmit or receive the burst number of CIS PDUs
859	  is reserved.
860
861config BT_CTLR_EVENT_OVERHEAD_RESERVE_MAX
862	bool "Reserve maximum event overhead in time reservations"
863	default y
864	help
865	  Use radio event scheduling CPU time overhead in calculations of event
866	  time reservations.
867
868	  If this option is disabled, then Peripheral ACL and Peripheral ISO
869	  role will not include CPU time overhead. Other role will continue to
870	  use CPU overheads in their event time reservations.
871
872config BT_CTLR_SLOT_RESERVATION_UPDATE
873	bool "Update event length reservation after PHY or DLE update"
874	depends on (BT_CTLR_DATA_LENGTH || BT_CTLR_PHY)
875	default y
876	help
877	  Updates the event length reservation after a completed Data Length Update
878	  and/or PHY Update procedure to avoid overlap of radio events
879
880config BT_CTLR_LLL_PRIO
881	int "Lower Link Layer (Radio) IRQ priority" if (BT_CTLR_ULL_LLL_PRIO_SUPPORT && !BT_CTLR_ZLI)
882	range 0 3 if SOC_SERIES_NRF51X
883	range 0 6 if (SOC_COMPATIBLE_NRF52X || SOC_COMPATIBLE_NRF53X)
884	default 0
885	help
886	  The interrupt priority for event preparation and radio IRQ.
887
888config BT_CTLR_ULL_HIGH_PRIO
889	int "Upper Link Layer High IRQ priority" if BT_CTLR_ULL_LLL_PRIO_SUPPORT
890	range BT_CTLR_LLL_PRIO 3 if SOC_SERIES_NRF51X
891	range BT_CTLR_LLL_PRIO 6 if (SOC_COMPATIBLE_NRF52X || SOC_COMPATIBLE_NRF53X)
892	default BT_CTLR_LLL_PRIO if (!BT_CTLR_ULL_LLL_PRIO_SUPPORT || BT_CTLR_ZLI || BT_CTLR_LOW_LAT)
893	default 1
894	help
895	  The interrupt priority for Ticker's Worker IRQ and Upper Link Layer
896	  higher priority functions.
897
898config BT_CTLR_ULL_LOW_PRIO
899	int "Upper Link Layer Low IRQ priority" if BT_CTLR_ULL_LLL_PRIO_SUPPORT
900	range BT_CTLR_ULL_HIGH_PRIO 3 if SOC_SERIES_NRF51X
901	range BT_CTLR_ULL_HIGH_PRIO 6 if (SOC_COMPATIBLE_NRF52X || SOC_COMPATIBLE_NRF53X)
902	default BT_CTLR_ULL_HIGH_PRIO
903	help
904	  The interrupt priority for Ticker's Job IRQ and Upper Link Layer
905	  lower priority functions.
906
907config BT_CTLR_LOW_LAT
908	bool "Low latency non-negotiating event preemption"
909	select BT_CTLR_LOW_LAT_ULL_DONE
910	default y if SOC_SERIES_NRF51X
911	help
912	  Use low latency non-negotiating event preemption. This reduces
913	  Radio ISR latencies by the controller event scheduling framework.
914	  Consequently, this reduces on-air radio utilization due to redundant
915	  radio state switches.
916
917config BT_CTLR_LOW_LAT_ULL
918	prompt "Low latency ULL"
919	bool
920	help
921	  Low latency ULL implementation that uses tailchaining instead of while
922	  loop to demux rx messages from LLL.
923
924config BT_CTLR_LOW_LAT_ULL_DONE
925	prompt "Low latency ULL prepare dequeue"
926	bool
927	help
928	  Done events be processed and dequeued in ULL context.
929
930config BT_CTLR_CONN_META
931	prompt "Connection meta data extension"
932	bool
933	help
934	  Enables vendor specific per-connection meta data as part of the
935	  LLL connection object.
936
937config BT_CTLR_RX_PDU_META
938	prompt "RX pdu meta data"
939	bool
940
941config BT_CTLR_NRF_GRTC
942	bool "Use nRF GRTC peripheral"
943	depends on SOC_COMPATIBLE_NRF54LX
944	select BT_TICKER_CNTR_FREE_RUNNING
945	default y
946	help
947	  Enable use of nRF54Lx NRF_GRTC peripheral.
948
949config BT_CTLR_NRF_GRTC_START
950	bool "Start nRF GRTC peripheral"
951	depends on BT_CTLR_NRF_GRTC
952	help
953	  Enable explicit start of nRF54Lx NRF_GRTC peripheral.
954
955config BT_CTLR_NRF_GRTC_KEEPRUNNING
956	bool "Keep running nRF GRTC peripheral"
957	depends on BT_CTLR_NRF_GRTC_START
958	help
959	  Keep running nRF GRTC peripheral.
960
961config BT_CTLR_NRF_GRTC_AUTOEN_CPUACTIVE
962	bool "Auto enable nRF GRTC on CPU active"
963	depends on BT_CTLR_NRF_GRTC_START
964	help
965	  Auto enable nRF GRTC on CPU active.
966
967config BT_CTLR_NRF_GRTC_AUTOEN_DEFAULT
968	bool "Auto enable nRF GRTC by default"
969	depends on BT_CTLR_NRF_GRTC_START
970	help
971	  Auto enable nRF GRTC by default.
972
973config BT_CTLR_RADIO_ENABLE_FAST
974	bool "Use tTXEN/RXEN,FAST ramp-up"
975	depends on SOC_COMPATIBLE_NRF52X || SOC_COMPATIBLE_NRF53X || SOC_COMPATIBLE_NRF54LX
976	select BT_CTLR_SW_SWITCH_SINGLE_TIMER if SOC_COMPATIBLE_NRF54LX
977	default y
978	help
979	  Enable use of fast radio ramp-up mode.
980
981config BT_CTLR_RADIO_TIMER_ISR
982	# Hidden, enables use of timer ISR callback
983	bool
984	depends on SOC_COMPATIBLE_NRF52X || SOC_COMPATIBLE_NRF53X
985	help
986	  Enables use of timer ISR callback.
987
988config BT_CTLR_TIFS_HW
989	bool "H/w Accelerated tIFS Trx switching"
990	depends on !BT_CTLR_RADIO_ENABLE_FAST && BT_CTLR_TIFS_HW_SUPPORT
991	default y
992	help
993	  Enable use of hardware accelerated tIFS Trx switching.
994
995config BT_CTLR_SW_SWITCH_SINGLE_TIMER
996	bool "Single TIMER tIFS Trx SW switching"
997	depends on (!BT_CTLR_TIFS_HW) && (SOC_COMPATIBLE_NRF52X || SOC_COMPATIBLE_NRF53X || \
998					  SOC_COMPATIBLE_NRF54LX)
999	help
1000	  Implement the tIFS Trx SW switch with the same TIMER
1001	  instance, as the one used for Bluetooth event timing. Requires
1002	  SW switching be enabled. Using a single TIMER:
1003	  (+) frees up one TIMER instance
1004	  (+) removes jitter for HCTO implementation
1005	  (-) introduces drifting to the absolute time inside Bluetooth
1006	  events, that increases linearly with the number of
1007	  packets exchanged in the event
1008	  (-) makes it impossible to use most of the pre-programmed
1009	  PPI channels for the controller, resulting in 4 channels
1010	  less left for other uses
1011
1012config BT_CTLR_PARAM_CHECK
1013	bool "HCI Command Parameter checking"
1014	default y if BT_HCI_RAW
1015	help
1016	  Enable code checking HCI Command Parameters. This is not needed in
1017	  combined host plus controller builds, saving some code space.
1018
1019if BT_CONN
1020
1021config BT_CTLR_LLCP_CONN
1022	int "Number of connections with worst-case overlapping procedures"
1023	default BT_MAX_CONN
1024	range 1 BT_MAX_CONN
1025	help
1026	  Set the number connections for which worst-case buffer requirements
1027	  for LLCP procedures must be met. Executing LLCP procedures on
1028	  more than this number of connections simultaneously may cause
1029	  instabilities.
1030
1031config BT_CTLR_LLCP_TX_PER_CONN_TX_CTRL_BUF_NUM_MAX
1032	int
1033	default 4
1034	help
1035	  The theoretical maximum number of tx ctrl buffers needed for any connection, is 4.
1036	  two for active encryption procedure plus one for rejecting a remote request
1037	  and one for a local terminate
1038
1039config BT_CTLR_LLCP_PER_CONN_TX_CTRL_BUF_NUM
1040	int "Number of tx control buffers to be reserved per connection"
1041	default BT_CTLR_LLCP_TX_PER_CONN_TX_CTRL_BUF_NUM_MAX
1042	range 0 BT_CTLR_LLCP_TX_PER_CONN_TX_CTRL_BUF_NUM_MAX
1043	help
1044	  Set the number control buffers that is to be pre allocated per connection
1045	  This defines the minimum number of buffers available for any connection
1046	  Setting this to non zero will ensure a connection will always have access
1047	  to buffer(s) for control procedure TX
1048
1049config BT_CTLR_LLCP_COMMON_TX_CTRL_BUF_NUM
1050	int "Number of tx control buffers to be available across all connections"
1051	default 0
1052	range 0 $(UINT8_MAX)
1053	help
1054	  Set the number control buffers that is to be available for tx.
1055	  This defines the size of the pool of tx buffers available
1056	  for control procedure tx. This pool is shared across all
1057	  procedures/connections with allocation through a fifo queue.
1058	  Configure between 0 and (4 - BT_CTLR_LLCP_PER_CONN_TX_CTRL_BUF_NUM) * BT_CTLR_LLCP_CONN
1059
1060config BT_CTLR_LLCP_LOCAL_PROC_CTX_BUF_NUM
1061	int "Number of local control procedure contexts to be available across all connections"
1062	default 6 if (BT_AUTO_PHY_UPDATE=y || BT_AUTO_DATA_LEN_UPDATE=y) && BT_CTLR_LLCP_CONN < 4
1063	default 2 if BT_CTLR_LLCP_CONN = 1
1064	default BT_CTLR_LLCP_CONN if BT_CTLR_LLCP_CONN > 1
1065	range 2 $(UINT8_MAX)
1066	help
1067	  Set the number control procedure contexts that is to be available.
1068	  This defines the size of the pool of control procedure contexts available
1069	  for handling local initiated control procedures.
1070	  This pool is shared across all connections, with allocation through a queue.
1071
1072config BT_CTLR_LLCP_REMOTE_PROC_CTX_BUF_NUM
1073	int "Number of remote control procedure contexts to be available across all connections"
1074	default BT_CTLR_LLCP_CONN
1075	range 1 $(UINT8_MAX)
1076	help
1077	  Set the number control procedure contexts that is to be available.
1078	  This defines the size of the pool of control procedure contexts available
1079	  for handling remote initiated control procedures.
1080	  This pool is shared across all connections, with allocation through a queue.
1081
1082config BT_CTLR_LLID_DATA_START_EMPTY
1083	bool "Handle zero length L2CAP start frame"
1084	default y if BT_HCI_RAW
1085	help
1086	  Handle zero length L2CAP start frame.
1087
1088config BT_CTLR_TX_RETRY_DISABLE
1089	bool "Disable Tx Retry"
1090	help
1091	  Avoid retransmission of a PDU if peer device Nack-ed a transmission
1092	  in the current connection event, close the connection event so as to
1093	  save current consumption on retries (in case peer has no buffers to
1094	  receive new PDUs).
1095
1096	  Enabling this will lower power consumption, but increase transmission
1097	  latencies by one connection interval as the next attempt to send a PDU
1098	  would happen in the next connection event instead of repeated retries
1099	  in the current connection event.
1100
1101config BT_CTLR_TX_DEFER
1102	bool "Deferred ACL Tx packet transmission setup"
1103	select BT_CTLR_RADIO_TIMER_ISR
1104	help
1105	  Enable deferred ACL Tx packet transmission setup by radio, so that an
1106	  enqueued ACL Data packet by the upper layer can be transmitted with
1107	  the shortest latency.
1108
1109config BT_CTLR_THROUGHPUT
1110	bool "Measure incoming Tx throughput"
1111	help
1112	  Measure incoming Tx throughput and log the results.
1113
1114config BT_CTLR_FORCE_MD_COUNT
1115	int "Forced MD bit count" if !BT_CTLR_FORCE_MD_AUTO
1116	depends on !BT_CTLR_LOW_LAT
1117	range 0 $(UINT8_MAX)
1118	default 1 if BT_CTLR_FORCE_MD_AUTO
1119	default 0
1120	help
1121	  No. of times to force MD bit to be set in Tx PDU after a successful
1122	  transmission of non-empty PDU.
1123
1124	  This will prolong the connection event to from being closed in cases
1125	  where applications want to send data in same connection event but are
1126	  slow in providing new Tx data.
1127
1128config BT_CTLR_FORCE_MD_AUTO
1129	bool "Forced MD bit automatic calculation"
1130	depends on !BT_CTLR_LOW_LAT
1131	select BT_CTLR_THROUGHPUT
1132	default y if BT_HCI_RAW
1133	help
1134	  Force MD bit in transmitted PDU based on runtime incoming transmit
1135	  data throughput.
1136
1137config BT_CTLR_CONN_RANDOM_FORCE
1138	bool "Random forced scheduling for peripheral on missed anchor point"
1139	depends on BT_PERIPHERAL && (BT_MAX_CONN > 1)
1140	default y
1141	help
1142	  When enabled, controller will have legacy behavior and randomly force
1143	  priority at next ticker scheduling for peripheral role, if anchor point is
1144	  missed.
1145	  Two or more connections with similar interval on a device connected
1146	  to a peer device having two or more connections at its end with same
1147	  interval could lock to a round robin pattern where in neither of the central
1148	  nor peripheral event would be in sync at either end. Randomness allows
1149	  to break this locked round robin pattern permitting an anchor point sync.
1150
1151config BT_CTLR_CONN_RSSI_EVENT
1152	bool "Connection RSSI event"
1153	depends on BT_CTLR_CONN_RSSI
1154	help
1155	  Generate events for connection RSSI measurement.
1156
1157config BT_CTLR_ALLOW_SAME_PEER_CONN
1158	bool "Allow connection requests from same peer"
1159	depends on BT_MAX_CONN > 1
1160	help
1161	  Allow connection requests from the same peer. While the
1162	  Bluetooth specification does not allow multiple connections
1163	  with the same peer, allowing such connections is useful
1164	  while debugging multiple connections.
1165
1166	  WARNING: This option enables behavior that violates the Bluetooth
1167	  specification.
1168
1169config BT_CTLR_CONN_INTERVAL_LOW_LATENCY
1170	bool "Allow low latency connection intervals"
1171	help
1172	  Allow low latency connection intervals.
1173
1174config BT_CTLR_EVENT_IFS_LOW_LAT_US
1175	prompt "Low latency tIFS value in microseconds" if BT_CTLR_CONN_INTERVAL_LOW_LATENCY
1176	int
1177	default 52 if BT_CTLR_CONN_INTERVAL_LOW_LATENCY
1178	default 150
1179	help
1180	  Set low latency tIFS value.
1181
1182endif # BT_CONN
1183
1184config BT_CTLR_ADV_INDICATION
1185	bool "Advertisement indications"
1186	depends on BT_BROADCASTER
1187	help
1188	  Generate events indicating on air advertisement events.
1189
1190config BT_CTLR_SCAN_REQ_NOTIFY
1191	bool "Scan Request Notifications"
1192	depends on BT_BROADCASTER
1193	help
1194	  Generate events notifying the on air scan requests received.
1195
1196config BT_CTLR_SCAN_REQ_RSSI
1197	bool "Measure Scan Request RSSI"
1198	depends on BT_CTLR_SCAN_REQ_NOTIFY
1199	help
1200	  Measure RSSI of the on air scan requests received.
1201
1202config BT_CTLR_SCAN_INDICATION
1203	bool "Scanner indications"
1204	depends on BT_OBSERVER
1205	help
1206	  Generate events indicating on air scanner events.
1207
1208config BT_CTLR_SCAN_UNRESERVED
1209	bool "Unreserved scan window"
1210	depends on BT_OBSERVER && !BT_CTLR_LOW_LAT
1211	default y if BT_MESH
1212	help
1213	  Scanner will not use time space reservation for scan window when in
1214	  continuous scan mode.
1215
1216config BT_MAYFLY_YIELD_AFTER_CALL
1217	bool "Yield from mayfly thread after first call"
1218	default y
1219	help
1220	  Only process one mayfly callback per invocation (legacy behavior).
1221	  If set to 'n', all pending mayflies for callee are executed before
1222	  yielding
1223
1224config BT_TICKER_CNTR_FREE_RUNNING
1225	# Hidden options to use free running counter in ticker implementation
1226	bool
1227
1228config BT_TICKER_LOW_LAT
1229	bool "Ticker low latency mode"
1230	default y if SOC_SERIES_NRF51X
1231	help
1232	  This option enables legacy ticker scheduling which defers overlapping
1233	  ticker node timeouts and thereby prevents ticker interrupts during
1234	  radio RX/TX. Enabling this option disables the ticker priority- and
1235	  'must expire' features.
1236
1237config BT_TICKER_UPDATE
1238	bool "Ticker Update"
1239	help
1240	  This option enables Ticker Update interface.
1241
1242config BT_TICKER_REMAINDER_SUPPORT
1243	bool
1244
1245config BT_TICKER_START_REMAINDER
1246	bool "Ticker Start Remainder Parameter"
1247	depends on BT_TICKER_REMAINDER_SUPPORT
1248	help
1249	  This option enables Ticker Start interface remainder parameter for
1250	  first expire timeout.
1251
1252config BT_TICKER_JOB_IDLE_GET
1253	bool "Ticker Job Idle Get"
1254	default y if BT_TICKER_LOW_LAT
1255	help
1256	  This option enables the ticker interface to query the idle state of
1257	  the Ticker Job execution context. This interface is used to disable
1258	  Ticker Job execution once in idle state, no operations pending for the
1259	  Ticker Job to process.
1260
1261config BT_TICKER_NEXT_SLOT_GET
1262	bool "Ticker Next Slot Get"
1263	help
1264	  This option enables ticker interface to iterate through active
1265	  ticker nodes, returning tick to expire.
1266
1267config BT_TICKER_REMAINDER_GET
1268	bool "Ticker Next Slot Get with Remainder"
1269	depends on BT_TICKER_REMAINDER_SUPPORT
1270	select BT_TICKER_NEXT_SLOT_GET
1271	select BT_TICKER_NEXT_SLOT_GET_MATCH
1272	help
1273	  This option enables ticker interface to iterate through active
1274	  ticker nodes, returning tick to expire and remainder from a reference
1275	  tick.
1276
1277config BT_TICKER_LAZY_GET
1278	bool "Ticker Next Slot Get with Lazy"
1279	select BT_TICKER_NEXT_SLOT_GET
1280	select BT_TICKER_NEXT_SLOT_GET_MATCH
1281	help
1282	  This option enables ticker interface to iterate through active
1283	  ticker nodes, returning tick to expire and lazy count from a reference
1284	  tick.
1285
1286config BT_TICKER_NEXT_SLOT_GET_MATCH
1287	bool "Ticker Next Slot Get with match callback"
1288	depends on BT_TICKER_NEXT_SLOT_GET
1289	default y if BT_TICKER_SLOT_AGNOSTIC
1290	help
1291	  This option enables ticker interface to iterate through active
1292	  ticker nodes with a callback for every found ticker node. When
1293	  returning true in the callback, iteration will stop and the normal
1294	  operation callback invoked.
1295
1296config BT_TICKER_EXT
1297	bool "Ticker extensions"
1298	depends on !BT_TICKER_LOW_LAT
1299	default y if BT_BROADCASTER
1300	help
1301	  This option enables ticker extensions such as re-scheduling of
1302	  ticker nodes with slot_window set to non-zero. Ticker extensions
1303	  are invoked by using available '_ext' versions of ticker interface
1304	  functions.
1305
1306config BT_TICKER_EXT_SLOT_WINDOW_YIELD
1307	bool "Tickers with slot window always yields"
1308	depends on BT_TICKER_EXT
1309	default y if BT_MESH || BT_CTLR_ADV_ISO
1310	help
1311	  This options forces tickers with slot window extensions to yield to
1312	  normal tickers and be placed at the end of their slot window.
1313
1314config BT_TICKER_EXT_EXPIRE_INFO
1315	bool "Ticker timeout with other ticker's expire information"
1316	select BT_TICKER_EXT
1317	help
1318	  This option enables ticker to return expiration info. The extended
1319	  ticker interface) is used to ask for expiration information for
1320	  another ticker id to be returned in the ticker callback. This utilises
1321	  the extended ticker interface and a callback function with a different
1322	  context to keep the current ticker interface as unchanged as possible.
1323
1324config BT_TICKER_PRIORITY_SET
1325	bool "Tickers with priority based collision resolution"
1326	depends on BT_TICKER_EXT
1327	help
1328	  This option provide tickers with persistent priority value that will
1329	  be used in resolving collisions.
1330
1331	  The priority feature if enabled then a custom ULL is needed by vendors
1332	  to avoid repeated skipping of overlapping events as next_has_priority
1333	  check uses lazy value that would be always lazy_next > lazy_current as
1334	  currently skipped event becomes the next event with lazy value
1335	  incremented by 1. This repeated skip happens when all the time
1336	  between the event intervals are occupied continuously by overlapping
1337	  tickers.
1338
1339config BT_TICKER_SLOT_AGNOSTIC
1340	bool "Slot agnostic ticker mode"
1341	help
1342	  This option enables slot agnostic ticker mode, which ignores slot
1343	  reservations and collision handling, and operates as a simple
1344	  multi-instance programmable timer.
1345
1346config BT_TICKER_PREFER_START_BEFORE_STOP
1347	bool "Ticker prefer start before stop request"
1348	help
1349	  Under race conditions wherein for a given ticker node if a number of
1350	  start and stop operations are enqueued towards ticker_job by a said
1351	  user execution context, then start operations is preferred to be
1352	  processed before stop operations.
1353
1354	  Without this option, the default behavior is to defer all start
1355	  requests after all stop requests enqueued by all user context having
1356	  been processed. The rationale for default behavior being that under
1357	  race conditions, start followed by stop requests, or start before stop
1358	  requests, the said ticker node is always scheduled and at timeout the
1359	  execution context can take decision based on its execution state.
1360
1361config BT_CTLR_JIT_SCHEDULING
1362	bool "Just-in-Time Scheduling"
1363	select BT_TICKER_SLOT_AGNOSTIC
1364	help
1365	  This option enables the experimental 'Next Generation' scheduling
1366	  feature, which eliminates priorities and collision resolving in the
1367	  ticker, and instead relies on just-in-time ("lazy") resolution in
1368	  the link layer.
1369
1370config BT_CTLR_PERIPHERAL_ISO_EARLY_CIG_START
1371	bool "Early start of peripheral CIG event"
1372	depends on BT_CTLR_PERIPHERAL_ISO
1373	help
1374	  Start scheduling the Peripheral ISO CIG events one event in advance
1375	  and hence adjust CIG offset and reference point ahead one interval.
1376
1377config BT_CTLR_USER_EXT
1378	prompt "Proprietary extensions in Controller"
1379	bool
1380	help
1381	  Catch-all for enabling proprietary event types in Controller behavior.
1382
1383config BT_CTLR_USER_EVT_RANGE
1384	int "Range of event constants reserved for proprietary event types"
1385	depends on BT_CTLR_USER_EXT
1386	default 5
1387	range 0 10
1388	help
1389	  Number of event types reserved for proprietary use. The range
1390	  is typically used when BT_CTLR_USER_EXT is in use.
1391
1392config BT_CTLR_USER_TICKER_ID_RANGE
1393	int "Range of ticker id constants reserved for proprietary ticker nodes"
1394	depends on BT_CTLR_USER_EXT
1395	default 0
1396	range 0 10
1397	help
1398	  Number of ticker ids reserved for proprietary use. The range
1399	  is typically used when BT_CTLR_USER_EXT is in use.
1400
1401config BT_RX_USER_PDU_LEN
1402	int "Maximum supported proprietary PDU buffer length"
1403	depends on BT_CTLR_USER_EXT
1404	default 2
1405	range 2 $(UINT8_MAX)
1406	help
1407	  Maximum data size for each proprietary PDU. This size includes link layer
1408	  header and payload. It does not account for HCI event headers as these
1409	  PDUs are assumed to not go across HCI.
1410
1411config BT_CTLR_USER_CPR_INTERVAL_MIN
1412	bool "Proprietary Connection Parameter Request minimum interval"
1413	depends on BT_CTLR_USER_EXT
1414	help
1415	  When enabled, controller will accept Connection Parameter Request
1416	  intervals down to a proprietary minimum value.
1417
1418config BT_CTLR_USER_CPR_ANCHOR_POINT_MOVE
1419	bool "Proprietary handling of anchor point movement"
1420	depends on BT_CTLR_USER_EXT && BT_CTLR_CONN_PARAM_REQ && BT_PERIPHERAL
1421	help
1422	  When enabled, defer accept/reject of Connection Parameter Request with only
1423	  anchor point movement to proprietary logic.
1424	  Only applicable for peripheral.
1425
1426endmenu
1427
1428# Workaround to be able to have default for "choice" in hidden "menu" above
1429choice BT_CTLR_OPTIMIZE
1430	prompt "Optimization options"
1431	depends on !LTO
1432
1433config BT_CTLR_OPTIMIZE_FOR_SPEED
1434	bool "Optimize for Speed"
1435
1436endchoice
1437
1438source "subsys/bluetooth/controller/coex/Kconfig"
1439
1440comment "Bluetooth LE Controller debug configuration"
1441
1442config BT_CTLR_PROFILE_ISR
1443	bool "Profile radio ISR"
1444	help
1445	  Turn on measurement of radio ISR latency, CPU usage and generation of
1446	  controller event with these profiling data. The controller event
1447	  contains current, minimum and maximum ISR entry latencies; and
1448	  current, minimum and maximum ISR CPU use in micro-seconds.
1449
1450config BT_CTLR_DEBUG_PINS
1451	bool "Bluetooth Controller Debug Pins"
1452	depends on BOARD_NRF51DK_NRF51822 || BOARD_NRF52DK_NRF52832 || BOARD_NRF52DK_NRF52810 || BOARD_NRF52840DK_NRF52840 || BOARD_NRF52833DK_NRF52833 || BOARD_NRF5340DK_NRF5340_CPUNET || BOARD_RV32M1_VEGA
1453	help
1454	  Turn on debug GPIO toggling for the Bluetooth LE Controller. This is useful
1455	  when debugging with a logic analyzer or profiling certain sections of
1456	  the code.
1457
1458endif # BT_LL_SW_SPLIT
1459