Commit graph

15409 commits

Author SHA1 Message Date
Peter van der Perk
49e33d38c1 drivers: sensor: qdec_tpm: Add QDEC support for NXP TPM
Allows to run the NXP Timer/PWM Module (TPM) in Quadrature
Decoder Mode.

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2025-05-22 02:21:39 +02:00
Keith Packard
627f0ef565 posix: Use picolibc's limits.h when building POSIX code
When building POSIX code, we need to use picolibc's limits.h instead of
manually defining the POSIX values. This avoids duplicate definitions of
these symbols.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-05-22 02:21:01 +02:00
Francois Ramu
4bb618c66f drivers: clock control: stm32H7RS has a PLL2 & 3 or HCLK5 output
Add the definitions of the PLL2 and PLL3 outputs for the stm32H7RS mcus
and the HCLK 5 which is clock source for the XSPI instance.
and other HCLKn for other peripherals.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2025-05-21 17:35:06 +02:00
Alberto Escolar Piedras
448eac13d4 soc/ambiq/apollo5x: Fix code compliance issues
Fix issues detected by checkpatch

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-05-21 12:35:28 +02:00
Markus Lassila
5357013768 modem: backend: uart: Alignment check to recv buf
Receive buffer must be aligned to word when
CONFIG_MODEM_BACKEND_UART_ASYNC_HWFC=y is set.

Signed-off-by: Markus Lassila <markus.lassila@nordicsemi.no>
2025-05-21 12:34:44 +02:00
Vit Stanicek
37ec78f3dc drivers: misc: Add nxp,rtxxx-dsp-ctrl
Add the nxp,rtxxx-dsp-ctrl driver.

Responsibility of this driver is to load code executed by Xtensa-family
cores on NXP i.MX RTxxx microcontrollers and to control their run.

Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
2025-05-21 12:34:32 +02:00
Saravanan Sekar
258cc7e9cf drivers: pinctrl: mspm0: Add a pinctrl driver for TI MSPM0
Added a pinctrl driver support for MSPM0 Family.

Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
Signed-off-by: Jackson Farley <j-farley@ti.com>
2025-05-21 08:04:32 +02:00
Saravanan Sekar
51bb5ddde4 drivers: clock: ti: Add initial support TI MSPM0 clock module
Add initial support TI MSPM0 clock module

Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
Signed-off-by: Jackson Farley <j-farley@ti.com>
2025-05-21 08:04:32 +02:00
Sai Santhosh Malae
dcdc8e8a55 drivers: i2s: siwx91x: I2S clock initialization for siwx91x
Clock driver changes required for initializing the I2S clock
for the siwx91x driver

Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
2025-05-20 15:24:50 +02:00
Robert Lubos
011f2bc458 net: conn_mgr: Fix disconnect with CONN_MGR_IF_NO_AUTO_DOWN unset
Connection manager enforces non-blocking disconnect() behavior, yet in
case CONN_MGR_IF_NO_AUTO_DOWN flag is not set, it'd put the interface
down right after, disrupting the disconnect process.

As putting the interface down can be handled in the corresponding event
handler as well, when the interface is actually disconnected, remove the
conn_mgr_conn_if_auto_admin_down() call from conn_mgr_if_disconnect().
To make this work with persistence flag, introduce a new internal flag
indicating that the interface is in active disconnect.

Finally, since it isn't really necessary that disconnect() API call is
non-blocking, remove that requirement.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-05-19 16:37:07 +02:00
Anas Nashif
2aacbcaab5 style: add missing curly braces in if/while/for statements.
Add missing curly braces in if/while/for statements.

This is a style guideline we have that was not enforced in CI. All
issues fixed here were detected by sonarqube SCA.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-05-17 14:10:33 +02:00
Luis Ubieda
4dfe251986 sensor: rm3100: Add ODR build-time setting through DTS property
Using pre-defined values displayed on datasheet's table 5-4 for
CMM Update Rates.

Please note that datasheet specifies these Update-Rates may have
up to 7% standard deviation, which may be significant for certain
applications.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-05-16 21:36:23 +02:00
Phi Bang Nguyen
7b421398c4 drivers: video: Rename signal variables to avoid compliance violation
Rename signal variables to sig to be compliant with code rule 21.2

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2025-05-16 19:00:09 +02:00
Phi Bang Nguyen
9fa1aeea32 drivers: video: Add video_buf_type
M2M devices like ISPs or PxP have two separate buffer queues, i.e.
incoming and outcoming queues. For each API, the driver needs to
distinguish on which queue it needs to take action.

Add video buffer type to support this kind of devices.

- get_caps(), set/get_format(), enqueue()/dequeue(): the buffer type
is embeded in the video_caps, video_format and video_buffer structs

- video_stream_start/stop() : buffer type needs is sent as a parameter

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2025-05-16 19:00:09 +02:00
Phi Bang Nguyen
b63fb91622 drivers: video: Drop video_endpoint_id
The video endpoints are already described in the devicetree. The
video_endpoint_id parameter in each video API is not necessary and has
no usage. Drop it.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2025-05-16 19:00:09 +02:00
Josuah Demangeon
084f0acb36 drivers: video: controls: add the BASE and CAMERA controls
Add all the base controls present like they are in Linux into Zephyr,
limited to those that can apply in the current system:
- Buttons are left as integer for now.
- Some description is modified to fit the Zephyr situation.
- For the minimum number of buffer, Zephyr uses a different mechanism.
- No audio support through the video subsystem.
- Homogenize the wording

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-05-16 16:11:32 +02:00
Luis Ubieda
f8416de09e sensor: adxl345: fix: Overriding of ODR setting in DTS property
This patch fixes previous overriding of ODR setting through DTS (it
would always be 25-Hz, irrespective of what the DTS property said).

While doing so, create dt-binding enum to improve settings clarity.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-05-16 09:37:28 +02:00
Rodrigo Peixoto
6ae9a981d0 zbus: Improve consistency with runtime observers
A previous PR merged (to remove runtime observers' dependency with heap)
added inconsistencies and compatibility breaks to the zbus. This commit
improves that by removing the inconsistencies and still attending to the
features requested by the community.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2025-05-16 09:37:20 +02:00
Anas Nashif
5fe84d5b69 arch: nios2: remove arch
Remove architecture and dependencies.
Remove altera HAL supporting nios2

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-05-15 20:01:05 -04:00
Riadh Ghaddab
457ade48b4 settings: zms: code style clean up
Clean some parts of the code and refactor it to avoid multiple nested
conditions.

Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
2025-05-15 17:53:26 +02:00
Riadh Ghaddab
7ae14ebf58 settings: zms: use the safe function strnlen instead of strlen
if the provided name in argument is not null this could lead to un
undefined behavior.
Use strnlen to make this safe

Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
2025-05-15 17:53:26 +02:00
Riadh Ghaddab
cad2f1c103 settings: add new API function settings_get_val_len()
Add a function to get the value's length of a Key. If it doesn't exist
returns 0.
Add ZMS implementation for csi_get_val_len() and a default implementation
for the other storage systems.
Add some functional tests to verify it.

Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
2025-05-15 17:53:26 +02:00
Riadh Ghaddab
831da04247 settings: add an API function to load only one settings entry
Add a a function settings_load_one that allows to load only one settings
entry instead of a complete subtree.
Add as well its implementation for ZMS backend.
This will allow a faster return if the Settings entry doesn't exist in
the persistent storage.

Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
2025-05-15 17:53:26 +02:00
Martin Hoff
742261ddaa drivers: rtc: add silabs siwx91x rtc driver
Add the support of silabs siwx91x basic rtc driver.

Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
2025-05-15 14:09:23 +02:00
Jhan BoChao
7450a5249d driver: flash: add flash driver for rts5912
add flash driver for rts5912.

Signed-off-by: Jhan BoChao <jhan_bo_chao@realtek.com>
2025-05-15 11:18:22 +02:00
Jérôme Pouiller
1d4a0d78e3 drivers: memc: Add support for siwx91x QSPI controller
Silabs siwx91x includes a memory controller for (Quad-)SPI PSRAM. It
allows the application to use the PSRAM as if it was any other RAM.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-05-15 09:00:39 +02:00
Jérôme Pouiller
a1f48216bc soc: silabs: siwx91x: Rename pins
The reference manual and the schematics of the reference designs
numbers the pins from 0 to 57. So let's also apply this scheme to the
pinctrl.

Note while PIN are numbered between 0 and 64, the GPIOs are represented
with 4 block of 16 GPIOs. This is the way the GPIOs are documented in
the reference manual, so we don't change that (In addition,
gpio_port_pins_t is a uint32_t, so it won't be possible to represent 64
GPIOs in one gpio_port_pins_t anyway).

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-05-15 09:00:39 +02:00
Tom Burdick
c0a423426f rtio: API version 0.2.0, unstable
We're well past the experimental stage, but there are still some things
that may change. Bumping the API version to 0.2.0 signals this.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2025-05-14 23:35:15 +02:00
Fabio Baltieri
3cb8f745a6 serial: add an uart-bridge driver
Add a reusable uart-bridge driver that echoes data between two serial
devices. It's mainly meant to be used with one of the devices being an
USB CDC-ACM, the data is buffered, there's a pause feature to stop the
USB endpoint when the hardware UART is filling up to avoid overrun and
there's a helper function used to propagate the USB uart configuration
to the hardware one.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-05-14 20:11:00 +01:00
Fabio Baltieri
2f0d14176e led: fallback from set_brightness to on/off and vice versa automatically
Change the on/off/set_brightness API to automatically use whatever
function is available, this allows dimmable drivers to not implement the
on/off wrapper and vice versa.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-05-14 16:27:18 +02:00
Fabio Baltieri
69e739359f led: check for valid brightness range at API level
The API specifies that brightness is 0 to 100, no point checking it in
the individual drivers.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-05-14 16:27:18 +02:00
Fabio Baltieri
551c1363dd led: add and use a LED_BRIGTHNESS_MAX definition
The led_set_brightness API says that brightness is defined as
percentage, add a macro from the max and use it everywhere.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-05-14 16:27:18 +02:00
Nithin Ramesh Myliattil
70a97a8222 Bluetooth: BAP: Add control point cbs to BASS
For the control point operations, add/modify/
remove source, callbacks are added so that Application
can decide whether to accept/reject the control point
operations.

Signed-off-by: Nithin Ramesh Myliattil <niym@demant.com>
2025-05-14 14:15:51 +02:00
Alain Volmat
88d8003109 clock_control: stm32: add handling of clocks for the stm32mp13
Add enabled_clock, on / off and configure support for the clocks of
the stm32mp13. Describes the peripheral clock source selection.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-05-14 11:03:41 +01:00
Furkan Akkiz
40a60a6ac2 dts: arm: adi: max32650: Add more peripheral nodes
This commit adds following updates to MAX32650 SoC:
- Divide SRAM to sections according to UG.
- Add DMA and SPI nodes
- Add WDT nodes without adding clock property
- Include dma binding to SoC dts file.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
Signed-off-by: Burak Babaoglu <burak.babaoglu@analog.com>
2025-05-14 11:03:22 +01:00
Chris Friedt
cfae041834 posix: implement the XSI_SINGLE_PROCESS Option Group
gettimeofday() was already implemented, but incorrectly lumped into
POSIX_TIMERS.

putenv() is really just a wrapper around setenv().

The only one left to implement was gethostid() which was relatively
trivial.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-05-13 22:23:21 -04:00
David van Rijn
b1b586cac6 net: fix constness in http_request
Since we are taking a double pointer to an array owned by the user, we
should also make all but the top-level of indirection const, since we
are not planning on modifying it.

Signed-off-by: David van Rijn <david@refractor.dev>
2025-05-13 22:19:28 -04:00
Robert Hancock
54eeb7bee8 arch: arm: arm_mpu_v7m: Fix unsupported Cortex-R access permission mode
This file previously defined an MPU access permission mode of 0x7 which
corresponded to privileged read-only, unprivileged read-only, similar to
mode 0x6. However, it appears that at least Cortex-R5 does not support
this mode, defining 0x7 as UNP (Unpredictable) or a value which should
not be used.

This value was in turn referenced by the REGION_FLASH_ATTR macro, which
caused the offending value to be used when a memory region was declared
as DT_MEM_ARM(ATTR_MPU_FLASH) in the device tree, causing such regions
to not work properly on Cortex-R5.

Since 0x6 is supported by both Cortex-M and Cortex-R and does the same
thing, there is no reason to use 0x7. Remove the RO_Msk definition which
referenced it, and change REGION_FLASH_ATTR to use P_RO_U_RO_Msk instead.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2025-05-13 17:44:40 +02:00
Srishtik Bhandarkar
09ab462e10 drivers: sensor: pzem004t: add pzem004t AC parameter sensor driver
Adds driver for Peacefair pzem004t multifunction AC parameter sensor.

Signed-off-by: Srishtik Bhandarkar <srishtik.bhandarkar2000@gmail.com>
2025-05-12 21:09:27 +02:00
Pavel Vasilyev
14b4e30cdf bluetooth: host: Deprecated BT_CONN_TX_MAX
After https://github.com/zephyrproject-rtos/zephyr/pull/72090,
`conn_tx_alloc` no longer blocks, and each buffer always has a
corresponding `bt_conn_tx` object. This eliminates the need to configure
the number of `bt_conn_tx` objects via `CONFIG_BT_CONN_TX_MAX`, since
every buffer now carries its own context even when no callback is used.

This commit deprecates `CONFIG_BT_CONN_TX_MAX` as it is no longer
necessary. Instead, `CONFIG_BT_BUF_ACL_TX_COUNT` is used to allocate
`bt_conn_tx` objects for outgoing ACL data. ZLL already uses
`CONFIG_BT_BUF_ACL_TX_COUNT` to configure the number of outgoing ACL
packets. With this change, modifying the packet count will automatically
adjust the number of corresponding contexts, preventing both context
starvatoin and underutilization.

This approach also aligns with ISO, where the number of `bt_conn_tx`
objects for outgoing ISOdata matches `CONFIG_BT_ISO_TX_BUF_COUNT`.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2025-05-12 14:54:26 +02:00
Fin Maaß
ff5e031c20 net: conn_mgr: set to unstable
Set connection manager to unstable. It is now used
by multiple parts in zephyr and numerous samples.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-05-10 13:02:21 +02:00
Fin Maaß
a7ee49667d mgmt: hawkbit: add event for confirmed current image during init
add event for confirmed current image during initialization

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-05-09 14:01:08 +02:00
Björn Bergman
465f6ba73e userspace: weak defintions for generated k-object lookup functions
Instead of obscure linker-file hacks providing dummy definitions before
we have the proper generated k-object lookup functions, provide weak
definitions  that will be taken out by the real generated implementations
when they are available.

Signed-off-by: Björn Bergman <bjorn.bergman@iar.com>
2025-05-09 12:51:30 +02:00
Alain Volmat
2d46727f52 drivers: video: rename 8 bit bayer format in Sxxxx
In order to be consistant with other formats bayer formats
recently introduced, rename all 4 8 bit bayer formats with a
S prefix (SBGGR / SRGGB / SGBRG / SGRBG).

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-05-09 10:42:37 +02:00
Vytautas Virvičius
9a409d6b00 net: l2: ppp: Explicitly negotiate ACCM
Many cellular modems attempt to negotiate an ACCM value of 0x00000000.
While the PPP driver rejects this by default, it does not propose an
alternative. As a result, some modems default to using 0x00000000 after
LCP negotiation. Because the PPP driver expects all control characters
to be escaped, this causes issues during decoding. This change
negotiates an ACCM value of 0xffffffff to ensure compatibility with such
modems.

Signed-off-by: Vytautas Virvičius <vytautas@virvicius.dev>
2025-05-09 08:23:16 +02:00
f4b1544bec drivers: pinctrl: add a driver for the CH32V00x series
The CH32V006 and others in the CH32V00x series are an evolution of the
CH32V003 and use different remap offsets for the various peripherals.

In the same way as the CH32V20x, fork the CH32V003 driver and add
CH32V00x support.

Signed-off-by: Michael Hope <michaelh@juju.nz>
2025-05-09 01:40:22 +02:00
Torsten Rasmussen
c79c4ef9a8 linker: move last section id constant to c-code
Move creation of last section id from ld linker script LONG() usage to
C code with last section attribute.

The use of `LONG()` works correctly with ld but lld emits a warning
because .last_section section is not allocated as there are no matching
input sections and discards the `LONG()` call, meaning the last section
identifier will not be present in the flash.
> ld.lld: warning: ignoring memory region assignment for
>                             non-allocatable section '.last_section'

Placing the last section id in `.last_section` in C code makes lld
allocate the memory for the id and thereby create the output section
with the correct output.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2025-05-08 15:55:40 +02:00
Torsten Rasmussen
8f2560cf3e linker: discard eh_frame when C++ exceptions are disabled
Discard the eh_frame section when C++ exceptions are disabled.

In principle the eh_frame may be used for other purposes such as
backtracing when linking C programs, then Zephyr compiles each source
file with '-fno-asynchronous-unwind-tables', thus keeping the eh_frame
in the elf output just takes up space.

When using gcc/ld, then the eh_frame is generally generally discarded
per default, however for clang/lld it will be included but give a
warning that the section is auto-placed.

Some platforms already discards the eh_frame, so unify this for all
targets.

As eh_frame is now discarded in linker scripts then post processing step
of removing the section during hex or bin conversion can also be
removed.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2025-05-08 15:55:40 +02:00
Abderrahmane JARMOUNI
cf30cfa59b devicetree: macros: add display specific macros
Add macros to get display controllers phandles and count from
"zephyr,displays" compatible node

Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
2025-05-08 12:24:21 +02:00
Emil Gydesen
425f3f4b0a Bluetooth: Audio: Rename ctx type prohibited to none
The context type PROHIBITED has been removed from
the Bluetooth assigned numbers document. It is, however,
still used in some profiles to indicate either "No context
type supported" or "None available", and thus a rename
to "NONE" makes sense.

It is still treating similar to prohibited in some cases,
as it is not a valid context type in all cases.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-05-08 01:58:01 +02:00