Commit Graph

130 Commits

Author SHA1 Message Date
Gerard Marull-Paretas 5249619f6a soc: nordic: nrf54h: gpd: fix compile warning when CONFIG_DEBUG=y
Usage of K_SPINLOCK with CONFIG_DEBUG=y seems to trigger a compiler
warning about request not always being initialized. Fallback to
k_spin_lock/unlock calls to fix this issue.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-11-05 14:46:15 +01:00
Gerard Marull-Paretas 969326bfff soc: nordic: nrf54h: disable PM_DEVICE_POWER_DOMAIN
It is enabled by default if we enable device PM, but we do not want
this, otherwise we get linker errors (PM subsys, fun guaranteed!).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-11-01 12:10:12 -05:00
Gerard Marull-Paretas 77fc18327a soc: nordic: nrf54h: gpd: add API to set/clear pin retention
This API needs to be called by FAST peripherals before/after
disabling/enabling them.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-11-01 12:10:12 -05: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
Gerard Marull-Paretas 87a42a89cb soc: nordic: nrf54h: add SoC level API to request/release GPD
Add a new soc-level API that allows to manually request/release global
power domains.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-11-01 12:10:12 -05:00
Adam Kondraciuk 59629d0039 soc: nordic: s2ram: Align s2ram marking procedures
Rework Nordic specific S2RAM marking procedures.
The S2RAM marking procedures must not disrupt the stack due to
the TLS pointer not yet being initialized during their execution.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2024-10-25 13:58:37 +02: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
Sean Madigan e4fa386882 soc: nordic: nrf53: SOC_NRF53_CPUNET_ENABLE should not depend on !BT
The previous changes in
https://github.com/zephyrproject-rtos/zephyr/pull/74304
assumed that because this is also handled in
`bt_hci_transport_setup` that it shouldn't be done on
initialisation too.

However, if someone wants to develop their own app which
uses BT and also wants to enable the CPUNET by default this
KConfig should be available to them.

Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
2024-10-23 15:32:59 -05: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
Jamie McCrae 85710f1727 soc: nordic: nrf53: Make GPIO pin forwarding automatic
Allows forwarding GPIO pins to network core automatically if the
devicetree node exists.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-17 15:38:22 -04:00
Krzysztof Chruściński 6253c0678e soc: nordic: nrf54h: cpuapp: Don't use serial shell when ETR is used
ETR handler (for Coresight STM logging) is using console UART and
can act as the shell backend. When that happens default serial shell
backend shall be disabled (and it is by default enabled if there is
a zephyr,console chosen set.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-17 10:48:25 -04:00
Andrzej Głąbek edc4f75b61 soc: nordic: Fix the way of enabling clock control for nRF54H Series
This is a follow-up to commit 7a2ce2882a.

Do not enable clock control by default on nRF54H Series SoCs when
the system timer is present, because clock control is not needed
for this purpose there.

Add missing `default y` in the CLOCK_CONTROL_NRF2 Kconfig option that
enables compilation of clock control drivers for nRF54H Series.
This way modules that actually require clock control (like drivers
that use radio) will be able to enable it using the generic option
(CLOCK_CONTROL), not the above one that is specific for nRF54H.

Update accordingly applications that referenced the CLOCK_CONTROL_NRF2
option.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-10-16 16:36:51 +01:00
Nikodem Kastelik 6300e1bc25 soc: nordic: nrf54l: remove normal voltage mode
Normal voltage mode is no longer supported by MDK 8.67.0.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-10-15 04:27:42 -04:00
Rafal Dyla ec77fc399c modules: hal_nordic: Add global domain power request service
Service for powering peripherals that use GPIO pins
in the global power domains:
- Active Fast
- Active Slow
- Main Slow

Signed-off-by: Rafal Dyla <rafal.dyla@nordicsemi.no>
2024-10-09 18:36:47 +01:00
Gerard Marull-Paretas a9d0eacae2 soc: nordic: nrf54h20: add support for nRF54H20 EngB
nRF54H20 EngB is a re-label to the existing hardware revision for the
nRF54H20. nRF54H20 (whithout EngX) is becoming the final revision of the
SoC.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-10-07 18:42:14 +02:00
Adam Kondraciuk bc7a5b6781 drivers: timer: nrf_grtc_timer: Align Zephyr to new AUTOEN read manner
The new GRTC reading manner of the SYSCOUNTER uses hardware mechanism which
allows to keep it alive when any of CPUs is not sleeping. Otherwise
the SYSCOUNTER goes into sleep mode. Thus there is no
longer need to maintain the `CONFIG_NRF_GRTC_SLEEP_ALLOWED` symbol, however
if the user wants to have the SYSCOUNTER enabled all the time the
`CONFIG_NRF_GRTC_ALWAYS_ON` can be used instead.
The nrfx_grtc  driver no longer provides the `wakeup-read-sleep` reading
manner.
Also setting the GRTC clock source is performed by the nrfx_grtc driver so
it has been removed from the `sys_clock_driver_init()` function.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2024-10-07 18:42:14 +02: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
Krzysztof Chruściński 3786b617bd soc: nordic: Disable asserts on ppr and flpr
Asserts are by default enabled for tests but flpr and ppr are
small cores (<64k) and many tests does not fit in memory with
asserts enabled.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-04 10:45:57 +01: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
Jamie McCrae 07f96b8620 soc: nordic: nrf53: Make GPIO pin forwarding selectable
Allows selecting the forward GPIO pins to network core Kconfig
option and enables it by default if the node exists in devicetree

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-09-26 17:43:34 -04: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
Tomasz Moń 9815f43fd0 boards: nrf54h20dk: Allow running USB on radio core
Add the necessary entries but keep the usbhs disabled by default on
radio core (it is enabled by default on app core).

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-09-25 12:02:33 +01:00
Gerard Marull-Paretas 718007a038 soc: nordic: nrf53: deprecate all L|HFXO options
Devicetree should be used instead. Example DT snippets are provided to
ease with the transition.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-09-20 11:08:39 +02: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
Grzegorz Swiderski 26c99a6f36 soc: nordic: Extend address validation for Haltium platform
VPR addresses are platform-dependent, so let's use a common symbol -
CONFIG_NRF_PLATFORM_HALTIUM - to cover both nRF54H and nRF92 series.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-09-09 13:54:39 -04:00
Grzegorz Swiderski 3b56ef0de1 soc: nordic: nrf92: Update supported NRFS services
PMIC service should be supported on Application and Radiocore, whereas
DVFS service is currently unsupported.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-09-09 13:54:39 -04:00
Grzegorz Swiderski 57ce595ac1 soc: nordic: nrf92: Set PPR hart ID to processor ID
Booting VPRs requires changing the default value of CONFIG_RV_BOOT_HART.
This must be reverted (back to zero) for a future nRF9230 SoC revision,
which will align more closely with the RISC-V spec.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-09-09 13:54:39 -04: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
Krzysztof Chruściński 1dcd599982 soc: nordic: nrf54h: Add STM data flushing in pre_sleep
In order to get all data from STMESP written to ETR and processed
on time we need to write dummy data before sleep.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-06 11:31:27 -04: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
Sean Nyekjaer d218a2d73e soc: nordic: nrf52: fix used define for enabling DCDC converter
Use the correct define for checking if the DCDC converter shall be
enabled.

This resolves the opposite behavior where boards that enable the DCDC
converter uses the LDO and boards where LDO is used they enable the
DCDC.

Fixes: e189fb0720 ("soc: nordic: nrf52: add support for DT-based
regulators config")
Signed-off-by: Sean Nyekjaer <sean@geanix.com>
2024-09-06 10:05:07 -05:00
Andrzej Głąbek 7a2ce2882a drivers: clock_control: Add support for nRF54H20 clock controllers
Add custom clock_control API for nRF platforms that allows requesting
clocks with specified minimal required attributes (accuracy, precision,
and frequency). Provide an implementation of this API for FLL16M, HFXO,
HSFLL, and LFCLK controllers in the nRF54H20 SoC.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-09-05 17:00:24 -04:00
Marcin Szymczyk 161149ba01 soc: nordic: add enabled instances validation for nRF54L series
Align verification macros to nRF54L series specific instances.

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2024-09-05 16:57:19 -04:00
Karol Lasończyk 198a005177 soc: Add support for nRF54L20 SoC
Introduce nRF54L20 entries in soc directory.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-09-04 07:02:19 -04:00
Krzysztof Chruściński 175855e0d8 soc: nordic: Use 31250 Hz as system tick rate for GRTC
So far 10 kHz tick rate was used but it has 2 drawbacks:
- kernel timer precision is limited to 100 us which is worse compared
to 30 us on platforms which use RTC (which had 32768 Hz tick rate)
- GRTC has 1 MHz frequency so tick rate requires dividing by 100 during
 timeout calculation. When 31250 Hz is used (which is 1000000 / 32)
then dividing can be done with bit shifting and it is faster (> 2 times
faster on Cortex-M33 and >8 times faster on VPR - RISCV).

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-03 10:43:30 +02:00
Gerard Marull-Paretas 726c8abf32 soc: nordic: nrf54l15: add missing include
Add nrf5x binding header, as NRF5X_REG_MODE_DCDC is used in a macro
comparison. Missing header prevented evaluation to become true and so
enable DC/DC module.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-09-02 12:29:51 -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
Karol Lasończyk 85c292ac59 soc: nordic: Move DCDC configuration to DT for nRF54L15
Moving configuration for nRF54L15 device from kconfig to dts.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-08-23 15:49:52 +01: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
Krzysztof Chruscinski cd3dae7c2c soc: arm: nordic_nrf: timing: Fix wrapping
Fix wrapping case for SoC with 32 bit TIMER.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-08-16 08:50:13 -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 8cf0d0b0c6 soc: nordic: introduce CONFIG_NRF_PLATFORM_HALTIUM
Some new Nordic nRF SoCs are based on a common platform, named
'Haltium'. Introduce a selectable Kconfig option available for series to
flag they are part of such common platform. This will allow to easily
enable common code shared across all Haltium based products.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-13 18:19:51 -04: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
Anas Nashif 7f52fc4188 arch: custom cpu_idle and cpu_atomic harmonization
custom arch_cpu_idle and arch_cpu_atomic_idle implementation was done
differently on different architectures. riscv implemented those as weak
symbols, xtensa used a kconfig and all other architectures did not
really care, but this was a global kconfig that should apply to all
architectures.

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