Skip to content

Ncs bluetooth host upmerge#1

Open
m-alperen-sener wants to merge 6328 commits into
alwa-nordic:ncs-bluetooth-hostfrom
m-alperen-sener:ncs-bluetooth-host_upmerge
Open

Ncs bluetooth host upmerge#1
m-alperen-sener wants to merge 6328 commits into
alwa-nordic:ncs-bluetooth-hostfrom
m-alperen-sener:ncs-bluetooth-host_upmerge

Conversation

@m-alperen-sener
Copy link
Copy Markdown

Rebased the ncs-bluetooth-host branch onto NCS main. sdk-zephyr history is a bot re-written, so what I did is to cherry pick the top 4 commit onto sdk-zephyr head rather then rebase or merge.

JordanYates and others added 30 commits May 25, 2026 15:34
Move the common 3GPP message handlers to the header to enable OOT modems
to use the common implementations.

Signed-off-by: Jordan Yates <jordan@embeint.com>

(cherry picked from commit 5d3d023)
…iles

Simplify the `modem_cellular.c` file by pulling out all the individual
modem macros and instantiation to a dedicated file per modem.

Signed-off-by: Jordan Yates <jordan@embeint.com>

(cherry picked from commit fcde47f)
Explicitly casting a `const void *` to an end data type is unnecessary,
introduces the opportunity to mis-cast the `const` qualifier and goes
against the direction decided in:
    zephyrproject-rtos/zephyr#37616

Signed-off-by: Jordan Yates <jordan@embeint.com>

(cherry picked from commit 12b601a)
Switch out the hardcoded 32 byte buffer for a Kconfig option.

Signed-off-by: Jordan Yates <jordan@embeint.com>

(cherry picked from commit 3eb2355)
Once `rx_full` has been set, the modem is instructed to no longer send
data on that DLCI channel until we notify the modem that the channel is
able to receive more data. This happens in the RX callback which drains
the pipe.

Currently the amount of free space required in the ring buffer to
release the flow control condition is hardcoded to
`CONFIG_MODEM_CMUX_MTU`. While this value is fine for the DLCI1 and
DLCI2 channels (which have buffers created as
`CONFIG_MODEM_CMUX_MTU + N` bytes large), the user pipes with size
`MODEM_CELLULAR_USER_PIPE_BUFFER_SIZES` are typically much smaller. This
lead to the flow control condition never being released on the user
pipe DLCI channels once it was set.

Fix the issue by limiting the threshold to the capacity of the ring
buffer, so that if the buffer is completely empty we will always release
the flow control condition.

Signed-off-by: Jordan Yates <jordan@embeint.com>

(cherry picked from commit 4679c69)
Rather than passing every possible script into the common modem
instantiation macro, use a struct to hold all the scripts and pass the
struct instead.

The advantage of this approach is that it makes adding new optional
scripts much less invasive. The script only needs to be added to the
struct and populated in the drivers that will use it, no need to modify
the global macro.

Signed-off-by: Jordan Yates <jordan@embeint.com>

(cherry picked from commit 4f55300)
`subsys/net/l2/ppp/misc.c` uses NET_DBG() inside
`validate_phase_transition()`, which is compiled only when
CONFIG_NET_L2_PPP_LOG_LEVEL is at LOG_LEVEL_DBG. The macro is
declared in <zephyr/net/net_log.h>, which the file does not include.

At log level INF (default) the function body is a no-op stub
(ARG_UNUSED), so the missing macro goes unnoticed. At log level DBG
the file fails to build:

  misc.c: implicit declaration of function 'NET_DBG'
          [-Wimplicit-function-declaration]

Other files in the same directory (e.g. `link.c`) include
<zephyr/net/net_log.h> correctly; only `misc.c` is missing it.

Signed-off-by: Petr Hlineny <development@hlineny.cz>

(cherry picked from commit 4f33728)
…ipt_async()

It is easier just check the NULL pointer in Chat module, so
the modem_cellular.c does not need to check the existence of
periodic scripts.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>

(cherry picked from commit c44bc42)
When modem_chat_attach() is called with same pipe,
do not reset the parser state.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>

(cherry picked from commit ecf68f7)
…twork setup and PPP

* Add separate state RUN_NETWORK_SCRIPT before running the PPP dial script.
* Allow defining modem with separate network setup script.

These changes allow modem to be defined with a separate script
that runs on DLC1 channel and configures URC messages and joins the
network.

The PPP dial command can then be refactored to be only a single ATD*99#
or AT+CGDATA which runs on DLC2.

URC channel is not switched, so it can be configured to be DLC1
if given modem has a command for it.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>

(cherry picked from commit 57e5450)
… script

Refactor "nordic,nrf91-slm" to configure URC and PPP in the
network setup script.

The dial script can be now left empty as AT#XPPP=1 automatically
starts the PPP on the secondary DLC.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>

(cherry picked from commit 1ead2a4)
Lift the unsol_matches table out of modem_cellular.c.
Each driver now declares its own match table via the new
MODEM_CELLULAR_UNSOL_DEFINE() helper, which generates the matches array
and a small modem_cellular_config_unsol descriptor in one go. Drivers
point at it through the new `unsol` field on modem_cellular_config.

Signed-off-by: Paulo Santos <paulo.santos-ext@hexagon.com>

(cherry picked from commit 15726bd)
If CMUX is going to be shut down while in power-saving mode,
we need to wake-up before doing the state transitioning.

If we directly transition from STATE_POWERSAVE to
STATE_DISCONNECTING, the UART is not woken up and the
disconnect commands are not send.

Use is_connection() helper on both disconnect and connect APIs
to clean up the state check.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>

(cherry picked from commit 7412f6a)
Add testcases to verify that CMUX powersaving feature works.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>

(cherry picked from commit 0a06a0f)
When network is temporary lost, we might receive
PPP_DEAD event just before parsing "+CEREG: ..."

Therefore immediately redialing might lead to out-of-sync
states.

Delay the redial script by the PERIODIC_SCRIPT_TIMEOUT
as any other script failures do.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>

Upstream PR #: 108986

(cherry picked from commit 76c2f94)
Remove unnecessary second recovery call from nRF92,
as nRF92 is running Ironside SE, which already
performs a full erase of MRAM on recovery.

Upstream PR #: 108586

Signed-off-by: Ville Kujala <ville.kujala@nordicsemi.no>
(cherry picked from commit ecbc745)
ChaCha20-Poly1305 is the preferred cipher on platforms lacking hardware
AES acceleration, which is common on embedded targets. Adding this
ciphersuite allows Zephyr devices to negotiate it when connecting to
servers that support it (e.g. nginx, OpenSSL), avoiding a fallback to
AES-based suites.

Assisted-by: GitHub Copilot:claude-sonnet-4.6
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
(cherry picked from commit d8b4039)
…IPHER

Enabling such options by default is not great, and with Mbed TLS 4
it's now part of the APIs that should not be used anymore, so remove
its default enabling.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
(cherry picked from commit fb64c0e)
…y mode and early data

Add MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE and MBEDTLS_SSL_EARLY_DATA
as Kconfig options so they can be individually controlled rather than
being unconditionally enabled. Place EARLY_DATA after SESSION_TICKETS
with a depends on, and COMPATIBILITY_MODE after EARLY_DATA with
default y. Wire both into config-mbedtls.h: un-nest
MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE from the TLS1_3 proto guard,
and consolidate MBEDTLS_SSL_EARLY_DATA to a single standalone block.

Signed-off-by: Rithic Chellaram Hariharan <gr8rithic@gmail.com>
(cherry picked from commit 1b8fb5c)
Add MBEDTLS_SSL_ENCRYPT_THEN_MAC as a dedicated Kconfig option inside
if MBEDTLS_SSL_PROTO_TLS1_2, with default y. Wire it into
config-mbedtls.h replacing the unconditional TLS1_2 && PSA_CRYPTO_C
guard.

Add MBEDTLS_SSL_IN_CONTENT_LEN and MBEDTLS_SSL_OUT_CONTENT_LEN Kconfig
options to allow independent control of incoming and outgoing TLS buffer
sizes. Both default to 1500, with fallback to MBEDTLS_SSL_MAX_CONTENT_LEN
if set. This enables constrained devices to use asymmetric buffer sizes
to save heap.

Deprecate MBEDTLS_SSL_MAX_CONTENT_LEN in Kconfig.deprecated in favor of
the independent IN/OUT buffer size controls.

Signed-off-by: Rithic Chellaram Hariharan <gr8rithic@gmail.com>
(cherry picked from commit 970058e)
…DEBUG is disabled

Move the SHELL_STATIC_SUBCMD_SET_CREATE and SHELL_CMD_REGISTER calls
inside the MBEDTLS_MEMORY_DEBUG guard to avoid registering an empty
shell command set when memory debugging is disabled.

Signed-off-by: Rithic Chellaram Hariharan <gr8rithic@gmail.com>
(cherry picked from commit e70664b)
Include psa/crypto.h in zephyr_init.c when CONFIG_MBEDTLS_PSA_CRYPTO_CLIENT
is enabled to ensure PSA types are available during initialization.

Signed-off-by: Rithic Chellaram Hariharan <gr8rithic@gmail.com>
(cherry picked from commit fa37c7f)
Introduced optional TLS credentials struct in the OCPP header to
enable secure socket communication with the Central System.

Signed-off-by: Sanjay Vallimanalan <sanjay@linumiz.com>
(cherry picked from commit 2765843)
Updated the OCPP sample to support TLSv1.3 by adding overlay
configuration files and updating the project configuration
for secure socket setup.

Signed-off-by: Sanjay Vallimanalan <sanjay@linumiz.com>
(cherry picked from commit 9978b51)
CONFIG_NET_SOCKETS_SOCKOPT_TLS no longer implies mbed TLS configs,
and some of those configs were removed so just remove them from the
config file.

Update renamed mbed TLS configs.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit c38c658)
… length Kconfig

Replace CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN with the new
CONFIG_MBEDTLS_SSL_IN_CONTENT_LEN and CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN
options across all in-tree .conf files, hostap Kconfig defaults, and
socket subsystem help text.

This completes the deprecation of MBEDTLS_SSL_MAX_CONTENT_LEN in favor
of independent incoming/outgoing buffer size control.

Signed-off-by: Rithic Chellaram Hariharan <gr8rithic@gmail.com>
(cherry picked from commit aee3630)
…TLS_PSA_CRYPTO_C

Make `CONFIG_MBEDTLS_PSA_CRYPTO_C` look for and enable an entropy driver
only when the Mbed TLS PSA Crypto core is used. Others don't necessarily
require entropy unconditionally, it can be an optional feature.

Additionally, make the RNG source default to
`CONFIG_MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG` also when some other PSA
Crypto core is used. This allows avoiding code bloat by default
to avoid falling back to `CONFIG_MBEDTLS_PSA_CRYPTO_LEGACY_RNG`
which would enable more features. It may seem a bit silly to have
`CONFIG_MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG` enabled even if we don't have
actual entropy but some places assume that if it's not defined then
the legacy path is used.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
(cherry picked from commit 21e55f2)
Fix the path to TF-PSA-Crypto now that we moved it outside of the Mbed
TLS repo.

Also replace the "Do not edit it manually" note from the Kconfig file
in order to start making manual additions to it.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
(cherry picked from commit 6dfe22f)
Use only one space between the name and the value.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
(cherry picked from commit 558de01)
Add a help text to their Kconfig options to warn about that.

In addition, make CONFIG_PSA_WANT_ALG_MD5 select NOT_SECURE but not
CONFIG_PSA_WANT_ALG_SHA_1 because for instance HMAC-SHA1 is still
considered secure, which means SHA-1 usage might not necessarily
be insecure.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
(cherry picked from commit 8c410a4)
ayla-nordicsemi and others added 30 commits May 28, 2026 12:11
- Add Fast peripherals, GRTC CLCK pin, VPR121, VPR130
and MIPIRFFE Ctrlsel configuration to nRF9251.

- Add Trace port Ctrlsel support for nRF9251 and nRF9280.

- Simplify script by removing Family and rely only on SoC
number.

(cherry picked from commit 0d744a0cc63b1c49408985be54d4f224673f74c3)

Signed-off-by: Aymen LAOUINI <aymen.laouini@nordicsemi.no>
…NEEDS_PRNG

MCUX TRNG triggers hardware errors (TRNG_MCTL_ERR) when used as
continuous random source via HARDWARE_DEVICE_CS_GENERATOR, causing
sys_csrand_get() assertion failures.
On platforms where CONFIG_ENTROPY_NEEDS_PRNG is set 'sys_csprng_get()'
cannot poll directly the entropy device, but it needs to apply some
PRNG on top of it. Therefore enable CONFIG_PSA_CSPRNG_GENERATOR.
Fixes #107087

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
(cherry picked from commit 8afc592)
It was deprecated for Zephyr v4.4.0 (by
b92d516) but not in a proper way.
Its implementation was removed and it was made identical to
CONFIG_PSA_CSPRNG_GENERATOR which is deceiving.
In addition, it appears first in the choice, which means the
build system defaults to using this deprecated option instead of
CONFIG_PSA_CSPRNG_GENERATOR.

Removing it now is the best course of action to avoid deceiving users
any longer or defaulting to a deprecated option.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>

Upstream PR #: 109914
… voltage

The need to monitor battery voltage on nordic devices and nRF7120
in particular is required among other metrics such as die temperature.
Creating a sensor to measure battery voltage allows to easily monitoring
of all required metrics in a consistent way.

This commit adds a new sensor driver to monitor battery.

Signed-off-by: Robert Robinson <robert.robinson@nordicsemi.no>
(cherry picked from commit ea9c9bc)
…ld_all test

Add "nordic,nrf-vbat" to sensor test targets.

Signed-off-by: Robert Robinson <robert.robinson@nordicsemi.no>
(cherry picked from commit d177efb)
…_SIGNALS

POSIX_MULTI_PROCESS is currently enabled via POSIX_SIGNALS,
which prevents it from being disabled through configuration files.
This change removes POSIX_MULTI_PROCESS from POSIX_SIGNALS so that it
can be explicitly enabled or disabled via configuration when required.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
(cherry picked from commit d7056671ce37f13e1d37fc11d9531e0254ac687e)
…ions

Correct alignment of `\` characters in the `FLASH_MSPI_NOR_INST(inst)`
macro definition.
Use `NSEC_PER_USEC` symbols instead of 1000 when doing conversion from
nanoseconds to microseconds.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>

Upstream PR #: 108858
Add proper handling of the `has-dpd`, `t-enter-dpd`, and `t-exit-dpd`
devicetree properties that could be applied to "jedec,mspi-nor" nodes,
but caused no effect so far.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>

Upstream PR #: 108858
…ndling

as in the spi_nor driver, so that the DPD mode can be used even if
the flash API caller does not perform the runtime device PM calls.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>

Upstream PR #: 108858
… core

Enable the GPIO peripheral for the nRF54H20 FLPR core.
Add the corresponding test overlays so that the
tests run correctly under Twister for the FLPR core.

Signed-off-by: Paweł Pelikan <pawel.pelikan@nordicsemi.no>

(cherry picked from commit be316c0)
Enable the gpiote130 and gpio0 nodes needed to pass this twister test:
tests/drivers/gpio/gpio_basic_api : drivers.gpio.2pin
for this target : nrf54h20dk@0.9.0/nrf54h20/cpuflpr/xip

Signed-off-by: Riadh Ghaddab <riadh.ghaddab@nordicsemi.no>

(cherry picked from commit a96b242)
Disable GPIO interrupts for the nRF54H20 FLPR core,
as it doesn't support GPIO interrupts by design.

Signed-off-by: Paweł Pelikan <pawel.pelikan@nordicsemi.no>

(cherry picked from commit b6216c9)
…LPR core

Remove GPIOTE reference for the nRF54H20 FLPR core,
to avoid unsupported dependency to interrupts.

Signed-off-by: Paweł Pelikan <pawel.pelikan@nordicsemi.no>

(cherry picked from commit e94f664)
Add corresponding test overlays so that the SPI
tests run correctly under Twister for the FLPR core.

Signed-off-by: Paweł Pelikan <pawel.pelikan@nordicsemi.no>

Upstream PR #: 109472
…ction

Coming with nrfx 4.3, NRF_GPIO_HAS_DETECTMODE is now
defned only when it is actually accessible.
Removed the hidden Kconfig option and used
nrfx symbol only.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>

(cherry picked from commit eaa479e)
…t 3"

This reverts commit 7739816.

Signed-off-by: Magdalena Pastula <magdalena.pastula@nordicsemi.no>
…igs"

This reverts commit b9dc37a.

Signed-off-by: Magdalena Pastula <magdalena.pastula@nordicsemi.no>
…ge image should be OK

Changed the file filter in the compliance check script from "d" to "dr" to
not fail when a commit _moves_ an already large image to a new location.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>

(cherry picked from commit ff58a4d)
…LLOWLIST`

Allow the symbols defined in `UNDEF_KCONFIG_ALLOWLIST` to be extended
at runtime by loading a list from a file, with the file specified as
an environment variable.

This allows the script to be used without modification by other repos
that have their own set of expected undefined symbols.

Signed-off-by: Jordan Yates <jordan@embeint.com>

(cherry picked from commit 7053835)
…fig`

Allow warnings output by the `undef_within_kconfig` check to be
suppressed for individual symbols (list loaded from a file).

While ideally this situation should be avoided, in practice it is
sometimes unavoidable for modules that are intended to support being
imported from multiple manifest repos, or are trying to support multiple
zephyr versions.

Signed-off-by: Jordan Yates <jordan@embeint.com>

(cherry picked from commit b49bf3e)
…OWLIST`

Move the list of undefined Kconfig symbols to allow out of the python
script and into a dedicated file.

Signed-off-by: Jordan Yates <jordan@embeint.com>

(cherry picked from commit f87cfbd)
Remove previous solution determinig which BSP should be
used in build.

Signed-off-by: Magdalena Pastula <magdalena.pastula@nordicsemi.no>
(cherry picked from commit d68dbaf6821c3c6096aee4803c0bb158d6987654)
Add a new Kconfig option to disable the stable BSP from build
and make part of the CMake file dependable on it to avoid conflicts
with external BSPs.
Also, remove remains of the old solution.

Signed-off-by: Magdalena Pastula <magdalena.pastula@nordicsemi.no>
(cherry picked from commit cf51105c81f81a8b19a93dced12a02a65e9d375e)
Remove SOC_NORDIC_BSP_PATH_OVERRIDE from list of undefined Kconfigs,
as it's no longer used.

Signed-off-by: Magdalena Pastula <magdalena.pastula@nordicsemi.no>
(cherry picked from commit b45a63f6b35ca3f940bb2cdbe6d5c0a7e3988442)
For whatever reason USE_DUMMY_CREDS=1 param does not propagate to
mcuboot build in twister, causing build failures. Restrict the platforms
allowed for this configuration in twister to mitigate the issue.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit c34e5d1)
This test doesn't have anything specific to Mbed TLS, so make it a
generic PSA Crypto test.

At the same time stop setting the PSA Crypto provider manually.
The build system should take care of enabling the appropriate one.
This caused issues in cases where a different provider would be
selected.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>

Upstream PR #: 109827
…s for nRF Connect SDK Bluetooth Host

When CONFIG_BT_HOST_NORDIC is enabled, redirect Bluetooth Host
includes to the nRF Connect SDK Bluetooth Host headers. This lets
existing code (applications, samples, and internal subsystems like
Mesh and Audio) keep using their current include paths.

For public headers, the include guard is activated to prevent
loading the Zephyr version after the redirect.

For internal headers, the Zephyr content is wrapped in
#if !defined(CONFIG_BT_HOST_NORDIC) to avoid duplicate definitions.

The nRF Connect SDK Bluetooth Host include paths are intentionally
different from Zephyr's to avoid recursive includes.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
… nRF Connect SDK host is active

When CONFIG_BT_HOST_NORDIC is enabled, skip sourcing the Zephyr
Bluetooth Host CMake and Kconfig from subsys/bluetooth/, and skip
the HCI driver subdirectory under drivers/bluetooth/. These are
provided by the nRF Connect SDK Bluetooth Host in sdk-nrf.

Also redirect the Zephyr drivers/bluetooth.h header to the
nRF Connect SDK version, matching the pattern used for the host
headers.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Signed-off-by: Kyra Lengfeld <kyra.lengfeld@nordicsemi.no>
Add a debug message identifying that the Zephyr Bluetooth Host is
running. This complements the corresponding message in the nRF
Connect SDK Bluetooth Host, making it easy to tell which host
implementation started.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Add directory tracking entries for the nRF Connect SDK Bluetooth
Host CI test scope.

Signed-off-by: alperen sener <alperen.sener@nordicsemi.no>
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.