Commit graph

18 commits

Author SHA1 Message Date
Krzysztof Chruściński 17c3a23157 modules: hal_nordic: nrfx: nrfx_glue: Improve GPIOTE_CHANNELS_USED
Channels owned by a child core shall also be included in the mask of
used channels (channels that cannot be allocated by the GPIOTE channel
allocator).

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-06-07 15:08:04 +02:00
Krzysztof Chruściński 1f563b7821 modules: hal_nordic: Add NRFX_GPIOTE130_CHANNELS_USED mask
On SoC like nrf54h20 GPIOTE channels are split between cores. They
are reserved at compile time in devicetree. We need to ensure that
dynamically allocated channels are used only from pool assigned to
the given core. This is done using NRFX_GPIOTE130_CHANNELS_USED mask
which contains data from the device tree.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-05-28 10:08:09 +02:00
Andrzej Głąbek 2e8f104425 modules: hal_nordic: nrfx_glue: Remove NRFX_GPIOTE_CHANNELS_USED
This definition is no longer supported by the nrfx_gpiote driver (since
nrfx 3.2.0, reserved channels need to be defined per GPIOTE instance),
so remove it to not mislead users.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-05-24 07:47:15 -04:00
Jędrzej Ciupis ba1102c97d modules: hal_nordic: add missing glue for nRF54H20
Add missing #ifdef in nrfx_glue for nRF54H20.

Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2024-05-13 10:21:08 +02:00
Marco Widmer 1a899ee414 modules: hal_nordic: nrfx_glue: Fix unused argument
NRFX_IRQ_PRIORITY_SET is defined as empty. This causes an unused
argument warning in many callers (e.g. nrfy_gpiote_int_init). Fix it by
using ARG_UNUSED for the priority argument.

Signed-off-by: Marco Widmer <marco.widmer@bytesatwork.ch>
2024-03-26 11:19:05 -05:00
Marco Widmer 0e46701d6d modules: hal_nordic: nrfx_glue: Fix coding style
We will touch these lines in the next commit. Convert the comment style
to C89 instead of C99 and the indentation to tabs instead of spaces.

Signed-off-by: Marco Widmer <marco.widmer@bytesatwork.ch>
2024-03-26 11:19:05 -05:00
Andrzej Kuros ed55e4abd6 modules: hal_nordic: nrfx_glue add missing code for nrf_802154
For use nRF 802.15.4 Radio Driver on nRF54L series there is
necessary update for nrfx_glue.h file. It follows the pattern
used for other nRF family members.

Signed-off-by: Andrzej Kuroś <andrzej.kuros@nordicsemi.no>
2024-03-05 12:22:08 +01:00
Gerard Marull-Paretas 270ae63036 modules: hal_nordic: add configuration for nRF54H PPR core
Add nrfx configuration file to make the nrfx HAL work for
nRF54H PPR core.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-02-02 16:40:11 +01:00
Andrzej Głąbek 2efd34bda3 modules: hal_nordic: nrfx_glue: Include cmsis_core_m_defaults.h
... to cover missing __ICACHE_PRESENT and __DCACHE_PRESENT symbols that
should be defined in MDK files.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-02-02 16:40:11 +01:00
Patryk Lipinski 14827aad65 modules: hal_nordic: nrfx_glue: Changes in the macro statements
Changes in the macro statements that allows to build
with -Wudef flag enebaled, without errors.

Signed-off-by: Patryk Lipinski <patryk.lipinski@nordicsemi.no>
2023-11-15 09:59:56 +01:00
Adam Wojasinski 39b32a4f68 modules: hal_nordic: nrfx_glue: Add cache auxiliary macros
Add cache auxiliary macros needed nrfy layer in nrfx drivers SW stack.

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-05-05 11:47:53 +02:00
Gerard Marull-Paretas 5f5a905784 modules: migrate includes to <zephyr/...>
In order to bring consistency in-tree, migrate all modules code to the
new prefix <zephyr/...>. Note that the conversion has been scripted,
refer to zephyrproject-rtos#45388 for more details.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-06 19:57:47 +02:00
Andrzej Głąbek 222d42c22a modules: hal_nordic: Improve reservation of resources for BT_CTLR
Instead of including from nrfx_glue.h a specific Zephyr Bluetooth
controller header file that defines PPI and GPIOTE resources to be
reserved for exclusive use by the controller, include a file with
only a fixed name and expect the chosen Bluetooth controller to
provide the location of this file in include paths. This way, when
a different Bluetooth controller implementation is used downstream,
a different file can be easily pointed to.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-03-15 14:59:35 +01:00
Krzysztof Chruscinski 5ef63d8313 Bluetooth: Controller: nordic: Rework hw resources files
Move all defines that specifies (D)PPI resources which are used
to dedicated files which have no include dependencies. This allow
to use them in nrfx_glue.h to specify fixed (D)PPI channels used
by the bluetooth.

Additionally, added mask with GPIOTE channels used by the bluetooth
controller. It was previously not defined which could lead to
conflicts since same channels could be allocated by the nrfx_gpiote
user

Updated nrfx_glue.h to use new approach.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-12-02 09:55:48 +01:00
Krzysztof Chruscinski 7e0f1d08e4 modules: hal_nordic: Update nrfx to version 2.6.0
Update the hal_nordic module revision, to switch to nrfx v2.6.0.

nrfx 2.6.0 includes extended API in nrfx_gpiote which can be
used by the zephyr shim.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-12-02 09:55:48 +01:00
Krzysztof Chruscinski 9886bdc0c8 drivers: pwm: pwm_nrf5_sw: Use runtime resources allocation
Use nrfx_gpiote and nrfx_ppi allocators to allocate channels
at runtime instead of fixed, device-tree based allocation which
is harder to maintain.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-11-26 09:31:54 +01:00
Adam Zelik 3f2b07fc2f modules: nrfx_glue: Reserve PPI/DPPI resources used by 802.15.4 drv
Mark the PPI/DPPI channels and groups used by the 802.15.4 driver
as occupied and thus unavailable for allocation through nrfx_ppi.

Signed-off-by: Adam Zelik <adam.zelik@nordicsemi.no>
2021-02-15 08:10:19 -05:00
Andrzej Głąbek 251648afb4 modules: Move nrfx glue code to main Zephyr repository
Move nrfx glue code (nrfx integration files, related Kconfig entries,
and related part of CMakeLists.txt taken from the hal_nordic module)
to modules/hal_nordic/nrfx/ directory.
CMakeLists.txt located in modules/hal_nordic/ is now the main cmake
file for the hal_nordic module. It points back to cmake stuff related
to the nRF IEEE 802.15.4 driver that still remains in that module and
it adds the extracted nrfx part as a subdirectory.
Kconfig.nordic is renamed to Kconfig and moved to modules/hal_nordic/.
It sources nrfx related entries from that separate file.

Update also the manifest to point to accordingly modified hal_nordic
revision.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2021-01-19 17:35:04 +01:00