Commit graph

82 commits

Author SHA1 Message Date
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
Krzysztof Chruściński
2d82970710 soc: nordic: common: Fix HAS_HW_NRF_NFCT condition
Include nordic,nrf-nfct-v2 compatible in the option.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-06-12 11:46:21 +02:00
Jakub Zymelka
f87f2dc9b2 soc: nordic: common: poweroff: Set VPR to remain in its reset state
CM33 must write MEMCONF.POWER[VPR].RET = 0 before entering System OFF.
This bit drives the vprSavedCtx input to VPR. Forcing it low will
disable the Hibernate wake feature in VPR, so that VPR will remain
in its reset state when waking from OFF.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2025-06-12 11:34:10 +02:00
Adam Kondraciuk
fa55c30e46 soc: nordic_nrf: add support for TDM
Add Kconfig options for TDM130 and TDM131.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2025-06-02 13:29:10 +02:00
Karol Lasończyk
22ffe4f531 soc: drivers: nrf: Add support for UARTE23 and UARTE24
Extends configuration to support instances used in new SOCs.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2025-05-27 10:29:41 +02:00
Krzysztof Chruściński
80b9040146 soc: nordic: dmm: Add lock around sys_heap operations
sys_heap alloc and free are not thread safe so lock is needed to
prevent data corruption.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-05-23 15:31:25 +02:00
Marcin Szymczyk
fe1b0e31b7 soc: nordic: allow setting VPR_LAUNCHER support for out of tree SoCs
Make the compilation of vpr_launcher dependent on sysbuild Kconfig
that can be set by SoC.

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2025-05-20 15:24:58 +02:00
Andrzej Głąbek
4dded19ad7 soc: nordic: Disable cache for soft peripheral RAM region in nRF54H/nRF92
Add an entry for the RAM region assigned to soft peripherals that will
disable caching for that region. Without this, communication with the
FLPR coprocessor cannot be performed correctly.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2025-04-08 16:11:31 +02:00
Nikodem Kastelik
c3646a34fd soc: nordic: add option for forcing RAM power on reboot
RAM power configuration is preserved through soft reset,
meaning that there is a risk of accessing powered off RAM blocks
when booting in different application (i.e. bootloader).
Add option to force all RAM blocks to be powered on
before triggering soft reset to prevent this from happening.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2025-04-01 16:28:08 +02:00
Adam Kondraciuk
5aa0827960 soc: 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
Michał Stasiak
ce8a66dd65 soc: nordic: nrf54: add nRF54L20 FLPR core
Added support for nRF54L20 FLPR core in soc dir.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2025-03-19 10:57:18 +01:00
Krzysztof Chruściński
1dfe3cba99 soc: nordic: common: vpr: Update custom idle
VPR (FLPR) on nRF54L series has fixed issue with sleeping so
custom CPU idle function does not need to be used there.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-03-12 09:53:42 +01:00
Krzysztof Chruściński
074215a30f drivers: clock_control: nrf: Move NRF_PERIPH_GET_FREQUENCY
Move macro from nrf_clock_control.h to soc_nrf_common.h. Clock control
header fetches many dependencies (e.g. onoff.h) so move macro to more
low level header.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-03-07 19:52:10 +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
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
Ł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
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
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
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
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
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
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
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
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
Gerard Marull-Paretas
9925ec99fd drivers: pinctrl: nrf: add flag to signal the FAST_ACTIVE1 peripherals
This patch introduces a new flag to indicate if a peripheral belongs
to FAST_ACTIVE1 domain. This way, pinctrl knows when to request the
SLOW_ACTIVE domain (where CTRLSEL multiplexer resides).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-11-01 12:10:12 -05:00
Grzegorz Swiderski
b3b0c63ad9 soc: nordic: Enable VPR launcher on nRF54H20 EngB
Just like on nRF54H20 EngC.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-10-24 16:55:44 +01:00
Carles Cufi
51c1e45301 soc: nordic: Remove the nRF54L15 EngA
The production version of the nRF54L15 SoC is now available, so remove
the initial Engineering A (EngA) preview version.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-10-21 01:46:39 +01:00
Michał Stasiak
c092964dd2 modules: hal_nordic: Add new PDM instances
New PDM, some present on nRF54L15 FP1, instances have
been added. Modified condfiguration file for nRF5340,
which now requires PDM0 instance.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2024-10-18 08:19:01 -04:00
Gerard Marull-Paretas
97dff5bccb modules: hal_nordic: align PDM configuration
Introduce instance 0, PDM0, following nrfx 3.7.0 update.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-10-07 18:42:14 +02:00
Yong Cong Sin
52a202309b zephyr: bulk update to DT_NODE_HAS_STATUS_OKAY
Change instances of:

DT_NODE_HAS_STATUS(<node_id>, okay)

to

DT_NODE_HAS_STATUS_OKAY(<node_id>)

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-10-03 17:06:52 +01:00
Ivan Iushkov
e35781419b dts: nordic: Add Channel Sounding support to nrf-radio
- Added `cs-supported` property to nrf-radio devicetree
- Added `HAS_HW_NRF_RADIO_CS` Kconfig option which is set if
`cs-supported` property is enabled
- Enabled `cs-supported` property for nrf54-series devices
- Disabled `cs-supported` on nrf54l15bsim because it is not
yet supported

Signed-off-by: Ivan Iushkov <ivan.iushkov@nordicsemi.no>
2024-09-26 03:32:03 -04:00
Gerard Marull-Paretas
f00bd302f4 soc: nordic: nrf53: allow configuring L|HFXO from DT
Support both, Kconfig (about to be deprecated) and DT.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-09-20 11:08:39 +02:00
Karol Lasończyk
aca6b2ab22 soc: nrf: Update systemoff sequence for nRF54L15
Production version of the nRF54L15 SoC needs reset reason
to be cleared before going into system off.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-09-09 13:54:05 -04:00
Anas Nashif
f519dd1411 arch: arm: replace PLATFORM_SPECIFIC_INIT with PLATFORM_RESET_HOOK
Use generic hook infrastrucutre instead of custom Kconfig and hooks for
ARM.

Replace z_arm_platform_init() with platform_reset().

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-09 10:07:33 +02:00
Adam Kondraciuk
ee9d23945f soc: nordic: nrf54h: poweroff: Add support for s2ram
Add functions for local domain suspend to RAM. Add matching resume
procedure. Add pm_s2ram function for determining source of reset.
Add preserving NVIC and MPU state in retained RAM when CPU is powered off
during S2RAM procedure.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2024-09-06 11:29:06 -04:00
Marcio Ribeiro
cb583995b8 arch: riscv: imply XIP config pushed to SoC level
'imply XIP' pushed from arch/Kconfig/'config RISCV' to riscv SoCs Kconfig
files to allow riscv SoCs having XIP enabled (or not) at SoC level

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-08-31 06:47:52 -04:00
Karol Lasończyk
e3bcd428b3 soc: Add support for nRF54L15
Add support for production version of the device.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-08-29 12:02:35 +02:00
Emanuele Di Santo
242a70b32e soc: nordic: Add initial support for nRF9280 SiP
The nRF9280 is a SiP (System-in-Package) consisting of the nRF9230 SoC
and additional components such as PMIC and others. Additionally,
the nRF9230 contains several CPUs, similarly to the nRF54h20 SoC.

Update nrfx glue, and add necessary Kconfig and initialization code
to allow building for nRF9280 targets: CPU, Radio and PPR cores.

The nRF9280 is used for all user build targets and Kconfigs,
whereas the nRF9230 is used as the build target for the MDK.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
Co-authored-by: Andreas Moltumyr <andreas.moltumyr@nordicsemi.no>
2024-08-22 14:24:38 -04:00
Emanuele Di Santo
49c79582f6 soc: nordic: common: add CAN121 to nrf54hx_nrf92x_mpu_regions.c
Add support for CAN121, if present in DT.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2024-08-22 14:24:38 -04:00
Emanuele Di Santo
0a9ad40a85 soc: nordic: move mpu_regions.c to common folder and rename
Move mpu_region.c to common folder, to re-use with nRF92.
Rename it to nrf54hx_nrf92x_mpu_regions.c to indicate
which product series it applies to.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2024-08-22 14:24:38 -04:00
Gerard Marull-Paretas
8e7919cf65 drivers: mbox: nrfx_ipc: enable based on DT status
Enable the driver using the standard mechanism used everywhere else in
the tree. It is possible here as it is a singleton, so there's no
dependency on nrfx instantiation magic.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-16 11:20:08 +01:00
Gerard Marull-Paretas
f463e6d88a soc: nordic: pinctrl: rework nordic,clock-enable
Instead of forcing users to provide this setting, allow to describe
which signals require CLOCKPIN enablement at device nodes. This is later
captured by the pinctrl macros and applied in the pinctrl driver. Note
that name has been adjusted to nordic,clockpin-enable to avoid confusion
with clock related settings.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-12 12:58:58 +02:00
Anas Nashif
a91c6e56c8 arch: use same syntax for custom arch calls
Use same Kconfig syntax for those  custom arch call.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-08-12 12:43:36 +02:00