zephyr/tests/bluetooth
Martí Bolívar 7ff74e0ab9 Bluetooth: controller: support FEMs via devicetree
A FEM in this case is an external Front-End Module. This is basically
a range booster with some extra amplification in the TX and RX paths.

This feature is supported for the Nordic open source controller. See
the changes to the ubx_bmd345eval_nrf52840 board for a quick summary
of what you have to do to take advantage of this.

(This patch doesn't actually remove the feature in the openisa HAL,
though, because that never implemented the required GPIO handling
routines.)

We are using the 'fem' property previously added to the
nordic,nrf-radio's devicetree binding, which points to the FEM that is
in use. If you have this property and the node it points to is
enabled, the controller subsystem respects it. Otherwise, FEM support
is disabled.

This obsoletes the following Kconfig options, which are now unused:

- CONFIG_BT_CTLR_GPIO_PA
- CONFIG_BT_CTLR_GPIO_PA_PIN
- CONFIG_BT_CTLR_GPIO_PA_POL_INV
- CONFIG_BT_CTLR_GPIO_PA_OFFSET

- CONFIG_BT_CTLR_GPIO_LNA
- CONFIG_BT_CTLR_GPIO_LNA_PIN
- CONFIG_BT_CTLR_GPIO_LNA_POL_INV
- CONFIG_BT_CTLR_GPIO_LNA_OFFSET

- CONFIG_BT_CTLR_FEM_NRF21540
- CONFIG_BT_CTLR_GPIO_PDN_PIN
- CONFIG_BT_CTLR_GPIO_PDN_POL_INV
- CONFIG_BT_CTLR_GPIO_CSN_PIN
- CONFIG_BT_CTLR_GPIO_CSN_POL_INV
- CONFIG_BT_CTLR_GPIO_PDN_CSN_OFFSET

The PA and LNA pins are now specified via fem-specific devicetree
properties in the FEM node:

- The "generic" PA/LNA case is handled with the ctx-gpios and
  crx-gpios properties of the generic-fem-two-ctrl-pins compatible,
  respectively.

- If the fem is an nRF21540, use the tx-en-gpios and rx-en-gpios
  properties instead (and also respectively). This allows us to specify
  FEM properties in a way that makes sense for the hardware datasheet,
  while still handling them in a uniform way within the controller.

We support this in the nRF5 HAL with a new radio_nrf5_fem.h
sub-header, which pulls in radio_nrf5_fem_generic.h or
radio_nrf5_fem_nrf21540.h depending on the fem node's compatible, if
one is defined. These in turn let us replace the implementation
routines in radio.c with DT equivalents.

Keep in-tree users and devicetree binding documentation up to date.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-11-11 21:52:24 +01:00
..
adv cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
at cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
bluetooth cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
bsim_bt Bluetooth: Audio: Media control BabbleSim tests 2021-11-11 15:31:37 +01:00
ctrl_sw_privacy cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
ctrl_sw_privacy_unit Bluetooth: Controller: Implement Periodic Advertiser List 2021-10-01 21:48:51 +02:00
ctrl_user_ext cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
df Bluetooth: controller: add missing ADI support in per adv chains 2021-11-11 18:36:54 +01:00
gatt cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
hci_codecs_info cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
hci_prop_evt tests: hci_prop_evt: Fix net_buf reference handling 2021-11-09 22:21:23 +02:00
init Bluetooth: controller: support FEMs via devicetree 2021-11-11 21:52:24 +01:00
l2cap cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
ll_settings cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
mesh tests: Bluetooth: mesh: Remove explicit disable of CSA#2 2021-10-06 11:36:12 -05:00
mesh_shell Bluetooth: Mesh: Moved composition data out of mesh shell 2021-11-08 11:07:11 -05:00
shell Bluetooth: Audio: Add build tests for media control 2021-11-11 15:31:37 +01:00
tester tests: bluetooth: tester: Add support for advertising with target RPA 2021-11-09 19:54:30 -05:00
uuid cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00