Commit graph

17,121 commits

Author SHA1 Message Date
Seppo Takalo
b1942ced1a modem: cmux: Handle C/R bit from address field
The C/R bit in the address field should be handled as explained
in 5.2.1.2 in the spec (3GPP TS 127.010).

To detect if the frame is a command or a response,
we need to know who was the initiator of the CMUX channel.

>    Initiator is the station that take the initiative to initialize
>    the multiplexer (i.e. sends the SABM command at DLCI 0 )

See the table from given section of the specification.

Also, on UIH frames 5.4.3.1 says
>    The frames sent by the initiating station have the C/R bit set to 1
>    and those sent by the responding station have the C/R bit set to 0.

NOTE: This is different than a C/R bit in the Type field.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2025-10-14 12:52:39 +03:00
Måns Ansgariusson
6528605a87 shell: Remove shell history initialization function
The shell history initialization function doesn't work in if the shell
instance hasn't been created through the shell macro. This removes the
function to avoid confusion.

Signed-off-by: Måns Ansgariusson <Mansgariusson@gmail.com>
2025-10-14 12:52:27 +03:00
Måns Ansgariusson
683819f862 shell: history rewrite to use k_heap instead of ring_buffer
The ring_buffer API was not ideal for this use case, as it is designed for
concurrent access, which is not needed here. The new implementation using
k_heap is more readable and easier to maintain.

There is a slight penalty in memory usage & effectiveness due to the
overhead of k_heap, but since this isn't a production-critical path, the
trade-off is acceptable.

Signed-off-by: Måns Ansgariusson <Mansgariusson@gmail.com>
2025-10-14 12:52:27 +03:00
Declan Snyder
eeabcd84f9 soc: mcxn947: Enable TRNG
Enable TRNG driver of MCXN947.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-10-14 12:51:22 +03:00
Robert Lubos
75ef63921d net: coap_client: Move send buffer into request context
Keep a separate buffer for each request context instead of having a
single common buffer for the entire client context. This allows to
simplify the retransmission logic, as parallel requests will no longer
overwrite the buffer for each other. That way, we can simply retransmit
the packet w/o a need to recreate it, and thus reach to the payload
pointer or callback.

This removes the requirement to keep the payload pointer, provided to
asynchronous coap_client_req() call, valid throughout the exchange
lifetime for simple cases (i.e. no block transfer used). In case of
block transfer, this is unavoidable and needs to be documented.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-10-14 12:50:39 +03:00
Robert Lubos
c5c51f23d8 net: coap: Define a symbol for fixed header size
Move the definition from the test suite to a public header.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-10-14 12:50:39 +03:00
Robert Lubos
f7e9d21936 net: coap_client: Use buffers instead of pointers for path and options
Use buffers instead of pointers for path and extra options provided in
the struct coap_client_request, so that the library keeps a copy of the
path/options instead of pointers. That way, the library can still work
correctly in case of retransmissions or block transfer in case when the
original path or options were automatic variables that went out of
context.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-10-14 12:50:39 +03:00
Seppo Takalo
9d93594de9 modem: cmux: Define macros for header size
Define CMUX_HEADER_SIZE macro that is 6 or 7 bytes depending on
MTU.

Remove the previous CMUX_FRAME_SIZE_MAX that was a bit misleading
as it meant only the header size without data and was fixed to 7 bytes.

Redefine new macros CMUX_FRAME_SIZE_MAX and CMUX_FRAME_SIZE_MIN which
are actually frame sizes with data included.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2025-10-14 12:50:30 +03:00
Pieter De Gendt
6728e78576 Revert "shell: Add user data argument to shell_set_bypass"
Revert a change that broke the stable API function shell_set_bypass.
This reverts commit 6b876dba1ba61b659b1b2d4c3ccd0ac41bd56027.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-10-13 18:12:42 -04:00
Paul Hepworth
58a21bf422 doc: fs: document preconditions with fs_open & fs_opendir
fs_open and fs_opendir rely on the structures in the first param
being intialized. (The init functions are documented with the type
declarations.) This simple documentation change mentions this need
to initialize (and emphasizes it). (Users of similar APIs such as
POSIX open and opendir do not expect this initialization need.)

Fixes #97205
Signed-off-by: Paul Hepworth <paulh@vpitech.com>
2025-10-13 11:28:00 -04:00
Rami Saad
7d2fb6c013 mgmt: mcumgr: grp: settings_mgmt: Add capability to save setting by key
Extend the save command to allow passing name/val pair to save a
subtree or individual setting to persistent storage.
Resolves zephyrproject-rtos#90407

Co-authored-by: Jamie <40387179+nordicjm@users.noreply.github.com>
Signed-off-by: Rami Saad <rami.saad@morgansolar.com>
2025-10-13 09:35:23 -04:00
Sang Tran
b82eefc397 arch: rx: Add NMI vector table for Renesas RX MCU
Add support for non-maskable interrupt (NMI)  vector table for
Renesas RX architecture

Signed-off-by: Sang Tran <sang.tran.jc@renesas.com>
2025-10-13 09:33:35 -04:00
Quy Tran
842fd974cc include: arch: rx: Move _ebss before noinit to preserve after reset
This change ensure .noinit is excluded from zeroed memory region after
reset

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2025-10-13 09:33:35 -04:00
Emil Gydesen
1c004a08c3 Bluetooth: CCP: Client: Add support for get provider name
Add support for getting the remote bearer provider
name.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-10-13 08:43:47 +02:00
Danny Nuch
c9d3a01c20 arch: arm: specify max MPU regions for CONFIG_ARMV7_M_ARMV8_M_MAINLINE
Specifies max value of 16 MPU regions for this processor.

Signed-off-by: Danny Nuch <dannynuch@gmail.com>
2025-10-11 08:35:58 -04:00
Alexander Apostolu
0e83446fd1 include: zephyr: drivers: sensor.h: fixed inline code format
Fixed inline code format from @code to backticks.

Signed-off-by: Alexander Apostolu <apostolu240@gmail.com>
2025-10-10 20:50:21 -04:00
Maciej Zagrabski
b69b064242 fs: littlefs: add api call for lfs_fs_gc
Lfs provide lfs_fs_gc function for some time now.
Function allow offloading of expensive block allocation scan.

Introduce lfs_fs_gc via api call fc_gc.

Signed-off-by: Maciej Zagrabski <mzi@trackunit.com>
2025-10-10 13:00:05 -04:00
Lyle Zhu
26065ecee3 Bluetooth: Classic: GOEP: Support multiple OBEX sessions
Split the structure `struct bt_obex` into two parts.
Part 1 `struct bt_obex`, it is the common part and shared by all OBEX
sessions which share the same one transport.
Part 2 `struct bt_obex_server` and `struct bt_obex_client`. The
`struct bt_obex_server` is used to manage the OBEX session of server
role. The `struct bt_obex_client` is used to manage the OBEX session
of client role.

Add function `bt_obex_server_register()` to register the OBEX server
with specific uuid.

Add function `bt_obex_server_unregister()` to unregister the OBEX
server.

Add function `bt_obex_make_uuid()` to make UUID.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-10-10 12:59:56 -04:00
McAtee Maxwell
281e52f6bf drivers: clock_control: add clock_control support for kit_pse84_eval
- add support for kit_pse84_eval board
- refactor infineon,fixed-clock binding
- refactor infineon,fixed-factor binding
- refactor infinein,peri-div binding

Signed-off-by: McAtee Maxwell <maxwell.mcatee@infineon.com>
2025-10-10 12:59:33 -04:00
McAtee Maxwell
5d3741caaf drivers: clock_control: rename files related to ifx clock_control
- rename ifx clock_control drivers
- rename infineon,cat1-peri-div yaml
- rename ifx clock dt-binding .h file

Signed-off-by: McAtee Maxwell <maxwell.mcatee@infineon.com>
2025-10-10 12:59:33 -04:00
Emil Gydesen
b07be641e7 Bluetooth: Controller: Deprecate bt_ctlr_set_public_addr
Deprecate the bt_ctlr_set_public_addr function.
It is unused in the tree, and there is a vendor specific HCI
command that can be used for the same purpose.
The function does not have any tests and is basically
unmaintained.
Additionally it is the only function in the public
controller API, and removing it would allow us to
remove that part completely as unused.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-10-10 12:59:08 -04:00
Christophe Dufaza
5762ff5b58 bluetooth: host: remove transitional option _BT_LE_ADV_OPT_ONE_TIME
Automatic advertiser resumption is deprecated since Zephyr 4.0 [1].

To maintain the behavior during the deprecation period, internal
transitional symbols were introduced to replace the deprecated ones
in the implementation:

- _BT_LE_ADV_OPT_CONNECTABLE: same option bit
   as BT_LE_ADV_OPT_CONNECTABLE (deprecated)
- _BT_LE_ADV_CONN_ONE_TIME: same option bit
   as BT_LE_ADV_CONN_ONE_TIME (deprecated)

The only option for connectable advertising is now BT_LE_ADV_OPT_CONN,
whose value is _BT_LE_ADV_OPT_CONNECTABLE|_BT_LE_ADV_OPT_ONE_TIME.

We can assume _BT_LE_ADV_CONN_ONE_TIME is true for connectable
advertisers, and meaningless for non-connectable advertisers.

[1] Bluetooth: Deprecate adv auto-resume #73395

Signed-off-by: Christophe Dufaza <chris@openmarl.org>
2025-10-10 12:56:28 -04:00
Christophe Dufaza
e24d3b92a3 bluetooth: host: remove transitional option _BT_LE_ADV_OPT_CONNECTABLE
Automatic advertiser resumption is deprecated since Zephyr 4.0 [1].

To maintain the behavior during the deprecation period, internal
transitional symbols were introduced to replace the deprecated ones
in the implementation:

- _BT_LE_ADV_OPT_CONNECTABLE: same option bit
   as BT_LE_ADV_OPT_CONNECTABLE (deprecated)
- _BT_LE_ADV_CONN_ONE_TIME: same option bit
   as BT_LE_ADV_CONN_ONE_TIME (deprecated)

The only option for connectable advertising is now BT_LE_ADV_OPT_CONN,
whose value is _BT_LE_ADV_OPT_CONNECTABLE|_BT_LE_ADV_OPT_ONE_TIME.

We can substitute BT_LE_ADV_OPT_CONN for _BT_LE_ADV_OPT_CONNECTABLE
when testing if an advertising set is connectable.

Note: to fix a ClangFormat warning raised by check_compliance.py,
this commit also includes a formatting change next to the lines
actually edited (subsys/bluetooth/host/id.c:810).

[1] Bluetooth: Deprecate adv auto-resume #73395

Signed-off-by: Christophe Dufaza <chris@openmarl.org>
2025-10-10 12:56:28 -04:00
Christophe Dufaza
4850c0c52d bluetooth: host: remove API for automatic advertising resumption
Automatic advertising resumption is source of errors [1],
and deprecated since Zephyr 4.0 [2].

Samples and tests no longer cover this feature.

Deprecated public symbols include:
- advertising options BT_LE_ADV_OPT_CONNECTABLE
  and BT_LE_ADV_OPT_ONE_TIME
- advertising parameters BT_LE_ADV_CONN
  and BT_LE_ADV_CONN_ONE_TIME

Withdrawing this API (options and parameters) makes the code paths
to automatic advertiser resumption unreachable.

[1] Bluetooth: Advertising resume functionality is broken #72567
[2] Bluetooth: Deprecate adv auto-resume #73395

Signed-off-by: Christophe Dufaza <chris@openmarl.org>
2025-10-10 12:56:28 -04:00
Cristian Bulacu
975635fc17 net: dns_resolve: Remove DNS server by specified address
This commit implements removal of a DNS server by specifing an IP
address.

Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
2025-10-10 12:55:46 -04:00
Pieter De Gendt
4fa4329a16 shell: Add user data argument to shell_set_bypass
Allow passing some context to the shell bypass callback function by
providing a void pointer user data argument.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-10-10 12:53:55 -04:00
Phi Bang Nguyen
ade4e05969 drivers: video: Set format size
Receiver drivers now need to set the format's size to expose it to
the application.

Application should base on the format size to allocate buffers. The
caps' min/max_line_count (which are needed only for HWs that cannot
support the whole image frame) can hence be dropped.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2025-10-10 12:53:28 -04:00
Phi Bang Nguyen
21fec46971 drivers: video: Add helper to estimate format size
Add a helper to estimate format size and pitch.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2025-10-10 12:53:28 -04:00
Titouan Christophe
1d1bf21538 audio: midi: do not cast into unsigned long in UMP_* macros
In commit 5e83d222b6, all bit masking
operations in audio/midi.h were modified to use BIT_MASK(n) instead of
literal hexadecimal constants. However, masking a number with a BIT_MASK
promotes it to an unsigned long (while UMPs are packets of uint32_t aka
unsigned on most platforms). This results in annoying warnings from LOG_*
calls, such as:

    warning: format '%lX' expects argument of type 'long unsigned int',
    but argument 4 has type 'uint32_t' {aka 'unsigned int'}

There is no point in making these long integers, so let's revert the
bit masks as they were before, with literal hexadecimal values.

Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
2025-10-10 12:52:11 -04:00
Benjamin Cabé
169cf86969 include: doc: fix bad @endcond markers
Anything appearing after the @endcond tag is, well, not part of the
conditional block anymore. This fixes "INTERNAL_HIDDEN" text appearing
at odd polaces in the generated documentation.

Fixes zephyrproject-rtos/zephyr#94862

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-10-09 20:36:28 -04:00
Hugues Fruchet
b69e1d550a include: video: add size field to video_format structure
Add size field to the video_format structure which needs to be set by the
driver and exposed to the application.

For uncompressed formats, this is the size of the raw data buffer in
bytes, which could be the whole raw image or a portion of the raw image
in cases the receiver / dma supports it.

For compressed formats, this is the estimated maximum number of bytes
required to hold a complete compressed frame.

Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2025-10-09 22:56:37 +03:00
Mohammad Massoudi
09ed77fe89 include: driver: video: add h264 pixel format support
Add H264 pixel format support.

Signed-off-by: Mohammad Massoudi <m.massoudi32@gmail.com>
2025-10-09 22:56:37 +03:00
Sudan Landge
0438b9f29e arch: arm: start threads on privileged stack
Use the privileged stack when starting K_USER threads in arch_new_thread().
Threads entering user mode with k_thread_user_mode_enter() keep their
existing flow. To support both cases, z_arm_userspace_enter() now takes an
internal ABI flag (sp_is_priv) indicating whether PSP already points to
the privileged stack.

Also fix calculation of the privileged stack top: use priv_stack_end
directly instead of priv_stack_start + CONFIG_PRIVILEGED_STACK_SIZE, which
failed to account for guard/FPU offsets applied to priv_stack_start.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2025-10-09 22:54:57 +03:00
Firas Sammoura
6a62950c35 dt-bindings: riscv: Add fine-grained IO memory PMP attributes
Introduce new macros to define bitfields for RISC-V Physical Memory
Protection (PMP) attributes, specifically for specifying Read, Write,
and Execute permissions for IO memory regions in device tree bindings.

The following macros are added:
- ATTR_RISCV_TYPE_IO_R: Read access
- ATTR_RISCV_TYPE_IO_W: Write access
- ATTR_RISCV_TYPE_IO_X: Execute access

Corresponding macros for device tree usage are also added:
- DT_MEM_RISCV_TYPE_IO_R
- DT_MEM_RISCV_TYPE_IO_W
- DT_MEM_RISCV_TYPE_IO_X

These macros allow device tree source files to precisely describe the
intended access permissions for memory-mapped IO regions, enhancing
the system's memory protection configuration.

Signed-off-by: Firas Sammoura <fsammoura@google.com>
2025-10-09 22:54:34 +03:00
Peter Mitsis
41db28e2d5 tracing: Remove superfluous inclusion of kernel.h
Nothing in the tracing/tracing.h header file requires the explicit
inclusion of kernel.h.

Fixes #95123

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2025-10-09 22:54:11 +03:00
James Roy
1f6bfffc20 toolchain: iar: Add the __deprecated_version macro
Add the `__deprecated_version` macro to print version
information when deprecation warnings are triggered.

Signed-off-by: James Roy <rruuaanng@outlook.com>
2025-10-09 12:47:35 -04:00
James Roy
012b46b6a6 toolchain: gcc: Add the __deprecated_version macro
Add the `__deprecated_version` macro to print version
information when deprecation warnings are triggered.

Signed-off-by: James Roy <rruuaanng@outlook.com>
2025-10-09 12:47:35 -04:00
Martin Hoff
f954105ed0 drivers: adc: enhance millivolt conversion with 64-bit support
This commit updates the adc_raw_to_millivolts function to use 64-bit
arithmetic. It is necessary when the intermediate result is higher
than the maximum value of uint32_t. It also adds a range check to
ensure the conversion result does not exceed the limits of int32_t,
providing an assertion message for out-of-range values.

Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
2025-10-09 12:42:56 -04:00
Peter Mitsis
613653716d cpu_freq: Add new policy APIs
Adds two new CPU frequency scaling policy APIs:
  cpu_freq_policy_reset()
  cpu_freq_policy_pstate_set()

These new APIs allow the policy to better control and isolate relevant
logic from the rest of the subsystem.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2025-10-09 12:42:32 -04:00
Peter Mitsis
ea5240368d cpu_freq: Update cpu_freq API documentation
Adds explicit restrictions on the use of both
cpu_freq_policy_select_pstate() and cpu_freq_pstate_set()
for use with SMP systems.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2025-10-09 12:42:32 -04:00
Firas Sammoura
93464d0361 arch: riscv: Use CONFIG_PMP_SLOTS for PMP array sizing
The arrays used for M-mode Physical Memory Protection (PMP),
specifically for the stack guard feature (CONFIG_PMP_STACK_GUARD),
were previously sized using the hardcoded PMP_M_MODE_SLOTS macro,
defined as 8. This affected arrays in both the _thread_arch
struct (m_mode_pmpaddr_regs, m_mode_pmpcfg_regs) and local
variables within the z_riscv_pmp_stackguard_disable function.

This commit changes the array sizing to use the Kconfig option
CONFIG_PMP_SLOTS. This option reflects the total number of PMP
slots available and configured for the target hardware.

Using CONFIG_PMP_SLOTS ensures these arrays are dimensioned
according to the system's actual capabilities, providing better
flexibility and correctness over a fixed size.

The PMP_M_MODE_SLOTS macro definition has been removed from
thread.h as it is no longer used.

Signed-off-by: Firas Sammoura <fsammoura@google.com>
2025-10-09 12:40:08 -04:00
Szymon Janc
7f4f94e7f1 bluetooth: hci: Add data fields to event and meta event structs
Those flexible arrays allow for easy access to event data.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2025-10-09 12:38:49 -04:00
Robert Lubos
fa22fa37cb net: coap_client: Add optional payload callback for uploads
Add an optional payload callback field to the coap_client_request
structure, allowing the application to provide blocks of payload
interactively during the resource upload, instead of having to provide
entire payload in a single contigunous memory space.

If registered, the CoAP client library will call the payload callback
whenever a new PUT/POST message is being generated (note this is also
true for retransmissions) instead of using the payload pointer/length.
If the payload callback is NULL, then the library operates as usual.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-10-09 12:37:47 -04:00
Mario Paja
49dedb0b82 dt-bindings: clock: add stm32l5_clock
This change introduces stm32l5xx clock definitions and separates
it from L4xx series. This change comes because of CCIPR missmatch
of SAI between L4xx and L5xx series.

Signed-off-by: Mario Paja <mariopaja@hotmail.com>
2025-10-09 09:36:37 +02:00
Quang Le
f85ceddea6 drivers: clock control: Add Clock Control support for RZ/A3UL, V2L
Add Clock Control driver support for Renesas RZ/A3UL, V2L

Signed-off-by: Quang Le <quang.le.eb@bp.renesas.com>
Signed-off-by: Tien Nguyen <tien.nguyen.zg@renesas.com>
2025-10-09 09:36:24 +02:00
Zhaoxiang Jin
2eff0fd208 audio: dmic: Uniform indentation
Some parts of this file use tabs as indentation,
and some use spaces as indentation. This commit
unifies the indentation.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2025-10-08 12:04:32 +02:00
Henrik Brix Andersen
afc65525c0 retention: remove unused API struct
Remove the unused/unnecessary retention subsystem API struct.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2025-10-08 10:09:41 +02:00
Karsten Koenig
6066a42748 drivers: debub: coresight: Added coresight_nrf
Added driver and bindings for the coresight nrf submodule.
add integrated it for the nrf54h20.
The coresight subsystem is a combination of ARM Coresight peripherals
that get configured together to achieve a simplified configuration based
on a desired operating mode.

This also replaces the previous handling in the nrf54h20 soc.c which was
powering the subsystem up but not configuring it.

Signed-off-by: Karsten Koenig <karsten.koenig@nordicsemi.no>
2025-10-08 10:09:02 +02:00
Karsten Koenig
85363f9e53 drivers: pinctrl_nrf: Add coresight tpiu pins
Pinctrl needs to set the needed drive and direction of the pins. Also
this later allows automatically setting the clock bit for the traceclk
pin.

Signed-off-by: Karsten Koenig <karsten.koenig@nordicsemi.no>
2025-10-08 10:09:02 +02:00
Karsten Koenig
d833556ee5 drivers: debug: Moved nrf_etr from misc
Moved the nrf_etr driver from the drive/misc folder into the recently
established driver/debug folder where it is a better fit. Moved the
associated files such as bindings and headers accordingly as well.

Signed-off-by: Karsten Koenig <karsten.koenig@nordicsemi.no>
2025-10-08 10:09:02 +02:00