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