Commit graph

24,075 commits

Author SHA1 Message Date
Aiden Hu
376d2c3139 usb: uvc: update header for UVC 1.5 compliance
Add input terminal descriptor and CS descriptor header and
extend frame descriptor fields (buffer size, default interval)

Signed-off-by: Aiden Hu <weiwei.hu@nxp.com>
Co-authored-by: Aiden Hu <weiwei.hu@nxp.com>
Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
2026-02-09 16:12:00 -06:00
Josuah Demangeon
9fd1afc6f9 usb: uvc: use max host/device for MAX_FRMIVAL
Compute the maximum of the CONFIG_USBD_VIDEO_MAX_FRMIVAL and
CONFIG_USBH_VIDEO_MAX_FRMIVAL for struct definition, so that
the same struct can be relevant for both host and device
implementation.

Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
Signed-off-by: Aiden Hu <weiwei.hu@nxp.com>
Co-authored-by: Aiden Hu <weiwei.hu@nxp.com>
2026-02-09 16:12:00 -06:00
Josuah Demangeon
69d9f133c4 usb: host: uvc: placeholder implementation
Loop through each of the VideoStreaming and VideoControl descriptor
to parse them. This is meant as a stub for the purpose of testing the
class API.

Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
2026-02-09 16:12:00 -06:00
Vytautas Virvičius
597ec0d8ff modem: backends: uart async close fix
This fixes an issue where the modem pipe is declared closed before it
actually is closed, leading to issues when you try to re-open quickly.

Signed-off-by: Vytautas Virvičius <vytautas@virvicius.dev>
2026-02-09 12:01:33 -06:00
Mathieu Choplain
3d03c55e1d llext: define global mutex using K_MUTEX_DEFINE
Use the appropriate macro K_MUTEX_DEFINE to define the global `llext_lock`
mutex instead of declaring it like a regular variable initialized
using the internal Z_MUTEX_INITIALIZER() helper.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-02-09 12:01:01 -06:00
Chaitanya Tata
7f6d361473 nrf_wifi: Remove nRF71 support
The driver and module now supports nRF70 only, nRF71 support will be
added in the future using a new driver.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2026-02-09 11:59:17 -06:00
Lingao Meng
4364dd9e51 fs: nvs: tighten ATE validation using write order constraints
NVS ATE validation currently relies on CRC8 and coarse boundary checks
against the sector size. Because CRC8 has a non-negligible collision
probability (1/256), a corrupted ATE may occasionally pass CRC
verification while still containing invalid offset or length fields.

Instead of only validating that the referenced data fits within the
sector, this change additionally verifies that the end of the data
region (offset + len) does not exceed the physical position of the ATE
itself.

Due to the append-only write order of NVS, data is always written before
its corresponding ATE. Therefore, any ATE referencing data beyond its
own location is structurally invalid and must be rejected.

This tighter consistency check significantly reduces the likelihood of
accepting corrupted ATEs without introducing additional flash reads or
changing the on-flash format.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2026-02-09 11:57:33 -06:00
Flavio Ceolin
7a3d2b6167 pm: policy_events: Fix variable scope
next_event should not be global. This can cause
linkage conflicts if another file defines a symbol
with the same name.

Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
2026-02-09 09:38:27 +01:00
Andrej Butok
ff8d194fdd soc: nxp: kinetis: fix SOC_SERIES inconsistency
- Fixes Kconfig SOC_SERIES naming for Kinetis SoCs,
  as required by HWMv2.
- Fixes: https://github.com/zephyrproject-rtos/zephyr/issues/69317

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2026-02-06 08:58:07 -06:00
Robert Lubos
5fc367e348 net: coap: Remove invalid 2.00 response code
CoAP response code 2.00 is not defined anywhere in the spec nor
assigned in the IANA registry, therefore it should not be defined
in Zephyr either. Remove the invalid response code and its usage
in tests.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2026-02-06 08:57:38 -06:00
Fin Maaß
810e79b35b fs: fs_stat: allow using it on root dir
We already allow using `fs_opendir` on the
root dir, so `fs_stat` should also work with it.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-02-06 14:03:17 +01:00
Maciej Sobkowski
61ba3c9cd6 instrumentation: support dynamic triggers
This makes using instrumentation with any sample/board combination
much easier, as it eliminates the need to define a custom dt overlay.
Trigger/stopper functions need to be configured at build time.

Signed-off-by: Maciej Sobkowski <msobkowski@antmicro.com>
2026-02-06 13:53:34 +01:00
Josuah Demangeon
5412bf3265 usb: uvc: move helpers functinos to common/
Move UVC helper functions to a file shared between UVC host and device.
The arrays are not visible anymore from either USB host or device, but
instead accessed through a front-end funciton.

Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
2026-02-06 11:18:45 +01:00
Emil Gydesen
e1ff7805de Bluetooth: VOCS: Client: Replace CHECKIF with if
The usage of CHECKIF has been replaced with a regular
if. The reason for this is that higher layer may depend
on some of the checks defined by the API, and the higher
layers cannot do that properly if the checks can be
removed via a Kconfig option.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2026-02-06 11:17:19 +01:00
Johann Fischer
5163ea64fe usb: device_next: hid: do not use false and true in COND_CODE_1
With the C23 standard, false and true are keywords and constants of type
bool with a value of 0 and 1. Though there does not seem to be issues
with GCC version 14, there is a note in the specification that the
spelling of false and true inside expressions that are subject to the #
and ## preprocessing operators is unspecified.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2026-02-05 16:54:58 +01:00
Alberto Escolar Piedras
45fae3de24 usb: host: Correct function prototype
Correct function prototype which causes a compiler warning
and builds to fail due to it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2026-02-05 16:51:26 +01:00
Josuah Demangeon
a8007b2209 usb: host: add debug logs for the configuration descriptor
The USB host will have to select the appropriate size for the configurtion
descriptor, and the defaults will not be enough for some classes that
encode a lot of information in the configuration descriptor.
Add logging to debug this.

Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
2026-02-05 13:12:58 +00:00
Josuah Demangeon
cdd8bdf239 tests: usb: host: test API using initialization code from USB samples
Add tests making sure the USB Host class APIs introduced build
and run as expected. Use USB device samples common code for
initialization.

Co-authored-by: Johann Fischer <johann.fischer@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
2026-02-05 13:12:58 +00:00
Josuah Demangeon
32c25aa978 usb: host: add a nil entry at the end of configuration descriptor
Allocate a larger size to keep room for a nil descriptor at the end of
the configuration descriptor. This is used to walk through the list of
descriptors until this empty descriptor happens.

Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
2026-02-05 13:12:58 +00:00
Josuah Demangeon
7e455ae0fe usb: host: improve safety of configuration descriptor parsing
Make sure that there is at least enough room for the header before
dereferencing the fields such as bLength.

Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
2026-02-05 13:12:58 +00:00
Josuah Demangeon
29504e2d86 usb: uvc: move the header definition to include/
Move the UVC header with all the definitions from the UVC standard to
share it between USB host and device class implementation.

Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
2026-02-05 13:12:58 +00:00
Josuah Demangeon
92c4d2744e usb: host: introduce usbh_class with init/remove functions
Add functions to probe/remove all classes as part of a new usbh_class.c
and a matching usbh_class.h. These functions are called from the function
usbh_init_device_intl() in usbh_core.c to initialize every class upon
connection of a device. Every class driver provide filters to match the
interfaces of the device.

Co-authored-by: Aiden Hu <weiwei.hu@nxp.com>
Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
2026-02-05 13:12:58 +00:00
Johann Fischer
b71d3223a8 usb: host: add functions to initialize and probe class drivers
Add basic functions to initialize and probe class drivers.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
2026-02-05 13:12:58 +00:00
Johann Fischer
293b5d0271 usb: host: add helpers to parse USB descriptors
Add helpers to parse and validate USB descriptors.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
2026-02-05 13:12:58 +00:00
Josuah Demangeon
7e38871a66 usb: host: store the pointers to the interface association
In addition to storing the interface pointers, also store the pointers
for the interface association. Also add comments to the other fields
of the structs to adapt to a new CI check.

Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
2026-02-05 13:12:58 +00:00
Josuah Demangeon
e103442d25 usb: host: introduce wrappers to access the class function pointers
Add API wrappers around the function pointers in struct usbh_class_api,
while also documenting the USB host class internal API.

Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
2026-02-05 13:12:58 +00:00
Josuah Demangeon
1df78741cc usb: host: add copyright notice to linker script
Add missing copyright notice for the linker script to help with
check_compliance.py.

Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
2026-02-05 13:12:58 +00:00
Mark Wang
9062679c55 bluetooth: shell: a2dp: use 'err' instead of 'ret' for error code
Rename variable 'ret' to 'err' in cmd_send_media() to align with
Zephyr coding conventions for error return values.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2026-02-05 13:01:02 +00:00
Andreas Klinger
22ba487f3d shell: add new command zyclictest
- Name derived from Zephyr cyclictest
- Inspired by Linux realtime test program cyclictest
- Measure latency of interrupt service routine as well as thread with the
  help of the timer interrupt, of which the programmed point of time is
  known.
- Zyclictest thread is running in background while individual application
  under test can be running in foreground.

- The interval can be set up with optional argument -i. It should be at
  least double of expected worst case thread latency to get valid output.
  If this is not met the measurement needs to be repeated.
- The priority can also be set up. It should be the priority of the
  application which should run on the final product.
- The maximum size of the histogram is hard coded to 200 so far.

- After stopping measurement the maximum latency, number of errors /
  overflows and the histogram itself is printed.
- Histogram is printed in a form which is easy to be used by plotting
  programs like GNUplot or Python matplotlib.

- Example: One wants to know what is the expected maximum latency of a
  cooperative task with priority of -10.

  $ zyclictest start -i 400 -p -10

  $ # start your application test cases

  $ zyclictest stop

Count: 547329
                   IRQ  Thread
Max-Latency:        21      27
Errors:              0       0
Overflow:            0       0
Histogram:
...
 23                  0  547306
 24                  0       2
 25                  0       5
 26                  0       5
 27                  0       2

Signed-off-by: Andreas Klinger <ak@it-klinger.de>
2026-02-05 10:27:48 +00:00
Sean Kyer
c273ce7989 cpu_freq: pressure: Introduce pressure policy
Add pressure policy to cpu_freq subsystem. The
pressure policy evaluates system load by accumulating
the priorities of runnable threads to inform P-state
transitions.

As more threads of higher priorities queue as ready
in the scheduluer, the system pressure increases
and the policy may decide to choose a more aggressive
P-state.

Signed-off-by: Sean Kyer <sean.actor@gmail.com>
2026-02-05 10:27:38 +00:00
Sean Kyer
dfb612473c cpu_freq: Avoid unnecessary pstate switching
Enchance the cpu_freq subsystem to remember the latest
pstate and skip calling the pstate_set function if
the next pstate is the same as the last.

Signed-off-by: Sean Kyer <sean.actor@gmail.com>
2026-02-05 10:27:38 +00:00
Kai Cheng
b1adf4afbc Bluetooth: Shell: add inquiry scan parameters command
Add shell command for testing BR/EDR inquiry scan parameters update.
Supports default parameter set and custom parameters via interval/
window/type arguments for inquiry scan configuration.

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2026-02-05 10:26:46 +00:00
Kai Cheng
1a8c5875e3 Bluetooth: Classic: add inquiry scan parameters update
Implement BR/EDR inquiry scan parameters update functionality with
new API bt_br_inquiry_scan_update_param(). Adds support for setting
inquiry scan interval, window and type via HCI commands. Includes
default parameter set for standard inquiry scanning.

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2026-02-05 10:26:46 +00:00
Kai Cheng
6af1073d1b Bluetooth: Shell: add page scan parameters command
Add shell command for testing BR/EDR page scan parameters update.
Supports predefined parameter sets (R0, R1, R2 variants) and custom
parameters via interval/window/type arguments.

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2026-02-05 10:26:46 +00:00
Kai Cheng
8fe282374b Bluetooth: Classic: add page scan parameters update
Implement BR/EDR page scan parameters update functionality with new
API bt_br_page_scan_update_param(). Adds support for setting page scan
interval, window and type (standard/interlaced) via HCI commands.
Includes predefined parameter sets for different Bluetooth versions
and use cases.

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2026-02-05 10:26:46 +00:00
Kai Cheng
3e065836c4 Bluetooth: Shell: add COD set/get support test shell
This commit implements Class of Device (COD) test shell
functionality for Classic Bluetooth, supporting both
setting and retrieving COD from the controller.

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2026-02-05 10:26:46 +00:00
Kai Cheng
14158c9d02 Bluetooth: Classic: add COD set/get feature
This commit implements Class of Device (COD) functionality for
Classic Bluetooth, supporting both setting and retrieving COD
from the controller by bt_br_write_cod and bt_br_read_cod.

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2026-02-05 10:26:46 +00:00
Robert Eichinger
4a99d8b411 net: http-server: handle OPTIONS for dynamic resources
Allow applications to respond to HTTP OPTIONS requests (e.g. CORS pre-
flight) by routing OPTIONS through the same dynamic handler path
as GET/DELETE.

This enables OPTIONS handling for both HTTP/1.1 and HTTP/2.

Signed-off-by: Robert Eichinger <robert.eichinger@bshg.com>
2026-02-05 10:24:26 +00:00
Benjamin Cabé
3905ca579a tests: ztest: use proper essential type in boolean variables assignments
As per Zephyr coding guideline #59, "operands shall not be of an
inappropriate essential type". This makes sure boolean variables are
assigned true/false values, not 1/0.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-02-05 10:20:22 +00:00
Benjamin Cabé
718f88d97f net: lwm2m: use proper essential type in boolean variables assignments
As per Zephyr coding guideline #59, "operands shall not be of an
inappropriate essential type". This makes sure boolean variables are
assigned true/false values, not 1/0.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-02-05 10:20:22 +00:00
Benjamin Cabé
94a873e7c7 instrumentation: use proper essential type in bool variables assignments
As per Zephyr coding guideline #59, "operands shall not be of an
inappropriate essential type". This makes sure boolean variables are
assigned true/false values, not 1/0.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-02-05 10:20:22 +00:00
Benjamin Cabé
0aa07f14c7 Bluetooth: use proper essential type in bool variables assignments
As per Zephyr coding guideline #59, "operands shall not be of an
inappropriate essential type". This makes sure boolean variables are
assigned true/false values, not 1/0.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-02-05 10:20:22 +00:00
Alberto Escolar Piedras
ebd86f93b1 net: mdns_responder: Avoid linking to not available code
When building with CONFIG_NO_OPTIMIZATIONS the compiler will not
optimize create_answer() based on the caller, and will try to call
ipv4/6 code even if not built.
Let's add an extra check in the if before those possibly unavailable
calls to ensure those branches are dropped in this case.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2026-02-04 15:17:39 +00:00
Somil Gupta
363591c0db net: wifi: add shell support for SAE password parameter
Extend the Wi-Fi shell connect command to allow passing an SAE
password separately from PSK. Previously, the shell stored all
passwords in the PSK field, preventing proper use of SAE credentials
required for WPA3 connections.

This change adds a dedicated option to populate the SAE password
field so that SAE authentication paths can be exercised correctly
from the shell.

Signed-off-by: Somil Gupta <somil24559@iiitd.ac.in>
2026-02-04 13:55:43 +01:00
Somil Gupta
e8b12b4447 net: wifi: fix SAE password length validation
Replace the hardcoded 64 character limit with WIFI_SAE_PSWD_MAX_LEN.

Signed-off-by: Somil Gupta <somil24559@iiitd.ac.in>
2026-02-04 13:55:43 +01:00
Benjamin Cabé
14b5485d57 Bluetooth: use proper essential type for boolean variables
As per Zephyr coding guideline #59, "operands shall not be of an
inappropriate essential type". This makes sure boolean variables are
initialized and used with proper essential type (true/false).

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-02-04 13:52:38 +01:00
Jamie McCrae
861079f1fe storage: flash_map: Fix macros for offset/address
Fixes macros that broke after changes were merged which started
using the unit address of partition nodes. This also fixes the
test to ensure devices not starting at 0x0 are properly checked
which previously would silently be unknown

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-02-04 13:51:57 +01:00
Jukka Rissanen
ac0f0ddd4d net: socket: Add helpers to send all data in a buffer
Add helpers for sending all the data in a buffer. This is
only useful for stream sockets like TCP.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2026-02-03 14:30:56 -06:00
Robert Lubos
ac80abface net: coap: Use dedicated pointer for resource metadata
CoAP .well-known/core handling routine assumed that the "user_data"
pointer in struct coap_resource will be set to a valid struct
coap_core_metadata pointer, or left NULL. This approach is error
prone (application cannot use "user_data" field freely) and renders the
"user_data" field useless for other cases.

Therefore, introduce a separate "metadata" pointer within the struct
coap_resource specifically to configure the resource-related metadata,
and leave "user_data" for the applications to use freely.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2026-02-03 14:30:02 -06:00
Fin Maaß
a8b71c24f8 fs: fs_stat: handle if it is on a mount point
If fs_stat() is done on a mount point treat
it like it is a directory, instead of leaving it to
the implementation of the filesystem.

The fatfs for example will fail.
That is also the reason `fs cd` from the fs shell
fails, when trying it on a mountpoint with fatfs.

This also makes the behavior of fs_stat() similar to the one
of fs_readdir(). Especially as both functions use the
`struct fs_dirent` to return the informations.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-02-03 14:29:32 -06:00