Commit graph

116182 commits

Author SHA1 Message Date
Matthieu Speder
66d90e7782 soc: nxp_kinetis: Mark __kinetis_flash_config with __used attribute
This is a fix for issue #90426 .
Marking __kinetis_flash_config  with __used attribute prevents
unwanted deletion when compiling with LTO.

Signed-off-by: Matthieu Speder <mspeder@users.sourceforge.net>
2025-05-31 03:37:20 +02:00
Declan Snyder
481711e5a6 tests: spi_loopback: Fix fail handle of thread test
Right now the thread test case does not handle when the test fails, the
test will be aborted by ztest in one of the spawned threads, and cause
desynchronization which messes up the rest of the test. Fix by
synchronizing in the case of fails and return fail from main test thread
instead of the spawned ones.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-05-31 03:36:33 +02:00
Declan Snyder
c10c13b961 tests: spi_loopback: Handle overflow of print latency
The test that checks latency also prints a measurement of the latency
which is just a visual information for the test output. However, this
print uses a subtraction which can have an overflow in the case where
the kernel timer is behind, so just clamp to 0 in that case where there
is an overflow. This change does not affect the test pass/fail logic.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-05-31 03:36:33 +02:00
Andrej Butok
eb5014f7a3 soc: imxrt: add mimxrt1052/1062 flashing configuration
- Adds a flash runner configuration for mimxrt1052 and mimxrt1062,
  used for sysbuild multi-image projects, mainly for MCU-boot.
- Avoid unwanted multiple erases and resets.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2025-05-31 03:36:24 +02:00
Michal Kozikowski
df65918cfa drivers: spi: spi_context.h: remove multithreading dependency
Replace semaphores with proper atomic flags when used without
multithreading enabled.

Signed-off-by: Michal Kozikowski <michal.kozikowski@nordicsemi.no>
2025-05-31 03:36:14 +02:00
John Shelton
7af55237da driver: sensor: aosong,dht: fix sensor protocol broken since change #83192
A recent change 9eeb60c improperly removed a critical line in the driver.

This commit replaces that line and moves an irq_lock to above any pin

value manipulation since the timing is sensitive with the DHT protocol.

This should also fix the timing issue 9eeb60c attempted to fix.

Signed-off-by: John Shelton <moosery@gmail.com>
2025-05-31 03:35:47 +02:00
Benjamin Cabé
1fb86e1470 doc: release: update/consolidate LTS information
Update documentation with new LTS lifecycle information following TSC
decision to extend LTS support to 5 years.
Also removed some duplicate information.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-05-31 03:35:36 +02:00
David Brown
36e0b3dea7 modules: optional: rust: Update to latest development
Bring in the following changes to the Rust module, updating since rev 4.1.

1cab77b436b dts.pest: Add support for comments in devicetree source files
e53f6de1c06 fix(cmake): Evaluate generator expressions in sample cargo...
e64cadb3c9e zephyr: thread: Add 'join_timeout' to RunningThread
a683eb8a3b5 zephyr: Replace critical-section implementation
26cd3bc0c8a zephyr-sys: Export irq_lock/unlock
901edef9bc8 zephyr: Specify minimum rust version
0de6f6c390d zephyr-build: Simplify dt-yaml syntax
edcef3ba39c zephyr: Remove stale doc references to futures
4096ad7c803 cmake: Fix dependency problem
5557cb3fc35 zephyr: object: Fix bad doc link
d921320cc7d zephyr: devicetree: Allow non-snake-case names in DT nodes
14618bd02f7 zephyr: sys: sync: Semaphore: Remove incorrect ALLOC check
47e270d5ac5 zephyr: sync: Conditionalize PinWeak on alloc
f8b228fe71c samples: bench: Increase thread stack size on 64-bit platforms
ec50a4317b9 zephyr: sync: Create PinWeak type
2e5059a209d samples: async-philosophers: Remove overly specific imports
a0061313850 samples: async-philosophers: Convert to general async
5c15fbb9d20 zephyr: Remove work-queue executor
f107c93dce6 samples: rename work-philosophers to async-philosophers
ed8d08bc890 samples: bench: Replace old async with new
087e584eae9 zephyr-macros: Incorporate fn name into thread name
72ed3818192 samples: philosophers: Migrate to new task declaration
44b2dd28073 zephyr: Add proc macro for thread declaration
8952b444b3a CI: Force python version 3.12
e3518de6d07 cmake: add USES_TERMINAL to show cargo output
b7dacdac984 zephyr: embassy: Use a semaphore for the executor
a871c7f588c Add support for board native_sim/native/64
349164d630a samples: blinky: Remove incorrect integration platform
b0866632d42 samples/tests: Ensure test/sample names are unique
7395ae4f486 zephyr-build: fix DTS parser for Windows
a341bc50041 samples: philosophers: Migrate Mutex to const constructor
5000f459f26 samples: bench: Clean up formatting
6020ab7db36 zephyr: Run rustfmt
c1d74e1d5df samples: bench: Make Semaphores static
37754d29e0b samples: bench: Reduce benchmark iterations
11067823e53 samples: bench: Remove the 'basesem' prototype
3a4f08ba1ea zepyr: sys: sync: Mutex/Condvar
64605eb89cf samples: bench: fix for API change
8d7ca493801 zephyr: Convert `Queue` to new atomic initializer up
3a0016dace2 zephyr: sys: sync: Make Semaphore constructors `const`
5ceccc155c2 zephyr: object: Implement new ZephyrObject wrapper
2790674bb7f docgen: Enable async features for doc generation
1b475b7a9a8 tests: drivers: gpio-async: Test the async gpio operations
0347eac6882 zephyr: Add async 'wait_for_high' and 'wait_for_low' to gpio
b60408c54ef zephyr: device: Add a possible static element with each device
28f7ec6b515 zephyr: device: gpio: Add a few more methods
bcc9ee433bd zephyr: embassy: Add Default implementation
a458d8e33eb zephyr: embassy: Eliminate unused printkln import
dea64363115 samples: embassy: Detect proper end to the test
04d9e5714e6 samples: embassy: Increase task pool size
eae89bc4d2b samples: embassy: Fix test name
758a2c264c7 samples: embassy: Update formatting
ac0eaac9d8b zephyr: Update rustfmt
db93ee7978e samples: embassy: Update Embassy Demo for Zephyr executor
a9958395985 zephyr: Implement `executor-zephyr` to use with Embassy
60d7c5396ac samples: embassy: Start of an embassy demo
1540e9ab785 zephyr: Add initial support for embassy
1503a982e00 docs: Update top-level index
c58d1f20024 zephyr: Expand top-level crate docs

Signed-off-by: David Brown <david.brown@linaro.org>
2025-05-30 19:40:57 +02:00
Grzegorz Chwierut
c6a41a47d9 tests: boot: Update imgtool path in west_sign_wrapper
Fixes tests/boot/with_mcumgr in case, when imgtool is
not installed. Added imgtool path to west sign wrapper.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2025-05-30 19:40:44 +02:00
Dipak Shetty
f5d1803eca tests: drivers: build_all: stepper: add uart configuration for tmc51xx
Now added a node to test builds with tmc51xx on uart.

Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
2025-05-30 19:40:34 +02:00
Dipak Shetty
358907b25f drivers: stepper: adi_tmc: tmc51xx uart support
Added support for tmc51xx uart support alongside the
existing spi support. The tmc51xx driver is now consolidated
into a dedicated folder.

Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
2025-05-30 19:40:34 +02:00
Dipak Shetty
a66d064dc4 drivers: stepper: adi_tmc: extend rampstat mask range
Now added pos_reached_mask for polling rampstat when
position reached event is not supported, for example,
with uart drivers. Consequently, when the position is
reached, the position is reached, and the event flag is
set active. Hence, an additional value is now introduced.

Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
2025-05-30 19:40:34 +02:00
Dipak Shetty
b914537603 drivers: stepper: adi_tmc: extend to support uart
Add support for trinamic controller with single wire UART

Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
2025-05-30 19:40:34 +02:00
Dipak Shetty
6cc860d892 drivers: stepper: adi_tmc: bus: abstraction layer for bus
Now a bus abstraction for Trinamic stepper drivers with
unified interface for SPI/UART communication. Separates
transport logic from device-specific functionality.

Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
2025-05-30 19:40:34 +02:00
Dipak Shetty
bceeb766fc dts: bindings: stepper: adi: tmc51xx uart support
Now adds support to tmc51xx via uart. The base yaml supports
the common properties, and uart and spi bindings are
configuration-specific.

Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
2025-05-30 19:40:34 +02:00
Luis Ubieda
94a7f028ef ubx: Refactor codebase in order to improve usability
During testing and code inspection, there were various anti-patterns
on this (and U-Blox driver) codebase(s), including obfuscation, and
lack of data validation. This made it increasingly difficult to
introduce further variants of u-blox GNSS modems.

With this patch, both the UBX modem and the M8 driver have been
refactored to ease the reliability and maintainability of these
codebases. Here are some highlights:

WRT UBX modem:
- Helper macros to easily create UBX frames, (including checksum
calculation), at compile time; thus, making it easier to extend UBX
commands.
- Logic validation by the inclusion of the modem_ubx testsuite, used to
refactor the code through TDD.
- Ability to receive unsolicited messages, in order to enable U-Blox
drivers to rely on modem_ubx to transceive all commands, and avoid
hopping between modem_ubx and modem_chat.

WRT M8 driver:
- Remove GNSS specific protocol header files. Instead, unify them under
modem/ubx/protocol.h. Background: After a survey and looking at ubxlib
SDK I conclude the UBX protocol is by definition a GNSS protocol (there
are non-GNSS u-blox modems, but they're not interfaced through UBX
protocol).
- Establish pattern to create and send/receive commands using new
foundations on modem ubx.
- Remove dependency of Modem chat, and instead use UBX unsolicited
messages to get Navigation and Satellites data.
- Switch from the auto-baudrate detection pattern to a pattern of
transitioning between an initial known baudrate to a desired baudrate,
in order to improve initialization time.
- Add dts property to configure default fix-rate.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-05-30 19:40:19 +02:00
Declan Snyder
f1df21278c soc: rw: Enable flexcomm wakeup/sleep clocking
Following the new feature in the flexcomm driver to be able to wake up
from low power mode, the clock control drivers have to handle the
platform specific details, so this commit adds to the already ugly mess
that is the LPC syscon driver which is used by RW currently and makes
the required devicetree changes.

Make the console/shell uart on the FRDM_RW612 take advantage of this by
default.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-05-30 19:40:11 +02:00
Declan Snyder
e5a35e6435 drivers: uart_mcux_flexcomm: Enable as wakeup src
Add the feature for the flexcomm uart to be able to be a wakeup source
from low power modes. To be able to do this on a relevant platform, the
DT node for the UART needs to have the wakeup-source property and define
a "sleep" clock. The details of handling the sleep clock and default
clock are still platform specific but handled by the clock control
driver of the platform, so that this code should be able to be
applicable to any platform that follows the same DT definition.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-05-30 19:40:11 +02:00
Declan Snyder
4598c18754 soc: rw: Switch main clock on PM2 to LPOSC
On RW, normal configuration has all clock generators gated in PM2.
Only the LPOSC is available for main clock source since it is a low
power clock.

Many of the peripherals on the chip are still "on" and do need a
main clock source in order to be effective as wakeup sources
to the chip as intended. So we should make this switch for PM2
specifically in order to achieve desired wakeup capabilities.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-05-30 19:40:11 +02:00
Declan Snyder
6bd6e50838 pm: Add API to check if a state disables a device
Add an API function that can be used by client code to check if a state
disables a device.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-05-30 19:40:11 +02:00
Declan Snyder
65ebecbf78 pm: refactor policy_device_ get/put
Refactor this code so it has less nesting and is able to share some code
between functions, by making a function to find the device constraints
object which can be called before doing operations using it.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-05-30 19:40:11 +02:00
Declan Snyder
481a2faf1e uart_mcux_flexcomm: Fix TX garbage char bug in PM
There is currently a bug where when entering low power modes, there is a
garbage character sent if the UART is in the middle of a transmit when
entering low power mode. This is because the fifo interrupt happens when
last character is pulled by transmitter from fifo and then we unlock PM
constraints at that moment, instead of waiting for actual transmitter to
become idle. Fix by adding work item to check for this when needed.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-05-30 19:40:11 +02:00
Jordan Yates
a550c74da1 doc: document WIFI_USAGE_MODE
Add docs for `WIFI_USAGE_MODE` in the Wi-Fi section and release notes.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-05-30 19:40:01 +02:00
Jordan Yates
3aa61a9503 tests: wifi: nrf_wifi: reduce config overrides
Reduce the number of config overrides needed for the various testcases
by only enabling the options if needed in the first place.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-05-30 19:40:01 +02:00
Jordan Yates
3d7979ea4a drivers: wifi: nxp: auto NXP_WIFI_SOFTAP_SUPPORT
Automatically enabled `NXP_WIFI_SOFTAP_SUPPORT` if the application
specifies it wants AP support.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-05-30 19:40:01 +02:00
Jordan Yates
53cf5ff576 drivers: wifi: esp32: auto ESP32_WIFI_AP_STA_MODE
Automatically enabled `ESP32_WIFI_AP_STA_MODE` if the application
specifies it wants either feature.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-05-30 19:40:01 +02:00
Jordan Yates
90a2d0ec92 drivers: wifi: nrf_wifi: operation mode from application request
Default the operation mode from the application requested Wi-Fi
features, not the nRF70 part number.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-05-30 19:40:01 +02:00
Jordan Yates
7dbd36a222 drivers: wifi: options for application usage of Wi-Fi
The `CONFIG_WIFI` symbol currently covers a number of different
use-cases of Wi-Fi, primarily:
  * Wi-Fi AP (Broadcasting a network others can connect to)
  * Wi-Fi Station (Connecting to an AP + SSID scanning)
  * Wi-Fi AP + Station (Both the above)
  * Wi-Fi SSID scanning (SSID scanning only)

Each of these application usages of Wi-Fi requires a different set of
supporting options to operate correctly (`WPA_SUPP`,
`NET_CONNECTION_MANAGER`, etc), and different opportunities for resource
optimisation (System heap, buffer counts, etc).

Currently, optimizing the Wi-Fi drivers depends on driver specific
options, which can be challenging to find and are obviously not portable
across different drivers.

The addition of this choice allows applications to specify in a single
Kconfig option which features of Wi-Fi they use, and enable individual
Wi-Fi drivers to choose defaults based on those features.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-05-30 19:40:01 +02:00
Fabian Blatz
5cffb8e5a6 modules: lvgl: Register print callback after lv_init
Move initialization of the print callback handler after calling lv_init, as
the latter zeroes the global callback structure.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2025-05-30 16:37:57 +02:00
Bjarki Arge Andreasen
3d24070890 kernel: work: add k_work_queue_run()
Add the ability to block and process a work queue by invoking
`k_work_queue_run` from an existing thread. This can be particularly useful
for using the main thread to process work items, in the same vein as the
system work queue, but from a lower priority/preemptible thread.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Co-authored-by: Peter Johanson <peter@peterjohanson.com>
2025-05-30 16:37:02 +02:00
Jamie McCrae
2c69e7ca34 dts: vendor: nordic: Fix wrong GPREGRET addresses
Fixes invalid addresses for this peripheral

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-05-30 16:36:03 +02:00
Adrian Gielniewski
e04f679093 openthread: Add Kconfigs for packet TX time and carrier functions
Add new Kconfig options to enable platform-specific features in
OpenThread:

- CONFIG_OPENTHREAD_PLATFORM_PKT_TXTIME enables support for packet TX
time when CONFIG_NET_PKT_TXTIME is selected.
- CONFIG_OPENTHREAD_PLATFORM_CARRIER_FUNCTIONS enables modulated and
continuous carrier functions when CONFIG_OPENTHREAD_DIAG and
CONFIG_IEEE802154_CARRIER_FUNCTIONS are enabled.

Update preprocessor conditionals to use the new options instead of
relying directly on CONFIG_NET_PKT_TXTIME and
CONFIG_IEEE802154_CARRIER_FUNCTIONS.

This change improves configurability and allows to reuse the platform
implementation when not using Zephyr networking.

Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no>
2025-05-30 16:35:39 +02:00
Fabio Baltieri
033672114b led: fix up the ENOSYS condition to pass coverity
The current ENOSYS check code can proceed for a driver that
hypothetically implements the on() but not the off() function of
vice versa, which would result in a null pointer dereference.

This would be a weird use case but Coverity catches the situation, no
harm in changing the ENOSYS check to fail if the on/off is half
implemented, so let's change it to do that.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-05-30 16:35:30 +02:00
Sebastian Głąb
af434877ec tests: boards: nrf: i2s: i2s_divider: Confirm CLK divider value
Frame rate selected by the user may not be obtained due to
PCLK frequency and finite number of clock divider values.
In such case, driver shall select divider that results in
frame clock rate closest to the requested value.
There was a bug that was discarding perfect match divider.

Add test which confirms correct clock divider selection.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2025-05-30 16:35:22 +02:00
Sebastian Głąb
b9916322cb tests: drivers: i2s: i2s_speed: Fix typo in Kconfig file
Fix typo in the Kconfig file.
Change 'per socond' to 'per second'.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2025-05-30 16:35:22 +02:00
Håkon Amundsen
801107eb4d drivers: firmware: add IRONside boot report
The boot report is used to pass information from IRONside to a CPU
being booted.

Integrate the boot report to the update service sample.

Signed-off-by: Håkon Amundsen <haakon.amundsen@nordicsemi.no>
2025-05-30 16:35:15 +02:00
Raffael Rostagno
588c2e66e9 soc: esp32c6: Fix sleep routine
PMU related functions need to be located in IRAM when sleep
process is triggered, as cache is disabled past a certain point
in the execution of the sleep process.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-05-30 16:34:48 +02:00
Raffael Rostagno
5712c967d3 west.yml: hal_espressif: Fix ESP32-C6 sleep routine
Update hal_espressif to fix ESP32-C6 sleep routine.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-05-30 16:34:48 +02:00
Mark Wang
8951711f96 drivers: uhc: udc: use DYNAMIC_INTERRUPTS for KHCI and EHCI
Because the same IP supports both device and host, so use
DYNAMIC_INTERRUPTS for KHCI and EHCI if both device and host
are enabled.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2025-05-30 16:34:41 +02:00
Mark Wang
e98cfa48e3 boards: nxp: add uhc support for mimxrt1050_evk
add uhc related items to dts.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2025-05-30 16:34:41 +02:00
Mark Wang
a8796ca6ee boards: nxp: add uhc support for frdm_k22f, rt1060, lpc55s69 and lpc55s28
add uhc related items to dts.
add clock initialization
add BM4 if CONFIG_USB_UHC_NXP_KHCI is enabled
add pin mux
update board related CMakeLists.txt
update sdk-ng CMake to include NXP controller drivers
update west.yml to contain the hal_nxp pr

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2025-05-30 16:34:41 +02:00
Mark Wang
abfa9455cc drivers: uhc: implement nxp mcux uhc driver
It is based on SDK USB Host controller driver.
Support NXP EHCI, KHCI, OHCI and IP3516HS controllers.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2025-05-30 16:34:41 +02:00
Anas Nashif
7bbb834deb Revert "posix: rwlock: Refactor locking using k_timepoint_t"
This reverts commit 833eaccfd1.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-05-30 08:27:19 -04:00
Anas Nashif
0a6e579987 Revert "posix: net: move static inline gethostname() to lib definition"
This reverts commit e60070d91b.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-05-30 08:27:19 -04:00
Anas Nashif
a649b31cfc Revert "posix: device_io: mark pwrite() buf as const"
This reverts commit c14f97f194.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-05-30 08:27:19 -04:00
Anas Nashif
da48a04572 Revert "posix: sysconf: match _SC* defines with newlib/picolib"
This reverts commit c5f1c43b8c.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-05-30 08:27:19 -04:00
Anas Nashif
a098f5c3a3 Revert "posix: move PTHREAD_STACK_MIN to posix_features"
This reverts commit d6edc75699.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-05-30 06:20:59 -04:00
Hao Luo
d410b2cc67 samples: counter: alarm: undef redefined TIMER for ambiq
There's duplicated TIMER defined in ambiq hal, need to undef the
old one in alarm sample.

Signed-off-by: Hao Luo <hluo@ambiq.com>
2025-05-30 10:28:13 +02:00
Pieter De Gendt
d5931bae93 net: lib: coap: Return an error on removing a non-existing observer
If we're parsing a CoAP request with an observe option of '1', but there is
no matching observer, return an error instead of returning a zero.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-05-30 10:28:02 +02:00
Piotr Kosycarz
39ae9c3813 samples: drivers: counter: alarm: support nrf54h and nrf54l
Fix building/running for nrf54h and nrf54l.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2025-05-30 10:27:50 +02:00