Skip to content

Commit

Permalink
samples: bluetooth: radio_coex_1wire: Add support for nRF54H20
Browse files Browse the repository at this point in the history
This commit adds support for nRF54H20 for this sample.

Explicit binding and extra node is needed because nrf-regtool doesn't
pick up properties from the zephyr,user node. Because of this, it
doesn't add to the UICR of the radio core the gpio that sample needs.

Other platforms don't have such security mechanism and thus don't need
this workaround.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
  • Loading branch information
PavelVPV committed Sep 27, 2024
1 parent ea054d9 commit 26cc9fd
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 3 deletions.
5 changes: 3 additions & 2 deletions samples/bluetooth/radio_coex_1wire/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})

project("External radio Bluetooth coexistence sample")

if (NOT CONFIG_SOC_SERIES_NRF52X AND NOT CONFIG_SOC_SERIES_NRF54LX)
message(FATAL_ERROR "This sample is only supported on the nRF52 and nRF54L series.")
if (NOT CONFIG_SOC_SERIES_NRF52X AND NOT CONFIG_SOC_SERIES_NRF54LX
AND NOT CONFIG_SOC_SERIES_NRF54HX)
message(FATAL_ERROR "This sample is only supported on the nRF52, nRF54L and nRF54H series.")
endif()

# NORDIC SDK APP START
Expand Down
8 changes: 8 additions & 0 deletions samples/bluetooth/radio_coex_1wire/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,19 @@ The following table shows the default pins used for this sample for each support
+----------------------------+----------------------+-------------+
| nrf54l15dk/nrf54l15/cpuapp | P0.00 | P0.02 |
+----------------------------+----------------------+-------------+
| nrf54h20dk/nrf54h20/cpurad | P0.00 | P0.02 |
+----------------------------+----------------------+-------------+


The board's :ref:`/zephyr,user <dt-zephyr-user>` node must have the ``coex-pta-grant-gpios`` property set in the devicetree.
You can use this sample's board overlay as an example.

.. note:
For the ``nrf54h20dk/nrf54h20/cpurad`` target in the board's devicetree file, you must define a node with the compatible property set to ``coex-pta-grant-gpios``.
Then set the ``coex-pta-grant-gpios`` property of that node to the desired pin.
This is needed to properly configure the UICR register and get a pin access from the core the application is running on.
See the :file:`boards/nrf54h20dk_nrf54h20_cpurad.overlay` file for an example.
Building and running
********************

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/ {
zephyr,user {
coex-pta-grant-gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
};

coex_pta_node {
status = "okay";
coex-pta-grant-gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
compatible = "coex-pta-grant-gpios";
};

nrf_radio_coex: radio_coex_one_wire {
status = "okay";
compatible = "sdc-radio-coex-one-wire";
grant-gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
concurrency-mode = <0>;
};

aliases {
egu = &egu020;
};
};

&gpio0 {
status = "okay";
};

&gpiote130 {
status = "okay";
owned-channels = <0>;
};

&radio {
coex = <&nrf_radio_coex>;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright (c) 2024 Nordic Semiconductor ASA
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause

description: |
Coexistence PTA (Power Transmitter Amplifier) grant GPIOs
include: base.yaml

properties:
coex-pta-grant-gpios:
type: phandle-array
description: |
A phandle to the GPIO controller that provides the GRANT signal.
The GPIO controller must be defined in the device tree.
required: true

compatible: "coex-pta-grant-gpios"
3 changes: 2 additions & 1 deletion samples/bluetooth/radio_coex_1wire/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ tests:
integration_platforms:
- nrf52840dk/nrf52840
- nrf54l15dk/nrf54l15/cpuapp
platform_allow: nrf52840dk/nrf52840 nrf54l15dk/nrf54l15/cpuapp
- nrf54h20dk/nrf54h20/cpurad
platform_allow: nrf52840dk/nrf52840 nrf54l15dk/nrf54l15/cpuapp nrf54h20dk/nrf54h20/cpurad
tags: bluetooth ci_build sysbuild

0 comments on commit 26cc9fd

Please sign in to comment.