Commit graph

17,121 commits

Author SHA1 Message Date
Lyle Zhu
cbf7576aad Bluetooth: Classic: SDP: Use slist to manage SDP records
Use slist instead of custom singly linked list to manage SDP records.

Check if the SDP record has been registered in the function
`bt_sdp_register_service()`.

Append the new SDP record to the tail of the SDP record list.

Check if the index of SDP record is overflow in the function
`bt_sdp_register_service()`.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-09-10 08:26:50 +02:00
Duy Vo
0c5af6f25f crc: initial support for CRC subsystem
Migrate support from crc library to new crc subsystem
Add hardware acclerator backend for crc subsystem

Signed-off-by: Duy Vo <duy.vo.xc@bp.renesas.com>
2025-09-10 08:26:32 +02:00
Duy Vo
3d99f67436 drivers: crc: initial support for CRC driver
- Implement CRC syscall.
- Add CRC driver API.
- Introduce support for the CRC driver.

Co-authored-by: Zoe Kaute <zoe.kaute@brillpower.com>
Signed-off-by: Duy Vo <duy.vo.xc@bp.renesas.com>
2025-09-10 08:26:32 +02:00
Emil Gydesen
b201cb737e include: util: Add generic function to count bits set in a value
Adds a generic function that will count the number of bits set in
a value.

It uses POPCOUNT (e.g. __builtin_popcount for GCC) if available,
or else it will use Brian Kernighan’s Algorithm to count bits.

POPCOUNT will likely always support unsigned ints, but the function
was implemented to use it with uint8_t for the sake of simplicity
and compatibility with Brian Kernighan’s Algorithm.

A generic solution was chosen rather than a macro/function per
type (e.g. uint8_t, uint16_t, etc.) as that is easier to maintain
and also supports array types (e.g. counting the number of bits
in 128 or 256 octet arrays).

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-09-09 17:27:15 +02:00
Dawid Niedzwiecki
6fddc44d59 mgmt: ec_host_cmd: add USB backend
Add a new ec_host_cmd backend based on USB. The backend uses the new USB
device stack.

The backend implements a vendor-specific (Google) USB interface. It uses
three endpoints:
- bulk OUT to transfer a host command request
- bulk IN to transfer a host command response
- interrupt IN to signal an event and readiness of the response

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2025-09-09 12:18:52 +01:00
Rubin Gerritsen
524b72ce40 toolchain: llvm: Provide working BUILD_ASSERT macro
The resulting BUILD_ASSERT macro provided by
zephyr/toolchain/gcc.h is defined to be empty, making the macro
useless.

This commit ensures we define it to something that actually
performs a validation. When not compiling for C++ or >=C11,
we rely on that cdefs.h provides _Static_assert.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2025-09-09 11:44:38 +02:00
Yongxu Wang
f94b3b9e2b drivers: firmware: scmi: add cpu irq wake interface for nxp vendor
Add scmi_cpu_set_irq_mask function for scmi nxp cpu driver,
set cmc wakeup mask from scmi interface by this.

The CPU_IRQ_WAKE_SET is sent to the scmi platform
to determine which interrupt can wakeup the cpu platform
when the corresponding interrupt occurs

"1" means the IRQ cannot wakeup CPU platform
Each bit corresponds one-to-one with the interrupt
controller of the platform such as nvic in mcore

Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
2025-09-09 10:31:22 +02:00
Sudan Landge
1916ec27b5 arch: arm: support PACBTI with unprivileged mode
To support unprivileged mode (CONFIG_USERSPACE):
- Set unprivileged PAC key registers when system is in unprivileged
  mode.
- Add `bti` after each svc call, to make sure that the indirect jumps on
  `lr` while returning from an `svc` don't result in a usage fault.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2025-09-09 07:34:50 +02:00
Sudan Landge
09cc777daa arch: arm: add per thread unique PAC key support
Add a config option to set unique PAC keys per thread and
make sure to retain them during context switch.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2025-09-09 07:34:50 +02:00
Fin Maaß
a584e36e27 arch: cache: set default of line size
set default of line size to the
value from the devicetree.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-09-08 15:53:36 -04:00
Anas Nashif
25938ec2bf arch: init: rename z_data_copy -> arch_data_copy
Do not use private API prefix and move to architecture interface as
those functions are primarily used across arches and can be defined by
the architecture.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-09-08 15:51:07 -04:00
Anas Nashif
6b46c826aa arch: init: z_bss_zero -> arch_bss_zero
Do not use private API prefix and move to architecture interface as
those functions are primarily used across arches and can be defined by
the architecture.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-09-08 15:51:07 -04:00
Anas Nashif
d98184c8cb arch: boot: rename z_early_memcpy -> arch_early_memcpy
Do not use private API prefix and move to architecture interface as
those functions are primarily used across arches and can be defined by
the architecture.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-09-08 15:51:07 -04:00
Anas Nashif
641fc4a018 arch: init: rename z_early_memset -> arch_early_memset
Do not use private API prefix and move to architecture interface as
those functions are primarily used across arches and can be defined by
the architecture.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-09-08 15:51:07 -04:00
Anas Nashif
53a51b9287 kernel/arch: Move early init/boot code out of init/kernel headers
Cleanup init.c code and move early boot code into arch/ and make it
accessible outside of the boot process/kernel.

All of this code is not related to the 'kernel' and is mostly used
within the architecture boot / setup process.

The way it was done, some soc code was including kernel_internal.h
directly, which shouldn't be done.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-09-08 15:51:07 -04:00
Anas Nashif
cf6db903e1 kernel: move xip into arch/common
Not really a kernel feature, more for architecture, which is reflected
in how XIP is enabled and tested. Move it to architecture code to keep
which much of the 'implementation' and usage is.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-09-08 15:51:07 -04:00
Fabio Baltieri
fbe0c9feb9 utils: utf8: change utf8_count_chars return to int
Change utf8_count_chars return type to int and drop thesys/types.h, this
way the function does not depend on posix types.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-09-08 11:11:40 -04:00
Fabio Baltieri
8366365c03 util: move utf8 utils to a separate header
This moves the declaration of the utf8 utils defined in lib/utils/utf8.c
in their own header. Main reason to do this is that the current setup
requried adding an include for sys/types.h in util.h, which can result
in a build falure due to a circular header depdenecy when using:

CONFIG_POSIX_API=y
CONFIG_NEWLIB_LIBC=y
_GNU_SOURCE

the loop and error are:

- include/sys/types.h:50: <- this is a NEWLIB one
- include/zephyr/posix/sys/select.h:9:
- include/zephyr/posix/posix_types.h:30:
- include/zephyr/kernel.h:17:
- include/zephyr/kernel_includes.h:25:
- include/zephyr/sys/atomic.h:18:

include/zephyr/sys/util.h:705:1:
error: unknown type name 'ssize_t'

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-09-08 11:11:40 -04:00
Elmo Lan
ee2ebbd3a8 drivers: gpio: rts5912 remap gpio number
Provide a map from RTS5912_GPIO_NUM_000 to RTS5912_GPIO_NUM_131
for appication call be easier read.
For example:
Used: <&gpiog 6 (GPIO_OUTPUT)>
Now: <RTS5912_GPIO_NUM_102 (GPIO_OUTPUT)>

Signed-off-by: Elmo Lan <elmo_lan@realtek.com>
2025-09-08 09:48:22 +02:00
Benjamin Cabé
fa201b3c2e include: drivers: doc: uniformize wording of Doxygen groups
Use consistent wording for Doxygen groups of device driver interfaces.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-09-06 06:36:28 -04:00
Benjamin Cabé
fbd2e28f43 include: drivers: add Doxygen @file tag
Ensure all top-level device driver headers have a Doxygen @file tag and
put the @file in the same group as the driver API.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-09-06 06:36:28 -04:00
Benjamin Cabé
3e9f46c1ca doc: doxygen: improve name/desc of Device Drivers group
add an actual meaningful brief and detailed desc

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-09-06 06:36:28 -04:00
Benjamin Cabé
08e41ca0ba include: drivers: lora: follow naming scheme for doxygen group
Minor changes so that LoRa API uses the same naming scheme as other
device drivers.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-09-06 06:36:28 -04:00
Benjamin Cabé
1d2b03feb3 include: drivers: edac: follow naming scheme for doxygen group
Minor changes so that edac API uses the same naming scheme as other
device drivers.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-09-06 06:36:28 -04:00
Benjamin Cabé
82765de253 include: mspi: fold MSPI devicetree macros doc under MSPI group
Move MSPI devicetree macros documentation under MSPI group to not
clutter top-level device drivers page.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-09-06 06:36:28 -04:00
Benjamin Cabé
b98c2106c3 include: arch: cache: move arch/cache.h to arch-interface Doxygen group
This module was erroneously showing up in Device Drivers category.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-09-06 06:36:28 -04:00
Benjamin Cabé
1cb7fc7e1e include: dt-bindings: fix doxygen group for sent.h
do not redefine sent_interface group, but rather add to existing one

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-09-06 06:36:28 -04:00
Benjamin Cabé
80c2cb82c6 drivers: sensor: include: add doxygen for sensor_data_generic_header
Basically just fixing the comment style to use javadoc-style comments
so that doxygen picks these up

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-09-06 06:36:28 -04:00
Krzysztof Chruściński
53c2d58ff8 lib: utils: Add function for finding group of cleared bits in a bit mask
Add function which finds contiguous number of bits which are not set
in the 32 bit mask.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-09-06 10:38:18 +02:00
Charles Hardin
81283c678a kernel: event api extensions to clear events and avoid phantom events
This is variation of the PR to handle phantom events and hopefully
this get merged into the PR to land.

See-also: https://github.com/zephyrproject-rtos/zephyr/pull/89624
Signed-off-by: Charles Hardin <ckhardin@gmail.com>
2025-09-05 16:50:28 -04:00
Anas Nashif
0c84cc5bc6 kernel: drop deprecated pipe API
This API was deprecated in 4.1, so drop it for the 4.3 release. Use new
PIPE API instead.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-09-05 17:13:05 +02:00
Josuah Demangeon
a6faa0ca32 usb: host: rename "struct usbh_contex" to "usbh_context"
Make the struct name match the device naming for ease of use, although
slightly longer name. Propagate the change to the subsystem, includes,
tests and samples.

Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
2025-09-05 13:45:30 +02:00
Tri Nguyen
1e25973c75 drivers: flash: Initial support QSPI Flash driver for Renesas RA6
Add QSPI Flash driver supports for Renesas RA6.

Signed-off-by: Tri Nguyen <tri.nguyen.wj@bp.renesas.com>
Signed-off-by: Thao Luong <thao.luong.uw@renesas.com>
Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2025-09-05 12:26:44 +02:00
Fabrice DJIATSA
1e8f67e513 include: zephyr: drivers: dma: fix STM32_DMA_GET_INSTANCE() macro
Add the STM32 auxiliary macro STM32_DMA_GET_CHANNEL_INSTANCE to handle
naming convention conflicts between STM32 series.
The H5, H7RS, N6, U3, MP2, U5, and WBA series use
the LL_DMA_GET_CHANNEL_INSTANCE definition, while other series use
__LL_DMA_GET_CHANNEL_INSTANCE.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2025-09-05 12:26:32 +02:00
Sean Kyer
e4fb01c66b cpu_freq: Add CPU Frequency Scaling subsystem
Add a CPU frequency scaling subsystem, allowing a policy
algorithm to control the frequency of a given SoC/MCU
automatically at runtime.

Implement a basic, "on-demand" policy algorithm which
iterates through the P-states supported by the SoC and
selects the first P-state where it's trigger threshold is
less than the CPU load.

The CPU frequency scaling subsystem does not currently
support SMP. The CPU load measurement can be made to support
SMP since statistics are measured from the scheduler.

Co-authored-by: Eric Hay <Eric.Hay@analog.com>
Signed-off-by: Sean Kyer <Sean.Kyer@analog.com>
2025-09-05 07:43:56 +02:00
Eric Hay
73ce03246b cpu_load: Add CPU Load subsystem
Implement CPU load measurement subsystem. The statistics
used to calcualte the load are taken from the scheduler.
Specifically, the number of cycles used by the idle thread.

Co-authored-by: Sean Kyer <Sean.Kyer@analog.com>
Signed-off-by: Eric Hay <Eric.Hay@analog.com>
2025-09-05 07:43:56 +02:00
Niu Zhihong
8f85d8e62a dt-bindings: input: fix swapped comments for gear buttons
The comments for INPUT_BTN_GEAR_DOWN and INPUT_BTN_GEAR_UP were
incorrectly swapped. This commit fixes the documentation to match
the actual button definitions.

Signed-off-by: Niu Zhihong <zhihong@nzhnb.com>
2025-09-04 20:08:45 -04:00
Benjamin Cabé
fab062f3be include: devicetree: gpio: add doxygen for ST Morpho header
Add doxygen documentation for this header.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-09-04 21:04:04 +02:00
Benjamin Cabé
ed0067e6ae include: devicetree: gpio: add doxygen for Arduino MKR header
Add doxygen documentation for this header.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-09-04 21:04:04 +02:00
Benjamin Cabé
459252356f include: devicetree: gpio: add doxygen for Raspberry Pi CSI connector
Add doxygen documentation for this header.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-09-04 21:04:04 +02:00
Benjamin Cabé
b99aeec528 include: devicetree: gpio: add doxygen for Arduino Nano header
Add doxygen documentation for this header.
Also fix typo for ARDUINO_NANO_HEADER_A5.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-09-04 21:04:04 +02:00
Benjamin Cabé
6315d117e3 include: devicetree: gpio: add doxygen for Arducam DVP connector
Add doxygen documentation for this header.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-09-04 21:04:04 +02:00
Benjamin Cabé
654d794dd0 include: devicetree: gpio: add doxygen group for GPIO pin headers macros
Add a Doxygen group for the GPIO pin headers macros and initially
document Arduino Uno (R3) header pin constants.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-09-04 16:45:07 +02:00
Declan Snyder
7e92b70437 include: devicetree: Add more PHA macros
Add more macros for interacting with controller/data type of
relationships (phandle arrays / cells)

Add macros for arbitrarily iterating cells of phandle specifiers

Add tests for the new macros

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-09-04 14:43:13 +02:00
Emil Gydesen
aa27460880 Bluetooth: CCP: Add support for set/get provider name
Add support for setting and getting the bearer provider
name. For now the name will be duplicated by the TBS
implementation, but will be optimizied in the future
so only one copy of the name exists.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-09-04 11:30:36 +02:00
Benjamin Cabé
c0ed6c0a8c include: display: mipi: re-arrange doxygen groups
Move MIPI headers under Display group so that they don't clutter
top-level Device Drivers group.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-09-03 21:21:18 +02:00
Benjamin Cabé
1df6e7caea include: dt-bindings: mipi_dbi: doxygen fixups
Improve/fix documentation of this header file

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-09-03 21:21:18 +02:00
Benjamin Cabé
94a4b13df3 include: doc: mipi: flag MIPI-DBI and MIPI-DSI API as unstable
These have many implementations in-tree so are to be considered
unstable.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-09-03 21:21:18 +02:00
Benjamin Cabé
0132ea07fb doc: fix spelling errors tree-wide
fix some spelling errors in code comments and Kconfig helps

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-09-03 17:04:13 +02:00
Benjamin Cabé
a8b763fe3b doc: fix "buses" spelling
Plural of "bus" is "buses", not "busses".

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-09-03 17:04:13 +02:00