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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Due to the possibility of simultaneous accesess to LRCCONF registers,
additional management is required.
Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>
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>
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>