Skip to content

Conversation

@anangl
Copy link
Contributor

@anangl anangl commented Feb 21, 2025

Add Kconfig fragment that allows using the sample with the non-secure variant of the board.
Applied as a noup because upstream the build fails on signing the image.

adamkondraciuk and others added 30 commits February 12, 2025 11:29
…ing function

This change ensures that LR will not be implicitly used when calling
`pm_s2ram_mark_check_and_clear`.

Upstream PR #: 81853

Signed-off-by: Adam Kondraciuk <[email protected]>
(cherry picked from commit 269aa0f)
Adding support for reset reasons in the nRF54H20 SoC.

Upstream PR #: 81751

This commit should be replaced with a fromtree one, since PR 81751 has
been already merged, but the latter became dependent on nrfx 3.10.0
which is not present in the upmerge and integrating it at the final
stage of the upmerge is too risky, hence the commit has been turned
into a noup. It is supposed to be replaced with the proper fromtree
commit right after the upmerge.

Signed-off-by: Karol Lasończyk <[email protected]>
Add a custom section in the linker which should always
be placed in the top of RAM. This will be used by the
KMU to push keys into it. Since when you provision a key
into the KMU you need to set specific a memory location
for the PUSH operation we need to keep this memory location
static across images/dfus.

This is a noup since the KMU is not supported upstream.

Ref: NCSDK-25121

Signed-off-by: Georgios Vasilakis <[email protected]>
(cherry picked from commit fcecc13)
In this patch we do several things to be able to configure power and
clocks when NRF_OSCILLATORS and NRF_REGULATORS is secure.

We port soc.c to TF-M so that the TF-M image can do the same
configuration that would normally be done by the Zephyr image.

This is done by explicitly including autoconf.h for instance.

We also ifdef-out the configuration when nordicsemi_nrf54l_init is
invoked from a non-secure image, because the peripherals are secure.

Signed-off-by: Sebastian Bøe <[email protected]>
(cherry picked from commit e3e053f)
Noup as it patches code that does not exist in zephyr
arch_busy_wait and k_busy_wait waited half the expected time
due to SystemCoreClock being set back to the default value when ns
builds. Changed to rely on device tree as to avoid
hardcoded clock frequencies

Signed-off-by: Dag Erik Gjørvad <[email protected]>
(cherry picked from commit 665aba4)
Update path for autoconf.h which is now in zephyr/autoconf.h

Signed-off-by: Frank Audun Kvamtrø <[email protected]>
(cherry picked from commit 923f090)
…trollers

Add a generic driver for MSPI controllers based on the DesignWare
SSI core. With small vendor-specific adaptations covering integration
details, it should be possible to use the driver for various devices.

Upstream PR #: 85520

Signed-off-by: Andrzej Głąbek <[email protected]>
…devices

Add a flash driver intended to handle various flash devices
connected over MSPI bus as long as they support JEDEC SFDP.
This is an initial commit providing only basic operations
in Octal I/O mode with some hard-coded values for Macronix
MX25Ux series chips.

Upstream PR #: 85520

Signed-off-by: Andrzej Głąbek <[email protected]>
This is a follow-up to commit 45d827a.

Although routing for those pins is configured via UICR, pinctrl still
needs to be involved so that it is possible to set desired drive mode
for them etc.
Add also the missing RWDS pin.

Upstream PR #: 85520
Applied as [nrf noup] due to a conflict in nrf-pinctrl.h

Signed-off-by: Andrzej Głąbek <[email protected]>
…y map

Access to this region must be requested through UICR by a local
domain that want to use the Execute In Place (XIP) feature of
the EXMIF peripheral.

Upstream PR #: 85520

Signed-off-by: Andrzej Głąbek <[email protected]>
(cherry picked from commit 71cc8b6)
… nRF54H20 DK

Add nRF54H20 DK specific entries to allow using the sample on this
board.

Upstream PR #: 85520

Signed-off-by: Andrzej Głąbek <[email protected]>
(cherry picked from commit 9edbdaf)
… template

fixup! [nrf noup] tree-wide: support NCS Partition Manager (PM) definitions

Signed-off-by: Torsten Rasmussen <[email protected]>
(cherry picked from commit 7d364d0)
This is a follow-up to commit cdf45cb234077522b5cef2da084869af43d42dc1.

Adjust the DTS node for the nRF EXMIF peripheral so that it is possible
to handle the peripheral with the generic MSPI driver for DW SSI based
controllers and use all its data lines in communication.
Also adjust the related board files accordingly.

Upstream PR #: 85520

Signed-off-by: Andrzej Głąbek <[email protected]>
…mspi-nor" devices

Extend several flash samples and tests so that they can also be used
with "jedec,mspi-nor" devices.
Add configurations needed for the nrf54h20dk/nrf54h20/cpuapp target.

Upstream PR #: 85520

Signed-off-by: Andrzej Głąbek <[email protected]>
This commit brings back modifications from these reverted commits:
- f68b2ed
- e606246
slightly adjusted so that the EXMIF peripheral is still by default
handled by the mspi_dw driver, and in cases where this driver cannot
be used because something still does not work correctly, one can
switch to the old solution based on the tweaked spi_dw driver.

Signed-off-by: Andrzej Głąbek <[email protected]>
(cherry picked from commit 352fb6b)
Do not delete clocks for the bsim target. Clocks are referenced
by peripherals and it can be used to get frequency that clocks
the peripheral.

Signed-off-by: Krzysztof Chruściński <[email protected]>
(cherry picked from commit 32898cf)
…ency to 64MHz"

This reverts commit 413ca65.

Signed-off-by: Andrzej Głąbek <[email protected]>
(cherry picked from commit 3168b60)
Add ifdefs to make MSPI API test more generic.

Signed-off-by: Jakub Zymelka <[email protected]>
(cherry picked from commit fc59ce3)
Configure SDP MSPI pins to switch their control to VPR core

Signed-off-by: Jakub Zymelka <[email protected]>
(cherry picked from commit 2540f7b)
Add nRF54l15 overlay file to be able to run SDP MSPI API test.

Signed-off-by: Jakub Zymelka <[email protected]>
(cherry picked from commit abc7966)
…clusion stricter

Some devices do not support nrf_clock HAL.

Signed-off-by: Nikodem Kastelik <[email protected]>
(cherry picked from commit ee05087)
Added clock control api for global hsfll used in fast PWM120 driver.

Signed-off-by: Michał Stasiak <[email protected]>
(cherry picked from commit 2c89ed5)
Fix failing tests for nRF54H20 target.

Signed-off-by: Adam Kondraciuk <[email protected]>
(cherry picked from commit eb7e947)
Fix platform radio state machine to be compliant with one shown in
OpenThread's `include/openthread/platform/radio.h`

Align twister tests to verify proper behavior of the
state machine.

Signed-off-by: Maciej Baczmanski <[email protected]>
(cherry picked from commit b46f720)
Add possibility to set channel in diag mode by implementing
`platformRadioChannelSet` API.

Signed-off-by: Maciej Baczmanski <[email protected]>
(cherry picked from commit 712da72)
After openthread/openthread#11055,
platform is not required to check diagnostics mode while
processing commands.

Signed-off-by: Maciej Baczmanski <[email protected]>
(cherry picked from commit 74bbbdc)
…ace command

Latest version of nrfutil trace doesn't support setting
uart baudrate.
Remove --baudrate {baudrate_val} from command that executes nrfutil.

Also, combine pytest script for:
- samples.boards.nordic.coresight_stm,
- tests.boards.nrf.coresight_stm,
to minimize code duplication (fix compliance check R0801).

Signed-off-by: Sebastian Głąb <[email protected]>
(cherry picked from commit 153f5b6)
In order to ensure that watchdog channels are freed in proper
driver state, synchronization in form of simple loop needs
to be added after stopping. In no irq variant, it is already done
on nrfx level. NRFY function can be replaced by NRFX one in
the future.

Signed-off-by: Michał Stasiak <[email protected]>
(cherry picked from commit b578ffa)
…ers.

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 <[email protected]>
(cherry picked from commit 9c574ed)
…n nrf54*

Add test that checks reset cause reported by HWINFO.

Check that hwinfo_get_supported_reset_cause() returns
expected value.

Check that hwinfo_get_reset_cause() correctly detects:
- RESET_PIN,
- RESET_SOFTWARE,
- RESET_WATCHDOG.

Check that reset cause can be cleared
with hwinfo_clear_reset_cause().

Signed-off-by: Sebastian Głąb <[email protected]>
(cherry picked from commit 8f83267)
cvinayak and others added 20 commits February 21, 2025 11:39
… conn done event

Fix uninitialized is_aborted in connection done event.

Relates to commit cadef5a ("Bluetooth: Controller:
Introduce BT_CTLR_PERIPHERAL_RESERVE_MAX").

Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
(cherry picked from commit f3e398d)
Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
…x to any PHY Tx

Fix regression in Coded PHY S2 reception to any other PHY Tx
in the s/w switch implementation.

Regression in commit 55b7dba ("Bluetooth: Controller:
Refactor sw_switch hal interface use").

Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
(cherry picked from commit 7573ac5)
Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
Fix connection event busy check when peripheral role is
using minimal time reservation.

Peripheral and Central have a anchor point sync if the
Peripheral has successfully transmitted once to the Central.

Fixes commit cadef5a ("Bluetooth: Controller: Introduce
BT_CTLR_PERIPHERAL_RESERVE_MAX")'.

Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
(cherry picked from commit 745810c)
Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
… update

Fix incorrect peripheral drift compensation when connection
events are overlapping and a PHY update causes the currently
used PHY to change.

Incorrect preamble to address that is calculated using
updated PHY was used causing supervision timeout.

Fixed by storing the PHY used in the current connection
event and using that for drift compensation calculation.

Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
(cherry picked from commit 13fa3a0)
Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
Workaround HCTO calculation for BabbleSIM due to need of
addition timeout value required to have anchor point sync.

Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
(cherry picked from commit e8da981)
Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
…sed events value

Fix incorrect elapsed events value when event prepare are
aborted in the pipeline. This can caused premature
supervision timeouts.

Relates to commit 247037b ("Bluetooth: Controller: Fix
incorrect elapsed events value").

Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
(cherry picked from commit 1c86636)
Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
…lated latency

Fix Connected ISO to use accumulated latency to update the
payload count.

Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
(cherry picked from commit 3bf3308)
Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
…CIG overlaps

Fix incorrect event_count use in CIG events when the next
CIG interval's prepare overlaps with the current CIG event.
Use separate event_count_prepare variable in ULL and copy
the value in LLL event.

Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
(cherry picked from commit be91cfe)
Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
Coverity was unhappy that
`struct ll_conn_iso_stream *cis = NULL;` was never assigned to
a non-NULL value, which is due to the assignment being
guarded by `#if defined(CONFIG_BT_CTLR_CONN_ISO)`.

Signed-off-by: Emil Gydesen <[email protected]>
(cherry picked from commit a9279ee)
Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
…t parameter

This fixes uninitialized iso_interval parameter in
bt_hci_evt_le_big_complete.

Signed-off-by: Mariusz Skamra <[email protected]>
(cherry picked from commit 6723625)
Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
… BASE0

We have previously fixed an issue with shifting and
assigning the value without a cast, but coverity
is still complaining about aa[1] and aa[0] with:

"Casting narrower unsigned aa[1] to wider signed type
int effectively tests its lower bound."

Using the common function, sys_get_le24, should fix this issue.

Signed-off-by: Emil Gydesen <[email protected]>
(cherry picked from commit 9fca7ee)
Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
…onal code

Fix BT_CTLR_LOW_LAT_ULL conditional compilation code by
decoupling it from BT_CTLR_LOW_LAT code.

BT_CTLR_LOW_LAT_ULL makes ULL execution context to tailchain
in comparison to continuously process in a while loop.

Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
(cherry picked from commit 5119896)
Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
…Adv Sync

Fix incorrect device address reported in the LE Periodic
Advertising Sync Established event when using Periodic
Advertiser List.

During Extended Scanning there can be an ADV_EXT_IND PDU
received between currently being received ADV_EXT_IND PDU
and AUX_ADV_IND PDU; if the one received between has an
address match then incorrectly the Periodic Synchronization
was established to the device whos AUX_ADV_IND PDU is being
received. Fix by storing the auxiliary context that has the
address match and compare with it when matching the SID in
SyncInfo of AUX_ADV_IND PDU being received prior to creating
the synchronization.

Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
(cherry picked from commit 83e2ec3)
Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
…E BIG Complete

Fix missing sync_delay and transport_latency information in HCI
LE BIG Complete event.

Relates to commit 1a640e4 ("Bluetooth: controller:
Included transport latency in LE_Big_Established").

Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
(cherry picked from commit 8ebc4f3)
Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
…chain reception

Fix regression introduced in Periodic Advertising
Synchronization due to change related to multiple
Advertising chain reception.

Related commit c334ed5 ("Bluetooth: Controller: Fix
multiple Extended Adv chain reception"), and
commit da792a9 ("Bluetooth: Controller: Fix interleaved
extended scanning assert").

Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
(cherry picked from commit 2461552)
Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
…dic Sync

Fix assertion due to changes introduced to support multiple
advertising chain reception.

Auxiliary context association with the Periodic Sync context
was not cleared due to which when terminating a Periodic
Synchronization triggered an assertion check, under race
conditions, detecting that the auxiliary context was already
released.

Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
(cherry picked from commit 3263729)
Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
…ed in node rx

Fix to release aux context stored in node rx, and not in the
superior scan or sync context as the one in the superior scan
or sync context could be reset or have a different new aux
context when multiple advertising chain reception is used.

Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
(cherry picked from commit a806592)
Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
Fix regression in scan aux release now that aux context is
retrieved from the node rx when supporting multiple chain
reception.

Relates to commit a806592 ("Bluetooth: Controller: Fix
to release aux context stored in node rx").

Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
(cherry picked from commit 49642ef)
Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
… association

Remove redundant reset of LLL sync aux context association.

Related to commit 3263729 ("Bluetooth: Controller: Fix
assertion terminating Periodic Sync").

Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
(cherry picked from commit dcdd330)
Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
…5340 DK

Add Kconfig fragment that allows using the sample with the non-secure
variant of the board.
Applied as a noup because upstream the build fails on signing the image.

Signed-off-by: Andrzej Głąbek <[email protected]>
@anangl anangl force-pushed the code_relocation_nrf5340dk_ns branch from 7c01861 to ca97fe7 Compare February 21, 2025 12:27
Copy link
Contributor

@SeppoTakalo SeppoTakalo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would approve as [noup] because of following reasons:

  • Split XIP build support only exist in NCS as a sysbuild scripts.
  • Split XIP build requires PartitionManager which exist only in NCS.
  • Our chip requires our fork of TF-M and all required pieces are in NCS.

Therefore TF-M build with all the required Partition Manager and Sysbuild support only exist in nRF Connect SDK. So this would not work on upstream.

@nordicjm
Copy link
Contributor

I don't know what the intention is here but this does absolutely nothing for QSPI split image support, as can be seen by trying to build https://github.com/nrfconnect/sdk-nrf/tree/main/samples/nrf5340/extxip_smp_svr for an ns board target:

CMake Error at /tmp/bb/nrf/cmake/sysbuild/image_signing_split.cmake:147 (message):
  TFM is not currently supported with QSPI XIP

All this does is allow a single sample to build which does not support updates in any way

@SeppoTakalo
Copy link
Contributor

I see.
So the problem is not about having TF-M, but a build scripts that do not handle the image signing.

@bjarki-andreasen
Copy link
Contributor

Requires rebase since upmerge :)

@carlescufi
Copy link
Contributor

PoC, can be closed.

@carlescufi carlescufi closed this Jul 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.