Commit graph

230 commits

Author SHA1 Message Date
Krzysztof Chruściński
18e4ee298a soc: nordic: nrf53: Forward gpio pins to network core just before reset
Instead of forwarding pins to the network core during the
initialization, do it just before reseting the network core. With
this approach pins can be used by the application core as long as
network core is not started.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-02-06 17:46:06 +01:00
Bjarki Arge Andreasen
7e0e583f9e soc: nordic: nrf54h: gpd: yield() to not block if main is coop
The main thread, if configured with coop priority (don't do that :D)
breaks gpd since it has a non yielding while loop (also don't do that)

Add an explicit yield() to allow other threads to run if main or other
threads use gpd with coop prio.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-02-05 12:25:10 +01:00
Nikodem Kastelik
c61a5178fe soc: nordic: nrf53: kconfig: mark RAM CTRL as supported
nRF5340 SoC supports nrfx RAM control helper.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2025-01-30 16:21:30 +01:00
Nikodem Kastelik
8b495dc316 soc: nordic: poweroff: remove disabling of emul l05/l10 unused RAM
Code is now incorporated into SystemInit() function of MDK 8.69.1,
which is integrated within nrfx 3.10.0.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2025-01-30 16:21:30 +01:00
Marcin Szymczyk
cb4b350700 soc: nordic: vpr: fix CLOCK_CONTROL default value
VPR cores should not enable this option.

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2025-01-28 18:16:38 +01:00
Marcin Szymczyk
16e4af4f6d soc: nordic: vpr: enable GP relative addressing
`RISCV_GP` will now be used to reduce code size and speed up
execution.

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2025-01-28 18:16:38 +01:00
Marcin Szymczyk
0b52052a19 soc: nordic: vpr: use SystemInit() as soc_reset_hook
Similarly to ARM cores, VPRs should call `SystemInit()`
at reset.

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2025-01-28 18:16:38 +01:00
Krzysztof Chruściński
df32919a52 soc: nordic: nrf54l: Set SystemCoreClock using frequency from DT
Use cpu clock source frequency as system core clock.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-01-27 17:08:01 +01:00
Xudong Zheng
020cb79d27 drivers: serial: nrfx_uarte: move DEPRECATED_UART_NRFX_UARTE_LEGACY_SHIM
The Kconfig option should be defined alongside
UART_NRFX_UARTE_LEGACY_SHIM for clarity.

Signed-off-by: Xudong Zheng <7pkvm5aw@slicealias.com>
2025-01-23 08:26:33 +01:00
Xudong Zheng
fac7c86568 drivers: serial: nrfx_uarte: fix deprecation warning when UART is unused
This hides the deprecation warning when UART_NRFX_UARTE_LEGACY_SHIM is
false because UART is not used.

Signed-off-by: Xudong Zheng <7pkvm5aw@slicealias.com>
2025-01-23 08:26:33 +01:00
Łukasz Stępnicki
9c574ed922 arch: riscv: option to init custom hw stacked esf members.
When RISCV_SOC_HAS_ISR_STACKING is used, it may
be needed to initialize custom hw stacked esf members.
Some initial values may need to be aligned with
hw stacking mechanism to avoid any side effects.

Signed-off-by: Łukasz Stępnicki <lukasz.stepnicki@nordicsemi.no>
2025-01-20 16:27:33 +01:00
Karsten Koenig
5af7bf8ff0 soc: nordic: common: vpr: Remove tp register
The tp register has been remove from the common RISC-V stack frame so
remove it from the VPR specific variant declared via
SOC_ISR_STACKING_ESF_DECLARE. This saves 4 bytes and allows removing a
lot of padding to get the 16B aligned size.

Signed-off-by: Karsten Koenig <karsten.koenig@nordicsemi.no>
2025-01-16 14:49:00 +01:00
Krzysztof Chruściński
70118c06a5 drivers: serial: nrfx_uarte: Deprecate non-legacy shim
Some time ago a new shim for nRF UARTE was added (uart_nrfx_uarte2.c)
which used nrfx_uarte.c driver underneath. It was supposed to support
nrf54x platforms. However, later on legacy driver (uart_nrfx_uarte.c)
was extended to support nrf54x platforms and it takes less code size,
has better performance and more features. Shim uart_nrfx_uarte2 will
no longer be supported. As new shim is the default and there is a
Kconfig to pick the legacy shim (CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=y)
it cannot be deprecated in the normal way. Additional Kconfig option
is created (DEPRECATED_UART_NRFX_UARTE_LEGACY_SHIM) which is enabled
if CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=n and it selects DEPRECATED.
A warning was also added to the CMakeLists.txt.

Patch removes use CONFIG_UART_NRFX_UARTE_LEGACY_SHIM in tests.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-01-14 13:23:32 +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
Nikodem Kastelik
39f2950d06 soc: nordic: poweroff: disable remaining RAM on emul l05/l10 targets
nRF54L05 and nRF54L10 devices that are emulated on nRF54L15
needs to have manually disabled remaining RAM blocks
that are outside of their RAM region definitions.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-12-23 18:40:52 +01:00
Nikodem Kastelik
74423027de soc: nordic: poweroff: add retention management
RAM retention is disabled for all RAM blocks
before entering System OFF to achieve lowest power consumption.
RAM retention can still be enabled using retained_mem driver.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-12-23 18:40:52 +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
Gerard Marull-Paretas
3d3dce61b6 dts: common: nordic: nrf54h20: define BICR node
BICR (Board Information Configuration Registers) are located within the
application UICR region (ref. MRAM mapping, table 38).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-12-18 12:46:20 +01:00
Gerard Marull-Paretas
d16cd566b9 soc: nordic: nrf54h: add BICR generation tooling
Add supporting scripts and build-system integration for BICR (Board
Information Configuration Registers) generation.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2024-12-17 15:23:50 +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
Gerard Marull-Paretas
0dc18e1236 soc: nordic: nrf54h: gpd: align GPD domain names
nRFs exposes now all power domains, following their actual name in the
specification. Add support for all of them in the GPD service. Note that
this is a breaking change: running this code requires a new SCFW as IDs
have changed in nRFs and so SCFW.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2024-12-17 15:22:37 +01:00
Robin Kastberg
742679a928 soc: nordic: make -include a compiler property
CMakeLists.txt uses the C compiler parameter -include,
This is causing issues for other toolchains and needs to generalized.

Signed-off-by: Robin Kastberg <robin.kastberg@iar.com>
2024-12-16 20:51:17 +01:00
Krzysztof Chruściński
d1bd45739a logging: frontends: stmesp: Move zephyr_custom_log.h to the unique path
Logging with STMESP frontend is using custom logging header feature.
Put that specific header file in a custom path which is added to the
build only if that logging frontend is used.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-12-10 20:37:22 +01:00
Krzysztof Chruściński
752f8b0176 logging: frontends: stmesp: Add optimized short logs
Add 'turbo' logging feature. When enabled, short logs (no argument
or one numeric, 32 bit argument) are handled in a special way that
is much faster than the default one (5-10x faster). Additionally,
there is an option to remove all other logs from the system which
allows to not include almost any logging framework code in the
binary (~170 bytes of code is needed). It may be especially
valueable for memory constraint targets (ppr, flpr) where with
only 170 byte of code (+code for each log message) we can provide
limited formatted string logging support.

'Turbo' logging is using following to achieve that:
- logging strings are put into a memory section and additional
memory section is created which holds addresses of those strings.
Index in that array is used to identify a string (32 bit address
is encoded into a smaller number, 15 bits is more than enough).
This index is used for a STMESP register set (there are 2^16
available). So STMESP channel encodes string.
- Logging level is stringified and prepended to a string
- Source ID is encoded by using DM16 (so far not used).
- Log without arguments is written as DMTS16
- Log with one argumetn is written as DM16+DMTS32

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-12-10 11:09:55 +01:00
Nikodem Kastelik
a96b3e3d5d soc: nordic: nrf54l: add preliminary workaround for nRF54L anomaly 31
This workaround will be replaced with a variant
executed at SystemInit() level, once MDK implements it.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-12-10 11:08:49 +01:00
Nikodem Kastelik
2d378a19fe soc: nordic: nrf54l: remove configuration of DCDC regulator
Since nrfx 3.9 integration, configuration is executed
in MDK SystemInit().

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-12-10 11:08:49 +01:00
Krzysztof Chruściński
e8a5ecc160 soc: nordic: common: mram_latency: Add option to auto request no latency
Add CONFIG_MRAM_LATENCY_AUTO_REQ. When option is enabled then module
requests no latency during the initialization. This option might be
useful for cases where we want to achieve maximum performance and
want to avoid controlling MRAM in the code.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-12-09 22:05:17 +00:00
Michał Stasiak
4c96cbb79b soc: nordic: nrf54l: remove redundant ELV code
Removed dead ELV code from nRF54L soc.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2024-12-06 15:16:29 +01:00
Nikodem Kastelik
da76859054 soc: nordic: nrf54l: fix APPROTECT handling
APPROTECT symbols were already aligned to nRF54L15,
but did not take into account similar SoCs like nRF54L05 or L10.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-12-05 12:30:37 +01:00
Jamie McCrae
486fd37de9 soc: nordic: Select symbol properly
Correctly selects the Kconfig symbols for viper CPU clusters
instead of having a reverse hwmv1 setup where the symbol has
a choice

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-12-03 15:48:37 +00:00
Kyra Lengfeld
51957c8858 soc: nordic: Default enable Power Management on nRF54H20 radio core
Adds CONFIG_PM=y to Radio core in the nRF54H20 SoC on the nRF54H20 DK
soc defconf.

Signed-off-by: Kyra Lengfeld <kyra.lengfeld@nordicsemi.no>
2024-12-03 15:47:48 +00:00
Krzysztof Chruściński
980e0acbf1 soc: nordic: common: Add mram latency manager
Add module for managing multiple requests for MRAM latency.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-11-26 15:43:37 -05:00
Adam Kondraciuk
be1f40547f soc: nordic: nrf54h: disable IRQ before PM config
IRQs must be disabled before starting any procedures to prepare
for low-power states.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2024-11-26 14:46:55 +00:00
Adam Kondraciuk
9b252855fd soc: nordic: Add LRCCONF management
Due to the possibility of simultaneous accesess to LRCCONF registers,
additional management is required.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2024-11-26 14:46:55 +00:00
Krzysztof Chruściński
114d9b34e2 soc: nordic: nrf53: Update default value of NRF53_SYNC_RTC
Most likely there is no point of synchronizing RTC if net core is
not enabled. Same for the bootloader.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-11-25 17:42:39 +01:00
Gerard Marull-Paretas
e6b24df0af soc: nordic: nrf54h: gpd: use nrf_gpio_pin_retain_enable|disable
Instead of raw register access.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2024-11-25 12:16:17 +01:00
Carles Cufi
e78832034f soc: nordic: Introduce the nRF54L05 and nRF54L10
These two new ICs are variants of the nRF54L15 with different memory
sizes:

- nRF54L05: 500KB RRAM, 96KB RAM
- nRF54L10: 1022KB RRAM, 192KB RAM
- nRF54L15: 1524KB RRAM, 256KB RAM

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-11-21 09:26:38 +01:00
Carles Cufi
0b3a15016b soc: nordic: nRF54L: Consolidate common Kconfig options
There are many common options to all ICs of the 54L series. Consolidate
them in a single entry so that they do not need to be re-typed for each
SoC series member.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-11-21 09:26:38 +01:00
Nikodem Kastelik
5f6fc8ad5d soc: nordic: nrf54l: tune configuration of DCDC regulator
DCDC regulator on nRF54L may not always works as intended.
Tune the fix addressing that.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-11-19 10:04:43 -05:00
Nikodem Kastelik
b7fb1012b0 soc: nordic: nrf54l: fix configuration of DCDC regulator
DCDC regulator on nRF54L may not always works as intended.
Apply a fix addressing that.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-11-19 10:04:43 -05:00
Nikodem Kastelik
17a81280b2 soc: nordic: nrf54l15: fix APPROTECT handling
To configure APPROTECT on nRF54L15 different set of MDK symbols
must be used. Additionally, nRF54L15 does not support loading
APPROTECT configuration from the UICR in runtime.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-11-19 10:01:07 -05:00
Rafał Kuźnia
e18410944e modules: hal_nordic: add NRFX_GPPI config
The nrfx_gppi module is an abstraction over nrfx_ppi and nrfx_dppi
drivers. It now has a Kconfig option that is separate from nrfx_dppi and
by default it enables all PPI/DPPI instances, if available.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2024-11-19 09:53:10 -05:00
Rafał Kuźnia
d6007690de manifest: update hal_nordic revision
The hal_nordic revision was updated to bring in NRFX v3.8.0.

Aligned the uses of single-instance API to use multi-instance instead.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2024-11-19 09:53:10 -05:00
Piotr Kosycarz
6056a9237f soc: nordic: add configuration for nrf54h20 flpr core
To properly execute erase, recover and reset.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-11-19 09:51:43 -05:00
Jamie McCrae
2f800cea8f soc: Remove re-defining some defined types
Removes re-defining some Kconfigs that are already defined
e.g. in arch

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-11-18 07:41:23 -05:00
Sudan Landge
c99243c8ce arch: arm: cleanup of soc flags in arch
What is changed?

Use CMSIS SystemCoreClock via a dedicated flag instead of using
soc flags.

Why do we need this change?

This change is part of cleaning soc specific code out of arch folder.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2024-11-16 15:56:11 -05:00
Carles Cufi
9643ca20e9 nordic: Remove the nRF54H20 Engineering B
The production version of the nRF54H20 SoC is now available, so remove
the initial Engineering B (EngB) preview version.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-11-16 15:09:14 -05:00
Bjarki Arge Andreasen
3e6d6033bb soc: nordic: add fn for setting constlat mode
Nordic SoCs implement an event system, for which the system can
optimize for low latency/high power or low power.

Add soc level implementation of reference counted API which will
optimize for low latency if any part of the system requires it.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-11-16 15:08:11 -05:00
Gerard Marull-Paretas
faf075a9d4 soc: nrf54h: gpd: use callback to fetch nrfs async result
Busy-waiting for the result of the nrfs service calls can stall, so
let's use a callback that flags a semaphore instead. Since the API is
supposed to be callable in the context of pre-kernel, fallback to
busy-wait on that scenario.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-11-07 08:57:45 -08:00
Grzegorz Swiderski
c1776df8ae soc: nordic: dmm: Fix DMM_REG_ALIGN_SIZE macro when CONFIG_DCACHE=n
Make sure this expansion doesn't include `CONFIG_DCACHE_LINE_SIZE`,
which would be undefined and produce a build error.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-11-05 10:57:07 -06:00