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