Commit graph

210 commits

Author SHA1 Message Date
Sebastian Bøe
8007e2481c soc: nrf53: Port SYS_INIT nrf53_cpunet_init to soc_late_init_hook
Port SYS_INIT nrf53_cpunet_init to soc_late_init_hook as SYS_INIT are
legacy.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2025-05-06 10:50:31 +02:00
Sebastian Bøe
5d9f5543b9 soc: nrf53: Port SYS_INIT rtc_pretick_init to soc_late_init_hook
Port the SYS_INIT for rtc_pretick_init to use soc_late_init_hook as
SYS_INIT's are legacy.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2025-05-06 10:50:31 +02:00
Sebastian Bøe
5da0748612 soc: nrf53: Port SYS_INIT to soc_early_init_hook
Port the nordicsemi_nrf53_init to use soc_early_init_hook instead of
SYS_INIT as SYS_INIT is legacy.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2025-05-06 10:50:31 +02:00
Michal Kozikowski
9a6f116a6a soc: nordic: nrf54h: Disable GPD for MCUBoot
Disable GPD for MCUBoot build, as it cannot be
reinitialized later in application (SDFW does not
support reinitialization).

Also, remove the GPD disabling from the mcumgr sample
for nRF54H20 iron board app - it was the reinitialization
that caused problems.

Signed-off-by: Michal Kozikowski <michal.kozikowski@nordicsemi.no>
2025-04-25 14:06:08 +02:00
Michal Kozikowski
ea6e6c66a1 boards: nordic: nrf54h20dk iron board MCUBoot support
Provide proper adaptions as bootloader ROM offset, flash load
offset and dts definitions for the nRF54H20 iron board to make it
ready for the MCUBoot bootloader.

Signed-off-by: Michal Kozikowski <michal.kozikowski@nordicsemi.no>
2025-04-18 17:46:40 +02:00
Jamie McCrae
b59d6d3c2d soc: nordic: Add missing flash runner config
Adds missing qualifiers for grouping flash runner configuration

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-04-18 10:41:08 +02:00
Krzysztof Chruściński
a36b154fd1 soc: nordic: nrf54h: power: Enable cache as early as possible
Add nrf_cache_power_up and nrf_cache_power_down functions. In case of
s2ram power up cache as early as possible, before restoring ARM core
registers. It improves restore time from 180 us to 33 us.

As a minor optimization nrf_memconf_ramblock_control_mask_enable_set is
used which allows to control ram blocks for icache and dcache in a
single register write.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-04-09 15:24:02 +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
Krzysztof Chruściński
4b1691531b soc: nordic: nrf54h: Change PM_DEVICE_RUNTIME default
nrf54h20 device requires device runtime PM to be enabled when
device PM is in use.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-04-03 11:07:55 +02:00
Krzysztof Chruściński
02644b28e3 soc: nordic: nrf54: Indicate presence of DWT
ARM Cortex-M33 cores in nrf54h20 and nrf54l series have DWT.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-04-01 22:14:44 +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
Håkon Amundsen
1fac1b917f boards: nordic: add 'iron' board variant
This is needed for next generation Secure Domain firmware.

Signed-off-by: Håkon Amundsen <haakon.amundsen@nordicsemi.no>
2025-04-01 11:54:30 +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
Krzysztof Chruściński
37fe7504ce soc: nordic: nrf54h: power: Add idle tracing calls
Add calls to sys_trace_idle and sys_trace_idle_exit in nrf54h specific
idle states to allow measuring CPU load on nrf54h20 when power
management is enabled.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-03-20 17:14:52 +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
c3ca1aecb9 soc: nordic: enable west commands for nRF54L20 Enga cpuflpr
Enabled west flash and west erase for nRF54L20 PDK FLPR core.
Added missing reset qualifier for nRF54L20 and nRF54L09.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2025-03-19 10:57:18 +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
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
Gerard Marull-Paretas
c93860fae2 soc: nrf54l: fix LFXO INTCAP calculation formula
The formula has been changed in latest version of the PS, adjust code
accordingly.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2025-03-15 00:36:00 +01:00
Carles Cufi
3195165d86 soc: nordic: nRF54L: Move a few options from boards to the SoC definition
A few option defaults that were so far defined in the board _defconfig
files are actually entirely SoC family (nRF54L) dependant, so it makes
much more sense to have them defined at the SoC family level in order
for all boards based on these SoCs to automatically inherit them.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2025-03-14 17:56:01 +01:00
Adam Kondraciuk
d9c5c8d825 soc: nordic: nrf54l: Fix num of irq for nRF54L09
Change number of IRQ parameter for nRF54L09 devices.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2025-03-13 16:54:06 +00:00
Adam Kondraciuk
2055f7d595 soc: nordic: nrf54h: Add SCB retention for s2ram
For the Suspend to RAM procedures the SCB content
also needs to be retained.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2025-03-12 19:03:17 +01:00
Krzysztof Chruściński
7249fac80d soc: nordic: nrf54h: Add option to use NFCT pins as GPIOs
Protection circuit must be disabled to use NFCT antenna pins
as GPIOs. It can be done by adding nfct-pins-as-gpios to nfct
node in the devicetree in cpuapp. Node must be disabled as
NFCT is not used. In legacy platforms same property was added
to uicr node because that information was stored in UICR. In
nrf54h20 it is not part of UICR so property is part of nfct
node.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-03-12 14:04:57 +00: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
Krzysztof Chruściński
3fdc8c8bd4 soc: nordic: nrf54l: Explicitly include autoconf.h
Include configuration file for cases when this file is complied
in special builds (e.g. TFM).

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-03-07 19:52:10 +01:00
Krzysztof Chruściński
163f9ba0b9 soc: nordic: nrf54l: Setup power and clock only on secure build
Setup regulators and oscillators only on cpuapp secure target.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-03-07 19:52:10 +01:00
Adam Kondraciuk
50c21f1591 soc: nordic: nrf54l: Fix num of irq for nRF54L20
Change number of IRQ parameter for nRF54L20 devices.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2025-02-18 13:31:26 +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
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