Commit graph

17,121 commits

Author SHA1 Message Date
Andrey Dodonov
286362087d net: http: service: extend HTTP service with config
Update the HTTP service API to allow setting per-service configuration,
currently it is only custom socket creation callback,
but in the future it can be extended with other parameter

Signed-off-by: Andrey Dodonov <Andrey.Dodonov@endress.com>
2025-07-30 17:32:43 -04:00
Tobias Meyer
ceadedf3ae drivers: sensor: tmp11x: add trigger for alert and pm
Allows to configure the alert or therm mode for triggers
based on the low/high temperature treshholds
Also adding simple PM

Signed-off-by: Tobias Meyer <tobiuhg@gmail.com>
2025-07-30 17:32:27 -04:00
Bjarki Arge Andreasen
4a827fd632 doc: services: pm: update pm device init/deinit/states
- Specify "Device" Power Management Support in sections covering
  CONFIG_PM_DEVICE=y or n
- Extend the enum pm_device_state docstrings to define and detail
  expectations of devices in each enum pm_device_state state.
- Extend pm device driver code example with more concise comments
  and include pm_device_driver_init, pm_device_driver_deinit, and
  DEVICE_DT_INST_DEINIT_DEFINE() (device deinit feature)
- Describe the device driver PM states used if PM_DEVICE is not
  enabled.
- Note which states a device driver is initialized from and can
  be deinitialized in and why.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-07-29 22:56:02 -04:00
Bjarki Arge Andreasen
cd16d17dca pm: device: introduce pm_device_driver_deinit()
Introduce pm_device_driver_deinit() which is required to fully
support device_deinit(). This function shall be called by drivers
when device_deinit() is called.

If PM_DEVICE is enabled, it will
simply check whether the device is either SUSPENDED or OFF, this
will prevent device_deinit() on a device which is currently in
use, and ensure the device is in the correct state if device_init()
is called later.

If PM_DEVICE is not enabled, it will invoke the SUSPEND action which
mirrors the pm_device_driver_init() behavior. Note that TURN_OFF
action is not called since the device is deinitialized after this
call.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-07-29 22:56:02 -04:00
Bjarki Arge Andreasen
6821b5b319 pm: device: extend pm_device_driver_init() description
Rewrite the docstring for pm_device_driver_init() to align with
documentation, especially covering the case where CONFIG_PM_DEVICE=n

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-07-29 22:56:02 -04:00
Benjamin Cabé
bed4ad299c drivers: haptics: add DRV2605_SEQ_WAIT_MS macro
Add a macro to simplify the creation of wait/delay values for the
waveform sequencer.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-29 22:51:46 -04:00
Benjamin Cabé
db3512dc50 include: drivers: haptics: add Doxygen docs for drv2605
Aim for full coverage for the drv2605 device-specific haptics API.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-29 22:51:46 -04:00
Chaitanya Tata
5ff2028203 modules: nrf_wifi: Fix bustest QSPI crash
Commit 5e25283821a("drivers: wifi: Create dedicated mem pool for Wi-Fi
driver") introduced OSAL dependecy in the Zephyr QSPI driver for HL
read, but in bustest we don't enable nrf_wifi OS module, so, it crashes
here. And we should not be using OSAL APIs in Zephyr code anyway.

And in this case we don't even need to use the heap, so, move the rx
buffer to stack.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-07-29 11:23:51 -04:00
Tim Lin
3e82d7c736 drivers/espi: ite: Add support for ESPI_PERIPHERAL_HOST_IO_PVT
Add support the host I/O over eSPI peripheral channel for private
channel.
The default port number of ESPI_PERIPHERAL_HOST_IO_PVT_PORT_NUM
for ITE SoC is 0x68.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-07-29 09:30:02 -04:00
Bjarki Arge Andreasen
2854115443 soc: nrf54h: remove deprecated gpd (global power domain) driver
Remove the deprecated GPD (Global Power Domain) driver.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-07-29 09:03:37 -04:00
Lyle Zhu
af42036ca6 Bluetooth: Classic: SDP: Improve UUID 128 support
In current implementation, the UUID 128 is not well supported. The
found issue includes,
Issue 1: No clear byte order of the UUID 128 in local SDP record.
Issue 2: No clear byte order of the UUID 128 of the SDP discover
parameter.

For issue 1,
Add the description to note that if the SDP attribute type is
`BT_SDP_UINT128`, `BT_SDP_INT128`, and `BT_SDP_UUID128`, the byte
order should be little-endian.

And swap the 128bit from little-endian to big-endian when responding
the peer SDP discovery request.

For issue 2,
Add the description to note that if the SDP discovery type is
`Service Search` and `Service Search Attribute`, and UUID is UUID 128,
the passed UUID data of the discovery request parameter should be
represented as the little-endian byte-order sequence.

And swap the 128bit from little-endian to big-endian when packing the
SDP discovery packet.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-07-29 11:21:37 +01:00
The Nguyen
c538a18782 bindings: pinctrl: add ctsu psel selection for Renesas RA
Add CTSU pin function selection for Renesas RA devices

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2025-07-29 11:19:20 +01:00
The Nguyen
9ae5b7efd9 drivers: input: initial support for renesas,ra-ctsu
First commit to add support for Renesas RA Capasitive Sensing Unit

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2025-07-29 11:19:20 +01:00
Armando Visconti
792b7e3570 rtio: add helper function rtio_read_transaction()
Add a helper function that constructs a rtio SQE chain with the purpose
to perform a bus read operation on a list of registers.

Usage:

  struct rtio_regs regs;
  struct rtio_reg_list regs_list[] = {{regs_addr1, mem_addr_1, mem_len_1},
                                      {regs_addr2, mem_addr_2, mem_len_2},
                                      ...
                                     };
  regs.rtio_regs_list = regs_list;
  regs.rtio_regs_num = ARRAY_SIZE(regs_list);

  rtio_read_regs_async(rtio,
                       iodev,
                       RTIO_BUS_SPI,
                       &regs,
                       sqe,
                       dev,
                       op_cb);

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2025-07-28 16:44:17 -04:00
Cheng Chang
afcce53220 bluetooth: host: a2dp:error_code should be detailed in set_config_rsp
Error codes fall into two main categories:
case 1: NOT_SUPPORT_XXX. This means that the configuration of the
parameter is not supported locally.
case 2: INVALID_XXX. This means that the parameter is not configured or
duplicated in the set_config_req command.

Currently the protocol only supports SBC, so it is only checked for SBC
parameters.

Signed-off-by: Cheng Chang <cheng.chang@nxp.com>
2025-07-28 16:43:29 -04:00
Yishai Jaffe
7f3a728aaa soc: silabs: s2: make order in soc Kconfig's
Made some order in the Kconfig's for silabs series 2 socs.
Made a distinction between silabs "generic family" (e.g. xg21) and silabs
"device family" (e.g. efr32mg21).

Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
2025-07-28 16:40:58 -04:00
Cheng Kai
cf61573ce9 Bluetooth: L2CAP: add br l2cap unregister interface
It needs to do l2cap unregister operation from app

Signed-off-by: Cheng Kai <chengkai@xiaomi.com>
2025-07-28 08:52:01 -04:00
Sean Madigan
3adae8bd9a bluetooth: host: Add support for extended feature set feature
This commit adds support for the extended feature set
feature. This includes:
- hci boilerplate
- kconfigs, including one for a max local feature page
- reading remote features is done by a command and callback
- this is not linked into the auto feature request on
connection as this procedure can take quite a few connection
events, and we do not want to delay the user
- added the commands to the bt shell

Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
2025-07-28 08:48:30 -04:00
Gang Li
84d4592373 net: l2: wifi: add wifi config command
- Added "wifi config" command.
- Add OKC parameter to "wifi config" command.
  Set okc to 1 to enable opportunistic key caching.

Signed-off-by: Gang Li <gang.li_1@nxp.com>
2025-07-28 08:46:37 -04:00
Yuval Peress
ed8f537d89 adc: Fix C++ initialization for channel cfg
When compiling with -Werror=missing-field-initializers and the
differential is disabled, we get a compilation error for the ADC
drivers. We should still initialize the value to false.

Signed-off-by: Yuval Peress <yuval.peress@gmail.com>
2025-07-27 05:00:01 -04:00
Benjamin Cabé
08e328724c include: drivers: misc: ft8xx: add doxygen to ft8xx_touch_transform
Add missing documentation for ft8xx_touch_transform fields.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-25 23:29:31 +02:00
Luis Ubieda
216fc8f5de sensor: icm4268x: Add support for ICM42686 variant
Now this driver supports both ICM42688 and ICM42686.
Tested with read-decode as well as streaming mode.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-07-25 23:28:47 +02:00
Luis Ubieda
8db851ff57 general: icm4268x: Refactor ICM42688 driver to ICM4268X
As a first step to enable the similar variants (e.g: ICM42686),
refactor common functionality into icm4268x files. As a result,
applications using the icm42688 will need to have both compatible
properties: "invensense,icm42688" and "invensense,icm4268x" defined.
In-tree boards have been modified to comply with this pattern.

This patch does not contain functional changes. The driver should
work the same as before.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-07-25 23:28:47 +02:00
Mathieu Choplain
381d820f68 arm: irq: fail build if IRQ_CONNECT is used with ZLI
Commit 3b8e1fa8df updated the documentation
to mention explicitly that ZLI must be registered using IRQ_DIRECT_CONNECT.

Update the ARM IRQ macros such that attempts to register a ZLI using
IRQ_CONNECT becomes a build failure instead of silently succeeding.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2025-07-25 17:03:46 +01:00
Ajay Parida
c70b3504bb net: l2: wifi: Configure BSS max idle period
Support to configure BSS max idle period at runtime.

Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
2025-07-25 17:03:38 +01:00
Triveni Danda
3f037430b6 net: l2: wifi: Refactor certificates processing code into common file
Refactor certificate processing code to eliminate duplication and
enable reuse across modules that require enterprise support.

Signed-off-by: Triveni Danda <triveni.danda@nordicsemi.no>
2025-07-25 17:03:38 +01:00
Kapil Bhatt
fbd34dac0f wifi: Fix fractional part of Tx rate by converting to float
The Tx rate was previously stored as an integer, which caused loss of
precision for rates like 8.6 Mbps or 34.4 Mbps due to integer division.
The change will update data type to float.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2025-07-25 17:03:38 +01:00
Alexander Kozhinov
b6b7b6759d include: zephyr: dt-bindings: clock: stm32mp13_clock
add APB3_S bus

Signed-off-by: Alexander Kozhinov <ak.alexander.kozhinov@gmail.com>
2025-07-25 08:18:48 -04:00
Alexander Kozhinov
a13a857ddd include: zephyr: dt-bindings: clock: stm32wl_clock
add APB0 bus

Signed-off-by: Alexander Kozhinov <ak.alexander.kozhinov@gmail.com>
2025-07-25 08:18:48 -04:00
Alexander Kozhinov
36ef80033c drivers: interrupt_controller: introduce STM32 EXTI driver
add peripheral lines support
add EXTI interface

Co-authored-by: Mathieu CHOPLAIN <mathieu.choplain@st.com>
Signed-off-by: Alexander Kozhinov <ak.alexander.kozhinov@gmail.com>
2025-07-25 08:18:48 -04:00
Alexander Paschoaletto
8c03410af0 tracing: msgq: adding dedicated tracing for k_msgq_put_front
This commit adds the tracing macros and functions related
specifically to the k_msgq_put_front API.

Signed-off-by: Alexander Paschoaletto <axelpinheiro@gmail.com>
2025-07-25 08:16:58 -04:00
Alexander Paschoaletto
16986849d5 kernel: msgq: adding support to k_msgq_put_front
This commit introduces the k_msgq_put_front API for sending
messages to a queue in a LIFO scheme.

Signed-off-by: Alexander Paschoaletto <axelpinheiro@gmail.com>
2025-07-25 08:16:58 -04:00
Thomas Stranger
0a27353945 dt-bindings: clock: stm32c0: add can-fd domain clock helper
On STM32C092 variants CAN-FD is supported, and the clock
source can be chosen in the CCIPR1 register.
This commit adds the helper to prepare that choice for the register.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2025-07-25 08:14:53 -04:00
Luis Ubieda
1187e172b2 rtio: fix CQE semaphore by not giving it no CQE item was created
Otherwise, calls to rtio_cqe_consume_block will bypass the semaphore
and held back in a Z_SPIN_DELAY(1) indefinitely.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-07-25 08:06:08 -04:00
Benjamin Cabé
b49e385889 include: drivers: lora: add missing doxygen comments
Add doxygen documentation where missing in lora.h

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-25 08:05:55 -04:00
Mathieu Choplain
cba9dceff4 Revert "arch: arm: cortex_m: Add API for scb save and restore"
This reverts commit a90a47b1c9.

This commit was written with CMSIS 5 in mind, where some Cortex-M cores
have "SHP" in the SCB_Type, and some have "SHPR". This is not correct as
Zephyr is *supposed* to be using CMSIS 6 for Cortex-M... but CI actually
picks up CMSIS 5 instead (it includes both with CMSIS 5 taking priority).

The end result is that Zephyr's CI builds this happily but it causes build
failures on downstream users (e.g., example-application).

Revert the commit now, as it is not used yet by anyone. The revised version
using only "SHPR" shall be reintroduced once the CI issue has been fixed.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2025-07-25 11:20:12 +01:00
Bjarki Arge Andreasen
825dea6832 shell: exchange k_mutex for k_sem
The mutex is being used as a simple binary semaphore. It is not
recursed so we don't need to track thread ownership nor lock count.

Exchange the mutex for a binary semaphore to save resources and
speed up shell.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-07-24 17:00:07 +01:00
Michele Sardo
a90a47b1c9 arch: arm: cortex_m: Add API for scb save and restore
Add two API to save SCB context and restore it, typically
used in suspend to RAM use case.

The scb_context_t and the backup/restore functions are designed to only
handle SCB registers that are:
- Mutable: Their values can be changed by software.
- Configurable: They control system behavior or features.
- Stateful: Their values represent a specific configuration that an
            application might want to preserve and restore.

Register excluded from backup/restore are:
1.	CPUID (CPUID Base Register)
	Motivation for Exclusion: This is a read-only identification register.
2.	ICSR (Interrupt Control and State Register)
	Motivation for Exclusion (from restoration): While its current value
	can be read, directly restoring a saved	ICSR value is highly
	dangerous and generally unsafe in an RTOS context.
	Contains Read-Only Status Bits: A significant portion of ICSR
	consists of read-only bits (VECTACTIVE, VECTPENDING, ISRPREEMPT,
	TSRUNPEND). These bits reflect the current state of the exception
	system (e.g., which exception is active, which are pending) and are
	managed dynamically by the CPU and the RTOS.
	Forcing a previous state onto these bits would corrupt the live
	system's interrupt handling.
	Contains Write-Only Set/Clear Bits: Some bits are write-only to set
	or clear a pending interrupt (PENDSVSET, PENDSVCLR, SYSTICKSET,
	SYSTICKCLR). If these bits were set in the saved context, restoring
	them might immediately trigger an interrupt or change its pending state
	unexpectedly, outside the RTOS's control.
	RTOS Management: In Zephyr (and other RTOSes), the kernel tightly
	manages the interrupt and exception state.
	Direct manipulation of ICSR's volatile bits could conflict with the
	RTOS's internal state machine, leading to crashes or unpredictable
	behavior.
3.	CFSR (Configurable Fault Status Register)
	Motivation for Exclusion: This is a read-only status register that
	reports the current state of Memory Management, Bus Fault, and Usage
	Faults. It's used by fault handlers to determine the cause of a fault.
4.	HFSR (HardFault Status Register)
	Motivation for Exclusion: Similar to CFSR, this is a read-only status
	register that reports the current state	of HardFaults. It's for
	reporting, not for configuration or restoration.
5.	DFSR (Debug Fault Status Register)
	Motivation for Exclusion: This is a read-only status register that
	reports debug-related faults. It's primarily used by debuggers and
	is not part of the application's runtime context to be saved/restored.
6.	MMFAR (MemManage Fault Address Register)
	Motivation for Exclusion: This is a read-only register that stores the
	address that caused a Memory Management	fault. It's a diagnostic
	register, not a configurable parameter.
7.	BFAR (BusFault Address Register)
	Motivation for Exclusion: Similar to MMFAR, this is a read-only
	register that stores the address that caused a BusFault. It's a
	diagnostic register.
8.	AFSR (Auxiliary Fault Status Register)
	Motivation for Exclusion: This register is implementation-defined and
	read-only.

Signed-off-by: Michele Sardo <msmttchr@gmail.com>
2025-07-24 16:59:59 +01:00
Zhaoxiang Jin
1564438d17 drivers: acmp: Updated driver to be compatible with nxp_rt7xx
1. Fixed the bug that DAC value was set incorrectly.
2. The MIMXRT700 does not have windowed mode and
'enableSample' controls, code added for compatibility
on this platform.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2025-07-24 16:56:55 +01:00
Mathieu Choplain
708ce0336b kernel: spinlock: update k_spin_lock() documentation wrt context switch
Threads must not attempt to context switch if they are holding a spinlock.

Add this information to the documentation for k_spin_lock().

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2025-07-24 02:47:21 -04:00
Mathieu Choplain
af689aa7b8 kernel: irq: update irq_lock() documentation regarding context switches
Upon context switch, the virtual "interrupt lock" acquired by irq_lock()
must not be "held". However, the current documentation for irq_lock() says
that it is perfectly valid to hold it (!), and that a suspended thread will
hold the "interrupt lock" upon being scheduled again (!!).

Update the documentation to remove the outdated section and indicate that
context switching while holding the interrupt lock is not allowed.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2025-07-24 02:47:21 -04:00
Ravi Dondaputi
20b93d79bb net: wifi_mgmt: Enhance documentation
Provide details for the fields defined in wifi_connect_req_params
structure.

Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
2025-07-23 17:30:23 +01:00
Tomáš Juřena
4abf3d584d include: zephyr: dt-bindings: clock: Add HSI48 support STM32C071
STM32C071 have USB peripheral which can be clocked from HSI (HSIUSB48).

Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
2025-07-23 17:27:24 +01:00
Jakub Michalski
77834f2069 fs: implement zephyr fs api for virtiofs
This commit implements zephyr filesystem operations for virtiofs

Signed-off-by: Jakub Michalski <jmichalski@antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2025-07-23 12:20:22 -04:00
Vijayakannan Ayyathurai
affecd1839 drivers: ethernet: Add platform driver for MMIO mapping reuse
The Ethernet device model consists of multiple subsystem components, such
as MDIO, PHY, MAC and PTP_CLOCK. These components are mapped into a single
PCIe BAR location with same base address.

This platform driver retrieves the MMIO mapping details and provides a
framework to share it with all the child subsystem components. This
approach avoid the duplicate remapping, ensures efficient re-use of
MMIO mappings across related devices.

Example device tree structure for first ethernet instance:

parent0: parent0 {
        compatible = "intel,eth-plat";
        interrupt-parent = <&intc>;
        vendor-id  = <0x8086>;
        device-id  = <0xXXXX>;

        igc0: igc0 {
                compatible = "intel,igc-mac";

                /*
                 * MAC specific properties.
                 */

                status = "okay";
        };

        mdio0: mdio0 {
                compatible = "intel,igc-mdio";
                #address-cells = <1>;
                #size-cells = <0>;

                ethphy0: ethernet-phy@0 {
                        compatible = "ethernet-phy";
                        /*
                         * PHY specific properties.
                         */
                        reg = <0x0>;
                };
        };
};

This framework is modular and re-usable for other PCIe based Ethernet
devices. It can also be extended to support additional platform specific
information shared across child nodes.

Signed-off-by: Vijayakannan Ayyathurai <vijayakannan.ayyathurai@intel.com>
2025-07-23 17:17:24 +01:00
Georgij Černyšiov
54e16c4ad2 drivers: mipi_dbi: stm32: get fmc frequency correctly
Use clock api to get correct FMC clock frequency.

Signed-off-by: Georgij Černyšiov <geo.cgv@gmail.com>
2025-07-23 09:34:08 +02:00
Bjarki Arge Andreasen
a39285b720 shell: exchange k_poll for k_event
The shell subsystem currently uses k_poll for signalling. However,
k_poll is only used for simple event signals, results are not used.

Replacing the k_poll with k_event greatly simplifies the code, and
saves 4 struct k_poll_signal and 4 struct k_poll_event (one of which
was entirely unused) while costing a single struct k_event, for
every shell instance. It also allows us to not select POLL,
as we are using the simpler EVENTS instead.

A quick test build of the shell test suite on an nrf54l15 produces
the following build info:

using EVENTS:

           FLASH:       71592 B      1428 KB      4.90%
             RAM:        9872 B       188 KB      5.13%
        IDT_LIST:          0 GB        32 KB      0.00%

using POLL

           FLASH:       75524 B      1428 KB      5.16%
             RAM:       11224 B       188 KB      5.83%
        IDT_LIST:          0 GB        32 KB      0.00%

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-07-22 19:34:02 -04:00
Sanjay Vallimanalan
6c37aa9eac include: zephyr: data: add mixed array type support for json
Introduced a mixed array type for JSON using the struct
json_mixed_arr_descr. Added helper macros to define elements of the
descriptor array.

Signed-off-by: Sanjay Vallimanalan <sanjay@linumiz.com>
2025-07-21 21:31:21 -04:00
Luis Ubieda
25b4e868a9 gnss: u-blox f9p: Add RTK integration to driver
Enable driver to consume RTK data-correction messages published
in order to enhance GNSS Navigation results.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-07-21 09:19:14 -04:00
Luis Ubieda
2418612421 modem: ubx: Change request buffer to be void
So this API can be used to send frames with a different encoding than
UBX. This enables UBX drivers to send RTCM3 correction frames using UBX
API, without having to switch over modem pipes.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-07-21 09:19:14 -04:00