Commit Graph

15548 Commits

Author SHA1 Message Date
Mark Wang
e71b5122f7 bluetooth: classic: add role switch API
add bt_conn_br_switch_role and bt_conn_br_set_role_switchable to control
the role switch, add DEFAULT_ROLE_SWITCHABLE Kconfig to control the default
role switch state.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2025-07-19 09:59:16 +02:00
Mark Wang
31fba83fb3 bluetooth: classic: add role changed callback
add `role_changed` to `struct bt_conn_cb` to notify the HCI_Role_Change
event to application.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2025-07-19 09:59:16 +02:00
Jilay Pandya
3ce26616c9 drivers: stepper: rename gpio_steppper_controller to h_bridge_stepper
rename gpio stepper to h bridge stepper
minor correction in stepper_stop, stepper_stop shall cancel all active
movements and should not be concerned about keeping the coils energized
or not, since that is a concern of a motion controller and not a stepper
driver.

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-07-19 09:57:40 +02:00
Tom Burdick
cbfe7813c7 pmci: mctp: I2C+GPIO Target binding
Adds a I2C+GPIO Target device binding for MCTP communication over I2C.

The binding requires an i2c bus and gpio pin, along with a specified I2C
and endpoint address pair. These are then used to create an MCTP binding
which can be used to communicate in a peer to peer manner among other
MCTP endpoints.

Each message transmit signals to the bus controller using a GPIO logical
high and is unset on transmission completion. Pending transmitters are
queued using a semaphore avoiding memcpy being needed to asynchronously
transmit mctp pktbufs.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2025-07-19 09:53:21 +02:00
Tom Burdick
6464329346 pmci: mctp: I2C+GPIO controller bindings
Adds a custom MCTP binding for an I2C bus controller using GPIO signaling
for write requests rather than mode switching.

This binding operates a lot like the I3C binding specification DMTF has
for MCTP. The controller expects to receive interrupts (from GPIO pins)
and upon getting an interrupt read a message from the I2C target device.

The macro does a lot of the heavy lifting to setup all the state needed
for capturing GPIOs, being able to do asynchronous reads/writes, and
such. The entire controller works using state machines driven by
interrupts leading to low latency and clear ram costs.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2025-07-19 09:53:21 +02:00
Tom Burdick
9e12c111bb i2c: Use a I2C_CONCAT rather than ## in names
Fixes an issue where the name is not a token itself but perhaps an
unrealized macro.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2025-07-19 09:53:21 +02:00
Ravinder Singh
394c97a819 Bluetooth: LE: CONN: Added bt_conn_le_set_default_phy function.
Added bt_le_set_default_phy in hci. This handles
the HCI_LE_Set_Default_PHY HCI command.
Added call to bt_conn_le_set_default_phy in central_gatt_write and
peripheral_gatt_write samples.

Signed-off-by: Ravinder Singh <ravinder.singh2@infineon.com>
2025-07-19 09:46:34 +02:00
Sean Kyer
4484354dcc secure_storage: Add global registry for PSA ITS UIDs
Allows for subsystems to reserve UID ranges when using
PSA ITS.

Signed-off-by: Sean Kyer <Sean.Kyer@analog.com>
2025-07-19 09:45:56 +02:00
Yanir Levin
6df14b432e arc: cache: Support region operations, SLC, and entire cache operations
Added configurable support for L1 cache region operations,
which offers improved performance over line operations.
Added configurable support for SLC (system level cache).
Added support for entire cache operations: flush_all,
invd_all, flush_and_invd_all.

Reviewed-by: Aaron Komisar <aaron.komisar@tandemg.com>
Signed-off-by: Yanir Levin <ylevin@gsitechnology.com>
2025-07-19 09:42:20 +02:00
Make Shi
c95d3167e2 Bluetooth: AVRCP: Implement unit message reception on the AVRCP target
- Add a new callback to support the situation when a unit info command is
  received, and add an API to respond to the unit info command.

Signed-off-by: Make Shi <make.shi@nxp.com>
2025-07-19 09:40:19 +02:00
Make Shi
a559fee00b Bluetooth: AVRCP: Refactored AVRCP API for CT/TG separation
- Only AVRCP connect and disconnect api for AVRCP common functions.
- Added _ct prefixes to all CT callback functions and feature APIs.
- Updated shell demo code for AVRCP API changes.

Signed-off-by: Make Shi <make.shi@nxp.com>
2025-07-19 09:40:19 +02:00
Alberto Escolar Piedras
f5bc01beae include/zephyr/linker/common-rom: Remove NATIVE_APPLICATION support
It is not possible to build anymore in that mode, so we do not
need to support building the constructors and initialization arrarys
in a way that support it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-07-19 09:38:15 +02:00
Alberto Escolar Piedras
0cb474a338 include toolchain mwdt.h: Fix old comment
This ifdef was changed to use another kconfig option, but
the comment in the endif was forgotten, let's fix it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-07-19 09:38:15 +02:00
Anas Nashif
e3278012e4 memmgmt: doc: replace Memory-Attr with Memory Attributes
No need to use abbriviated form here, just spell it out.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-07-16 16:39:59 -05:00
Anas Nashif
1a7ce3f45e Revert "init: Make entry init-function less and introduce service objects"
This reverts commit 175da6bdb0.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-07-16 16:39:36 -05:00
Tom Hughes
9fd547f94d zephyr: sw_isr_table: Fix compilation error
The IRQ_DIRECT_CONNECT macro eventually uses _Z_ISR_DIRECT_TABLE_ENTRY,
which defines a function. IRQ_DIRECT_CONNECT is meant to be used
inside functions. While nested functions are supported as an extension
in GNU C, the nested function cannot have static storage.

https://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html:

> A nested function always has no linkage. Declaring one with extern or
> static is erroneous.

./scripts/twister -c -s arch.interrupt.gen_isr_table_local.riscv --all

tests/kernel/gen_isr_table/src/main.c: In function
'gen_isr_table_test_build_time_direct_interrupt':
include/zephyr/sw_isr_table.h:197:41: error: invalid storage class for
function '__isr_table_entry_isr1_irq_2'
#define __MK_ISR_ELEMENT_NAME(func, id) __isr_table_entry_ ## func ## _irq_ ## id
                                        ^~~~~~~~~~~~~~~~~~

Issue #92194

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-07-14 07:09:03 -10:00
Robert Lubos
151295f98e net: sockets: Move socket vtable definition
Offloaded socket implementations need to create the socket operations
vtable, therefore need access to struct socket_op_vtable. So far this
has been defined in a private header, so implementations needed to add
the header location to the include path in CMake.

Therefore, move struct socket_op_vtable definition to the internal part
of the public socket header, so it's no longer needed to include a
private header. This is also more consistent with the rest of the public
header content, as for example macros needed to register a socket
implementation are already there.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-07-11 16:32:49 -05:00
Dipak Shetty
fd1f4392a6 include: zephyr: bluetooth: uuid: fix typo in characteristic doxygen
Fixes correct GATT characteristic description for Device Time.

Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
2025-07-11 16:32:39 -05:00
Ilya Tagunov
708c1dc488 linker: arc: add .rodata_in_data section to avoid unexpected placement
The .rodata_in_data section is produced by MWDT toolchain with -Hccm
option enabled. This option moves read-only data from the executable
memory (ICCM) to the data memory (DCCM), improving performance by
reducing conflicts between instruction fetches and data fetches.

Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
2025-07-11 16:32:28 -05:00
Tim Pambor
970c715ef4 sys: cbprintf: Suppress bugprone-sizeof-expression
clang-tidy reports a bugprone-sizeof-expression warning for
sizeof((__v)) when __v is a pointer type. This is a false-positive
in contexts like logging with %p, where using a pointer is
intentional and expected.

Add a NOLINT comment to suppress the warning in static analysis.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2025-07-11 09:41:50 -05:00
Tim Pambor
9f5492acec sys: cbprintf: Fix performance-no-int-to-ptr warning
clang-tidy reports a performance-no-int-to-ptr warning due to the cast
(const char *)(uintptr_t)(v).

Previously, only char * was cast to const char *, but there's no downside
to constifying all pointer types.

This change updates the Z_CONSTIFY macro to apply const consistently,
which even aligns better with its name and resolves the warning.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2025-07-11 09:41:50 -05:00
Josuah Demangeon
e0b706b6c6 drivers: video: stm32_dcmipp: move video/ header directory to drivers/
During #89407 a driver-specific header stm32_dcmipp.h got introduced to
support new functionnalities not yet covered by video APIs.
Move this header into a new <include/zephyr/drivers/video/> include
direcctory like what other driver classes do.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-07-09 09:42:43 -05:00
Benjamin Cabé
86bea343b1 Bluetooth: BAP: fix bad doxygen @cond placement
Move `@cond INTERNAL_HIDDEN` comment where it belongs (fixing what was
probably a copy-paste/refactoring error).
This also makes the previously `bap_iso`, `group`, `_prev_seq_num`
visible again.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-08 13:41:02 -05:00
Benjamin Cabé
80b7745d24 include: math: doc: add doxygen groups
add doxygen groups to include/zephyr/math header files and fold them
under Utilities top-level group.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-08 13:39:35 -05:00
Benjamin Cabé
3d111dd6e9 include: dsp: doc: cleanup Doxygen for DSP headers
moved docs to Utilities group (vs. top-level)
cleaned several incorrect Doxygen group definitions

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-08 13:39:35 -05:00
Chris Friedt
7da64e7bda poxi: aio: include zephyr/toolchain.h for ZRESTRICT
Previously, ZRESTRICT was used in aio.h without also including
zephyr/toolchain.h.

Tests may have compiled because the toolchain header was included by
some other means.

We should explicitly include it to ensure that ZRESTRICT is defined.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-07-04 16:44:02 -10:00
Yong Cong Sin
1967d1e699 drivers: syscon: do not assume that a function isn't supported
When a function pointer is `NULL`, it could be that the underlying
hardware doesn't support it, or it isn't implemented.

If a function isn't supported by the hardware, its driver should
return `-ENOTSUP`, the API layer should return `-ENOSYS` when a
function isn't implemented.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2025-07-04 16:42:53 -10:00
Benjamin Cabé
11a552b0f8 include: drivers: virtio: fix doxygen groups
Virtio Doxygen documentation is now folded under Device Driver API group
like it should be.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-04 15:49:54 -05:00
Benjamin Cabé
ee2b9a4e6d drivers: virtio: move virtio headers to zephyr/drivers
Virtio headers are moved to zephyr/drivers/ as they have no reason to be
top-level headers since virtio is a driver class.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-07-04 15:49:54 -05:00
Robert Lubos
48d1a01b2d net: sockets: Specify alignment for sockaddr* structs
To avoid misalignment errors when casting between
sockaddr_storage/sockaddr and specialied sockaddr_* variants, specify
alignment for the former to match the alignment of the others.

The issue was reported by UBSAN:

  utils.c:802:8: runtime error: member access within misaligned
  address 0xf4aff186 for type 'struct sockaddr_in6', which requires
  4 byte alignment

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-07-04 13:16:32 -05:00
Robert Lubos
f549bfcfeb net: ipv4: Add raw variants of various IPv4 functions
To address the misaligned access issues reported by UBSAN, introduce raw
variant of certain IPv4 functions used in the critical data path of the
network stack, operating on plain uint8_t buffers in stead of IPv4
address struct.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-07-04 13:16:32 -05:00
Robert Lubos
74ccd5fdaa net: ipv6: Add raw variants of various IPv6 functions
To address the misaligned access issues reported by UBSAN, introduce raw
variant of certain IPv6 functions used in the critical data path of the
network stack, operating on plain uint8_t buffers in stead of IPv6
address struct.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-07-04 13:16:32 -05:00
Robert Lubos
9b00a1d656 net: ipv6: Fix net_ipv6_is_addr_mcast_group() check
Some bytes were compared twice and one comparison used wrong index.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-07-04 13:16:32 -05:00
Guillaume Gautier
9977ce4eb6 dts: bindings: memc: stm32-fmc: reorder parameters to match code
Description of parameters in st,control property didn't match the values
used in the code.
Modify the description to match with the current driver implementation.
Also add a description for reg property to help setting it properly and
add corresponding dt-bindings.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-07-04 13:07:24 -05:00
Gaetan Perrot
4bee190264 sensor: icm42688: use lowercase for group name
Fix group name to lowercase for consistency with Zephyr documentation
guidelines.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-04 13:05:35 -05:00
Gaetan Perrot
aee0c34ece sensor: adxl345: use lowercase for group name
Fix group name to lowercase for consistency with Zephyr documentation
guidelines.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-04 13:05:35 -05:00
Gaetan Perrot
5d2f4e8dcd sensor: adxl367: use lowercase for group name
Fix group name to lowercase for consistency with Zephyr documentation
guidelines.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-04 13:05:35 -05:00
Gaetan Perrot
e6c1f02436 sensor: adxl362: use lowercase for group name
Fix group name to lowercase for consistency with Zephyr documentation
guidelines.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-04 13:05:35 -05:00
Gaetan Perrot
89cdd133ad sensor: tmp114: use lowercase for group name
Fix group name to lowercase for consistency with Zephyr documentation
guidelines.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-04 13:05:35 -05:00
Gaetan Perrot
fbbb777795 sensor: mc3419: use lowercase for group name
Fix group name to lowercase for consistency with Zephyr documentation
guidelines.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-04 13:05:35 -05:00
Gaetan Perrot
0490f03b29 sensor: tmp11x: use lowercase for group name
Fix group name to lowercase for consistency with Zephyr documentation
guidelines.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-04 13:05:35 -05:00
Josuah Demangeon
645f3d38e1 drivers: video: fix order of fields to allow use with FIFOs
The struct video_buffer are currently used with `struct k_fifo`, which
require them to preserve the first word of data for use by the kernel.
Move the first fields to make it possible to keep using video buffers in
FIFO safely.

Fixes #92526

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-07-02 17:58:46 -05:00
Gaetan Perrot
48c85cb065 sensor: sensor_axis_align: use lowercase for group name
Fix group name to lowercase for consistency with Zephyr documentation
guidelines.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-02 17:58:37 -05:00
Gaetan Perrot
9125e8941d sensor: adxl3xx: use lowercase for group name
Fix group name to lowercase for consistency with Zephyr documentation
guidelines.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-02 17:58:37 -05:00
Gaetan Perrot
ccad3cf5b6 sensor: sensor_axis_align: clarify defgroup
Rename and clarify the @defgroup SENSOR_AXIS_ALIGN to better reflect its
purpose. Replace the vague "DT Options" title with a more descriptive
name: "Sensor axis alignment DT options".

This improves documentation clarity for developers configuring sensor
orientation via Device Tree.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-02 17:58:37 -05:00
Gaetan Perrot
4d11a1188c sensor: adxl3xx: Clarify defgroup names in DT bindings
Replace vague "ADI DT Options" titles with explicit, device-specific
@defgroup names such as "ADXL345 DT Options", "ADXL362 DT Options",
"ADXL367 DT Options", and "ADXL372 DT Options".

This improves clarity for developers and documentation readers by avoiding
the unclear "ADI" abbreviation.

Fix: #92021

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-02 17:58:37 -05:00
Tom Hughes
14f1c567f9 arch: riscv: Increase IDT_LIST size
Some boards fail to build arch.interrupt.gen_isr_table_local.riscv test
since this region is too small:

riscv64-zephyr-elf/bin/ld.bfd: zephyr/zephyr_pre0.elf section `.intList'
will not fit in region `IDT_LIST'

riscv64-zephyr-elf/bin/ld.bfd: region `IDT_LIST' overflowed by 239 bytes

This is a bogus memory region, so increasing it has no effect on the
final binary size.

Issue #92194

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-07-02 17:57:58 -05:00
Jonathan Nilsen
b18c326946 soc: nordic: move nrf_ironside from drivers/firmware to soc/nordic
Move the IronSide APIs to soc/nordic from drivers/firmware since
these are vendor specific APIs. The header files are now included
from <nrf_ironside/*.h>. Adjust code that uses these APIs accordingly.

Also move the DT binding for "nordic,ironside-call" from
bindings/firmware to bindings/misc.

Signed-off-by: Jonathan Nilsen <jonathan.nilsen@nordicsemi.no>
2025-07-02 17:57:45 -05:00
Grzegorz Swiderski
75dd614437 drivers: firmware: nrf_ironside: Update the spelling
s/IRONside/IronSide/g

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2025-07-02 17:57:45 -05:00
Mark Wang
b93dec9295 bluetooth: sdp: cast from 'const x *' to 'struct x *' drops const qualifier
SonarQube reports: cast from 'const struct _snode *' to 'struct _snode *'
drops const qualifier. Fix it by removing the const.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
(cherry picked from commit 7982ee0df13b7f9e54595f799e32f38c464b0f9e)
2025-07-02 03:52:02 -10:00