Commit graph

126,787 commits

Author SHA1 Message Date
BUDKE Gerson Fernando
0d254d38f0 boards: arm: mps2: Fix NS flash layout
The mps2/an521/cpu0/ns define flash layouts in tf-m to allow
CONFIG_TFM_MCUBOOT_IMAGE_NUMBER be 1 or 2. In the Zephyr project when
building the samples the value selected is 2.

The layout changes are necessary to allow use the --max-sectors options
when signing the images. It ensures that flash layout is respected. To
allow this the compatible "soc-nv-flash" was added in the reserved
memory and the fixed-partitions were defined.

Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
2025-10-24 13:27:24 -04:00
BUDKE Gerson Fernando
2697953876 modules: tf-m: Kconfig.tfm: Update TFM_BOARD
Reorder TFM_BOARD entries by vendor name for improved clarity.

Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
2025-10-24 13:27:24 -04:00
Mohamed Moawad
4bdcc53de9 tests: stackprot: add guard area to ensure portable overflow behavior
The stackprot test currently depends on compiler-generated stack frame
layouts, which can vary between toolchains and optimization levels.
This makes the overflow check fragile and may cause unintended faults.

Add a small guard buffer in alternate_thread so the intentional overflow
is always contained within the thread stack. This ensures the test
behaves consistently across toolchains, architectures, and optimization
settings.

Signed-off-by: Mohamed Moawad <moawad@synopsys.com>
2025-10-24 13:27:06 -04:00
Thorsten Klein
03a58604d7 doc: develop: west: config option build.dir-fmt
new format arguments for config option build.dir-fmt are documented
accordingly.

Signed-off-by: Thorsten Klein <thorsten.klein@bshg.com>
2025-10-24 13:26:37 -04:00
Thorsten Klein
5ee522efc0 scripts: west_commands: added tests for config build.dir-fmt
Tests are added for different build.dir-fmt format string arguments.

Signed-off-by: Thorsten Klein <thorsten.klein@bshg.com>
2025-10-24 13:26:37 -04:00
Thorsten Klein
122edfef5b scripts: west_commands: extend build.dir-fmt format args
build.dir-fmt format string arguments are extended. New format args are
'west_topdir' (absolute path to the west workspace directory) and
'source_dir_workspace' (relative path of the source directory to
west_topdir).

Signed-off-by: Thorsten Klein <thorsten.klein@bshg.com>
2025-10-24 13:26:37 -04:00
Kim Seer Paller
6e3760b6cd tests: drivers: build_all: Add build test for AD4170 ADC
Add build test for AD4170, AD4190, and AD4195 SPI-based ADC.

Signed-off-by: Kim Seer Paller <kimseer.paller@analog.com>
2025-10-24 13:26:26 -04:00
Kim Seer Paller
fcd7842ca8 drivers: adc: Add AD4170-4, AD4190-4, and AD4195-4 ADC driver
Add initial support for the AD4170-4, AD4190-4, and AD4195-4 24-bit
ADCs, including reference selection, programmable gain amplifier, ADC
conversion modes, configurable analog inputs, filter settings, and both
bipolar and unipolar operation. Supports internal and external buffered
references, and operation from a 4.75-5.25V analog supply and a
1.7-5.25V digital supply.

Signed-off-by: Kim Seer Paller <kimseer.paller@analog.com>
2025-10-24 13:26:26 -04:00
Kim Seer Paller
2d141260de dts: bindings: adc: Add AD4170-4, AD4190-4, and AD4195-4 ADCs
Document the AD4170-4, AD4190-4, and AD4195-4 low noise, high precision
24-bit ADCs, each supporting 4 differential or 8 single-ended inputs,
integrated PGA (0.5-128). All devices feature internal and external
buffered references, operate from 4.75-5.25V analog and 1.7-5.25V
digital supply.

Signed-off-by: Kim Seer Paller <kimseer.paller@analog.com>
2025-10-24 13:26:26 -04:00
TaiJu Wu
91f1acbb85 kernel: Add more debug info and thread checking in run queue
1. There are debug info within k_sched_unlock so we shoulld add
   same debug info to k_sched_lock.

2. The thread in run queue should be normal or metairq thread, we should
   check it is not dummy thread.

Signed-off-by: TaiJu Wu <tjwu1217@gmail.com>
2025-10-24 13:26:15 -04:00
TaiJu Wu
4da13b8a5e test: increase mps2/an385 ISR stack size
The next patch will cause mps2/an385 board fail.

The original code access 0x2000a10 but the interrupt statck
start at 0x20002000 with size 2048 byte(end at 20001800)
so the access causes stack overflow.

Increase ISR stack size to resolve this issue.

Signed-off-by: TaiJu Wu <tjwu1217@gmail.com>
2025-10-24 13:26:15 -04:00
Jordan Yates
dbb45ddd18 scripts: checkpatch.pl: relax Missing a blank line
Relax the `Missing a blank line after declarations` checkpatch error by
loosening the requirements for a macro to be treated as one that
declared a variable.

Currently the regex matches the pattern `DECLARE` or `DEFINE`, as long
as there are between 1 and 6 trailing `_FOO` components to the macro
name (e.g. `DECLARE_MY_TYPE()`). Zephyr however contains many macros
that don't have the trailing components but still resolve to variables
(e.g. `ATOMIC_DEFINE`, `K_MUTEX_DEFINE, etc`).

By changing `{1,6}` to `{0,6}`, we remove the requirement for the
trailing `_FOO` component(s) while still allowing them. This stops
checkpatch from erroring on patterns like this:
```
struct driver_data {
	uint16_t some_value;
	ATOMIC_DEFINE(some_atomic, 16);
};
```

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-10-24 13:26:04 -04:00
Simon Maurer
31d16f353e drivers: i2c: cdns: add broken hold bit workaround for Zynq-7000
The Xilinx Zynq 7000 I2C controller has the following bugs:
- completion indication is not given to the driver at the end of
a read/receive transfer with HOLD bit set.
- Invalid read transaction are generated on the bus when HW timeout
condition occurs with HOLD bit set.
- If the delay between address register write and
control register write in cdns_i2c_mrecv function is more, the xfer size
register rolls over and controller is stuck.

As a result of the above, this patch disallows message transfers with
a repeated start condition following a read operation. Also disables
interrupts between the address register write and control register write
during message reception, to prevent transfer size register rollover.

Signed-off-by: Simon Maurer <mail@maurer.systems>
2025-10-24 13:25:54 -04:00
Diego Herranz
23aef46644 boards: phytec: phyboard_nash: doc: fix core name
It's M33 rather than M7.

Signed-off-by: Diego Herranz <diegoherranz@diegoherranz.com>
2025-10-24 13:25:43 -04:00
Alain Volmat
0f6a0d94fe samples: usb: uvc: add h264 / jpeg encoder test entries
Add entries in sample.yaml for enabling h264enc / jpegenc
uvc based test on the stm32n6570_dk/stm32n657xx/sb platform.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-10-24 13:25:34 -04:00
Alain Volmat
1b39e52399 boards: stm32n6570_dk: add zephyr_h264enc / zephyr_jpegenc labels
Add zephyr_h264enc and zephyr_jpegenc labels on node in order to
be able to use VENC and JPEG codec from samples.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-10-24 13:25:34 -04:00
Alain Volmat
e761fd7f0f samples: usb: uvc: add h264/jpeg suffixed overlay
Add overlay files in order to enable usage of
the encoder in the UVC sample.
This work with platform defining node label
    zephyr_jpegenc
    zephyr_h264enc

Mode can be selected by using -DFILE_SUFFIX="jpegenc" or
-DFILE_SUFFIX="h264enc" when building the sample while
also adding -DCONFIG_VIDEO_ENCODER_JPEG or
-DCONFIG_VIDEO_ENCODER_H264 as well in the command line.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-10-24 13:25:34 -04:00
Alain Volmat
6a7aefaadd samples: video: tcpserversink: check video_enqueue/dequeue return values
Add proper check of the return value of video_enqueue / video_dequeue.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-10-24 13:25:34 -04:00
Alain Volmat
e7ae828f70 usb: usbd_uvc: add frame_based support (currently only H264)
The frame_based descriptors differ from the frame descriptors
in that there is no dwMaxVideoFrameBufferSize field.
In order to do that, add a new uvc_frame_based_discrete_descriptor
structure to be used to fill in proper information into the
frame descriptor. In addition to that, a new format descriptor
is also added for frame based transfer.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-10-24 13:25:34 -04:00
Alain Volmat
0e3de8e3ca usb: uvc: use struct uvc_frame_descriptor in most of function parameters
This commit prepares introduction of the UVC Frame Based support by
using the struct uvc_frame_descriptor as parameter of most of the UVC
functions. struct uvc_frame_descriptor contains the common fields for
all supported frame type and then depending on the DescriptorSubtype
the pointer is casted in the correct struct definition.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-10-24 13:25:34 -04:00
Alain Volmat
065754373a video: add H264 estimate in video_estimate_fmt_size
Add rough estimate of a worth case H264 output size.

The video_estimate_fmt_size would need more information
such as quality, profile in order to give a better
estimate for each formats so for the time being just
stick to 16bpp based size, same as for JPEG.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-10-24 13:25:34 -04:00
Alain Volmat
ac4566fa23 samples: usb: uvc: add video encoder support
Allow creating a pipeline as follow
   camera receiver -> encoder -> uvc

If the chosen zephyr,videoenc is available, the sample will pipe
the camera receiver to the encoder and then the UVC device instead
of directly the camera receiver to the UVC.

Current implementation has several points hardcoded for the time
being:
1. intermediate pixel format between the camera receiver and encoder
   is set to NV12. This shouldn't be hardcoded and should instead be
   discovered as a commonly capable format from the encoder / video dev
2. it is considered that encoder device do NOT perform any resolution
   change and that encoder output resolution is directly based on the
   camera receiver resolution.  Thanks to this, UVC exposed formats
   are thus the encoder output pixel format & camera receiver
   resolutions.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-10-24 13:25:34 -04:00
Alain Volmat
261e25fe28 samples: usb: uvc: add indirection for UVC source device
In preparation for the introduction of video encoder support
add an indirection for handling of the buffers of the UVC
source device. Currently this is only video_dev however it
can also be an encoder device when encoder is introduced
between video capture device and the UVC device.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-10-24 13:25:34 -04:00
Alain Volmat
0812c110d7 samples: usb: uvc: use video_transfer_buffer helper function
Replace video_dequeue / video_enqueue buffer exchange code by
video_transfer_buffer helper function.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-10-24 13:25:34 -04:00
Alain Volmat
a6ceee976e video: addition of video_transfer_buffer helper function
Addition of a helper function which takes care of dequeue
from a source video device and queue into a sink video device.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-10-24 13:25:34 -04:00
Jamie McCrae
189f3646b7 doc: hardware: porting: soc_porting: Fix inconsistencies
Fixes some errors and inconsistencies to show a fuller example of
a Kconfig.soc file

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-10-24 13:25:18 -04:00
Jamie McCrae
ef2f264ab5 doc: build: kconfig: setting: Replace text
Replaces text to clarify a setting

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-10-24 13:25:18 -04:00
Daniel Leung
d04f91bce4 west: update Xtensa HAL to latest SHA
This updates the SHA for Xtensa HAL to latest.
This brings in the SoC configuration for intel_adsp/ace40,
and will be used with the next SDK release.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-10-24 13:25:06 -04:00
Ryan McClelland
c4a70b4d01 drivers: i3c: cdns: handle ibi len of 0
Section 4.3.7.3.6 of the I3C v1.2 specification states that a value of
0 for the max ibi size indicates an unlimited payload size. Set it to
the max it can be configured for.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-10-24 13:24:54 -04:00
Guillaume Gautier
b18a70e959 dts: arm: st: fix linter
Fix formatting errors reported by the dts linter.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-10-24 13:24:44 -04:00
Guillaume Gautier
05972b3b7e doc: releases: update migration guide for stm32 adc
Update the 4.3 migration guide to include the change made on the STM32
ADC clocks.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-10-24 13:24:44 -04:00
Guillaume Gautier
b07f90fd88 dts: bindings: adc: update binding description
Update STM32 ADC binding description now that the STM32F3 ADC asynchronous
prescaler is set through the clock property.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-10-24 13:24:44 -04:00
Guillaume Gautier
0cf6b7775a drivers: clock: stm32: remove adc prescaler setting
Now that the ADC prescaler are set within the driver using the clock
system, remove the specific setting of the prescaler from the clock driver.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-10-24 13:24:44 -04:00
Guillaume Gautier
1f2034e16f dts: arm: st: remove specific rcc compatible for stm32f1 and f3
Now that the ADC prescaler are set within the driver using the clock
system, the specific rcc compatibles for F1 and F3 are no longer useful.
Replace them with the standard one (from which they were derived).

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-10-24 13:24:44 -04:00
Guillaume Gautier
7c4d42b4fd drivers: adc: stm32: add support for rcc prescaler clock
Some series like F1, F3, N6 and U3 use an ADC prescaler defined in the RCC.
Instead of adding specific properties in the RCC driver, use the secondary
clock system to configure the prescaler.

The ADC driver now configures the clocks depending on their presence and
their name. Three clocks can be defined:
- the register clock (mandatory for all series)
- the kernel clock (depends on series)
- the prescaler value (depends on series)

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-10-24 13:24:44 -04:00
Guillaume Gautier
cc245368dc dts: adc: stm32: make clock-names property required in adc binding
To easily differentiate between the different clocks that can be configured
in device tree, make their naming mandatory, and explicit what the expected
names are.

Add these names in all dtsi and dts files that need them.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-10-24 13:24:44 -04:00
Guillaume Gautier
b02dacf065 include: dt-bindings: clock: stm32: add adc prescaler for f1, f3, n6 and u3
This commit adds the RCC configurations for ADC prescaler for STM32F1, F3,
N6 and U3.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-10-24 13:24:44 -04:00
Guillaume Gautier
d891aad2ed include: dt-bindings: clock: stm32: rework STM32_DT_CLOCK_SELECT details
Reworks the way the STM32_DT_CLOCK_SELECT builds its elements. Instead of
taking a mask, it takes the MSB of the field. From the MSB and LSB, we
calculate the width of the field, and this width is then stored (instead
of the mask). This allows to gain space for higher values for the fields.

This larger space is necessary to add the selection of the ADC prescaler
on STM32N6 because it is an 8-bit long field.

The allowed width is from 1 to 8 (and internally stored as 0-7 to fit on
3 bits).

STM32_DT_CLKSEL_MASK_GET keeps the same name, since we still need the mask,
and returns the bitmask from the width with the BIT_MASK macro. Other
STM32_DT_CLKSEL_MASK_* macros are renamed with WIDTH.

All call to STM32_DT_CLOCK_SELECT are updated to reflect the change and use
a width instead of a mask.

This also fixes a few issues like STM32H7 MCO macros, and adds MCO_PRE for
STM32N6.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-10-24 13:24:44 -04:00
Fabrice DJIATSA
2133ad7f07 boards: st: nucleo_h753zi: update and reorder flash partitions
- Increase the size of the storage partition to 2 sectors
because a single sector makes it unusable as reported
by test_flash_copy.

This change will breaks backward compatibility regarding
MCUboot firmware update support.

Add a migration guide note about changes to the flash layout
and warn users about potential firmware upgrade failures.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2025-10-24 13:24:29 -04:00
Fabrice DJIATSA
9018212695 tests: drivers: flash: common: boards: set flash size of nucleo_wb55rg
update CONFIG_TEST_DRIVER_FLASH_SIZE to match actual flash size.
The test was previously failing due to a mismatch between the expected
flash size (827392 bytes) and the actual size reported by flash_get_size()
(1048576 bytes).
This update sets CONFIG_TEST_DRIVER_FLASH_SIZE to 1048576 to reflect the
correct size of the flash device as defined in the reference manual for
the NUCLEO_WB55RG board.
The increase in required flash size (216K) for the full stack M0 binary
also justifies aligning the test configuration with the actual hardware
capabilities.

This change ensures the test passes and accurately reflects the flash
memory layout.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2025-10-24 13:24:29 -04:00
Liam Ogletree
7275e44146 docs: releases: Add documentation for Haptics shell
Add line documenting CONFIG_HAPTICS_SHELL in 4.3 release notes.

Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
2025-10-24 13:24:08 -04:00
Liam Ogletree
91caa2f2f8 drivers: haptics: Add Shell support for haptics drivers
Expose the haptics API through a shell interface. Tested locally
with dummy haptics driver.

Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
2025-10-24 13:24:08 -04:00
Khaoula Bidani
66e8451780 drivers: i2c: stm32: add target error callback
Allow applications to be notified of target I2C transfer
error usingthe recently added target error callback mechanism.

Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
Signed-off-by: Julien Racki <julien.racki-ext@st.com>
2025-10-24 13:23:57 -04:00
Khaoula Bidani
5e81c84a93 drivers: i2c: Support target error callbacks
Support I2C target error callback in I2C driver when
registered by the bus target consumer.

Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
Signed-off-by: Julien Racki <julien.racki-ext@st.com>
2025-10-24 13:23:57 -04:00
Nicolas Pitre
c03653eab9 samples: posix: env: Add delay before printing environment variables
Add a 1 second delay before printing environment variables to give the
shell time to initialize and print its prompt. This prevents a race
condition where the shell prompt could interleave with the environment
variable output on SMP systems, causing test failures.

Without this delay, the output could appear as:
  BUILD_VERSIuart:~$ ON=v4.2.0...

With the delay, the shell completes initialization first:
  uart:~$
  BOARD=...
  BUILD_VERSION=...
  ALERT=

This fixes the sample.posix.env test timeout on FVP v9a/smp where the
test harness regex failed to match the corrupted output.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2025-10-24 13:22:19 -04:00
William Tambe
ee149a3fd9 tests: kernel/common: skip test_nested_irq_offload if more than 1 CPU
test_nested_irq_offload is meant for single CPU.
Skip it if there is more than 1 CPU.

Signed-off-by: William Tambe <williamt@cadence.com>
2025-10-24 13:22:09 -04:00
Jeppe Odgaard
7d7a317fa0 lib: heap: return -ENOMEM if heap_array is full
Replace -EINVAL which indicates an invalid input parameter.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2025-10-24 13:21:57 -04:00
Fin Maaß
24669df207 arch: riscv: use RISCV_ISA_EXT_F to set CPU_HAS_FPU
use CONFIG_RISCV_ISA_EXT_F to set CONFIG_CPU_HAS_FPU.
Same for CONFIG_RISCV_ISA_EXT_D and
CONFIG_CPU_HAS_FPU_DOUBLE_PRECISION.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-10-24 13:21:47 -04:00
Fin Maaß
3be1b9ca7a arch: riscv: use RISCV_ISA_RV64I to set 64BIT
use CONFIG_RISCV_ISA_RV64I to set CONFIG_64BIT.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-10-24 13:21:47 -04:00
Sylvio Alves
b487d53d81 tests: crypto: hash: allow espressif boards testing
Allow Espressif SoCs to be tested properly.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-10-24 13:21:24 -04:00