Commit graph

136,983 commits

Author SHA1 Message Date
Benjamin Cabé
43d4644867 drivers: led: lp3943: fix unsigned integer underflow Coverity
Replace the switch statement with an array-based register lookup and a
modulo operation to resolve a Coverity "integer handling" issue and make
the code simpler.

The original subtractions (*led -= 4U/8U/12U) were guarded by switch cases
making underflow impossible in practice, but the pattern was flagged
nevertheless. The new array-based approach is semantically equivalent and
arguably more readable.

Fixes zephyrproject-rtos/zephyr#84770
Fixes Coverity CID 487606

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-02-24 16:05:56 -06:00
Liam Ogletree
fe01b09da6 drivers: haptics: Restructure haptics subsystem into subfolders
Placing device drivers in vendor-specific subfolders provides greater
flexibility for approaches like `<vendor/device>-common.c/h` without
cluttering a shared directory. The sensor subsystem provides good
examples of the benefits of this approach -- in particular, the
/drivers/sensor/ti/ina2xx/ subdirectory.

Signed-off-by: Liam Ogletree <liam.ogletree@cirrus.com>
2026-02-24 16:05:29 -06:00
Manojkumar Konisetty
2565018964 drivers: gpio: Use shared interrupts for PSOC4
Enable CONFIG_SHARED_INTERRUPTS to allow multiple devices
to register handlers on the same IRQ line.

Replace irq_connect_dynamic() with IRQ_CONNECT() to configure
interrupts at build time, eliminating runtime setup overhead.

Signed-off-by: Manojkumar Konisetty <manoj@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
2026-02-24 16:04:54 -06:00
Sylvio Alves
9cdd4be660 soc: espressif: esp32c6: add lp core coprocessor support
Add ULP LP core coprocessor support including:
- Kconfig options for wakeup sources (LP timer, LP IO)
- LP core startup assembly with BSS clear and vector table
- HP core initialization and LP core binary loading
- Deep sleep poweroff with ULP wakeup enable
- Linker script updates for LP core memory sections

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-02-24 16:04:32 -06:00
Sylvio Alves
6caf9f6f37 dts: espressif: esp32c6: reorganize lp sram memory layout
Reorganize ESP32-C6 LP SRAM into dedicated memory regions:
- ulp_shm: ULP shared memory for LP core communication
- ipc_shm: IPC shared memory for mbox driver
- lp_rtc: RTC data section for deep sleep persistence
- retainedmem: retained memory region with zephyr,retained-ram

Reduce main LP SRAM from 16K to 15K to accommodate the new
dedicated regions in upper LP SRAM. Update mbox overlay
references from shmlp to ipc_shm nodelabel.

Remove deep_sleep and retained_mem board overlays that are no
longer needed with the updated base DTS.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-02-24 16:04:32 -06:00
Sylvio Alves
4d1976e1b1 soc: espressif: rename ULP_ Kconfig symbols to ESP32_ULP_
Add ESP32_ vendor prefix to all ULP Kconfig symbols to follow
Zephyr naming conventions. This affects Kconfig definitions,
source files, linker scripts, sample configs, and documentation.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-02-24 16:04:32 -06:00
Paul Wedeck
3cedc3bbac boards: stm32g0b1_core: initial support
Add the WeAct STM32G0B1 Core Board based
on the stm32g0b1cbt6.

Signed-off-by: Paul Wedeck <paulwedeck@gmail.com>
2026-02-24 16:03:56 -06:00
Benjamin Cabé
76a780d991 include: sys: uuid: add kconfig_dep Doxygen tags to public API functions
This ensures public Doxygen documentation clearly indicate what Kconfig
options need to be enabled for the documented functions to be available.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-02-24 16:03:15 -06:00
Benjamin Cabé
a910195a93 doc: services: uuid: Add dedicated page for UUID API
Add more complete/dedicated documentation page for UUID API.
Drop the old services/misc page as it's empty/deleted now

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-02-24 16:03:15 -06:00
Bill Waters
9ac587cc9f drivers: spi: spi_context.h compiler warning
Avoid this warning associated with the spi_context_cs_* functions
when DT_SPI_CTX_HAS_NO_CS_GPIOS is defined.
warning: statement with no effect [-Wunused-value]

Signed-off-by: Bill Waters <bill.waters@infineon.com>
2026-02-24 16:03:00 -06:00
Tobias Kässer
e29602e48a samples: sensor: accel_trig: add activity detection and error reporting
Enhance accel_trig sample with activity detection support and
improved error reporting for testing interrupt functionality.

Signed-off-by: Tobias Kässer <t.kaesser@gmail.com>
2026-02-24 16:01:57 -06:00
Tobias Kässer
e7d6408a0d drivers: sensor: adxl345: implement proper interrupt configuration
Fix interrupt enable/disable sequence per ADXL345 datasheet
recommendations.

The ADXL345 datasheet (page 19) states: "When initially configuring
the interrupt pins, it is recommended that the functions and interrupt
mapping be done before enabling the interrupts."

Main changes:

1. Remove adxl345_interrupt_config() which incorrectly enabled
   interrupts during driver initialization without proper sequencing.
   It's not clear to me what was the purpose of this function as all
   the required logic (setting gpio interrups, adxl mapping and enabling
   happens already in tigger_set).
   I checked other drivers and this seems to be the common pattern.

2. Implement proper INT_ENABLE disable/enable sequence in
   adxl345_submit_stream() when reconfiguring watermark interrupts:
   - Disable watermark interrupt in INT_ENABLE
   - Configure interrupt mapping in INT_MAP
   - Flush FIFO
   - Re-enable watermark interrupt in INT_ENABLE

3. Add datasheet-based comments in adxl345_trigger.c explaining
   non-obvious register operations:
   - AC/DC coupling modes (ACT_INACT_CTL register)
   - INT_MAP routing logic (0=INT1, 1=INT2)
   - Interrupt clearing by reading data registers

4. Fix bug in adxl345_trigger_set() where ADXL345_INT_MAP_DATA_RDY_MSK
   was hardcoded instead of using the correct int_mask variable.

Fixes #100891

Tested on ebyte_e73_tbb with samples `accel_polling` and `accel_trig`

Signed-off-by: Tobias Kässer <t.kaesser@gmail.com>
2026-02-24 16:01:57 -06:00
Noah Stephens
eb68e58579 drivers: adc: ad7124: added support for pd-switch-enable
Added support for the low side power switch pin used for switching
DUTs attached to the ADC. The switch is configured though the
drivers device tree.

Signed-off-by: Noah Stephens <nstephens78@gmail.com>
2026-02-24 16:01:43 -06:00
Johann Fischer
c052b05415 usb: host: use USB buffer macros
Allow to use DMAable buffers in UHC driver and host support.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2026-02-24 16:01:21 -06:00
Johann Fischer
7158c64690 include: drivers: usb: rename UDC buffer to USB buffer
Rename it to USB buffers so we can use it in host support without
confusion. Keep the UDC_* macros for now, we can deprecate and remove
them later.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2026-02-24 16:01:21 -06:00
Johann Fischer
51153871f0 include: usb: introduce UDC_ROUND_UP macro
Move the common rounding pattern to the UDC_ROUND_UP macro.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2026-02-24 16:01:21 -06:00
Johann Fischer
e15b514a58 drivers: usb: move UDC net_buf_data_cb implementation to USB common
Move it to USB common so that it can be used on the host side in the
future.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2026-02-24 16:01:21 -06:00
Tim Pambor
a31a673032 tests: drivers: disk: disk_performance: Use sector size reported by disk
Use sector size reported by disk driver instead of assuming a fixed
512 bytes sector size.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2026-02-24 18:28:39 +01:00
Tim Pambor
e62ec4831b tests: drivers: disk: disk_access: Use sector size reported by disk
Use sector size reported by disk driver instead of assuming a fixed
512 bytes sector size.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2026-02-24 18:28:39 +01:00
Sylvio Alves
e35ef80a3e tests: boards: espressif: memory_layout: use platform_allow
Use platform_allow to explicitly list supported boards instead of
a config filter. This restricts the test to specific devkit boards
and avoids running on appcpu targets.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-02-24 18:26:39 +01:00
Robert Lubos
653ebccc49 samples: net: Add FTP client sample
Add a minimal FTP client sample, exposing FTP operations via network
shell.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2026-02-24 15:37:25 +01:00
Robert Lubos
caa6273301 net: shell: Add FTP module
Add FTP shell module covering basic FTP client operations.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2026-02-24 15:37:25 +01:00
Robert Lubos
991ea36f70 net: lib: ftp_client: Add FTP client library
Add FTP client library, based on the FTP client library from nRF Connect
SDK.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2026-02-24 15:37:25 +01:00
Fin Maaß
f8adf04b3a boards: ethernet: remove now unnneded init prio default overwrites
as mdio and phy init prio is now on the same value
and the therefore the prority from the dt is used,
we can remove these default overwrites.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-02-24 15:36:30 +01:00
Fin Maaß
e99890bbbf docs: migration-guide: ethernet: mention init prio change
mention init prio change for ethernet drivers.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-02-24 15:36:30 +01:00
Fin Maaß
2e5d7620b4 drivers: ethernet: set init prio to the same value
set the init prio of ethernet, mdio and the ethernet phy
to the same value, that way the prio from the dt is used.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-02-24 15:36:30 +01:00
Peter Mitsis
143076008b kernel: msgq: Fix __ASSERT_NO_MSG() checks
The message queue 'buffer_end' field points to the next address AFTER
the end of the buffer. When the buffer goes to the last addressable
byte, the next byte is 0x0. To ensure proper evaluation of the bounds
the __ASSERT_NO_MSG() checks must not use "< buffer_end", but
"<= buffer_end - 1".

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2026-02-24 15:36:04 +01:00
Emil Gydesen
dd72c4c711 Bluetooth: BAP: SD: Fix issues with pa sync requests
The implementation only used the receive state's PA sync state
to determine whether to call the PA sync req or PA sync term req,
but that state does not include the syncing state.

Rather than using the receive state's PA sync state, we add a local
boolean to keep track of whether the PA sync was requested, so if
we receive a mod_src with PA sync == BT_BAP_BASS_PA_REQ_NO_SYNC then
we request a termination, even if the PA sync was not established yet.

Some cleanup in the mutex handling was also done as part of this.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2026-02-24 15:35:54 +01:00
Jukka Rissanen
0747bca9e1 net: ipv4: Do packet length checks before starting fragment reassembly
Make sure to check packet length check before starting the
IPv4 fragmentation reassembly process. This way we can drop the
malformed packet without consuming resources.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2026-02-24 13:53:25 +01:00
Tamas Jozsi
dbea70e98f boards: seeed: xiao_mg24: add zephyr_i2c label and okay status
This increases out-of-the-box compatibility with various shields
and drivers and also makes the configuration consistent with
other Arduino boards.

Signed-off-by: Tamas Jozsi <tamas.jozsi@silabs.com>
2026-02-24 13:53:00 +01:00
Tamas Jozsi
0a8b6f6411 boards: arduino: nano_matter: add zephyr_i2c label and okay status
This increases out-of-the-box compatibility with various shields
and drivers and also makes the configuration consistent with
other Arduino boards.

Signed-off-by: Tamas Jozsi <tamas.jozsi@silabs.com>
2026-02-24 13:53:00 +01:00
Tahsin Mutlugun
a36ab08276 drivers: serial: uart_max32: Add runtime power management support
Refactor MAX32 UART driver to use pm_device_driver_init so that the
device is moved to the appropriate power state expected by the system
during initialization.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2026-02-24 13:52:15 +01:00
Tahsin Mutlugun
7d2396d876 drivers: serial: uart_max32: Add PM policy constraints
Add PM policy constraints so that UART driver can prevent the system
going to sleep before all characters are sent or received.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2026-02-24 13:52:15 +01:00
Aksel Skauge Mellbye
a6432d7426 west: blobs: Add git lfs http(s) fetcher
Add support for fetching blobs from Git LFS HTTP(s) servers using
the LFS API to discover the blob URL.

This fetcher relies on the `sha256` and `size` fields in the blob
metadata to perform an API request to the LFS API in `url` to
get the download URL for the blob.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2026-02-24 13:51:20 +01:00
Aksel Skauge Mellbye
faf4ba3041 west: blobs: Allow explicit fetcher selection
Decouple fetcher selection from the URL by adding a new field
`fetcher` to the blob metadata. If not set, fall back to parsing
the schema from the URL.

Add an optional field `size` to declare the size of the blob in
bytes.

Update documentation to cover the new additions. Fix a typo
`uri`->`url` and document the `click-through` field together
with the new fields.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2026-02-24 13:51:20 +01:00
Aksel Skauge Mellbye
c5e2ca218a west: blobs: Give the fetcher full context
Pass the entire blob context to the fetcher instead of only
the URL to allow for fetchers that require more context than
a single URL.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2026-02-24 13:51:20 +01:00
Aksel Skauge Mellbye
bb60eee7cf west: blobs: Refactor logging to not use globals
Log using the west command instance instead of the deprecated
global in blob fetchers.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2026-02-24 13:51:20 +01:00
Egon Carusi
3f90fed794 dts: cva6: cva6.dtsi contains wrong reg for gpio and eth
The cva6.dtsi contains bad reg values for eth and gpio peripherals.
The form reg=<0x0 base 0x0 size> has been replaced with expected
reg=<base size>.

Signed-off-by: Egon Carusi <egon.carusi@swhard.it>
2026-02-24 10:42:41 +01:00
Lingao Meng
f9d4e653d1 nvs: fix delete ATE length inconsistency during GC
Delete entries in NVS are represented by an ATE with len == 0 and
no associated data.

However, when GC is triggered by a delete operation, the
propagated ATE length may become non-zero due to unconditional CRC
addition, leading to inconsistent semantics and potential mount or
space calculation issues.

Introduce nvs_data_len_with_crc() to centralize the logic of
conditionally adding the data CRC size. This ensures that delete
entries always retain len == 0 and restores consistency across write,
GC and space calculation paths.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2026-02-24 10:41:31 +01:00
Johann Fischer
d20bbf1c22 boards: blackpill_u585ci: remove CDC ACM UART node
Boards should not define own CDC ACM UART.
See Board Porting Guide, General recommendations.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2026-02-24 10:40:37 +01:00
Johann Fischer
a79f63c9d6 boards: apex_pro_mini: use common DTS fragment to enable CDC ACM UART
Boards should not define own CDC ACM UART.
See Board Porting Guide, General recommendations.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2026-02-24 10:40:37 +01:00
Johann Fischer
05b792d73f boards: remove supported feature 'usb'
Suppoted feature 'usb' is not required or used in any of the USB
samples or tests. The only valid feature for USB is `usbd`, or
`usb_device` for the legacy samples and tests.

See also commit 4df50a057f
("boards: remove supported feature 'usb'")

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2026-02-24 10:40:37 +01:00
Daniel Leung
d6544ddfb5 tests: kernel/mem_protect: test domain de-init
Adds test to de-initialize memory domain if arch supports it.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2026-02-24 10:39:59 +01:00
Daniel Leung
bd5bbed502 tests: kernel/mem_protect: separate thread objects for tests
This separates the mem_domain and kobject test suites to use
different thread variables. Reusing the child_thread from
mem_domain tests in kobject tests is not really desirable
as the child_thread is under test_domain and not the default
memory domain.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2026-02-24 10:39:59 +01:00
Daniel Leung
0654b1ace2 tests: kernel/mem_protect: remove mem_domain_setup()
This is simply calling another setup function. So remove it
and call that setup function directly. There is no need for
this redirection.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2026-02-24 10:39:59 +01:00
Daniel Leung
3032b58f52 xtensa: mmu: support memory domain de-initialization
This supports de-initialization of memory domains to release
allocated page tables back to the pool.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2026-02-24 10:39:59 +01:00
Daniel Leung
c1ff64599b kernel: mem_domain: support memory domain de-initialization
This adds the ability to de-initialization a memory domain.
This requires support in the architecture layer. One usage of
this is to release the resources associated with the domain.
For example, we can release allocated page tables so they can
go back to the pool of page tables to be allocated later.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2026-02-24 10:39:59 +01:00
Daniel Leung
6db2a0fd71 xtensa: mmu: clear L2 table when usage counter reaches zero
When a L2 table is no longer being used, we should set all PTEs
in the table to be illegal PTEs. This is simply a precautious
so that any stray references to the L2 table would not result
in incorrect permissions being applied.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2026-02-24 10:39:59 +01:00
Bernardo Perez Priego
1d12eb64e3 gpio: mchp: Don't skip interrupt enable when IDET is unchanged
`gpio_xec_pin_interrupt_config` returned early when the computed IDET
configuration matched the current CR1 IDET field. On some reset paths
the GPIO control register can retain the same IDET value while the
interrupt aggregator state is reset/reconfigured. In that case, the
early return prevents re-enabling the aggregator and interrupts remain
disabled.

Remove the IDET equality early-return so the driver always updates the
level/edge bookkeeping and programs the interrupt aggregator enable
state.

Signed-off-by: Bernardo Perez Priego <bernardo.perez.priego@intel.com>
2026-02-24 10:39:09 +01:00
Gustav Holmberg
cf7b658609 llext: disable section placement by default
In commit 7a671993eacf7542a450d62439c012503b7cda2e a change was introduced
that placed variables in llextspecific sections. In the linker script
these are guarded by `#ifdef CONFIG_LLEXT`, but not the corresponding
C code, so these variables are being put in sections that are not
specified in linker scripts. This causes issues with IAR linker,
which warns about these orphan sections.

Signed-off-by: Gustav Holmberg <gustav.holmberg@iar.com>
2026-02-24 10:38:00 +01:00