Commit graph

118,807 commits

Author SHA1 Message Date
Benjamin Cabé
44aaa8443b tests: lib: net_buf: add tests for net_buf_linearize()
Add tests to ensure 100% line and branch coverage of previously untested
net_buf_linearize() function.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-26 11:01:49 -05:00
Maxwell Weru
4e4646bcef doc: clarify commit email requirements in contribution guidelines
Updated the contribution guidelines to specify that pseudo or anonymized
emails (e.g., GitHub noreply addresses) are not allowed for commits.

Signed-off-by: Maxwell Weru <mburumaxwell@gmail.com>
2025-06-26 11:00:59 -05:00
Robert Lubos
2b1b509d9c tests: net: lwm2m: interop: Add custom tests for observe atributes
Add custom interoperability tests verifying that numerical observe
attributes work as expected.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-06-26 11:00:42 -05:00
Robert Lubos
8aa842c2c4 net: lwm2m: Prevent busy looping when active notify is set
In case a new notification is triggered while the previous one is still
active (i.e. not acknowledged), the LwM2M engine will start busy
looping, as the new notification is still valid (and supposed to be sent
after the previous one is done), but it's not sent in the current
iteration. The busy looping might prevent the system from receiving the
acknowledgment for the previous one, resulting in unresponsive system.

Fix this, by delaying the new notification timestamp a bit in such case,
so that the new notification will be scheduled for later instead of
trying to send it again right away.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-06-26 11:00:42 -05:00
Robert Lubos
a9c30d73f8 net: lwm2m: Implement gt/lt/st attributes handling
While it was possible to specify Greater Than / Less Than / Step
observe attributes for a resource, they were not taken into
consideration when evaluating notification criteria. This commit adds
support for checking if the resource value meets the value criteria
specified by gt/lt/st attributes.

Note that gt/lt attributes are thresholds - notification should only
sent if the resource value crosses them.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-06-26 11:00:42 -05:00
Robert Lubos
1bfd2ab4fd net: lwm2m: Update value of resources in notification registry
Update the value stored in the notification registry whenever
notification is sent (for those resources that have gt/lt/st attributes
assigned).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-06-26 11:00:42 -05:00
Robert Lubos
1ee6943cb5 net: lwm2m: Implement notified value registry for gt/lt/st attributes
Greater than, Less than and Step attributes require to track the last
notified value of a resource/resource instance in order to be able to
apply the specific thershold/step rules that the attributes define.

Therefore, implement a simple registry of the last notified values. When
one of the gt/lt/st attributes is configured on a resource/resource
instance, a registry entry is allocated for respective resource.
Whenever a notification is sent (either as a reply to Observe message,
or proactively) the registry is updated for the notified resources.

The stored resource values have been unified as "double" variables, to
avoid implementation complexity of having to support different
integer/floating point resource types.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-06-26 11:00:42 -05:00
Robert Lubos
46aaf287da net: lwm2m: Do not apply gt/lt/st attributes to incompatible resources
gt/lt/st attributes can only be applied to numerical resources according
to LwM2M specification (and common sense), hence verify that when
attributes are assigned.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-06-26 11:00:42 -05:00
Alain Volmat
a8d269915d shields: st_b_cams_imx_mb1854: rename 22pins CSI into CSI
Following renaming of the raspberry csi connector nexus,
rename all places when csi 22pins is mentioned to only keep
csi instead.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-06-26 10:59:54 -05:00
Alain Volmat
5ff7fa77fe boards: stm32: stm32n6570_dk: rename 22pins CSI into CSI
Following renaming of the raspberry csi connector nexus,
rename all places when csi 22pins is mentioned to only keep
csi instead.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-06-26 10:59:54 -05:00
Alain Volmat
616c6ed21f dts: bindings: support 15-pin and 22-pin RaspberryPi CSI camera connector
Update the RaspberryPi CSI camera connector nexus gpio in order to only
expose the list of GPIO pins in order to support both 15-pin and 22-pin
connectors as well as 15-pin to 22-pin conversion cables.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-06-26 10:59:54 -05:00
Romain Jayles
684b90e6b3 bluetooth: stm32wbax: add temperature calibration of linklayer
This patch allows to link the request of the linklayer for a
temperature calibration to the temperature driver.
The linklayer will then adapt and trigger its calibration related to
the current temperature.

Signed-off-by: Romain Jayles <romain.jayles@st.com>
2025-06-26 10:59:31 -05:00
Romain Jayles
94b82655fa drivers: bluetooth: dedicated Kconfig for the STM32WBA configuration
Adds a Kconfig for the STM32WBA associated BT configuration

The first configuration added is the possibility to activate the
calibration of the radio using the temperature

Signed-off-by: Romain Jayles <romain.jayles@st.com>
2025-06-26 10:59:31 -05:00
Romain Jayles
dd79c81876 west.yml: references hal_stm32 pull request for temperature calibration
Add the pull request reference #283 of hal_stm32 related to temperature
calibration activation

Signed-off-by: Romain Jayles <romain.jayles@st.com>
2025-06-26 10:59:31 -05:00
Marco Widmer
07b4f30b2d pytest twister harness: increase timeout when stopping subprocess
When running pytest tests with coverage enabled, the test process starts
to write the coverage data when it receives the SIGTERM signal. On slow
machines, this can take longer than 0.5s. Increase the timeout and only
attempt to kill the process if it is still running after the timeout.

Signed-off-by: Marco Widmer <marco.widmer@bytesatwork.ch>
2025-06-26 10:59:12 -05:00
Sai Santhosh Malae
957ef08cc2 tests: counter: siwx91x: counter_basic_api test support
1. Add counter tag in siwx91x board yaml files
2. Enable sysrtc node for siwx917_rb4342a through overlay

Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
2025-06-26 10:58:34 -05:00
Sai Santhosh Malae
b914c7f1a1 tests: dma: siwx91x: loop_transfer test support
Add siwx917_rb4338a and siwx917_rb4342a overlays
for loop_transfer test

Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
2025-06-26 10:58:34 -05:00
Sai Santhosh Malae
ff8a8a2d25 tests: dma: siwx91x: update scatter gather testcase.yaml
Include siwx917_rb4338a board

Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
2025-06-26 10:58:34 -05:00
Sai Santhosh Malae
3be571dd1d tests: dma: siwx91x: scatter_gather test support
Add scatter gather test support for siwx917_rb4342a

Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
2025-06-26 10:58:34 -05:00
Sayooj K Karun
41adc8a61a include: zephyr: sys: Refactor MIN_HEAP_DEFINE macro
Remove calling of `min_heap_init()` from MIN_HEAP_DEFINE

Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
2025-06-26 11:58:05 -04:00
Sayooj K Karun
ff657071ce include: zephyr: sys: Assert in min_heap_get_element
Assert in `min_heap_get_element()` if heap is NULL

Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
2025-06-26 11:58:05 -04:00
Sayooj K Karun
e719ba239f include: zephyr: sys: simplify MIN_HEAP_FOREACH macro
Refactor the `MIN_HEAP_FOREACH` macro to use a cleaner
for-loop style removing the need for a third `body` argument.
Update the sample application with the new macro changes.

Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
2025-06-26 11:58:05 -04:00
Sayooj K Karun
964a832702 lib: min_heap: Refactor heapify_up/down functions
Remove using `swap()` which was using VLA and replace it
with `byteswp()`.
Reduce the scope of local variables in `heapify_up/down` to
the smallest necessary block.
Replace `while(true)` loop in `heapify_down()` with a bounded `for`
loop.

Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
2025-06-26 11:58:05 -04:00
Dave Joseph
cabf2c4d1d tests: power: tisci: TISCI power domains test
Test for power domains driver based on TISCI API added. This test is
for the target am243x_evm/am2434/r5f0_0.

Signed-off-by: Dave Joseph <d-joseph@ti.com>
2025-06-26 10:57:45 -05:00
Dave Joseph
cdea43c7c3 dts: arm: ti: PD support for AM243x EVM in DT
Adds power domain config for AM243x EVM to the device tree.

Signed-off-by: Dave Joseph <d-joseph@ti.com>
2025-06-26 10:57:45 -05:00
Dave Joseph
76905a8e54 drivers: power_domain: Power domain TISCI driver support
Support added for power domain regulation using TISCI added for
devices using the binding ti,sci-pm-domain.
This driver relies on the TISCI layer to make calls to the
device manager core to perform power management.

Signed-off-by: Dave Joseph <d-joseph@ti.com>
2025-06-26 10:57:45 -05:00
Rafał Kuźnia
558f26eaf9 modules: hal_nordic: nrf_802154: set clock startup latency
The clock startup latency is now obtained from the clock driver and the
nrf-802154 is now set to a value that matches hardware capabilities.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2025-06-26 10:57:12 -05:00
Rafał Kuźnia
d0a076984b boards: nordic: nRF54L15DK: set HFXO clock latency to 854
The HFXO used on nRF54L15 DK has the typical startup latency of 854us.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2025-06-26 10:57:12 -05:00
Rafał Kuźnia
0eb182a120 modules: hal_nordic: nrf_802154: CCA threshold config in dBm
The nrf-802154 component of hal_nordic is updated.
The CCA threshold configuration is now done in dBm units, instead of
hardware-dependent scale.
Fixed a bug, where the CONFIG_NRF_802154_CCA_ED_THRESHOLD units were
different from the NRF_802154_CCA_ED_THRESHOLD units. Now all
configuration is done in dBm.

Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
2025-06-26 10:57:12 -05:00
Jeppe Odgaard
dffbd4fc88 license: fix copyright owner
Change license owner to Prevas due to initially wrong owner due to company
mix-up during co-development.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2025-06-26 10:56:48 -05:00
Ryan McClelland
d0d9894070 drivers: sensor: bmm350: expose magnetic reset
This exposes a driver specific function to perform a
magentic reset by the application.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-06-26 10:55:54 -05:00
Ryan McClelland
8cdaf1db99 drivers: sensor: bmm350: run clang-format
Run clang-format on files

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-06-26 10:55:54 -05:00
Ryan McClelland
dc6594997c drivers: sensor: bmm350: nit picky cleanup
There were a lot of places where the return value was sum'ed up
which can be slightly easier to read, but can give an odd return
value in the end. This changes it to just return immediately if
an error is seen.

There was also runtime NULL checking of input arguments that are
rather programmer clown prevention. Change these to asserts.

The return value didn't have a consistant type through the file,
make it consistently an int.

This changes the name of the return value of fix_sign to be
signed_value differenating it from the ret name used elsewhere.

Use the sizeof(buffer) as the argument for reg reads and writes
rather than a hard number.

Some log messages ended with '\n'. Remove all these.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-06-26 10:55:54 -05:00
Ryan McClelland
e636fb2dd1 drivers: sensor: bmm350: add pad ctrl and int ctrl dts config
Add configurations for setting the pad drive strength and the
interrupt active high/low and od/pp.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-06-26 10:55:54 -05:00
Ryan McClelland
d2fdf52d43 drivers: sensor: bmm350: fix handling interrupt race condition
There is a race condition where an interrupt can fire before the
drdy_handler is registered. The drdy_handler will tradionaly
callback the sample get clearing the interrupt... but if it's not
configured and NULL, the interrupt will stay forever latched. Read
the interrupt status to clear the interrupt flag allowing it to
trigger again.

Also, move the serial api function helpers in to the header
allowing them to be used from other c files.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-06-26 10:55:54 -05:00
Ryan McClelland
c7e1f0b3da drivers: sensor: bmm350: fix no averaging val for oversampling
Fix the oversampling value to be 1 from 0 for no oversampling to be
consistant with other sensor drivers.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-06-26 10:55:54 -05:00
Ryan McClelland
b1dac48faa drivers: sensor: bmm350: add default odr/osr
Add a way to define the default odr and osr with devicetree for
the bmm350.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-06-26 10:55:54 -05:00
Ryan McClelland
8720b2368e drivers: sensor: bmm350: add attr_get
Add the attr_get api. Also rename functions where they implied
accelerometer to imply magnetometer.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-06-26 10:55:54 -05:00
Miguel Gazquez
68795fc021 boards: arduino_nano_33_ble: add lsm9ds1 magnetometer sensor to device tree
Describe the magnetometer part of the lsm9ds1 sensor, available in the
Arduino Nano 33 BLE through I2C.

Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
2025-06-26 10:55:11 -05:00
Miguel Gazquez
d3cae7ee92 drivers: sensors: add driver for the magnetometer in lsm9ds1
This driver supports the magnetometer in the ST lsm9ds1 sensor, on the
I2C bus.
This driver does not support the triggers.
This driver use the stmemsc HAL.

link: https://www.st.com/resource/en/datasheet/lsm9ds1.pdf

Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
2025-06-26 10:55:11 -05:00
Miguel Gazquez
8362e603bb dts: bindings: add DT bindings for the lsm9ds1 magnetometer
This commit adds a description for the magnetometer part of the lsm9ds1
sensor.

Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
2025-06-26 10:55:11 -05:00
David Jewsbury
0285cf4235 drivers: clock_control: update nrf2 lfosc_get_accuracy
Move lfosc_get_accuracy away from common library as
not all devices need this function.

Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
2025-06-26 14:13:54 +02:00
David Jewsbury
bd5aefb58b tests: drivers: Update nrf2 clock control tests for nrf2_auxpll driver
Test added for new nrf2_auxpll driver. Frequency checks are
against known usecases of the auxpll (USB, CAN and AUDIO).
Also update test to be more modular, only running certain tests
if in the devicetree.

Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
2025-06-26 14:13:54 +02:00
David Jewsbury
9087e82c9f drivers: can: update clock control to use nrf2_auxpll
Auxpll driver has been refactored to use nrf2 API instead.

Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
2025-06-26 14:13:54 +02:00
David Jewsbury
49b0f1abb8 drivers: clock_control: refactor nrf_auxpll driver to nrf2
Refactor of previous clock_control_nrf_auxpll.c to use
the nrf2 clock control API

Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
2025-06-26 14:13:54 +02:00
David Jewsbury
b4a9b8e3de dts: vendor: nordic: nrf54h20 update canpll to use auxpll binding
Added new binding for macros of possible auxpll frequency settings.

Will be used in future products also.

Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
2025-06-26 14:13:54 +02:00
David Jewsbury
8b5ff6ab36 dts: bindings: clock: add nordic,nrf-auxpll
Introduce Nordic NRF AUXPLL binding include.

Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
2025-06-26 14:13:54 +02:00
Jérôme Pouiller
18d16eb3bf boards: silabs: siwx91x: Fix PM with rb4342
Currently twister complains:

    benchmark.kernel.footprints.pm on siwx917_rb4342a/siwg917m111mgtba
    error (CMake build failure - warning: SILABS_SLEEPTIMER_TIMER (defined
    at soc/silabs/silabs_s2/Kconfig.defconfig:17,
    drivers/timer/Kconfig.silabs:4) has direct dependencies
    (SOC_FAMILY_SILABS_S2 || SOC_FAMILY_SILABS_SIWX91X) &&
    DT_HAS_SILABS_GECKO_STIMER_ENABLED && SYS_CLOCK_EXISTS with value n,
    but is currently being y-selected by the following symbols:)

So, SILABS_SLEEPTIMER_TIMER can't be selected because
DT_HAS_SILABS_GECKO_STIMER_ENABLED is not selected.

We just have to enable the proper timer in the DT of rb4342s to fix the
issue.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-06-26 14:09:25 +02:00
Jérôme Pouiller
3fe7c5706a manifest: Update reference for hal_silabs
The test benchmark.kernel.footprints.pm currently generate these warnings
during the link:

    [204/209] Linking C executable zephyr/zephyr_pre0.elf
    .../ld.bfd: warning: orphan section `.udma_addr1' from \
        `zephyr/libzephyr.a(UDMA.c.obj)' being placed in   \
        section `.udma_addr1'
    [209/209] Linking C executable zephyr/zephyr.elf
    .../ld.bfd: warning: orphan section `.udma_addr1' from \
        `zephyr/libzephyr.a(UDMA.c.obj)' being placed in   \
        section `.udma_addr1'

Last version of hal_silabs provide a workaround for this issue.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-06-26 14:09:25 +02:00
Aleksandr Khromykh
b6a0f4e072 bluetooth: mesh: remove unused functionality
Commit removes unused host hci custom functionality
that was moved to mesh by misinterpretation of it.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2025-06-26 14:09:01 +02:00