Commit graph

136,983 commits

Author SHA1 Message Date
Zhaoxiang Jin
2e54a3915b tests: counter_basic_api: harden alarm capability probing
- Add a self-contained alarm_capable() probe that starts the device, sets
  and cancels a 1-tick alarm, and stops the counter again. This treats
  -ENOTSUP as “not capable” and avoids leaving pending alarms.
- Switch single/multiple alarm capability checks to reuse alarm_capable(),
  preventing unsupported drivers from running alarm cases and reducing
  false failures.
- Ensure capability probing no longer leaves the driver running or with
  active alarms, preventing teardown/set_top_value failures in later tests.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2025-12-15 07:29:41 -05:00
Valerio Setti
d76477f9eb drivers: crypto: mbedtls_shim: fix crash in AES-ECB for RISCV 64 bits
Using "pkt->out_len" as the output length of "psa_cipher_[en|de]crypt"
caused a crash in RISCV 64 bits platforms due to misaligned address
access.
The solution is to add a temporary value on the stack to store this lenght
and only after the [en|de]cryption copy it to "pkt->out_len".

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2025-12-15 07:29:29 -05:00
Valerio Setti
75b48db718 samples: drivers: crypto: fix regex matching for Mbed TLS shim
Update regex matching for the Mbed TLS shim driver scenario in order to
match all the supported cases and ensure that they all passed.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2025-12-15 07:29:29 -05:00
Valerio Setti
ea9c1af07d samples: drivers: crypto: fix heap memory size for Mbed TLS shim
Increase heap memory size when Mbed TLS shim driver is used otherwise
all crypto tests will fail on some platforms.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2025-12-15 07:29:29 -05:00
Fabio Baltieri
318e43503f drivers: ksz8081: fix reset pin polarity
The reset pin, like most reset pins, is active low. Fix the driver to
treat it as active low and simplify the pin control logic while at it.
Fix all current boards using the wrong pin definition and add a note for
out of tree users.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-12-15 07:29:21 -05:00
Fabrice DJIATSA
683ea0eaf0 tests: drivers: spi: spi_loopback: add support for nucleo_g071rb
add nucleo_g071rb overlay and conf files to configure board
to execute spi_loopback to set up the board for executing the
spi_loopback test on CI.
With this addition, we will now be able to detect SPI and RTIO
regressions on this board.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2025-12-15 07:29:11 -05:00
Zhaoxiang Jin
93ec5c8c1d test: comparator: Enable gpio_loopback for NXP ACOMP driver
Enable gpio_loopback test for NXP ACOMP driver.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2025-12-15 07:29:01 -05:00
Zhaoxiang Jin
315e4efa2d test: comparator/gpio_loopback: handle unsupported BOTH trigger mode
If the comparator driver does not support BOTH edge trigger mode,
skip the test instead of failing it.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2025-12-15 07:29:01 -05:00
Zhaoxiang Jin
864272d892 boards: nxp/frdm_rw612: Enable NXP ACOMP for frdm_rw612
Enable NXP ACOMP for frdm_rw612

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2025-12-15 07:29:01 -05:00
Zhaoxiang Jin
bd65e115fa drivers: comparator: add NXP ACOMP driver support
Add NXP ACOMP comparator driver support.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2025-12-15 07:29:01 -05:00
Zhaoxiang Jin
c65ffc7737 soc: nxp: rw: Power on GAU if acomp is enabled
Power on GAU if acomp is enabled.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2025-12-15 07:29:01 -05:00
Farsin Nasar V A
b682749a62 tests: drivers: rtc: Add support for the pic32cx_sg41 and sg61 board
Added pic32cx_sg41_cult.conf file and pic32cx_sg61_cult.conf file

Signed-off-by: Farsin Nasar V A <farsin.nasarva@microchip.com>
2025-12-15 07:28:50 -05:00
Farsin Nasar V A
12192e9d34 boards: microchip: pic32cx_sg61_cult: Add RTC to supported list
Add RTC node in pic32cx_sg61_cult.dts
Update pic32cx_sg61_cult.yaml to reflect RTC G1 support on the board.

Signed-off-by: Farsin Nasar V A <farsin.nasarva@microchip.com>
2025-12-15 07:28:50 -05:00
Farsin Nasar V A
58a9c9335c boards: microchip: pic32cx_sg41_cult: Add RTC to supported list
Add RTC node in pic32cx_sg41_cult.dts
Update pic32cx_sg41_cult.yaml to reflect RTC G1 support on the board.

Signed-off-by: Farsin Nasar V A <farsin.nasarva@microchip.com>
2025-12-15 07:28:50 -05:00
Farsin Nasar V A
1e510faed4 dts: arm: microchip: add RTC node for G1 IP
Add the device tree node for microchip RTC G1 IP.

Signed-off-by: Farsin Nasar V A <farsin.nasarva@microchip.com>
2025-12-15 07:28:50 -05:00
Muzaffar Ahmed
dbe12ad8de drivers: wifi: siwx91x: Fix region persistence across reboots
Use the last configured region in the boot config for the next boot,
as opposed to a default region.

Signed-off-by: Muzaffar Ahmed <muzaffar.ahmed@silabs.com>
2025-12-15 07:28:17 -05:00
Martin Lampacher
a0b8684e46 boards: doc: remove tfm note for stm32u0 boards
The STM32U0 series MCUs don't support TF-M and therefore the
note regarding the `build/tfm` directory needs to be removed.

Signed-off-by: Martin Lampacher <martin.lampacher@gmail.com>
2025-12-15 07:28:07 -05:00
Michael Zimmermann
4759e39122 net: mqtt_sn: Disable support for GWINFO messages
The MQTT-SN v1.2 [0] specification specified the GwAddr as follows:
The GwAdd field has a variable length and contains the address of a GW. Its
depends on the network over which MQTT-SN operates and is indicated in the
first octet of this field. For example, in a ZigBee network the network
address is 2-octet long.

It specifies neither the possible values for the first octet, nor the
format of the network-specific address that follows. Thus, the
specification is incomplete and this functionality unusable.

I also wasn't able to find any implementation which implements a gwinfo
message where the address length is not zero. This includes
https://github.com/eclipse-paho/paho.mqtt-sn.embedded-c .

The current implementation in Zephyr simply copies a `struct sockaddr`
into GwAddr. This is a bad idea for many reasons, the most important one
being that the format is not even specified by POSIX [1]. They only say,
which defines must exist, not what their values are. And in fact, these
even differ between Zephyr and Linux.

Thus, I think it's best to remove the implementation to prevent people from
using this, which may even lead to memory safety issues, depending on the
length of CONFIG_MQTT_SN_LIB_MAX_ADDR_SIZE. If we were to receive an
updated specification, all we'd have to do is to convert between `struct
sockaddr` and mqtt-sn addresses both ways.

[0] https://groups.oasis-open.org/higherlogic/ws/public/download/66091/MQTT-SN_spec_v1.2.pdf
[1] https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_socket.h.html

Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
2025-12-15 07:27:57 -05:00
Michael Zimmermann
53012f9cc2 tests: net: mqtt_sn: client: Test gwinfo response from a gateway itself.
When the response comes from a gateway, the address length is 0. I renamed
the test which tests a gwinfo from another client to make this more clear.

Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
2025-12-15 07:27:57 -05:00
Michael Zimmermann
2d8cb5dad9 tests: net: mqtt_sn: client: fix running just search_gw
Since the code can't handle timestamp 0, we have to sleep during setup.

Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
2025-12-15 07:27:57 -05:00
Holt Sun
7214e39540 boards: nxp: frdm_mcxe247: enable CRC
Enable the CRC peripheral for MCXE24x and turn it on in the
FRDM-MCXE247 board DTS. Add a CRC sample board config to run
on FRDM-MCXE247 with default.

Signed-off-by: Holt Sun <holt.sun@nxp.com>
2025-12-15 07:27:48 -05:00
Holt Sun
45e9fe3eb2 drivers: crc: nxp: add CRC driver
Support CRC16 and CRC32 variants; return -ENOTSUP for unsupported types.
Use kCrcBits16/kCrcBits32 and complementChecksum for IEEE CRC-32.
Stream data via CRC_WriteData() and fetch results via
CRC_Get16bitResult()/CRC_Get32bitResult().
Provide simple thread-safety with a semaphore.

Work around the name clash between Zephyr's typedef crc_result_t and the
MCUX enum name by temporarily redefining crc_result_t around fsl_crc.h
include in this TU.

Signed-off-by: Holt Sun <holt.sun@nxp.com>
2025-12-15 07:27:48 -05:00
Holt Sun
6e6cc2270d dts: bindings: crc: add NXP CRC binding
Add devicetree binding for the NXP CRC controller
(compatible "nxp,crc") with required reg property.

Signed-off-by: Holt Sun <holt.sun@nxp.com>
2025-12-15 07:27:48 -05:00
Holt Sun
a838ad5ece modules: hal_nxp: mcux: enable CRC driver component
Enable mcux crc driver for zephyr crc driver.

Signed-off-by: Holt Sun <holt.sun@nxp.com>
2025-12-15 07:27:48 -05:00
Holt Sun
dd73fce1ce tests: drivers: crc: add conditional test compilation
Make CRC tests conditional based on driver capabilities to support
drivers that implement only a subset of CRC protocols.

Signed-off-by: Holt Sun <holt.sun@nxp.com>
2025-12-15 07:27:48 -05:00
Holt Sun
b44fe22e98 samples: drivers: crc: select protocol by capability
Choose CRC protocol in the sample at build time using
CONFIG_CRC_DRIVER_HAS_* guards (CRC8, CRC16-CCITT, CRC32-IEEE, CRC32-C).
Allow optional verification via EXPECTED_* macros; otherwise log result.
Update README to describe selection and add build instructions for
frdm_mcxe247 in addition to ek_ra8m1.

Signed-off-by: Holt Sun <holt.sun@nxp.com>
2025-12-15 07:27:48 -05:00
Håvard Reierstad
1540814488 Bluetooth: Host: Add random number clarification
Updates the `bt_le_oob_set_legacy_tk` API docs to encourage the temp key
to be generated randomly for each pairing process.

Updates the `bt_le_oob_get_local` and `bt_le_ext_adv_oob_get_local` to
encourage the user to generate new OOB information for each paring
process.

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2025-12-15 07:27:19 -05:00
Sylvio Alves
b7b32944fc drivers: espressif: move ISRs into IRAM area
Most of Espressif drivers ISRs are already running in IRAM area, except
those in this PR. Move ISRs accordingly so we avoid any
interrupt miss when cache is disabled.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-12-15 07:27:10 -05:00
Benjamin Cabé
cb93f97bd6 boards: m5stack: add full_name for NanoC6 board
Add full_name field to the m5stack_nanoc6 board definition

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-12-14 11:14:57 +00:00
Bjarki Arge Andreasen
66dbe436bd lib: os: poweroff: Disable ZLIs before poweroff
We currently only disable "normal" IRQs with irq_lock(). This is not
sufficient if ZLIs are enabled, as even though they are supposed to
be "above" the kernel, they must not interrupt the poweroff procedure.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-12-14 11:14:45 +00:00
Bjarki Arge Andreasen
7c72e3cc42 lib: os: reboot: Disable ZLIs before reboot
We currently only disable "normal" IRQs with irq_lock(). This is not
sufficient if ZLIs are enabled, as even though they are supposed to
be "above" the kernel, they must not interrupt the reboot procedure.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-12-14 11:14:45 +00:00
Bjarki Arge Andreasen
239d20af90 arch: arm: implement arch_zli_lock and arch_zli_unlock
Implement arch_zli_lock and arch_zli_unlock for the currently only
supported target cortex-M.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-12-14 11:14:45 +00:00
Bjarki Arge Andreasen
1bbbedc956 arch: introduce arch_zli_lock and arch_zli_unlock
Introduce APIs for locking zero latency interrupts.

Zero latency interrupts are defined as non-maskable interrupts
"above" the kernel. They can not be locked by the kernel.

However, there are cases where we do need to mask/lock ZLIs from the
kernel, namely when accessing and changing the state of core shared
hardware like RAM and the CPU which must be done atomically.

A common case is when powering down or rebooting the SoC. We can't
allow any IRQ, ZLI or not, to interrupt these operations. In any case,
such an interrupt would be immediately followed by the CPU being off,
and whatever process running from ZLIs would be terminated anyway.

Since we have specific usecases which require these APIs, and there
are already drivers and socs which do lock ZLIs by directly calling
arch APIs to acheive this, let's officially add the APIs with
appropriate documentation detailing expected usecases and warning of
the dire consequences of misusing it, keeping it in arch/cpu.h to
limit exposure of the API (compared to having it in zephyr/irq.h).

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-12-14 11:14:45 +00:00
Jason Yu
5ce1df22fa drivers: counter: nxp_mrt: Support power device constraint
Call pm_policy_device_power_lock_put/pm_policy_device_power_lock_get
to coordinate with system level power modes.

Signed-off-by: Jason Yu <zejiang.yu@nxp.com>
2025-12-14 11:14:35 +00:00
Kyle Bonnici
bbff45f1c4 DTS: format files using dts-linter 0.3.7-hotfix2
- Ensure that properties have 2 new lines when node is above it.
- Enures that 1 new line is required between a node and #if/#ifdef...
- Enures that 2 new line are required between #endif and node.
- Wraps property values that exceed 100 characters in length.

Signed-off-by: Kyle Bonnici <kylebonnici@hotmail.com>
2025-12-12 15:38:31 -05:00
Kyle Bonnici
d726022f83 CI: Update dts-linter to 0.3.7-hotfix2
dts-linter 0.3.7-hotfix2 Security Updates:
- Update `glob` to address CVE-2025-64756
- Update `js-yaml` to address CVE-2025-64718

Formatting updates:
- Ensure that properties have 2 new lines when node is above it.
- Enures that 1 new line is required between a node and #if/#ifdef...
- Enures that 2 new line are required between #endif and node.
- Wraps property values that exceed 100 characters in length.

Signed-off-by: Kyle Bonnici <kylebonnici@hotmail.com>
2025-12-12 15:38:31 -05:00
Jukka Rissanen
869cfb8fd6 samples: net: pkt_filter: Disabling packet priorities by default
The packet priority support is disabled by default so that the
application can work "normally" as a sample for trying network
packet filtering.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-12-12 15:38:18 -05:00
Jukka Rissanen
47941a6f58 samples: net: pkt_filter: Add IPv4/6 address blocklist
Add information how to block IPv4 or IPv6 addresses.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-12-12 15:38:18 -05:00
Jukka Rissanen
9dd57b3405 samples: net: pkt_filter: Fix the readme file
The readme file did not mention the network packet priority
based rules 1-5 introduced recently.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-12-12 15:38:18 -05:00
Jukka Rissanen
7c62cd32cb net: pkt_filter: Reformat macro lines
Shorten long lines with \ chars in NPF_PRIORITY macro so that the output
looks good if user is using narrower window to view the code.
Reformat \ in NPF_RULE macro so that the code looks better.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-12-12 15:38:18 -05:00
Jukka Rissanen
2f3e902cd0 net: Start RX before the TX
Honor the comment in the code and make sure RX is started
before TX so that we can receive responses to any data we
are sending.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-12-12 15:38:18 -05:00
Aksel Skauge Mellbye
3ac0e760e6 boards: silabs: sltb010a: Enable watchdog for testing
Declare watchdog as supported for testing.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-12-12 15:37:28 -05:00
Aksel Skauge Mellbye
9a17f66b77 boards: silabs: xg24_ek2703a: Enable analog peripherals
Configure ADC and DAC to use the Analog pin on the Mikrobus
connector as input/output to enable ADC and DAC samples.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-12-12 15:37:28 -05:00
Aksel Skauge Mellbye
01e19e96c9 boards: silabs: List ADC as supported for testing
Add ADC to supported list for testing on boards that have a
zephyr,user io-channels property.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-12-12 15:37:28 -05:00
Aksel Skauge Mellbye
5be58ab543 boards: silabs: Add pwm-leds configuration
Add PWM configuration on boards that have LEDs, but were
missing a definition of pwm-leds.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-12-12 15:37:28 -05:00
Aksel Skauge Mellbye
44627801a3 boards: silabs: Enable PWM on boards with PWM configuration
xg24_dk2601b and bg22_ek4108a has PWM configuration in Devicetree,
but didn't enable PWM for testing. xg24_dk2601b has RGB LEDs,
add aliases to enable the rgb_led sample.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-12-12 15:37:28 -05:00
Aksel Skauge Mellbye
94212fb665 samples: driver: counter: Fix silabs timer name
The Counter alarm sample contains a hard-coded list of devicetree
nodes to use. Since the definition of the counter node was changed
on Series 2 devices in #97912, this sample hasn't compiled.

Update the sample to select the correct devicetree node, and
add representative boards to platform_allow to allow the sample
to be tested on Series 2 boards.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-12-12 15:37:19 -05:00
Aksel Skauge Mellbye
3b15324eac samples: drivers: uart: async_api: Add overlays for silabs boards
Add overlays enabling DMA for Silabs boards to enable use of the
async API on the default shell uart.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-12-12 15:36:58 -05:00
Camille BAUD
d8f67d777b tests: build_all: display: rename bflb dbi m62 overlay
Forgot to update the file name in PR changing naming

Signed-off-by: Camille BAUD <mail@massdriver.space>
2025-12-12 15:34:59 -05:00
Camille BAUD
0d4517a8ef tests: build_all: display: clear up logic
platform_exclude not necessary

Signed-off-by: Camille BAUD <mail@massdriver.space>
2025-12-12 15:34:59 -05:00