Commit graph

158 commits

Author SHA1 Message Date
Piotr Koziar 17a3c6dc24 modules: hal_nordic: turn off temperature update by default for nRF54H20.
Adds an appropriate condition to the Kconfig as
the temperature driver is not supported for nRF54H20 devices yet.

Without this change, a build with NRF 802.15.4 libraries produces
Kconfig error.

Signed-off-by: Piotr Koziar <piotr.koziar@nordicsemi.no>
2024-06-10 15:00:01 +03:00
Piotr Koziar 89c4afa3b8 modules: hal_nordic: implement hfclk start/stop for nRF54H20.
Clock_control is currently not supported on nRF54H20.
This commit adds new way of handling the hfclk targeted for nRF54H20.

This solution shall be replaced once the clock_control is supported
for nRF54H20.

Signed-off-by: Piotr Koziar <piotr.koziar@nordicsemi.no>
2024-06-10 15:00:01 +03:00
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
Ilhan Ates ee4a20de15 modules: hal_nordic: nrfx: Use soc compatible definition
CONFIG_SOC_SERIES_NRF53X is replaced with SOC_COMPATIBLE_NRF53X
to have support for nrf5340bsim

Signed-off-by: Ilhan Ates <ilhan.ates@nordicsemi.no>
2024-06-05 17:37:31 -05:00
Gerard Marull-Paretas 7ff30b6d9f modules: hal_nordic: require nrf-regtool 5.3.0
>=5.3.0 is required for proper CAN support.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-05-30 05:20:50 -07:00
Adam Kondraciuk cac0da313b drivers: timer: grtc: Update GRTC driver
This commit aligns the GRTC driver to changes introduced in
hal_nordic. Some of the features regarding GRTC sleep/wakeup
functionality has been modified and moved out to the nrfx
driver's code.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2024-05-28 18:53:39 +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
Krzysztof Chruściński 59415697c4 modules: hal_nordic: nrfx: nrfx_config: Fix SPIS137 config
Fixing a bug where wrong instance was enabled when SPIS137 was supposed
to be used.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-05-27 02:09:34 -07: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
Alberto Escolar Piedras c9753f5cf6 modules hal_nordic: Handle appropiately new kconfig options
The new kconfig options intend to represent a final
nRF54L product, let's handle them appropriately.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-05-16 15:19:08 +01:00
Rafal Dyla 13aa26eac2 manifest: Adding nRF Services library
Adding nRF Services library to the hal-nordic repo

Signed-off-by: Rafal Dyla <rafal.dyla@nordicsemi.no>
2024-05-15 09:25:30 +01:00
Grzegorz Swiderski 24ce3f4182 drivers: serial: nrfx: Update Kconfig dependencies for RX cache
Two Kconfig symbols were tied to a board-specific DT nodelabel - namely
the `NRFX_UARTE_CONFIG_RX_CACHE_ENABLED` and `UART_<n>_RX_CACHE_SIZE`
were tied to `shared_ram3x_region` - but this is not necessary.

That DT node is where the UARTE driver RX/TX cache buffers are placed
in the default nRF54H20 DK memory map, but on another board, they could
be located somewhere else.

The exact memory sub-regions used for this purpose are indicated using
the `memory-regions` property on each UARTE instance, which should be
generic enough already, so let's use that instead.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-05-13 16:05:39 -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
Jędrzej Ciupis fe4f101a99 modules: hal_nordic: request nRF5340 network CPU in 802.15.4 init
The network CPU must be requested explicitly by the 802.15.4 driver for
the sharing mechanism to work correctly.

Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
2024-05-09 15:44:47 +02:00
Sebastian Głąb 2f17c46fb1 drivers: wdt: nrf: Add WDT instances that exist in nrf54h20
Add WDT instances no. 010, 011, 131, 132.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-05-09 15:44:40 +02:00
Dominik Ermel e2d9f09b70 modules: hal_nordic: nrfx: Add NRFX_RRAMC
Add Kconfig option for RRAM controller, NRFX_RRAMC.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-05-08 14:59:56 -05:00
Nikodem Kastelik 9711b37e7b modules: hal_nordic: nrfx: add support for nRF54 TWIS
Add Kconfig-to-nrfx symbol redefinitions so that TWIS instances
found on nRF54H20 and nRF54L15 devices are supported.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-04-19 02:23:16 +01:00
Grzegorz Swiderski 35e418f469 modules: hal_nordic: Fix NRF_GRTC_HAS_EXTENDED
This definition is used in nrfx header files, so it shouldn't be added
using `zephyr_library_compile_definitions()`. This would cause the GRTC
driver to fail the build when CONFIG_NRF_GRTC_START_SYSCOUNTER=y.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-04-17 14:26:02 +02:00
Jakub Zymelka d907986b5d modules: hal_nordic: nrfx: add nRF54L15 FLPR core support
Add support for nRF54L15 FLPR core.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2024-04-16 18:36:58 +01:00
Krzysztof Chruściński 685e6cec9b drivers: serial: nrf: Adapt config dependencies to nrf54h20
DT nodes and compatible had been renamed and Kconfig option was relying
on the names that do not exists.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-04-15 12:53:09 +02:00
Krzysztof Chruściński 865c8800c6 modules: hal_nordic: Extend SPI configuration for all instances
Iterate over all instances to get the information about extended
feature support in SPIM driver.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-04-11 14:30:31 +02:00
Nikodem Kastelik 9949645dd4 modules: hal_nordic: nrfx: add support for nRF54 PWM
Add Kconfig-to-nrfx symbol redefinitions so that PWM instances
found on nRF54H20 and nRF54L15 devices are supported.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-04-09 11:05:46 +02:00
Andrzej Głąbek 902351a2e5 modules: hal_nordic: Add missing nrfx_config entries for nRF54L15
Add nrfx_grtc related entries that were introduced in nrfx 3.4.0,
especially NRFX_GRTC_CONFIG_AUTOSTART that should be by default
set to 1.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-04-08 12:27:21 +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
Magdalena Pastula 92f1b3ff96 modules: hal_nordic: nrfx: propagate new configs to nrfx
Add support for propagating SOC_NRF54LX_DISABLE_FICR_TRIMCNF and
SOC_NRF54LX_SKIP_GLITCHDETECTOR_DISABLE values to nrfx.

Signed-off-by: Magdalena Pastula <magdalena.pastula@nordicsemi.no>
2024-03-19 09:47:58 +01:00
Andrzej Głąbek cec6ab0dcd modules: hal_nordic: Remove support for nRF54H20 EngA
This was a preview revision of the SoC that will no longer
be supported.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-03-18 19:11:36 +00:00
Andrzej Głąbek eac91bf8ac modules: hal_nordic: Add nrfx configuration needed for nRF54H20
Add cmake and nrfx_config entries that allow building for the nRF54H20
SoC.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-03-18 19:11:36 +00:00
Andrzej Głąbek e3d7c3b6e9 modules: hal_nordic: Align nRF54H20 nrfx_configs with nrfx templates
- add new entries that appeared in nrfx 3.4.0
- correct the default IRQ priority value for PPR (it is intended to be
  the lowest prority, so unlike for ARM cores, for RISC-V it should be
  the lowest value)

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-03-18 19:11:36 +00:00
Nikodem Kastelik ca147ff637 modules: hal_nordic: nrfx: include config for nrf54l15
Both nRF54L15 and nRF54L15 EngA uses same nrfx config file.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-03-15 06:26:44 -04:00
Andrzej Głąbek 6692d880e9 modules: hal_nordic: Enable support for DPPI on nRF54H20
Include into compilation the nrfx_gppi_dppi_ppib helper and related
interconnect layers when DPPIC nodes are enabled in DTS. Provide macro
definitions required by those interconnect layers based on information
from devicetree (the nrf_grtc_timer is only modified because a macro
that it uses became more generic).

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-03-12 14:27:16 +00:00
Krzysztof Chruściński c975910f84 drivers: spi: nrf: Add new SPIS instances
Add support for upcomming SPIS instances.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-03-06 10:48:01 +01: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
Andrzej Kuros 0703a3532d modules: hal_nordic: remove weak nrf_802154_clock_hfclk_ready
The __WEAK-tagged function `nrf_802154_clock_hfclk_ready` is removed.
The implementation is provided by the nRF 802.15.4 Radio Driver.
Existence of __WEAK-tagged version causes incorrect behavior when
Link Time Optimization is used.

Signed-off-by: Andrzej Kuroś <andrzej.kuros@nordicsemi.no>
2024-03-02 15:04:16 +01:00
Gerard Marull-Paretas afdddf1d22 modules: hal_nordic: require nrf-regtool 5.1.0
This new version is required to handle the upcoming IPC-related DT
structure (i.e. BELLBOARD/VEVIF).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-02-27 18:37:39 +01:00
Gerard Marull-Paretas c57ec6f07a modules: hal_nordic: add support for WDT131-132
Add HAL glue code to support WDT131-132.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-02-27 12:36:54 +01:00
Gerard Marull-Paretas 01b43074ab modules: hal_nordic: add support for EGU020
Add HAL glue code to support EGU020.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-02-27 12:36:54 +01:00
Gerard Marull-Paretas 3dd2b0d8b3 modules: hal_nordic: add support for RTC130-131
Add new HAL glue Kconfig options for RTC130-131.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-02-27 12:36:54 +01:00
Gerard Marull-Paretas 7dd9853382 modules: hal_nordic: add support for TIMER020-022|120-121|130-137
Add new HAL glue Kconfig options so that new TIMER instances can be
used.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-02-27 12:36:54 +01:00
Adam Kondraciuk fd20639c08 modules: hal_nordic: nrfx: Fix DPPI support for nRF54L15
Add required DPPIC interconnect files for nRF54L15 SoC.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2024-02-26 11:55:10 +00:00
Gerard Marull-Paretas 426bbf5649 soc: riscv: nordic_nrf: nrf54h: introduce PPR support
Add support for the nRF54H PPR (Peripheral Processor), based on the VPR
RISC-V core.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-02-02 16:40:11 +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 976de4edbe drivers: serial: nrfx: Allow new UARTE instances to be used
Extend Kconfig definitions and nrfx_config translations so that UARTE
instances that are available in nRF54H20 can be used.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-02-02 16:40:11 +01:00
Grzegorz Swiderski be8b2663c6 modules: hal_nordic: Integrate nrf-regtool
nrf-regtool is a Python utility from Nordic Semiconductor, which is used
for generating binary files with register values for given peripherals.
It sources the descriptions of peripheral registers from CMSIS-SVD files
(typically ones bundled with nRF MDK).

For some peripherals, such as UICR, nrf-regtool supports parsing values
from devicetree as well, based on the bindings already found in Zephyr.

Currently, this tool is not submitted as a script to Zephyr, but it can
be installed from PyPI.

Having nrf-regtool installed is recommended when working with nRF54H20.
Booting the Application or Radiocore CPU requires flashing not only its
firmware, but also its respective UICR instance. On this SoC, the UICR
is used to assign ownership of global hardware resources, including
memory and peripherals, to individual cores. The Zephyr build system can
call nrf-regtool to generate the UICR based on devicetree, to reflect
the boot-time hardware configuration required for a given application.
The generated `uicr.hex` is then merged with `zephyr.hex`, so that they
can be flashed together using west.

The build system integration takes the form of a CMake package, which
includes a version check and reusable components; over time, some of
these components can be reused by sysbuild. This package is located in
the `hal_nordic` module, because it depends on the `SOC_SVD_FILE` CMake
variable, which is defined there as well.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-02-02 16:40:11 +01:00
Grzegorz Swiderski 7740bcf670 modules: hal_nordic: Set SOC_SVD_FILE
This CMake variable contains a path to a CMSIS-SVD file from nRF MDK,
which describes the selected Nordic SoC.

Initially, this will be used as an argument to nrf-regtool.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-02-02 16:40:11 +01:00
Andrzej Głąbek abb0934def soc: nordic: Add initial support for nRF54H20 EngA
Add nrfx and Kconfig related infrastructure plus SoC initialization
code to allow building for nRF54H20 targets (Application and Radio
cores).

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 139b97a64a modules: hal_nordic: Use common nrfx_config section for GRTC
Move code that prepares `NRFX_CONFIG_GRTC_*` definitions based on
information from devicetree from the nRF54L15 nrfx_config header
to the global one, so that the code can be used by nRF54H20, too.

The checks that validate owned-channels and child-owned-channels
DT properties are moved to the nrf_grtc_timer driver so that
the global nrfx_config is not polluted unnecessarily.

The default values in nrfx_config_nrf54l15_enga_application.h
are restored to those from the corresponding template file.

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
Witold Lukasik 04e4e6e5e9 modules: hal_nordic: nrfx: add support for nRF54L15 SOC
Add config files for nRF54L15.

Signed-off-by: Witold Lukasik <witold.lukasik@nordicsemi.no>
2024-01-30 21:00:44 +00:00
Magdalena Pastula 7322abe588 modules: hal_nordic: nrfx: add nRF54L15 peripherals instances
Add new TIMER and UARTE instances for nRF54L15.

Signed-off-by: Magdalena Pastula <magdalena.pastula@nordicsemi.no>
2024-01-30 21:00:44 +00:00