Commit graph

260 commits

Author SHA1 Message Date
Jakub Zymelka
be8c61ab80 modules: hal_nordic: nrfx: Update NRFX API version to 3.12
Update NRFX_CONFIG_API_VER_MINOR to 12, to be compatible with
latest SAADC driver changes.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2025-06-18 09:23:23 -04:00
Sebastian Głąb
2b4f64522e modules: hal_nordic: nrfx: Add mising UARTE23/24 Kconfigs
Add UARTE23 and UARTE24 missing Kconfig options and their
translation to NRFX configuration macros.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2025-06-13 10:31:17 -04:00
Sebastian Głąb
c0a28ab561 drivers: spi: Support spim23 and spim24 instances
Extend SPI driver with possibility to use
- spim23, spim24,
- spis23, spis24.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2025-06-13 10:31:17 -04:00
Bjarki Arge Andreasen
8a27773247 drivers: clock_control: nrf2: split configs per driver
Currently the config CLOCK_CONTROL_NRF2 is used as a GLOB
style config which includes all "NRF2" drivers and related
configs.

With NRF2, clocks are treated as individidual devices
with individual device drivers. This commit split the
CLOCK_CONTROL_NRF2 config into device specific configs
and ifdefs. With this, drivers are selected individually
based on devicetree state as is common for most devices
drivers, and dependencies like NRFS and specific NRFS
services are selected by the specific driver which nees it.

Checks for CLOCK_CONTROL_NRF2 are updated to check for
existance of the clocks instead.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-06-13 11:12:43 +02:00
Adam Kondraciuk
d2c3923106 modules: hal_nordic: nrfx: Use owned-channels property for DPPIC
The `owned-channels` property specifies which channels are assigned to
a given target. Additionally, the `source-channels` or `sink-channels`
property defines channels that can be used to forward an event outside
the DPPI domain, otherwise they can only be used within it.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2025-06-13 07:36:19 +02:00
Łukasz Stępnicki
a0777734de drivers: nrf_ironside dvfs service
Added handling of new IRONside DVFS service.
NRFS DVFS is now not enabled by default.

Signed-off-by: Łukasz Stępnicki <lukasz.stepnicki@nordicsemi.no>
2025-06-12 11:32:32 +02:00
Piotr Koziar
5545e5806b Revert "modules: hal_nordic: nrf_802154: emit hfclk_ready with timer on nRF54LM20A"
This reverts commit 3c050cfcfd.

Signed-off-by: Piotr Koziar <piotr.koziar@nordicsemi.no>
2025-05-29 06:31:58 +02:00
Piotr Koziar
3c050cfcfd modules: hal_nordic: nrf_802154: emit hfclk_ready with timer on nRF54LM20A
Right now, the power_clock_irq is not available on nRF54LM20A.
Since the onoff mechanism relies on the irq, the timer is used
to emit the hfclk_ready callback.

Signed-off-by: Piotr Koziar <piotr.koziar@nordicsemi.no>
2025-05-22 15:24:51 +02:00
Krzysztof Chruściński
1ca4b333b4 modules: hal_nordic: nrfx: Decouple clock control from nrfx_clock
Create Kconfig configuration for nrfx_clock driver and use that to export
configuration to nrfx via nrfx_kconfig. So far nrfx_kconfig was using
Kconfig flags from clock_control which created a fixed connection between
nrfx_clock and clock_control and nrfx_clock could not be used without
clock_control in Zephyr.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-05-21 12:33:00 +02:00
Jonathan Nilsen
6066c5c004 modules: hal_nordic: bump regtool to 9.1.0
Changes for this package version:

* CTRLSEL is now set appropriately for the SPIS121 pins.
* DPPI.LINK configuration is now skipped when processing
  the 'dppic130' devicetree node.

Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
2025-04-24 16:54:37 +02:00
Jonathan Nilsen
8c5755cc8a modules: hal_nordic: bump regtool to 9.0.1
Fixes an issue where pinctrl psel properties encoded with
NRF_PSEL_DISCONNECTED() caused a build failure.

Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
2025-04-09 09:03:00 +02:00
Jonathan Nilsen
8e1f27a9fd modules: hal_nordic: bump regtool to 9.0.0
Added support for VPR GPIOs and a more concise output print.

Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
2025-04-01 16:27:04 +02:00
Adam Kondraciuk
eb8ab0a937 modules: hal_nordic: nrfx: switch off auto clksel for GRTC
Disable automatic LFCLK selection for GRTC during driver initialization.
For Zephyr applications it is selected by `sys_clock_driver_init()`
depending on configuration and DTS.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2025-04-01 11:52:26 +02:00
Adam Kondraciuk
dec7da15f9 modules: hal_nordic: Add nRF54L09 FLPR
Add nrF54L09 FLPR core support.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2025-03-28 08:34:23 +01:00
Nikodem Kastelik
d8506af12a soc: nordic: add support for SPIS120 instance
It is defined as spis120 rather than spi120,
because spi120 is already used for SPIM120 hardware instance,
but their base address is different.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2025-03-22 13:38:34 +01:00
Łukasz Stępnicki
2bac5eec84 nrfs: added audiopll service
Added configuration for new audio PLL service.
Pull in new service implementation in new hal nordic.

Signed-off-by: Łukasz Stępnicki <lukasz.stepnicki@nordicsemi.no>
2025-03-19 08:51:36 -04:00
Michał Stasiak
6ad4d92694 modules: hal_nordic: nrfx: add nRF54L20 FLPR core
Added configuration files for nRF54L20 FLPR core.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2025-03-19 10:57:18 +01:00
Michał Stasiak
def5f8ee07 soc: nordic: allow use of TWIM frequency workaround
Added Kconfig options to allow use of TWIM frequency
workaround in NRFX for nRF52 and nRF53.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2025-03-18 16:41:48 +01:00
Nikodem Kastelik
a708cca780 modules: hal_nordic: nrfx: align nRF54L09/L20 symbols to new scheme
MDK 8.70.0 introduced following changes in the device naming:
- renamed nRF54L20 Eng A to nRF54LM20A Eng A
- renamed nRF54L09 Eng A to nRF54LV10A Eng A
Actual SoC renaming will happen in followup PR.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2025-03-12 09:54:32 +01:00
Gerard Marull-Paretas
f23b4fdb2d modules: hal_nordic: nrfx: use dt_nodelabel_exists
As of today, nrfx components are selectable depending if devicetree has
a certain compatible or not, and in case of IP that can operate in
multiple modes, nodelabel+compatible. An example of the later is:

```
config NRFX_SPI0
    bool "SPI0 driver instance"
    depends on $(dt_nodelabel_has_compat,spi0,$(DT_COMPAT_NORDIC_NRF_SPI))
    select NRFX_SPI

config NRFX_SPIM0
    bool "SPIM0 driver instance"
    depends on $(dt_nodelabel_has_compat,spi0,$(DT_COMPAT_NORDIC_NRF_SPIM))
    select NRFX_SPIM

config NRFX_SPIS0
    bool "SPIS0 driver instance"
    depends on $(dt_nodelabel_has_compat,spi0,$(DT_COMPAT_NORDIC_NRF_SPIS))
    select NRFX_SPIS
```

These symbols are later selected by e.g. SPI driver if `spi0` node is
enabled. While this works in the Zephyr context, it can be a problem in
applications using nrfx directly in the application layer, unless they
tweak devicetree. For example, if devicetree `spi0` node defaults to
`compatible = "nordic,nrf-spim"`, NRFX_SPI0 or NRFX_SPIS0 won't be
selectable, but an application using nrfx directly doesn't really care
about what is defined in devicetree as it is effectively bypassing it.
It just wants to select e.g. `CONFIG_NRFX_SPI0=y` and forget about the
rest.

This patch fixes this problem by just checking for the existence of
certain nodelabels.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2025-03-11 18:54:57 +01:00
Karsten Koenig
b900ed561f modules: hal_nordic: bump regtool to 8.1.3
Added additional analog channels for ADC and COMP/LPCOMP and new pin
functionality mapping for TDM.

Signed-off-by: Karsten Koenig <karsten.koenig@nordicsemi.no>
2025-03-07 20:31:39 +01:00
Rafał Kuźnia
442d9383df modules: hal_nordic: nrf_802154: enable constant latency
To ensure that the accesses to the radio peripheral are done with
predictable timings, the constant latency must be enabled.
The constant latency mode is enabled alongside the HFXO.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2025-03-07 19:52:33 +01:00
Łukasz Stępnicki
e62ebd8985 modules: hal_nordic: nrfs: improve error handling
Added option to retry message send over ipc when for example
there is -ENOMEM error (shared memory buffer full).
Number of max retries and delay between them are Kconfigs.
Fixed nrfs error reporting when sending directly over
ipc service, status was not correct when negative value
was returned from ipc service send function.

Signed-off-by: Łukasz Stępnicki <lukasz.stepnicki@nordicsemi.no>
2025-03-07 19:47:02 +01:00
Rafal Dyla
2e44835b21 modules: hal_nordic: Adding SWEXT service
Adding support for SWEXT (SWitch EXTernal) peripheral.

Signed-off-by: Rafal Dyla <rafal.dyla@nordicsemi.no>
2025-02-14 19:39:36 +00:00
Krzysztof Chruściński
ff82048124 modules: hal_nordic: nrfs: dvfs: Deprecate Kconfig option
Deprecate NRFS_LOCAL_DOMAIN_DVFS_SCALE_DOWN_AFTER_INIT option for
scaling down CPU frequency during dvfs handler initialization.
Clock control API is managing access to DVFS and DVFS should not
be controlled bypassing this API. Deprecated feature will be added in
the clock control.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-02-14 17:05:16 +01:00
Piotr Pryga
b5e7ac5ede modules: hal_norfic: rise 802.15.4 NET core init priority
Due to internal dependencies on other modules init priority
the 802.15.4 priority level must be increased. Former init
priority caused the module to be initialied before those
it depends on, so that lead to hard faults.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2025-02-11 11:46:04 +00:00
Karsten Koenig
5f6a3ebcf5 modules: hal_nordic: bump regtool to 8.1.2
Recent versions fixed issues for EXMIF and TDM pins as well as support
for dynamic placement of the ETR buffer.

Signed-off-by: Karsten Koenig <karsten.koenig@nordicsemi.no>
2025-02-05 12:35:59 +01:00
Łukasz Stępnicki
c02db33789 modules: hal_nordic: nrfs: callback when connected
User can assign callback functions to nrfs ipc backend
to be notified when connection is actually established.
Callbacks register needs to be done before nrfs is
initialized.

Signed-off-by: Łukasz Stępnicki <lukasz.stepnicki@nordicsemi.no>
2025-02-03 14:02:16 +01:00
Piotr Koziar
8f83ffc302 modules: hal_nordic: suppress 'unused variable' warnings
Refactors the code to avoid 'unused variable' warning
that is problematic for some builds.

Signed-off-by: Piotr Koziar <piotr.koziar@nordicsemi.no>
2025-01-29 20:35:01 +01:00
Krzysztof Chruściński
43f442be46 dts: common: nordic: nrf54l: Add clocks to cpu
Add clocks property to CPUs. nRF54Lx series is using hfpll as clock
source for CPU (and fast peripherals). CPU clock frequency can be
derived from frequency of the source clock so clock-frequency property
is removed from cpu as it is redundant.

nrfx/MDK expects that NRF_CONFIG_CPU_FREQ_MHZ define is set to correct
CPU frequency. Modified nrfx CMakeLists.txt to use clock frequency of
hfpll instead of CPU clock-frequency property.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-01-27 17:08:01 +01:00
Piotr Koziar
f6892a4b29 modules: hal_nordic: enable CLOCK_CONTROL if nrf-802154 RD
Selects CLOCK_CONTROL config whenever nRF 802.15.4 Radio Driver
is enabled.

The driver requires HFCLK api available under the config switch.

Signed-off-by: Piotr Koziar <piotr.koziar@nordicsemi.no>
2025-01-23 23:19:54 +01:00
Alberto Escolar Piedras
4b56c74e1c modules: hal_nordic: Support new CRACEN CTR DRBG driver
Add support for the new nrf hal CRACEN CTR DRBG driver including a new
kconfig option to enable it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-01-22 18:32:35 +01:00
Krzysztof Chruściński
738549ed27 modules: hal_nordic: nrfx: Move some defines back to CMakeLists
534916c2253 moved some defines from CMakeLists.txt to nrfx_kconfig.h
but those defines are used by MDK which does not include nrfx_kconfig.h
and that broke some nrf platforms (e.g. nrf54l20). Moving those
defines back to CMakeLists.txt.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-01-20 16:27:46 +01:00
Piotr Koziar
b6ca9dbc71 modules: hal_nordic: use CLOCK_CONTROL_NRF2 for HFCLK request/release
Makes 802.15.4 use the API under CONFIG_CLOCK_CONTROL_NRF2
in nrf_clock_control.h to request/release HFCLK.

Previous HFCLK requesting/releasing on nRF54H20 was more
of a workaround and could produce issues when
comes to sharing the resources.

Signed-off-by: Piotr Koziar <piotr.koziar@nordicsemi.no>
2025-01-20 09:21:16 +01:00
Marcin Szymczyk
94589b784b modules: hal_nordic: nrfx: cleanup
* Move all KConfig configuration from CMake to `nrfx_kconfig.h`
* Move macro utils from `nrfx_kconfig.h` to `nrfx_zephyr_utils.h`
* Move GRTC channels allocation from `nrfx_kconfig.h` to
  `nrfx_reserved_resources.h`

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2025-01-14 13:38:03 +01:00
Marcin Szymczyk
aa3f78791d modules: hal_nordic: nrfx: use templates from hal_nordic
There is no reason to duplicate `nrfx_config_*.h` files.
Use configuration files from `hal_nordic/nrfx/templates`.

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2025-01-14 13:38:03 +01:00
Krzysztof Chruściński
eebaf819b6 modules: hal_nordic: nrfx_config: Customize NRFX_SPIM_EXTENDED_ENABLED
nrfx_config is setting NRFX_SPIM_EXTENDED_ENABLED based on presence of
a DT property. However, there are test cases when it is expected that
extended SPIM features will be disabled on a target that supports
extended features. Allow that by not setting the value if it is already
defined.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-01-10 09:48:59 +01:00
Krzysztof Chruściński
b0afa1e571 soc: nordic: nrf54l: Add nrf54l09 enga SoC
Add nrf54l09 EngA SoC in soc, dts and hal_nordic.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-01-08 19:10:24 +01:00
Rubin Gerritsen
81ed343212 modules: hal_nordic: nrfx: Compile NRFX_GPPI modules for 54lbsim
We should use CONFIG_SOC_COMPATIBLE_NRF54L15 whenever possible.
With the current bsim model of 54L these files do not yet compile,
but that can be added separately.

Compilation warning:
```
/nrfx_interconnect_dppic_ppib.c:158:36:
warning: implicit declaration of function ‘nrf_address_bus_get’
[-Wimplicit-function-declaration]
  158 |         uint8_t bus_address_area =
	nrf_address_bus_get(addr, p_dppic->apb_size);
      |                                    ^~~~~~~~~~~~~~~~~~~
```

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2025-01-07 11:52:12 +01:00
Adam Wojasinski
cd64d032be modules: hal_nordic: nrfx: Add missing GPIOTE logging symbol mapping
Add missing symbol mapping necessary to enable logging for GPIOTE
nrfx driver.

Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
2025-01-07 11:52:01 +01:00
Andrzej Kuros
ad1657f04b modules: hal_nordic: remove setting of NRF_802154_USE_RAW_API
The non-raw API has been removed from the nRF 802.15.4 Radio Driver.
There is no need to set NRF_802154_USE_RAW_API macro anymore in
CMakeLists.txt that integrates the driver.

Signed-off-by: Andrzej Kuroś <andrzej.kuros@nordicsemi.no>
2025-01-03 11:39:30 +01:00
Nikodem Kastelik
e501b54bad soc: nordic: add common symbol for RAM control helper presence
Common symbol is defined by SoCs that support RAM control helper.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-12-23 18:40:52 +01:00
Krzysztof Chruściński
6c754e636f hal_nordic: nrfs: dvfs: Update SystemCoreClock on frequency change
Update SystemCoreClock to match current core frequency. This MDK
variable is used by nrfx_coredep_delay_us which performs busy
waiting and is used by k_busy_wait.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-12-17 23:14:06 +01:00
Paweł Pelikan
630f716c2f modules: hal_nordic: nrfs: add GDFS Service
Adding the implementation for the GDFS service

Signed-off-by: Paweł Pelikan <pawel.pelikan@nordicsemi.no>
2024-12-17 15:22:37 +01:00
Krzysztof Chruściński
4615890792 modules: hal_nordic: nrfs: Optimize communication
It is not needed to use always the system work queue to send a
message over IPC. In thread context IPC service can be called
directly. It speeds up the communication and allows to use nrfs
from the system work queue. Legacy approach could easily lead
to the deadlock if user would call nrfs from work queue and
pend on semaphore until response is received.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-12-13 16:13:37 +01:00
Lukasz Stepnicki
7fa8bf1756 modules: hal_nordic: dvfs: refactor
This is follow up to commit:
modules: hal_nordic: dvfs: added callback when scaling done
Used get and set timer user data functions.
Added missing help text in KConfig.

Signed-off-by: Lukasz Stepnicki <lukasz.stepnicki@nordicsemi.no>
2024-12-11 21:36:31 +01:00
Nikodem Kastelik
a1152cd9fb modules: nordic: nrfx: workaround MDK erratas symbol for nRF54L05 & L10
MDK 8.68.1 uses nRF54L15_XXAA symbol for determining whether
given errata is applicable or not for nRF54L Series SoCs.
This causes all erratas to be disabled for nRF54L05 and nRF54L10.
To mitigate this DEVELOP_IN_NRF54L15 symbol needs to be defined,
and removed once new MDK is integrated.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-12-10 11:08:49 +01:00
Rafał Kuźnia
401f784337 dts: nordic: Add dppic0 label to nRF53 and nRF91 devices
Added dppic0 node label, alongside the dppic to maintain backward
compatibility. The use of dppic0 is preferred.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2024-12-04 09:23:55 +01:00
Rafał Kuźnia
df7fbe6086 modules: hal_nordic: replace LUMOS_XXAA with NRF54L_SERIES
The NRF54L_SERIES define is more specific and should be used in favor of
LUMOS_XXAA.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2024-12-04 09:23:55 +01:00
Rafał Kuźnia
d2cb0bde55 modules: hal_nordic: NRFX_GPPI enables GPPI on all platforms
Changed the CMakeLists to enable the nrfx_gppi utilities based solely on
the CONFIG_NRFX_GPPI Kconfig. This unifies the configuration on all nRF
SoC families.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2024-12-04 09:23:55 +01:00