Commit graph

15409 commits

Author SHA1 Message Date
Khaoula Bidani
5673dc162f include: zephyr: Add the stm32u3 clock control and the reset register
Add the stm32u3 clock control and the RCC bus reset register offset

Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
2025-06-16 13:59:38 -04:00
Johann Fischer
0e127e6b10 usb: device_next: add the missing const qualifier and save some RAM
In the USBD_DESC_STRING_DEFINE macro defenition the const qualifier is
missing. Also, do not reserve room for the UTF16LE conversion, as this
is done on the fly in the stack.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-13 14:29:30 +02:00
Bjarki Arge Andreasen
8a27773247 drivers: clock_control: nrf2: split configs per driver
Currently the config CLOCK_CONTROL_NRF2 is used as a GLOB
style config which includes all "NRF2" drivers and related
configs.

With NRF2, clocks are treated as individidual devices
with individual device drivers. This commit split the
CLOCK_CONTROL_NRF2 config into device specific configs
and ifdefs. With this, drivers are selected individually
based on devicetree state as is common for most devices
drivers, and dependencies like NRFS and specific NRFS
services are selected by the specific driver which nees it.

Checks for CLOCK_CONTROL_NRF2 are updated to check for
existance of the clocks instead.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-06-13 11:12:43 +02:00
Bjarki Arge Andreasen
73773abb4a clock_control: nrf: fix nrf_clock_control_get_startup_time desc
Fix the description of nrf_clock_control_get_startup_time which was
missing documentation of the spec param and had a spelling mistake
in it.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-06-13 11:12:43 +02:00
Khanh Nguyen
83fe349ad5 dts: arm: renesas: ra: add ELC node and enums for RA SoCs
Add ELC nodes to RA SoC DTS files and provide
device-specific ELC signal enums for Devicetree bindings

Signed-off-by: Khanh Nguyen <khanh.nguyen.wz@bp.renesas.com>
2025-06-13 10:09:35 +02:00
Khanh Nguyen
4cb73f8209 include: drivers: misc: Add header file for Renesas ELC driver APIs
Add header file to support Renesas ELC subsystem driver APIs

Signed-off-by: Khanh Nguyen <khanh.nguyen.wz@bp.renesas.com>
2025-06-13 10:09:35 +02:00
Marcin Wierzbicki
67edf2292a boards: nxp: add support for S32K148 evaluation board
Support for NXP S32K148 evaluation board (s32k148_evb).

Adapt samples: adc_dt, adc_sequence.
Adapt tests: adc_api, gpio_basic_api, gpio_hogs.

Signed-off-by: Marcin Wierzbicki <marcin.wierzbicki@accenture.com>
2025-06-12 15:04:32 -07:00
Robert Lubos
86244a9c54 net: stats: Make byte counters 64-bit
In high throughput tests it's fairly easy to overflow the current 32-bit
byte counters in net statistics (it's just over 4 GB of data).
Therefore, make the byte counters 64-bit to prevent overflows.
Rearrange some fields to avoid padding.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-06-12 09:36:38 -07:00
Krzysztof Chruściński
6717a37421 drivers: timer: nrf_rtc_timer: Optimize z_nrf_rtc_timer_get_ticks
Converting absolute system ticks to RTC ticks is simple. It needs to be
multiplied by CYC_PER_TICK (which by default is 1). Complex algorithm
was used when driver was not tracking current 64 bit tick and function
was returning uint32_t.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-06-12 09:26:29 -07:00
Tom Hughes
a4f702b857 include: kernel: Fix typo
It should be "will be called with" instead of "will be called will".

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-06-12 13:42:21 +02:00
Fin Maaß
c2fff4a3e4 devicetree: Enhance DT_ENUM_HAS_VALUE macro for arrays
On arrays DT_ENUM_HAS_VALUE() and DT_INST_ENUM_HAS_VALUE()
were only checking the first index, this changes it to check all indexes.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-06-12 11:44:46 +02:00
Łukasz Stępnicki
a0777734de drivers: nrf_ironside dvfs service
Added handling of new IRONside DVFS service.
NRFS DVFS is now not enabled by default.

Signed-off-by: Łukasz Stępnicki <lukasz.stepnicki@nordicsemi.no>
2025-06-12 11:32:32 +02:00
Andrzej Głąbek
60d3ac5e12 include: drivers: nrf_clock_control: Fix <hal/nrf_clock.h> inclusion
This is a follow-up to commit 7a2ce2882a.

Inclusion of <hal/nrf_clock.h> should not be done based on the NRF_CLOCK
symbol being defined, because it depends on the order in which headers
are included - that symbol gets defined when <nrfx.h> gets included and
this is not necessarily always happening earlier. Instead of adding
inclusion of <nrfx.h> here, move inclusion of <hal/nrf_clock.h> under
`#if defined(CONFIG_CLOCK_CONTROL_NRF)` where it is actually needed.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2025-06-12 11:31:11 +02:00
Robert Lubos
b18bc7cc3e net: sockets_offload: Allow to enable/disable DNS offload at runtime
Add new socket offloading functions, allowing to enable/disable
offloaded DNS implementation at runtime. This may be useful if there is
a mix of offloaded/native network interfaces in the system, so the
application can choose which DNS backend to use.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-06-11 16:20:18 -07:00
Arif Balik
1939ba64c3 logging: backend: mqtt
Added MQTT logging backend

Signed-off-by: Arif Balik <arifbalik@outlook.com>
2025-06-11 16:18:51 -07:00
Robert Lubos
35af68b840 net: mqtt: Allow to bind client to a specific interface
Add a new "if_name" pointer to the transport configuration structure,
allowing the application to bind MQTT client to a specific network
interface.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-06-11 16:18:31 -07:00
Daniel Leung
26ea29ddba toolchain: xcc: define __deprecated only if not already defined
Some tests explicitly test for deprecated functions and they
override the macro __deprecated to avoid compiler warnings.
So, for xcc/xt-clang, only define __deprecated if it has not
already been defined.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-06-11 16:10:53 -07:00
Fin Maaß
db79e78b98 net: mii: use BIT() macro in mii.h
use BIT() macro in mii.h.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-06-11 10:22:46 -07:00
Fin Maaß
ed4d421ace drivers: ethernet: remove phy related configs from eth config
remove phy related configs from eth config.
phy related configs chould go directly into the phy.
Most ethernet drivers didn't support the now removed
functions yet. Users should instead use `phy_configure_link()`
together with the `net_eth_get_phy()` function.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-06-11 10:17:37 -07:00
Jamie McCrae
656b6f37da devicetree: fixed-partition: Add sub-partition macros
Adds some macros for usage with sub-partitions

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-06-11 10:13:56 -07:00
Benjamin Cabé
66f5d701bd shell: fix alignment issue
Casting a char* to a struct* requires checking alignment as this can fail
on platforms requiring strict alignment (ex. Xtensa)

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-11 08:56:04 -07:00
Mike J. Chen
9075d53355 kernel: fix timeout bugs
When CONFIG_TIMEOUT_64BIT is y, positive values are relative/delta
timeouts and negative values are absolute timeouts, except
for two special values. -1 is K_WAIT_FOREVER and 0 is K_NO_WAIT.
The reserved value of -1 means INT64_MAX is not a valid argument
to K_TIMEOUT_ABS_TICKS(), but there was no check. If a literal
was passed, a preprocessor/compiler warning would be generated
for overflow, but if a variable was passed as the argument,
then the code would compile but not work correctly since the
absolute timeout would be changed to a relative one. One
example of this is task_wdt_init() if no channels are enabled.

Rather than just fixing task_wdt, and trying to find other cases
in an adhoc way, this CL changes K_TIMEOUT_ABS_TICKS() to
limit the larges value to (INT64_MAX-1). It does so silently,
but given the range of int64_t, there should be no practical
difference.

Also, change the implementation for Z_IS_TIMEOUT_RELATIVE() to
fix the case where INT64_MAX relative timeout was being
improperly reported as being not a relative timeout. This was
again due to the -1 reserved value.

Add some tests for these changes to the timer_api test.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2025-06-11 09:56:13 +02:00
Benjamin Cabé
9ab0ea73a8 shell: Introduce structured help message
In order to enable better and more consistent help messages for shell
commands, this commit introduces a new SHELL_HELP macro that allows to
document a command's description and usage in a more structured way.

This will allow to get rid of inconsistent (and duplicated!) variations
of "Syntax: ...", "Syntax:\n ...", "Usage: ...", in the commands, and
formatting of the description+usage will be taken care of by the shell
when it detects the help message is using the "structured" format.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-11 09:55:21 +02:00
TOKITA Hiroshi
ba48d83bec devicetree: Use IS_EQ() for DT_SAME_NODE()
`DT_SAME_NODE()` is judged by `==` and cannot be used as
a condition for `COND_CODE_1()`.
Using `IS_EQ()` to make it possible for compile-time
calculation.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2025-06-11 08:19:41 +02:00
Keith Packard
107198204c zephyr/linker: Move .tbss section back to ROMABLE_REGION
Placing this in RAMABLE_REGION messes up the TLS offsets computed by the
linker, presumably because it's not adjacent to the .tdata section.

In any case, it doesn't really matter as all we want the linker to do is
compute offsets from the TLS base value for all .tdata and .tbss values.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-11 08:14:46 +02:00
Keith Packard
513e6ed5d2 arch/common: Mark interrupt tables const when !DYNAMIC_INTERRUPTS
When not using dynamic interrupt mapping, various interrupt tables are
configured to be stored in read-only memory in the linker script.. Mark
them const so that the linker doesn't complain.

This affects _sw_isr_table, _irq_vector_table, and z_shared_sw_isr_table in
arch/common along with _VectorTable in arch/arc.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-10 22:13:09 +02:00
Keith Packard
5890c73087 linker: Place .tbss section in RAM, not FLASH
If this section is placed in FLASH, the section gets marked
as writable even though .tbss values will never be stored there.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-10 22:13:09 +02:00
Maksim Salau
bdd94261a5 modbus: serial: Add non-compliant mode with custom stop-bit settings
The mode is activated by the CONFIG_MODBUS_NONCOMPLIANT_SERIAL_MODE option
and allows any stop-bit setting for the serial port.

Signed-off-by: Maksim Salau <msalau@iotecha.com>
2025-06-10 12:53:23 -04:00
Guennadi Liakhovetski
5f4177b47c llext: add context save and restore
Some applications need to save LLEXT context, e.g. when suspending,
to later restore it quickly without a full relinking. Add 2 functions
for context saving and restoring. Since these functions are likely to
change in the future, put them in llext_experimental.c, which depends
on CONFIG_LLEXT_EXPERIMENTAL and is disabled by default.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2025-06-10 12:52:38 -04:00
Guennadi Liakhovetski
d8195c05c7 llext: rename _llext_list to llext_list
Beginning symbols or structure field names with an underscore isn't a
widely used style in Zephyr, remove the leading underscore from
_llext_list.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2025-06-10 12:52:38 -04:00
Alberto Escolar Piedras
f19432a576 include mwdt: Change ifdef from NATIVE_APPLICATION to NATIVE_BUILD
NATIVE_APPLICATION is now deprecated so nobody will set it,
but NATIVE_BUILD should cover the same case this build error
is trying to warn about. Let's use it instead.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-06-10 13:29:28 +02:00
Lu Jia
634b72a76c Bluetooth: Add API to obtain ACL connection corresponding to a2dp
When connecting two devices with an application, it
is necessary to differentiate which is the remote device.

Signed-off-by: Lu Jia <jialu@xiaomi.com>
2025-06-10 13:28:16 +02:00
Sai Santhosh Malae
9c436baf85 drivers: adc: siwx91x: Analog pin initialization
Modified pinctrl driver to configure analog pins for
ULP and HP modes.

Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
2025-06-10 12:07:33 +02:00
Sai Santhosh Malae
6d5e217262 drivers: adc: siwx91x: ADC clock initialization for siwx91x
Clock driver changes required for initializing the ADC clock
for the siwx91x driver

Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
2025-06-10 12:07:33 +02:00
Furkan Akkiz
e5fb161de4 dts: arm: adi: Add MAX32657 DMA instances and binding file
Add DMA0 and DMA1 nodes to MAX32657 dtsi file and add binding file
for DMA slots.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2025-06-10 08:47:42 +02:00
Qiankun Li
448b787c82 net: l2: wifi: Modify btwt_setup usage.
Soft ap supports WIFI_BTWT_AGREEMENT_MAX BTWT sessions.
The BTWT parameters for each session can be different.

The current usage can only set one set of parameters.
All sessions follow this set of parameters.

Add enhance code to support setting different
BTWT parameters for every sessions.

Usage:
wifi twt btwt_setup <sta_wait> <offset>
<twtli> <session_num>
<id0> <mantissa0> <exponent0> <nominal_wake0>
<id1> <mantissa1> <exponent1> <nominal_wake1>
<idx> <mantissax> <exponentx> <nominal_wakex>
The total number of '0, 1, ..., x' is session_num

For example:
wifi twt btwt_setup 0 0 0 2 0 112 10 128 1 32 10 64

Signed-off-by: Qiankun Li <qiankun.li@nxp.com>
2025-06-10 08:47:25 +02:00
Benjamin Cabé
9d785706df pinctrl: raspberrypi: rp2350: fix copy-paste error
correct the entry for PWM_3B_P23

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-09 14:52:18 -07:00
Benjamin Cabé
f72942067a drivers: led: fix LED_BRIGTHNESS_MAX typo
Renames LED_BRIGTHNESS_MAX to LED_BRIGHTNESS_MAX in led.h and all
in-tree users of the macro.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-09 14:50:33 -07:00
Pavel Maloletkov
26cf7a0064 net: http: fix __z_http_service_define fields incorrect order
Fixes an error:
error: designator order for field 'http_service_desc::backlog'
does not match declaration order in 'const http_service_desc'
When compiled for C++

Signed-off-by: Pavel Maloletkov <pavllick@gmail.com>
2025-06-09 14:43:04 -07:00
Sudan Landge
5a3c4941a2 pinctrl: add support for mps4
Add MPS4 pinctrl support by referring to
`mps4/common/partition/platform_base_address.h`
from TF-M's main branch.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2025-06-09 14:35:12 -07:00
Jordan Yates
c0ca636692 adc: add microvolt conversion functions
Add a family of functions that convert to microvolts instead of
millivolts. The resolution of an ADC with a 600 mV reference and a 12
bit output (nRF SAADC for example) is an order of magnitude better than
millivolts (0.146 mV), even before considering non-unity gains.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-06-09 10:25:52 +01:00
Jordan Yates
8ab300d63e adc: 64bit gain inversion function
Add a variant of `adc_gain_invert` that operates on an `int64_t` instead
of `int32_t`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-06-09 10:25:52 +01:00
Sayooj K Karun
cd7c78e92e lib: min_heap: Add min-heap data structure
Introduce a binary min-heap implementation as a generic data structure
for use in kernel and application code. A min-heap always maintains
the smallest element at the root, making insertion and removal of the
minimum element efficient (O(log n)).

The API allows both static and dynamic initialization, supports custom
comparators.

Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
2025-06-07 13:29:24 +01:00
Ivan Wagner
b9cd08b2ea drivers: sensor: lsm6dso: add support for tilt and tap triggers
Tilt or Tap can be selected via config and further tap parameters can be
configured via DT.

Signed-off-by: Ivan Wagner <ivan.wagner@tecinvent.ch>
2025-06-06 20:11:46 +01:00
Armando Visconti
a10f807994 drivers/lis2dux12: add read_and_decode APIs support
Add RTIO async and RTIO stream functionalities that enables,
among all the other things, the sensor data streaming from FIFO.

RTIO stream supports following triggers:

  - SENSOR_TRIG_FIFO_WATERMARK
  - SENSOR_TRIG_FIFO_FULL
  - SENSOR_TRIG_DATA_READY

Following FIFO parameters has to be defined in device tree to
correctly stream sensor data:

  - fifo-watermark
  - accel-fifo-batch-rate

Currently the driver can decode FIFO content with Accelerometer
16-bit samples.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2025-06-06 09:11:04 -07:00
Jukka Rissanen
a2ff40e112 net: pkt: Fix net_pkt_pull() documentation
Fix the net_pkt_pull() documentation and mention that the
function can remove data from the start of the network packet.
The function is meant to work similar way net_buf_pull() but
it can handle multiple net_buf fragments.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-06-06 09:09:49 -07:00
Carles Cufi
3b8e1fa8df doc: kernel: Clarify relationship between direct and ZLI interrupts
The documentation did not state clearly that any zero-latency IRQ must
also be declared as a direct ISR. This is critical because failure to do
so may cause race conditions between the ZLI and regular ISRs when
executing the preable/postamble code in regular interrupts.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2025-06-06 14:49:16 +01:00
Raffael Rostagno
a08ec3c0ec soc: esp32c2: esp8684: Add pinctrl for i2c
Add pinctrl configuration for i2c peripheral.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-06-06 14:48:37 +01:00
Andreas Schuster
41c6257046 include: dt-bindings: stm32g0_clock: add mco macros
Adds macros to be able to use the microcontroller clock output (MCO) on the
STM32G0 microcontroller.

Signed-off-by: Andreas Schuster <andreas.schuster@schuam.de>
2025-06-06 11:52:40 +02:00
Alain Volmat
fea5c421b4 drivers: video: dcmipp: add functions for external ISP functions usage
Add weak functions and their call within the dcmipp driver so that
externally provided ISP control functions can be called by the
driver at right timing in order to perform the control of the
ISP part of the DCMIPP.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-06-06 10:10:58 +02:00