Commit graph

17,121 commits

Author SHA1 Message Date
Arthur Gay
43738e6927 drivers: disk: sdmmc_stm32: Add API to retrieve SD card CSD register
Introduce a new API function in the sdmmc_stm32 driver that allows
applications to access the Card Specific Data (CSD) register of the
SD/MMC card. This functionality, already available in the SPI-based SD
and MMC subsystems, was previously missing from the STM32 SDMMC driver.

This enhancement enables use cases such as verifying the correct SD card
during manufacturing, ensuring that OEMs use the specified SD card, and
preventing mismatches.

Signed-off-by: Arthur Gay <arthur.gay@marshmallow.kids>
2025-10-22 18:33:18 +03:00
Immo Birnbaum
61b145f427 arch: arm: mpu: move MPU memory configuration header
Move the helper file arm_mpu_mem_cfg.h, which translates the values
of the Kconfig symbols CONFIG_FLASH_SIZE and CONFIG_SRAM_SIZE to size
definitions to be used during MPU setup, from a Cortex-M-specific
include directory to the Cortex-agnostic zephyr/arch/arm/mpu directory,
as:

- the contents of this header file are not dependent on the target being
  an ARMv7M, only ARMv8M is excluded, but the contents are identical
  for the ARMv7/8 Cortex-R MPU implementation,
- the header file zephyr/arch/arm/mpu/arm_mpu.h, included within
  arm_mpu_mem_cfg.h, is also compatible with both Cortex-M and Cortex-R,
  the distinction between the two implementations takes place at an
  even lower level,
- several ARMv7/8 Cortex-R targets now reference this header file in their
  MPU region setup (Xilinx ZynqMP, TI K3, Renode cortex_r8_virtual) while
  so far referencing it in an ARMv7 Cortex-M-specific include directory.

Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
2025-10-22 18:32:27 +03:00
Benjamin Cabé
5e590e4171 Revert "arch: arc: add sys_write64/sys_read64 functions"
This reverts commit 3462a489f0 that
was marked as hotfix and merged despite reservations from
ARC maintainer

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-10-22 18:31:56 +03:00
Benjamin Cabé
3462a489f0 arch: arc: add sys_write64/sys_read64 functions
Added sys_read64 and sys_write64 functions for 64-bit memory operations,
similar to sys_read32 and sys_write32.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-10-22 09:17:06 -04:00
Håvard Reierstad
82cfb5a056 Bluetooth: Host: Deprecate BT_FIXED_PASSKEY
The BT_FIXED_PASSKEY Kconfig option is being deprecated, and is replaced
by BT_APP_PASSKEY. The reason for the deprecation is an upcoming
errata, ES-24489, which mandates that a new passkey shall be generated
for each pairing procedure.

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2025-10-22 16:01:08 +03:00
Håvard Reierstad
6c64054d6e Bluetooth: Host: Add BT_APP_PASSKEY Kconfig option
Adds the BT_APP_PASSKEY Kconfig, which allows the application to provide
passkeys for pairing using the new `app_passkey()` callback.
This is an alternative to BT_FIXED_PASSKEY, which will be deprecated in
a later commit.

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2025-10-22 16:01:08 +03:00
Mathieu Choplain
541f7f7ff2 include: bindings: stm32wba: add OTGHS mux selector
Add missing OTGHS_SEL macro to STM32WBA clock header. This macro applies
only to certain SoCs of STM32WBA6x series.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2025-10-22 15:59:27 +03:00
Greter Raffael
a6eaa54f64 sys: util_macro: Support macros as arguments
Adjusted GET_ARG_N and GET_ARGS_LESS_N to use UTIL_CAT instead of simple
concatenation. This allows to use a macro as the argument N instead of
only numbers.

Adjusted the unit tests to showcase this.

Signed-off-by: Greter Raffael <rgreter@baumer.com>
2025-10-22 15:58:10 +03:00
Jordan Yates
70b0e17d60 gnss: gnss_emul: decouple realtime and gnss time
Allow the emulator to be set to an arbitrary UTC time, instead of being
locked to reporting the current system uptime as UTC.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-10-22 15:57:08 +03:00
Jordan Yates
7c3beaf6e4 gnss: gnss_emul: allow direct config queries
Provide an escape hatch from the GNSS API requirement that a device
be active to run the configuration `get` functions. This is useful in
the context of an emulator device to query how other software modules
have configured the GNSS.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-10-22 15:57:08 +03:00
Jordan Yates
711c8ce9e1 gnss: gnss_emul: manual data update mode
Add an option for the GNSS fix state reported by the emulated GNSS modem
to be manually configured by test code, instead of being hardcoded to
always achieve a fix of hardcoded parameters after 5 seconds.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-10-22 15:57:08 +03:00
Anas Nashif
24e094ef5e lib: move cpu_load into lib/os
Move cpu_load to lib/os, as this functionality on its own does not
justify being a subsystem on its own.

Fixes #95498

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-10-22 09:02:38 +02:00
Alexander Apostolu
70951ee985 include: zephyr: drivers: sensor.h: updated doxygen for get_frame_count
Updated Doxygen for sensor_decoder_api.get_frame_count().

* Reworded grammar
* Changed channel to chan_spec to reflect data type
* Changed return value from ENOTSUP to EINVAL to be consistent with
    sensor_decoder_api.decode()

Signed-off-by: Alexander Apostolu <apostolu240@gmail.com>
2025-10-22 09:01:21 +02:00
Titouan Christophe
ebad819d98 crypto: hash: in_buf should be constant
Hashing takes an input buffer, and writes the result in a separate
output buffer. Therefore, the input can be marked as constant, so that
constants can be supplied directly to the hashing context without any
intermediate copy, and without having to perform a type-unsafe cast
from (const uint8_t *) to (uint8_t *)

Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
2025-10-21 22:55:24 +03:00
Lucien Zhao
b53ba6043a drivers: clock_control: add nxp_mc_cgm clock driver
- add clock_init function to initialize clock sources according
  devicetree settings
- finish basic clock api function

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2025-10-21 22:55:08 +03:00
Daniel Leung
38d49efdac kernel: mem_domain: keep track of threads only if needed
Adds a new kconfig CONFIG_MEM_DOMAIN_HAS_THREAD_LIST so that
only the architectures requiring to keep track of threads in
memory domains will have the necessary list struct inside
the memory domain structs. Saves a few bytes for those arch
not needing this.

Also rename the struct fields to be most descriptive of what
they are.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-10-21 22:54:44 +03:00
Eric Ocasio
196a1da504 pmci: mctp: samples: Add support for MCTP over USB.
Adds support for the USB device binding for MCTP. Binding created based on
the DMTF specification for USB Transport Binding. The overall design of
this binding follows the existing UART and I2C+GPIO bindings that already
exist in Zephyr.

Signed-off-by: Eric Ocasio <eric.ocasio@nxp.com>
2025-10-21 12:25:56 -04:00
Tony Han
be03792d3d include: dt-bindings: sam_pmc: add PMC clocks for SAMA7D65
Add LVDSPLL, MCK3 and MCK5 clock definitions for microchip SAMA7D65.

Signed-off-by: Tony Han <tony.han@microchip.com>
2025-10-21 17:26:09 +03:00
Cla Mattia Galliard
8d38e720a4 net: pkt_filter: Filters to modify priority to incoming packets
To enable quality-of-service (QoS) applications, allow filters to modify
the priority of an incoming packet. This allows that processing can be
done on tc-queue-threads with different priorities.

Signed-off-by: Cla Mattia Galliard <clamattia@gmail.com>
2025-10-21 17:25:56 +03:00
Jiafei Pan
bca62b6043 counter: add counter_ticks_to_ns()
Add new API to get nanosecond from counter ticks.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2025-10-21 17:23:34 +03:00
Jukka Rissanen
1cfdf7c8d1 lib: Introduce a way to set minimum file descriptors count
Instead of user trying to figure out what is the amount of file /
socket descriptors in the system, let the various subsystems etc.
specify their need using a Kconfig option. The build system will
then add these smaller values together and set a suitable file
descriptor count in the system.

This works the same way as the heap size calculation introduced
in commit 3fbf12487c

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-10-21 17:22:03 +03:00
Jordan Yates
3973aaa282 modem: modem_cellular: comms check result callback
Add a callback for the periodic script result so that applications have
a way of detecting dead links.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-10-21 14:16:49 +03:00
farsin NASAR V A
574cff532d drivers: reset: microchip: Add reset driver
Add reset driver for Microchip RSTC G1 IP.

Signed-off-by: farsin NASAR V A <farsin.nasarva@microchip.com>
2025-10-21 14:15:33 +03:00
David Jewsbury
077021070c drivers: clock_control: Add macros for AUXPLL output frequencies
These represent the outputted frequencies of the AUXPLL of
different settings set in the device tree set using dt-bindings
in nrf-auxpll.h. This is added to remove the need for 'magic numbers'
in drivers and tests.

Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
2025-10-21 14:15:23 +03:00
Immo Birnbaum
cdc8325307 dts: bindings: remove AMBA AHB bus width parameter from xlnx,gem binding
This parameter no longer needs to be configured at the SoC level in
the declarations of the GEM controller instances (used to require
different values for the Zynq-7000 and the ZynqMP) as the value matching
the current target SoC is now being read at run-time from a design
configuration register.

Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
2025-10-21 11:43:03 +03:00
Lyle Zhu
e55bea247b Bluetooth: Classic: HFP_HF: Support users to query current call list
Add the function `bt_hfp_hf_query_list_of_current_calls()` to support
users to query current call list.

Add the callback `bt_hfp_hf_cb::query_call` to notify the received
current calls.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-10-21 11:42:28 +03:00
Arnaud Pouliquen
d65fc29d43 arch: arm: mmu: introduce K_MEM_ARM_NORMAL_NC flag
Add new flag to allow to select normal non-cacheable memory.
This is needed for armV7 to be able to configure non cacheable
memories with "normal" attribute instead of "device" attribute.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2025-10-21 11:42:17 +03:00
Julien Racki
9c9d100839 drivers: clock: stm32: Move the MSI init after the LSE init
Moved the MSI init after the LSE init to respect the initialization flow
of the MSI PLL mode that need LSE to be enabled and ready.

Signed-off-by: Julien Racki <julien.racki-ext@st.com>
2025-10-21 11:41:33 +03:00
COUSSEMENT Stijn
523eed2d08 drivers: sensor: ti: Add TI temp sensor HDC302x
The HDC302X sensor driver is added,
you can use this driver to read temperature and humidity.
Also set an offset, upper and lower limits to get warned
when temperature or humidity get out of band.
The sensor is build for ultra low power applications.

Signed-off-by: COUSSEMENT Stijn <stijn.coussement@psicontrol.com>
2025-10-20 19:19:09 -04:00
Johann Fischer
bca0ce0870 usb: device_next: hid: allow to set polling period at runtime
Allow to set input or output report polling period at runtime.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-10-20 19:19:00 -04:00
Logan Saint-Germain
52d0ad2c67 drivers: sensor: max30101: Enhanced driver to support triggers
The max30101 sensor driver doesn't support triggers.
Add `.trigger_set` API and corresponding Kconfig and
device tree parameters. Add `SENSOR_CHAN_AMBIENT_LIGHT`
and `SENSOR_TRIG_OVERFLOW`.

Signed-off-by: Logan Saint-Germain <l.saintgermain@catie.fr>
2025-10-20 19:17:51 -04:00
Seppo Takalo
1f996d07b8 modem: cmux: Implement Modem Status Command
Implement Modem Status Command(MSC) and a per DLC flow
control by using it.

Send flow control signals when our input buffer don't fit
full frame anymore.
Stop TX if we have received from controls on MSC.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2025-10-20 19:16:10 -04:00
Etienne Carriere
be62ee205a include: zephyr: arch: add missing stddef.h/stdbool.h in cache.h
Add missing inclusion of stddef.h and stdbool.h to respectively define
size_t and bool types used in some cache.h function declarations.

This change prevents build errors like:

.../include/zephyr/arch/cache.h:105:41: error: unknown type name 'size_t'
  105 | int arch_dcache_flush_range(void *addr, size_t size);
      |                                         ^~~~~~

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2025-10-20 14:21:33 -04:00
Firas Sammoura
52084a9321 riscv: pmp: Use XLEN-derived PMPCFG_STRIDE for array sizing
Replace `sizeof(unsigned long)` with `PMPCFG_STRIDE` (defined as
`__riscv_xlen / 8`) for dimensioning PMP configuration register arrays
(`pmpcfg_regs`).

The size of PMP configuration registers should be derived directly from
the target architecture's XLEN. Using `sizeof(unsigned long)` can cause
size mismatches, particularly with static analysis tools like SonarQube.
These tools might assume a host-specific size for `unsigned long`,
leading to spurious out-of-bounds access warnings when analyzing code
for different RISCV base architectures (e.g., RV32 vs. RV64).

This change ensures the array sizing is correctly and consistently tied
to the target's register width (XLEN).

Signed-off-by: Firas Sammoura <fsammoura@google.com>
2025-10-20 11:26:43 -04:00
Declan Snyder
dac0464b3a include: spi.h: Fix anonymous initialization order
Apparently some compiler may expect the fields initialized in a certain
order when there are anonymous fields in a struct.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-10-20 11:25:23 -04:00
Tim Lin
0ea524e0ae drivers: flash: ite: Add ex_op support for flash target and address mode
Extend the IT51XXX M1K flash controller driver to implement the flash
extended operation (ex_op) API. This allows runtime selection of both
the flash device and the addressing mode:

Flash target selection:
- FLASH_IT51XXX_INTERNAL: on-chip SPI eFlash
- FLASH_IT51XXX_EXTERNAL_FSPI_CS0: external SPI flash on FSCE0#
- FLASH_IT51XXX_EXTERNAL_FSPI_CS1: external SPI flash on FSCE1#

Addressing mode selection:
- FLASH_IT51XXX_ADDR_3B: 3-byte (24-bit) addressing mode, supports
  flash devices up to 16MB capacity
- FLASH_IT51XXX_ADDR_4B: 4-byte (32-bit) addressing mode, required
  for devices larger than 16MB

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-10-20 11:23:25 -04:00
Aleksander Wasaznik
70dd38a9b4 Bluetooth: Host: Add documentation for L2CAP tx buffer callbacks
Document the ownership contract and callback semantics for L2CAP
transmission buffers:

- Extend tx_queue documentation in bt_l2cap_le_chan to explain SDU/PDU
  storage, callback handling, and transmission order semantics
- Document bt_l2cap_create_frag responsibilities regarding callback
  invocation after HCI Number of Completed Packets or on disconnect
- Document bt_l2cap_send_pdu callback contract: invoked exactly once
  after transmission completes or with -ESHUTDOWN on disconnect

These documentation additions clarify the requirements for proper
buffer lifecycle management and callback invocation throughout the
L2CAP transmission path.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2025-10-20 11:54:42 +02:00
Chris Friedt
7d95a0fd7b posix: signal.h: include sigev_notify_function field in struct sigevent
Previously, the `sigev_notify_function` field was missing from
`struct sigevent`. Additionally, `sigev_notify_attributes` were
incorrectly named `sigev_thread_attr`.

Add it back to ensure that we are able to support realtime signals.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-10-18 20:33:57 -04:00
Chris Friedt
0fec926941 posix: signal.h: reorder where sigval and siginfo_t are declared
In order to avoid warnings, declare `union sigval` ahead of
`struct sigevent` and declare `siginfo_t` ahead of `struct sigaction`.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-10-18 20:33:57 -04:00
Chris Friedt
c606c3cdff posix: signal.h: sigevent is a struct not a typedef
A previous typo went undetected that declared a type-defined
`sigevent_t`, which is obviously incorrect, since it is only specified as
`struct sigevent`.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-10-18 20:33:57 -04:00
Chris Friedt
d11f05d93c posix: time.h: timepsec is a struct not a typedef
A previous typo went undetected that declared a type-defined
`timespec_t`, which is obviously incorrect, since it is only specified as
`struct timespec`.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-10-18 20:33:57 -04:00
Chris Friedt
9a82d409af posix: signal.h: do not define struct timespec when >= c11
C11 requires `<time.h>` to define `struct timespec`, so do not define
it when C11 is already known.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-10-18 20:33:57 -04:00
Chris Friedt
b069de68d8 posix: signal.h: always pull in time_t definition from libc
Avoid redefining `time_t` by always including the definition from
`<time.h>`, since the C library may use something other than `long`.

This is still safe according to the specification, since it explicitly
states:

> Inclusion of the <signal.h> header may make visible all symbols from
> the <time.h> header.

For more information, please see
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/signal.h.html

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-10-18 20:33:57 -04:00
Adam BERLINGER
f6cd77a7aa dts: arm: st: u0: Add CK48 multiplexer
Adds CK48 mutliplexer for STM32U0 families.

Signed-off-by: Adam BERLINGER <adam.berlinger@st.com>
2025-10-17 21:04:42 -04:00
Robert Perkel
1d5ffe5cc5 drivers: sensor: microchip: mtch9010 Added mtch9010 support
Added support for MTCH9010 and applied edits from reviewers.

Signed-off-by: Robert Perkel <robert.perkel@microchip.com>
2025-10-17 21:02:44 -04:00
Charles Dias
9c34b18cff dts: bindings: mipi-dsi: extend STM32 MIPI DSI support
These additions enhance the flexibility of the MIPI DSI host configuration
for STM32U5 series, enabling finer control over the DSI PLL and PHY
settings.

Signed-off-by: Charles Dias <charlesdias.cd@outlook.com>
2025-10-17 22:02:16 +03:00
Tom Hughes
b76911d8e0 arch: riscv: Fix warning when C++ is enabled
When compiling with C++ enabled (CONFIG_CPP), add an unused member to
prevent an empty struct; this makes the struct size the same for both C
and C++.

Fixes the following warnings:

In file included from include/zephyr/drivers/gpio.h:22:
In file included from include/zephyr/tracing/tracing.h:9:
In file included from include/zephyr/kernel.h:17:
In file included from include/zephyr/kernel_includes.h:32:
In file included from include/zephyr/kernel_structs.h:29:
In file included from include/zephyr/arch/structs.h:29:
include/zephyr/arch/riscv/structs.h:11:1: error: empty struct has size 0
in C, size 1 in C++ [-Werror,-Wextern-c-compat]
   11 | struct _cpu_arch {
      | ^

In file included from include/zephyr/drivers/gpio.h:22:
In file included from include/zephyr/tracing/tracing.h:9:
In file included from include/zephyr/kernel.h:17:
In file included from include/zephyr/kernel_includes.h:36:
In file included from include/zephyr/arch/cpu.h:25:
In file included from include/zephyr/arch/riscv/arch.h:18:
include/zephyr/arch/riscv/thread.h:68:1: error: empty struct has size 0
in C, size 1 in C++ [-Werror,-Wextern-c-compat]
   68 | struct _thread_arch {
      | ^

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-10-17 17:03:16 +03:00
cyliang tw
1e216d5b1e soc: nuvoton: numaker: add support for m333x series
Add initial support for Nuvoton NuMaker-M333x SoC series,
including basic initialization and device tree includes.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2025-10-17 12:55:17 +02:00
Kiara Navarro
bf535a4166 logging: document log_backend_std_get_flags
The function `log_backend_std_get_flags` was not documented.
Create a doxygen style documentation for it.

Signed-off-by: Kiara Navarro <knavarro@paltatech.com>
2025-10-17 11:16:03 +02:00
Pieter De Gendt
93c4dbd2e0 modules: hostap: Support bgscan
Add configuration options for background scanning (bgscan) in
wpa_supplicant.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-10-17 11:15:37 +02:00