Commit graph

111535 commits

Author SHA1 Message Date
Jakub Wasilewski
d5743e59b2 boards: add support for the OSD32MP1-BRK
Add support for the Octavo's OSD32MP1-BRK platform. The board uses
Octavo's OSD32MP15x SiP which integrates STM32MP157F MCU and
its SoC configuration.

Signed-off-by: Jakub Wasilewski <jwasilewski@internships.antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2025-03-12 02:25:33 +01:00
Jamie McCrae
92138f7ae7 west.yml: MCUboot synchronization from upstream
Update Zephyr fork of MCUboot to revision:
  1b2fc096d9a683a7481b13749d01ca8fa78e7afd

Brings following Zephyr relevant fixes:

  - 1b2fc096 boot: Reuse pointers for flash_area objects from state
  - d00b11dc boot: bootutil: Take into account scratch trailer when
    computing max image size
  - d1a3b953 boot: bootutil: Ensure the whole trailer is erased
    when it is large
  - 66d41e73 boot: bootutil: Fix scratch trailer overwritten if
    image trailer is large
  - 8975d5c4 boot: bootutil: Fix underflow in swap-scratch when
    trailer is large
  - a43167e3 zephyr: fix Mbed TLS configuration header file
    selection
  - fbd2267e boot: bootutil: Fix invalid last sector computation
    for swap-scratch
  - 7330df7c boot: bootutil: Fix last sector index computation for
    swap-offset
  - 429e2fea boot: zephyr: kconfig: Add new defaults option for FIH
  - 602cb459 Fix path for DT example
  - 3ff75490 zephyr: Add Kconfig option
    CONFIG_BOOT_KEY_IMPORT_BYPASS_ASN
  - f2b6def9 zephyr: Enable building ed25519 PSA variant with
    Zephyr

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-03-11 18:55:15 +01:00
Lars-Ove Karlsson
8d3dcd79f4 logging: Added config to disable vla in statements
The config LOG_USE_VLA depends on that MISRA_SANE is not set.
Unfortunately the IAR toolchain can't handle vla:s inside a
statement, which the LOG_USE_VLA macro does.

I've added a new, hidden config to check if vla is ok inside
statements, SUPPORT_VLA_IN_STATEMENTS. Default is always y, but
a toolchain can override it so that VLA is not used by
Z_LOG_MSG_ON_STACK_ALLOC.

Signed-off-by: Lars-Ove Karlsson <lars-ove.karlsson@iar.com>
2025-03-11 18:55:08 +01:00
Gerard Marull-Paretas
f23b4fdb2d modules: hal_nordic: nrfx: use dt_nodelabel_exists
As of today, nrfx components are selectable depending if devicetree has
a certain compatible or not, and in case of IP that can operate in
multiple modes, nodelabel+compatible. An example of the later is:

```
config NRFX_SPI0
    bool "SPI0 driver instance"
    depends on $(dt_nodelabel_has_compat,spi0,$(DT_COMPAT_NORDIC_NRF_SPI))
    select NRFX_SPI

config NRFX_SPIM0
    bool "SPIM0 driver instance"
    depends on $(dt_nodelabel_has_compat,spi0,$(DT_COMPAT_NORDIC_NRF_SPIM))
    select NRFX_SPIM

config NRFX_SPIS0
    bool "SPIS0 driver instance"
    depends on $(dt_nodelabel_has_compat,spi0,$(DT_COMPAT_NORDIC_NRF_SPIS))
    select NRFX_SPIS
```

These symbols are later selected by e.g. SPI driver if `spi0` node is
enabled. While this works in the Zephyr context, it can be a problem in
applications using nrfx directly in the application layer, unless they
tweak devicetree. For example, if devicetree `spi0` node defaults to
`compatible = "nordic,nrf-spim"`, NRFX_SPI0 or NRFX_SPIS0 won't be
selectable, but an application using nrfx directly doesn't really care
about what is defined in devicetree as it is effectively bypassing it.
It just wants to select e.g. `CONFIG_NRFX_SPI0=y` and forget about the
rest.

This patch fixes this problem by just checking for the existence of
certain nodelabels.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2025-03-11 18:54:57 +01:00
Gerard Marull-Paretas
b99ae6c7d9 scripts: kconfig: introduce dt_nodelabel_exists
Add a new function to check if a nodelabel exists in devicetree.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2025-03-11 18:54:57 +01:00
Alberto Escolar Piedras
b617418532 drivers/timer/native_sim_timer: Correct comments
Correct the introduction comment, removing the native_posix mention,
and something which did not apply for several years.
Also remove an unnecessary include.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-11 18:54:49 +01:00
Alberto Escolar Piedras
ba64291088 drivers timer: Rename native_posix_timer native_sim_timer
Including renaming the kconfig option
NATIVE_POSIX_TIMER into NATIVE_SIM_TIMER deprecating the first one.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-11 18:54:49 +01:00
Yangbo Lu
605335716a drivers: interrupt_controller: intc_nxp_irqsteer: fix system INTID
Current system INTID calcualtion only worked for SoCs whose extended
interrupts started from IRQ 0.
Otherwise, FSL_FEATURE_IRQSTEER_IRQ_START_INDEX should be added for
system INTID.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-03-11 18:54:40 +01:00
Yangbo Lu
8108c891b8 drivers: interrupt_controller: intc_nxp_irqsteer: support ARM Cortex-M
Added ARM Cortex-M support for intc_nxp_irqsteer driver.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-03-11 18:54:40 +01:00
Yangbo Lu
627a3b83cd arch: arm: cortex_m: handle multi-level interrupts in irq init
Multi-level interrupts should be handled in irq init. Only level1
interrupts going directly to interrupt controller need to be
initialized.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-03-11 18:54:40 +01:00
Yangbo Lu
b4f2553cd8 arch: arm: irq: allow custom irq control for multi-level interrupts
Custom irq control for multi-level interrupts should be allowed.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-03-11 18:54:40 +01:00
Jeppe Odgaard
8b8d56a5ca drivers: sensor: explorir_m: increase max response delay
The sensor does not always finish responding within 200 ms.
This is the sometimes the case when using the sensor calibrate command `X`.
Response delay up to 212 ms has been measured with a logic analyzer.

Increase the max response delay to 300 ms to fix the issue.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2025-03-11 18:54:34 +01:00
Jeppe Odgaard
e575eea233 drivers: sensor: explorir_m: improve transceive
During calibration feature development the following loop was used for
testing:

```shell
CMD="sensor attr_set explorir_m co2 calibration 1234"
while : ; do echo "$CMD" > /dev/ttyACM0; sleep .8; done
```

At some point calibration would fail and all following calibration commands
would fail.

Reset buffer and semaphore just before terminating the command to better
mitigate disturbance from previous failed command.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2025-03-11 18:54:34 +01:00
Johann Fischer
f624486f66 samples: dap: use new USB device stack and new DAP backend USB
Rework the sample to use the new USB device stack and the new DAP
backend and align the sample with the WebUSB sample which has a similar
BOS descriptor.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-03-11 18:54:24 +01:00
Johann Fischer
53c33ab9b5 dap: add DAP backend USB
The backend uses a new USB device stack and bulk endpoints. Only a
single instance of the backend function is currently supported. Both DAP
packet processing and the new backend are prepared to support multiple
instances, but require a user interface and minor modifications.

New backen has similar functionality to what is provided by the function
in the sample samples/subsys/dap.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-03-11 18:54:24 +01:00
Johann Fischer
6fbd63b733 cmsis_dap: remove Kconfig option CMSIS_DAP_PACKET_SIZE
We need a way to update the value configured by option
CMSIS_DAP_PACKET_SIZE at runtime. For example, the USB backend may have
different values depending on the speed at which the device is being
enumerated.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-03-11 18:54:24 +01:00
Emilio Benavente
e0bb942a43 boards: nxp: frdm_mcxw71: Adding Pull Up flag
The SW2 needs the PULL UP flag to be set to be
enabled.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2025-03-11 18:54:14 +01:00
Alberto Escolar Piedras
7ddfc6af46 boards native_sim: Correct UART outdated comments
Both polling and interrupt based APIs are supported in the TTY driver.
And the console backend is enabled unless *any* UART driver is built.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-11 18:54:02 +01:00
Alberto Escolar Piedras
cb53e40ff9 drivers uart_native_posix: rename to native_pty and support N instances
Rename the driver from uart_native_posix to uart_native_pty.
Including renaming the DTS compatible, and kconfig options, deprecating
the old ones.

And refactor the driver, generalizing it, so we can have any number of
instances.
Note that, unfortunately generalizing to N instances cannot be done
without a degree of backwards compatibility breakage: This driver was
born with all its configuration and selection of the instances based on
kconfig.
When the driver was made to use DT, it was done in a way that required
both DT and kconfig needing to manually coherently enable the 2nd UART.
This has now been fixed, which it means only DT is used to decide how
many instances are avaliable, and UART_NATIVE_POSIX_PORT_1_ENABLE is
just ignored.

Including:
* Deprecate UART_NATIVE_WAIT_PTS_READY_ENABLE: the options is always on
  now as it has no practical drawbacks.
* Deprecate UART_NATIVE_POSIX_PORT_1_ENABLE: DTS intanciation defines it
  being available now.
* Rename a few functions and in general shorten pseudo-tty/pseudo-
  terminal to PTY instead of PTTY.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-11 18:54:02 +01:00
Lyle Zhu
d811f6921c Bluetooth: L2CAP_BR: Reject the conn req if sec levels do not match
If the ACL link has been encrypted and it has a authenticated link key,
it means the pairing procedure has been done. And the security level of
the link key can not be upgraded. In this case, if `conn->sec_level` is
less than the required security level of the L2CAP channel, reject the
L2CAP conn request.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-03-11 18:53:50 +01:00
Henrik Brix Andersen
110cd6b806 kernel: fix compilation with CONFIG_TIMER_READS_ITS_FREQUENCY_AT_RUNTIME
Fix compilation with CONFIG_TIMER_READS_ITS_FREQUENCY_AT_RUNTIME=y and
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC unset at the board/SoC level.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2025-03-11 18:53:40 +01:00
Anas Nashif
895d91169e tests/samples: use integration platforms where possible
When possible, add integration_platforms to samples/tests.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-03-11 11:35:15 +01:00
Anas Nashif
9ca316bef4 tests: pinctrl: improve filtering and let tesrt build/run
Test was filtered out due to wrong metadata, make it run in simulation
and set integration platforms.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-03-11 11:35:15 +01:00
Anas Nashif
91c012ca12 samples: co2: fix filtering and use integration_platforms
This sample was filtered out completely, use integration platforms and
removee wrong depends_on.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-03-11 11:35:15 +01:00
Anas Nashif
7a54569d85 samples: gnss: no board has this feature, improve filtering
Use integration platforms to make this sample buildable.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-03-11 11:35:15 +01:00
Anas Nashif
5a09483686 samples: mh7_dual_core: remove depends_on mailbox
Make this sample build/run on something that is supported.
depends_on was causing this to be completely left out.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-03-11 11:35:15 +01:00
Anas Nashif
d1af028ec2 tests: use simulators in integration platforms
Where applicable, pick a simulator as the integration platform.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-03-11 11:35:15 +01:00
Anas Nashif
abb5f52898 tests: settings: where possible, use simulators for integration platforms
We want to be able to run tests and get results in CI, not just build
for platforms we do not have access to.
Where possible, use a simulator instead of hw platforms.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-03-11 11:34:54 +01:00
Anas Nashif
7c985dea67 tests: zms: remove bogus filter using depends_on
zms is not something to be used with depends_on, it is a software
feature. looks like it was a copy/paste from an nvs test. This test was
always fitlered out and never built or ran on anything....

Use filter instead.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-03-11 11:34:54 +01:00
Krzysztof Chruściński
841e852513 drivers: mbox: nrf_vevif_event_tx: Fix errata 16 workaround
Pend until requested event is set before clearing it. Without that
check event could be cleared too early and APP core is not waken up.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-03-11 11:34:44 +01:00
Piotr Pryga
ceb4298566 drivers: hci: ipc: Make IPC endpoint bound timeout configurable
The HCI IPC endpoint bound timeout value was hardcoded and set
to 1000 ms. This value may be differ between platforms, for
exampel due to extended boot time.
The default value used was a bit short for multicore SoCs
that usually may wait for some other service reposnes for
similar time. That may lead to timeout error while other
end of an endpoint was slightly late. Change the default
duration to 2000 ms to give more room for possible delays.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2025-03-11 09:00:29 +01:00
Bjarki Arge Andreasen
b33b82a758 tests: drivers: spi: update add pm-runtime-auto to nrf-spis
The nrf-spis instances require zephyr,pm-device-runtime-auto;
to be properly initialized.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-03-11 09:00:19 +01:00
Bjarki Arge Andreasen
7e9301697d drivers: spi: nrfx_spis: impl pm device runtime
Implement PM device runtime in nrx spis device driver.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-03-11 09:00:19 +01:00
Eve Redero
97ee3e8894 dts: atmel: add spi node for arduino due
Add SPI0 node and associated pincontrols in Arduino Due device tree.

Signed-off-by: Eve Redero <eve.redero@gmail.com>
2025-03-11 08:59:47 +01:00
Olivier Lesage
6f33793b41 bluetooth: Host: Rename CS tone antenna configurations
Improves readability by removing the need to check the table
to figure out how many antennas devices A and B are using.

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
2025-03-11 08:59:19 +01:00
Nicolas Pitre
c7467f0c65 ring_buffer: constify some arguments
Functions that don't modify content should have pointers to it marked
const.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2025-03-11 08:59:05 +01:00
Nicolas Pitre
e1eead3925 ring_buffer: shrink size of struct ring_buf
Make struct ring_buf 12 bytes smaller by default. This comes with a 32KB
buffer size limit which covers almost all cases. The previous limit of
2GB can be restored with CONFIG_RING_BUFFER_LARGE=y.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2025-03-11 08:59:05 +01:00
Nicolas Pitre
b97f11a752 ring_buffer: simplify code some more
Some variable renaming made the code clearer, which in turn allowed for
minor optimizations.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2025-03-11 08:59:05 +01:00
Nicolas Pitre
fa73b8b061 ring_buffer: update Kconfig help text
Make it more informative and useful.

Buffer sizes that are a power of 2 didn't provide any advantage since
commit 099850e916 ("ring_buffer: the great simplification").

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2025-03-11 08:59:05 +01:00
Emil Gydesen
9d4cc4b49b Bluetooth: BAP: Add a set of suggested intervals to use with BAP
Add a selection of interval values that are suitable for BAP,
which will allow better coexistence between ISO and ACL,
for both broadcast and unicast. Some of these are defined
by the BAP spec, and some are defined by Zephyr, since they
do have a suggested value from BAP.

Samples and tests have been updated to use these new values.
Peripheral samples have also been updated with
CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS so that the connection
parameters from the centrals aren't updated to something else
shortly after.

The shell has also been updated to use the LE Audio (BAP) values
if audio is enabled, and the audio.conf file has disabled automatic
updating of the connection parameters as the peripheral, as we rarely
(if ever) want to do that.

Due to the connection interval change, CI hit an issue
with test_bass_broadcast_code in test_main_client_sync, where
the reading of the long receive state did not finish before we
attempted to do another procedure, so the function was updated to have
a retry.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-03-11 08:58:51 +01:00
James Roy
f9601948ca dts: dai: Simplify the description of the binding
Remove redundant descriptions in DAI bindings, such
as "... node".

Signed-off-by: James Roy <rruuaanng@outlook.com>
2025-03-11 05:38:28 +01:00
Luis Ubieda
052c76b71e tests: icm45686: Add node to Build-All test
Only supported for SPI so far.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-03-11 05:37:06 +01:00
Luis Ubieda
4aef791a0e sensor: icm45686: Add Triggers functionality
Only working with SENSOR_TRIG_DATA_READY so far.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-03-11 05:37:06 +01:00
Luis Ubieda
05e8a65ba0 sensor: icm45686: Add low-pass filter configuration options
Both for Gyro and Accelerometer.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-03-11 05:37:06 +01:00
Luis Ubieda
25793fe33c sensor: icm45686: Add basic sensor functionality
- Add support for Fetch/Get API.
- Add support for Read/Decode API.
- Add config settings through device-tree.
- Add bus support for SPI (although easily extensible to others as
based on RTIO).

Fetch/Get API tested with accel_polling sample.
Read/Decode API tested with sensor_shell sample.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-03-11 05:37:06 +01:00
Helmut Lord
a90f9991cc tests: utils: lib: cobs tests
Adds tests for COBS util.

Signed-off-by: Helmut Lord <kellyhlord@gmail.com>
2025-03-11 05:36:49 +01:00
Helmut Lord
f31b4a67be lib: utils: add consistent overhead byte stuffing
Implementation uses netbufs.

Signed-off-by: Helmut Lord <kellyhlord@gmail.com>
2025-03-11 05:36:49 +01:00
Henrik Brix Andersen
783fe57cea doc: releases: fix sphinx lint errors
Fix compliance errors reported by SphinxLint.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2025-03-11 05:36:35 +01:00
Henrik Brix Andersen
b4d5fc5cd2 dts: bindings: neorv32: use vendor prefix
Use vendor prefix "neorv32" for all peripherals provided by the NEORV32
RISV-V Processor project.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2025-03-11 05:36:35 +01:00
Ederson de Souza
70c89811be scripts and soc: Mark MD5 and SHA1 usage as not for security
MD5 and SHA1 are not supposed to be used nowadays on security context.
Some ancillary scripts in tree do use them, but for verification only -
or where externally mandated, such the SPDX tool.

This patch marks those usages as `usedforsecurity=False`, which helps
clarify intent.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2025-03-11 04:52:15 +01:00