Commit graph

118,807 commits

Author SHA1 Message Date
Tomasz Bursztyka
49a96f67a2 cmake: Add service section to commo-rom linker generator
struct init_entry may point to a struct device or a struct service,
each ones belonging to device or service iterable section.
Service section being newly added, handling it in cmake relevantly.

Signed-off-by: Tomasz Bursztyka <tobu@bang-olufsen.dk>
2025-06-27 14:13:58 +02:00
Tomasz Bursztyka
c341f5389d tests: misc: Fixing expected output on check_init_priorities test
check_init_priorities.py does no longer output any information about any
initialization function pointer as such pointer has been removed from
struct init_entry.

Signed-off-by: Tomasz Bursztyka <tobu@bang-olufsen.dk>
2025-06-27 14:13:58 +02:00
Tomasz Bursztyka
653f1bf123 scripts: Removing init function pointer from check_init_priorities.py
As the pointer has been removed from struct init_entry, there is no point
to look for it nor to display any information about it (obviously).

Fixing the test script as well.

Signed-off-by: Tomasz Bursztyka <tobu@bang-olufsen.dk>
2025-06-27 14:13:58 +02:00
Tomasz Bursztyka
175da6bdb0 init: Make entry init-function less and introduce service objects
Since the addition of deinit operation in device, init and deinit have
been within each device, rendering their init entry's init function
useless.

In order to save ROM space, let's remove the init function from
init entry altogether, and introduce a new object called "service"
which owns an init function to go along with SYS_INIT/SYS_INIT_NAMED.

Signed-off-by: Tomasz Bursztyka <tobu@bang-olufsen.dk>
2025-06-27 14:13:58 +02:00
Alain Volmat
e4348ad877 samples: video: capture: add a stm32mp135f_dk config
Add a configuration file for the stm32mp135f_dk board.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-06-27 12:25:52 +02:00
Alain Volmat
80f81e2bd4 shields: st_mb1897_cam: addition of MB1897 camera board
Addition of a shield st_mb1897_cam embedding a GC2145 CSI
sensor which can be connected to the STM32MP135F-DK via a 15pins FFC.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-06-27 12:25:52 +02:00
Alain Volmat
48b633cc79 boards: st: stm32mp135f_dk: add camera pipeline nodes
The STM32MP135F-DK board embeds a ST-MIPID02 CSI to DVP
bridge allowing to connect a CSI 15pins FFC cable enabled
sensor to the DCMIPP in parallel interface.
Add the ST-MIPID02 node and its dependency MCO clock as well
as partially filled DCMIPP node.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-06-27 12:25:52 +02:00
Alain Volmat
921b5690ff board: st: stm32mp135f_dk: align MCP230XX init prio to I2C
MCP230XX IO expander is interfaced via i2c hence it is
suffisant to align its init priority to the i2c one.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-06-27 12:25:52 +02:00
Josuah Demangeon
b60609adea samples: usb: add new UVC sample
Following the addition of USB Video Class, this adds a sample that makes
use of the zephyr,camera chosen node of any board to stream the video
source to the host. A snippet video-sw-generator can be used to test
and debug devices without a zephyr,camera chosen node.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-06-27 12:25:41 +02:00
Josuah Demangeon
7538b7bdf0 usb: device_next: new USB Video Class implementation
Introduce a new USB Video Class (UVC) implementation from scratch.
It exposes a native Zephyr Video driver interface, allowing to call the
video_enqueue()/video_dequeue() interface. It will query the attached
video device to learn about the video capabilities, and use this to
configure the USB descriptors. At runtime, this UVC implementation will
send this device all the control requests, which it will send to the
attached video device. The application can poll the format currently
selected by the host, but will not be alerted when the host configures
a new format, as there is no video.h API for it yet.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-06-27 12:25:41 +02:00
Josuah Demangeon
fd6e60dd7c boards: nicla_vision: add usbd test feature
The Arduino Nicla Vision board supports the new device_next USB stack
and can be used for testing USB Device features such as UVC.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-06-27 12:25:41 +02:00
Daniel Schultz
7f31129d70 driver: serial: uart_shell: read: Return correct return code
Always return exit code 0 when cmd_uart_read stopped reading
data from UART. Instead, return with a error code in case
reading from the UART interface failed.

Currently, this command might return with exit code -1 because
uart_poll_in didn't return data and the read duration expired.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2025-06-27 12:23:14 +02:00
Jamie McCrae
801792b47c west.yml: MCUboot synchronization from upstream
Update Zephyr fork of MCUboot to revision:
  07222c1929e1d79d303baa8fde7f977a79e48e9a

Brings following Zephyr relevant fixes:

  - 07222c19 boot_serial: Avoid re-initializing state in
    boot_image_validate_encrypted
  - a18f635a boot: Remove now superfluous start_off parameters
  - c62c19db boot_serial: Use flash sectors from bootloader state
    when possible
  - 13edc5fb boot_serial: Use flash area from bootloader state when
    possible
  - f1aa499c boot_serial: Initialize a bootloader state for bs_list
    and bs_set
  - f1efd483 bootutil: loader: Expose routine to determine sector
    layout
  - 72166868 bootutil: loader: Expose routine to open/close all
    flash areas
  - 0319e91c boot: bootutil: Fix encryption/decryption size
    during copy
  - a36f9513 imgtool: Add support for HMAC/HKDF-SHA512 with
    ECIES-X25519
  - 37719169 zephyr: Support for HKDF/HMAC with SHA512
  - 1d83177c bootutil: Add support for HAMC-SHA512 with ECIES-X25519
  - 7de064ea boot: zephyr: add support for booting ARC processors
  - 72459ec0 boot: zephyr: stm32n6570_dk: define
    CONFIG_MULTIPLE_EXECUTABLE_RAM_REGIONS
  - be8b3abc boot: Zephyr: Add a Kconfig for
    MULTIPLE_EXECUTABLE_RAM_REGIONS define
  - c5011f2b zephyr: Improve logging
  - 11f9c6f2 bootutil: Improve logging coverage
  - adbe1cfb boot: stm32n6: Define specific executable region
  - 93c2b50a boot: zephyr: boards: Add configuration for
    stm32n6570_dk
  - fca80b41 boot: zephyr: defines FLASH device for external NOR
  - 78d94cf4 imgtool: bump minimal required version to 2.2.0
  - af602f81 bootutil: Replace local identifiers with common
    definitions
  - e5756df5 bootutil: Remove redundant ALIGN definitions
  - e3a271c9 bootutil: Move all encryption TLV helper identifiers
    into one place
  - 68a4c962 boot: bootutil: avoid full erase on BOOT_MAGIC_BAD
    in boot_set_next
  - 1ed0218c scripts: imgtool: Add hash for ECDSA256P1Public
  - a90ddfc7 zephyr: Fix pinreset trigger
  - e56cecc4 bootutil: Small cleanup in image.h
  - 402d3f7f boot: zephyr: Refactor DFU entry logic
  - 687dc8c5 bootutil: boot_decrypt_key: Only one
    bootutil_hmac_sha256_drop needed
  - a0065f8f bootutil: Fix boot_scramble_region escaping flash
    area
  - bb644c7c bootutil: loader: overwrite-only mode fix for
    trailer erase

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-06-27 12:23:07 +02:00
Fin Maaß
596cd64bb9 drivers: ethernet: use DT_INST_PROP_OR for local-mac-address
use DT_INST_PROP_OR for local-mac-address, so
that it is not required to be set in dt, as there are
other ways to se the mac address.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-06-27 12:22:49 +02:00
Fin Maaß
5f83aea9e4 drivers: ethernet: sensry: fix mac addr order
make sure, that zephyr,random-mac-address
has a higher prio, than local-mac-address, as
documented in ethernet-controller.yaml.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-06-27 12:22:49 +02:00
Fin Maaß
4b6ccbdd1f drivers: ethernet: xmc4xxx: random mac only on dt
only set a random mac if zephyr,random-mac-address
is set in dt.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-06-27 12:22:49 +02:00
Fin Maaß
5638d9fa47 drivers: ethernet: nxp: fix mac addr order
make sure, that zephyr,random-mac-address
has a higher prio, than local-mac-address, as
documented in ethernet-controller.yaml.

Also make sure, that no vaild mac address
doesn't lead to init fail, as it can still be
set later via set_config.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-06-27 12:22:49 +02:00
Fabrice DJIATSA
faf1b10d5c tests: drivers: adc: adc_api: increase adc prescaler
increase value of the adc-prescaler to avoid ADC
overrun.

adc driver related error log:
"E: ADC overrun error occurred ..."

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2025-06-27 12:22:40 +02:00
Chun-Chieh Li
7179ef51fe drivers: serial: numaker: support hw-flow-control
This honors dts config hw-flow-control to enable flow control cts/rts
at driver init stage.

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2025-06-27 12:22:12 +02:00
Grzegorz Chwierut
1f92890283 tests: upgrade: Upgrade with mcumgr using BLE transport
Extend tests/boot/with_mcumgr with BLE configuration.
Updated sample to use the source code from smp_svr.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2025-06-27 12:21:56 +02:00
Grzegorz Chwierut
c6b3b9342c twister: pytest: Add support for mcumgr go tool with BLE
Added basic support to run upgrade with mcumgr tool
using BLE transport.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2025-06-27 12:21:56 +02:00
Pieter De Gendt
ba905d045b cmake: extensions: Check no arguments are given to zephyr_library
The zephyr_library macro does not expect any arguments, add a check for
that and similar for zephyr_library_named for no unexpected additional
arguments.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-27 10:59:22 +02:00
Pieter De Gendt
775696c297 cmake: extensions: Add macro helper for functions to have no arguments
Add zephyr_check_no_arguments that macros and functions can call to check
that no arguments are given.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-27 10:59:22 +02:00
Gaetan Perrot
fae619a916 drivers: sensor: lsm6dsv16x: fix uninitialized struct in enable_wake_int
Zero-initialize lsm6dsv16x_pin_int_route_t to fix Coverity warning.

CID: 516227

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-06-27 10:58:58 +02:00
Gaetan Perrot
5de04c61b6 drivers: video: fix uninitialized struct in ov2640_init()
Initialize fmt with default format and zero pitch to fix Coverity.

CID: 524780

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-06-27 10:58:43 +02:00
Tomasz Moń
b3e80c5faa usb: device_next: uac2: Do not leak double buffered endpoint
UDC drivers use udc_buf_get_all() when dequeueing endpoint. On drivers
that require double buffering for isochronous IN endpoint, the dequeue
on interface disable will result in class request API called on net_buf
with frags set. Call release callback on the buffer pointed in frags
because it was passed in using usbd_uac2_send().

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-06-27 10:58:33 +02:00
Kapil Bhatt
15cf0c518e doc: networking: Add doc for EAP methods
Add commands to connect with EAP-TTLS and EAP-PEAP
security modes.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2025-06-27 10:58:22 +02:00
Tomasz Moń
d29719e27e drivers: udc_dwc2: Disable endpoints asynchronously
Do not synchronously wait for endpoint interrupt bits when disarming
endpoints. Introduce ep_disabled k_event that makes it possible for
application to wait for the action to take effect which is necessary
when handling SetFeature(ENDPOINT_HALT) or SetInterface() requests.

This change improves incomplete iso IN and OUT handling performance,
especially when there are multiple isochronous endpoints that need
servicing.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-06-27 10:58:09 +02:00
Tomasz Moń
9aff5da68a drivers: udc_dwc2: Optimize incomplete iso handling
At High-Speed there is at most 25 us handling window for incomplete iso
IN/OUT and therefore determining which endpoints are isochronous is too
wasteful. Add lookup variable holding which isochronous endpoints are
enabled and limit the search to only enabled endpoints. For applications
with just one OUT and one IN isochronous endpoint this is optimal.

The lookup variable is updated only when mutex is held. Interrupt
handler accesses the variable read-only and in general there is no
problem is incomplete iso handling interrupt hits when the lookup
variable is updated, because:
  * when endpoint is just activated, it cannot be source of incomplete
    iso interrupt because the endpoint is not armed yet
  * when endpoint is just deactivated, it was first disabled

If there is more than one isochronous endpoint same direction then just
relying on endpoint enabled is not necessarily optimal. However, in
order to be able to limit the search to only armed endpoints, the lookup
variable would have to be updated on every transfer preparation and
completion which would require more time-expensive synchronization.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-06-27 10:58:09 +02:00
Tomasz Moń
70cd0ab567 drivers: udc_dwc2: Use spin lock for synchronization
Replace irq_lock() with spin lock which is proper synchronization
primitive that should be used. Because non-SMP implementations are
allowed to optimize spin lock to just locking interrupts the resulting
code is the same on all currently supported DWC2 targets.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-06-27 10:58:09 +02:00
David Jewsbury
c237253fe7 drivers: spi: Support spim01/spis01 instances for nordic devices
Extend SPI driver to support spims01 and spim01.

Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
2025-06-27 10:58:02 +02:00
Bjarki Arge Andreasen
160c196435 tests: drivers: spi: loopback: extend nrf overlays with miso/mosi
Add miso-gpios and mosi-gpios to nrf overlays required for
device_deinit testing.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-06-27 10:57:59 +02:00
Bjarki Arge Andreasen
ecb5457898 tests: drivers: spi: loopback: test device_deinit
Introduce test for device_deinit() which deinitializes the spi
bus, then configures miso as input, mosi as output using gpio,
utilizing the loopback to test directly controlling the pins.
Then reinit the spi device.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-06-27 10:57:59 +02:00
Bjarki Arge Andreasen
2609cfbf4a drivers: spi: nrfx spim: impl device deinit
Implement device deinit for nRF SPIM device driver.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-06-27 10:57:59 +02:00
Bjarki Arge Andreasen
61694b79ce doc: releases: 4.2: mention new SPI_DEVICE_DEFINE deinit variants
Mention added SPI_DEVICE_DEFINE macro variants covering device
deinit.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-06-27 10:57:59 +02:00
Bjarki Arge Andreasen
1663253de6 drivers: spi: add DEINIT_ variants of SPI_DEVICE_ macros
Add DEVICE_DEINIT variants of SPI_DEVICE_ macros. These include

- SPI_DEVICE_DT_DEINIT_DEFINE()
- SPI_DEVICE_DT_INST_DEINIT_DEFINE()

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-06-27 10:57:59 +02:00
Tomasz Moń
46b11f1fb2 drivers: udc_dwc2: Inline vendor quirks if possible
Constify vendor quirks structure to not keep it in RAM. Use constified
vendor quirks structure directly if there is only one snps,dwc2 instance
to allow compiler inlining quirk implementation.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-27 10:57:47 +02:00
Andrey VOLKOV
957f10c3a0 edtlib: add new tests for 'interrupt-map'
Add tests to check the correctness of '#address-cells' usage.
The missing tests have allowed bug #77890 to persist for years.

Signed-off-by: Andrey VOLKOV <andrey.volkov@munic.io>
2025-06-27 10:57:38 +02:00
Ioannis Damigos
871afee41c edtlib: fix _raw_unit_addr() function
The '_raw_unit_addr()' function was incorrectly written a long time ago.
It tries to look up and use the '#address-cells' of the node containing
the 'interrupts' property itself, instead of using the '#address-cells' of
the interrupt controller's node (or its parent).

As a result, the mapping is successful only if the '#address-cells' value
is the same in both the node and the interrupt controller, all other cases
lead to random errors being generated by the 'gen_defines.py' script.

Also, the function was trying to use the '#address-cells' value as a
little-endian one, which led to unpredictable results as well.
This problem has been fixed too.

Fixes #77890, and probably #78020

Signed-off-by: Andrey VOLKOV <andrey.volkov@munic.io>
Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2025-06-27 10:57:38 +02:00
Ioannis Damigos
1b1bfc9cc8 edtlib: Improve _interrupt_parent() function
According to the following comment on github
https://github.com/zephyrproject-rtos/zephyr/pull/77900/files#r1750393745
edtlib implementation is partially correct and it is missing two things:

1. If an ancestor has an interrupt-controller or interrupt-map property,
   the walk must terminate.
2. If an interrupt-parent property is found, the linked node must be a
   valid interrupt controller or nexus.

This commit add these checks.

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2025-06-27 10:57:38 +02:00
Steven Chang
f548f45d1f board: kb1062_evb board
Add support for ENE kb1062_evb board

Signed-off-by: Steven Chang <steven@ene.com.tw>
2025-06-27 10:57:20 +02:00
Steven Chang
03227c3520 drivers: watchdog: watchdog driver
Add watchdog driver for ENE KB106X

Signed-off-by: Steven Chang <steven@ene.com.tw>
2025-06-27 10:57:20 +02:00
Steven Chang
7ce78aa294 drivers: pwm: pwm driver
Add pwm driver for ENE KB106X

Signed-off-by: Steven Chang <steven@ene.com.tw>
2025-06-27 10:57:20 +02:00
Steven Chang
bffb1530ab drivers: adc: adc driver
Add adc driver for ENE KB106X

Signed-off-by: Steven Chang <steven@ene.com.tw>
2025-06-27 10:57:20 +02:00
Steven Chang
43f311bf61 drivers: uart: uart driver
Add uart driver for ENE KB1200

Signed-off-by: Steven Chang <steven@ene.com.tw>
2025-06-27 10:57:20 +02:00
Steven Chang
7d2be3bbff drivers: gpio: gpio driver
Add gpio driver for ENE KB106X

Signed-off-by: Steven Chang <steven@ene.com.tw>
2025-06-27 10:57:20 +02:00
Steven Chang
d9310b6648 drivers: pinctrl: pinctrl driver
Add pinctrl driver for ENE KB106X

Signed-off-by: Steven Chang <steven@ene.com.tw>
2025-06-27 10:57:20 +02:00
Steven Chang
dcdf6d5d65 dts: ene: kb106x device tree
Add ENE KB106X device tree files

Signed-off-by: Steven Chang <steven@ene.com.tw>
2025-06-27 10:57:20 +02:00
Steven Chang
65991a8668 soc: ene: kb106x soc
Add ENE KB106X SoC

Signed-off-by: Steven Chang <steven@ene.com.tw>
2025-06-27 10:57:20 +02:00
Saravanan Sekar
e4ae7d0b56 samples: pwm: add the lp_mspm0g3507 to the blinky_pwm and led/pwm samples
The lp_mspm0g3507 has a red LED that can be driven by GPIO or PWM TIMA0
CH0, set maximum prescale and divider to arrive lower timer clock from
clock source. Add to the samples.

Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
2025-06-27 10:57:05 +02:00