Bluetooth: Controller: clean up nRF DFE

The way we currently handle direction finding extension (DFE) support
on Nordic nRF5 controllers relies on required devicetree properties
related to DFE in the "nordic,nrf-radio" node.

That doesn't make sense on radios without DFE support, though.
Any .dtsi for an SoC without DFE support which has such a node would
require extraneous DFE related properties like dfe-antenna-num.

Instead of making the properties required, mark them optional. We
indicate the presence of DFE support via a new 'dfe-supported' boolean
property which the SoC .dtsi files can set (or not) depending on
support.

This gives us the opportunity to do some cleanup in the Kconfig,
removing CONFIG_HAS_HW_NRF_RADIO_BLE_DF since we know from the
devicetree whether DFE support is available.

Handle that change appropriately in radio_df.c. This gives us an
opportunity to improve readability in the devicetree-related macro
magic in that file.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This commit is contained in:
Martí Bolívar 2021-07-19 17:30:32 -07:00 committed by Christopher Friedt
commit 041099f67c
9 changed files with 135 additions and 109 deletions

View file

@ -5,6 +5,9 @@
if BT_LL_SW_SPLIT
DT_PATH_NORDIC_RADIO := $(dt_nodelabel_path,radio)
DT_NORDIC_RADIO_DFE_SUPPORTED := $(dt_node_has_bool_prop,$(DT_PATH_NORDIC_RADIO),dfe-supported)
config BT_LLL_VENDOR_NORDIC
bool "Use Nordic LLL"
depends on SOC_COMPATIBLE_NRF
@ -31,7 +34,7 @@ config BT_LLL_VENDOR_NORDIC
select BT_CTLR_SYNC_PERIODIC_SUPPORT
select BT_CTLR_ADV_ISO_SUPPORT
select BT_CTLR_SYNC_ISO_SUPPORT
select BT_CTLR_DF_SUPPORT if HAS_HW_NRF_RADIO_BLE_DF
select BT_CTLR_DF_SUPPORT if $(DT_NORDIC_RADIO_DFE_SUPPORTED)
select BT_CTLR_CHAN_SEL_2_SUPPORT
select BT_CTLR_MIN_USED_CHAN_SUPPORT
select BT_CTLR_DTM_HCI_SUPPORT