Commit graph

136,983 commits

Author SHA1 Message Date
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
df02abfa41 usb: host: class: implement more of the class/data struct fields
Add a "struct usbh_class_api" for the host implementation, and move all
the function poitners to it. Add more fields to "struct usbh_class_data".

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
Josuah Demangeon
a7cfa6b3bb usb: host: add host status to the host context
Add a "struct usbh_status" that contains a bitmask of flags to keep
track of the global state of the host context, like done for the
device_next implementation.

Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
2026-02-05 13:12:58 +00:00
Krzysztof Chruściński
53efd4818c drivers: serial: nrfx_uarte: Fix compilation with deprecated option
Recent changes (6e65fbe585) deprecated Kconfig configuration for
TIMER that is used for bytes counting. In one place code was not
cleared correctly which results in compilation failure when
deprecated symbol is used.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2026-02-05 13:03:08 +00:00
Hake Huang
caaffa3d6f tests: PM: enable pm_soc test for mcxa series
enable pm_soc test for mcxa series

Signed-off-by: Hake Huang <hake.huang@nxp.com>
2026-02-05 13:02:08 +00:00
Johan Hedberg
9fa30fc2bf scripts: zephyr_module: Fix optionality of "click-through" for blobs
When pykwalify was changed to jsonschema in commit 58bf2dc the optionality
of 'click-through' was lost. Fix this by making sure there's always a value
in the dictionary, eliminating the following error when the key is missing:

if blob['click-through'] and not args.auto_accept:
   ~~~~^^^^^^^^^^^^^^^^^
KeyError: 'click-through'

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2026-02-05 13:01:36 +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
Miika Karanki
e43d4b488c drivers: dma: stm32u5: check stream busyness in dma_suspend
Add additional business check to waiting SUSPF to be set so
that the loop cannot be executed forever when the dma stream
is idle.

When the stream is not busy, then there is nothing to suspend.
However, if suspend was attempted for an idle stream, then the
changed loop waited forever SUSPF to be set. This could have
happened at least when serial api tx_abort() is called with
stm32u5 and tx dma transfer becoming ready about the same time
the tx_abort() API is called.

Fixes #103042

Signed-off-by: Miika Karanki <miika.karanki@vaisala.com>
2026-02-05 13:00:42 +00:00
Haoran Jiang
2883220328 dts: bindings: vendor-prefixes: Modify sifli prefix
SiFli will serve as the public name

Signed-off-by: Haoran Jiang <halfsweet@halfsweet.cn>
2026-02-05 13:00:20 +00:00
Haoran Jiang
461fd2dbbf boards: sifli: Modify the SiFli name
SiFli will serve as the public name

Signed-off-by: Haoran Jiang <halfsweet@halfsweet.cn>
2026-02-05 13:00:20 +00:00
Mahesh Mahadevan
4d6f0855b1 drivers: nxp_i2s: Add double buffer to TX path
Add double buffering to the TX path

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2026-02-05 12:59:08 +00:00
Mahesh Mahadevan
6fe085fd7c drivers: i2s: Refactor NXP MCUX Flexcomm driver
1. Rename the queue structure from i2s_txq_entry to
   i2s_mcux_q_entry
2. Renamed NUM_RX_DMA_BLOCKS to NUM_DMA_BLOCKS
3. Changed config_dma_blocks function to take
   struct i2s_mcux_q_entry * as an argument.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2026-02-05 12:59:08 +00:00
Andreas Klinger
53a8c429db doc: add zyclictest shell services command
Add documentation about Zyclictest which is a tool for measuring worst case
latencies.

Signed-off-by: Andreas Klinger <ak@it-klinger.de>
2026-02-05 10:27:48 +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
c3ee3b56b1 doc: release: Add cpu_freq pressure
Add cpu_freq pressure Kconfig to release
notes.

Signed-off-by: Sean Kyer <sean.actor@gmail.com>
2026-02-05 10:27:38 +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
f0967d130f cpu_freq: on_demand: Fix sample naming
Update the name of the on_demand policy sample
to be scoped to the on_demand policy instead
of the cpu_freq subsystem as a whole.

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
Sean Kyer
b50948b308 doc: tracing: Fix typo in tracing brief
Fixed a typo in tracing brief.

Signed-off-by: Sean Kyer <sean.actor@gmail.com>
2026-02-05 10:27:38 +00:00
Liam Ogletree
0ff28c779c drivers: haptics: Refactor error macros for IRQ acknowledgement
Clean up error macros to be more descriptive, and fix the IRQ number
for VDDB from 1 -> 10.

Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
2026-02-05 10:27:30 +00:00
Liam Ogletree
e7ed36db84 drivers: haptics: Add IRQ acknowledgement for haptics errors
Currently, the driver does not acknowledge error interrupts from
the device, resulting in the IRQ being continuously set in certain
cases. Add writes to acknowledge these interrupts.

Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
2026-02-05 10:27:30 +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
Khai Cao
f2dfb302a9 soc: renesas: ra: add SB_CONFIG_SOC_RA_START_SECOND_CORE
Add SB_CONFIG_SOC_RA_START_SECOND_CORE for Renesas RA8P1
SoC to support building a minimal launcher image that
starts the second core on Renesas RA SoCs via sysbuild

Signed-off-by: Khai Cao <khai.cao.xk@renesas.com>
2026-02-05 10:24:43 +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
Yves Wang
9a1726f07f drivers: display: sdl: add display orientation support
Add support for display orientation to the SDL display driver by
implementing the set_orientation API.
It will rotate around the center point.

Signed-off-by: Yves Wang <zhengjia.wang@nxp.com>
2026-02-05 10:22:12 +00:00
Michael Zimmermann
db654722c5 net: mqtt_sn: make client_radius a uint8_t
There is no need for it to have a different type than the packet data. The
variable is never checked for negativity and is only used when ts_gwinfo is
non zero, in which case client_radius must have been set as well.

Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
2026-02-05 10:21:46 +00:00
Pieter De Gendt
2099f3e577 tests: nvmem: Use nvmem_cell_is_read_only
Use the API provided function instead of member inspection for read-only.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-02-05 10:21:15 +00:00
Pieter De Gendt
dab2f5bcb4 nvmem: Make struct fields private
The internals of an NVMEM cell should be kept private, and needs to be
interacted with using an API.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-02-05 10:21:15 +00:00
Mathieu Choplain
2c43940195 scripts: footprint: fpdiff: read proper value for symbol sizes
The AnyNode class has a `size` property which hides the value sourced from
JSON key 'size', resulting in the script displaying nonsense. Consume the
proper value by directly accessing the __dict__ which holds it instead of
relying on the dot operator.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-02-05 10:20:35 +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é
c54ab5cbbe tests: 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
Benjamin Cabé
8a350c5033 modules: nrf_wifi: 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