Commit graph

114656 commits

Author SHA1 Message Date
Sebastian Bøe
8007e2481c soc: nrf53: Port SYS_INIT nrf53_cpunet_init to soc_late_init_hook
Port SYS_INIT nrf53_cpunet_init to soc_late_init_hook as SYS_INIT are
legacy.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2025-05-06 10:50:31 +02:00
Sebastian Bøe
5d9f5543b9 soc: nrf53: Port SYS_INIT rtc_pretick_init to soc_late_init_hook
Port the SYS_INIT for rtc_pretick_init to use soc_late_init_hook as
SYS_INIT's are legacy.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2025-05-06 10:50:31 +02:00
Sebastian Bøe
5da0748612 soc: nrf53: Port SYS_INIT to soc_early_init_hook
Port the nordicsemi_nrf53_init to use soc_early_init_hook instead of
SYS_INIT as SYS_INIT is legacy.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2025-05-06 10:50:31 +02:00
Emil Gydesen
277d0c1f89 tests: Bluetooth: CAP: Fix typo STREMT -> STREAM
Fixed a typo in the term "stream".

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-05-06 10:50:22 +02:00
Emil Gydesen
240749c770 tests: Bluetooth: CAP: Add bcast reception with multiple acceptors
Expand the CAP broadcast reception test to also run with
multiple acceptors to better verify correctness in the
procedures.

For this to run more stable, the maximum number of streams
has been reduce to 2, rather than
CONFIG_BT_BAP_BROADCAST_SRC_STREAM_COUNT.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-05-06 10:50:22 +02:00
Derek Snell
e96bf44d93 boards: nxp: frdm_mcxa153: enable DMA
Enable DMA by default for this board.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2025-05-06 02:36:35 +02:00
Derek Snell
6ce2c8a7f0 doc: boards: shields: nxp_m2_wifi_bt: add blobs command
Add command to fetch the firmware blobs from hal_nxp.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2025-05-06 02:36:22 +02:00
Daniel Nicoletti
9bbccf39cb include: zephyr: sys: Fix uuid.h usage in C++ code
In uuid.h the function uuid_generate_v5 had a 'namespace'
parameter which is a reserved C++ keywork.
Renamed to 'ns'.

Signed-off-by: Daniel Nicoletti <dantti12@gmail.com>
2025-05-06 02:36:15 +02:00
John Batch
b1950615bd driver: pwm: infineon: Use PWM buffer updates
Change PWM to use buffers registers instead of writing period
and compare directly.  This addressses an issue when updating
period to a value less than current counter, as demonstrated
in the blinky_pwm sample running on the CYW920829M2EVK_02
board.

Signed-off-by: John Batch <john.batch@infineon.com>
2025-05-06 02:36:04 +02:00
John Batch
2702192872 Samples: basic: blinky_pwm: Add support for cyw920829m2evk_02 board
Origin: Zephyr OS
License: Apache-2.0
URL: https://github.com/zephyrproject-rtos/zephyr/blame/main/samples/basic/fade_led/boards/cyw920829m2evk_02.overlay
commit: abca729367
Purpose: Add overlay to enable and configure PWM device on IFX
CYW920829M2EVK-02 board.

Signed-off-by: John Batch <john.batch@infineon.com>
2025-05-06 02:36:04 +02:00
Dhruv Menon
4aa1ac9f96 doc: fix typo in driver subsection of kernel
This commit fixes a type in kernel/driver/index.rst,
present in the "Drivers that do not use Zephyr Device
Model" subsection

Signed-off-by: Dhruv Menon <dhruvmenon1104@gmail.com>
2025-05-05 21:57:12 +02:00
Robert Hancock
3a0f26f02a drivers: ethernet: vsc8541: add RGMII clock delay configuration
As the code noted, the RGMII RX and TX clock delay values may need to
change depending on the MAC configuration or the PCB layout. Add
properties to allow configuring these in the device tree, defaulting to
the previous hard-coded values if not present.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2025-05-05 21:57:05 +02:00
Krzysztof Chruściński
8ad44471b9 pm: Include disabled states in search inside pm_state_get
pm_state_get() is used to get a PM state that can be forced.
Disabled states (not included in automatic state selection) can
also be forced thus they should be included in search inside
pm_state_get().

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-05-05 21:56:55 +02:00
Hao Luo
660390835b dts: ambiq: change to enable ambiq drivers in overlays
Keep minimal system in board dts, only enable driver in overlays

Signed-off-by: Hao Luo <hluo@ambiq.com>
2025-05-05 21:56:47 +02:00
51209ef7ec samples: pwm: add the CH32V003EVT to the blinky_pwm and led/pwm samples
The CH32V003 has a single red LED that can be driven by GPIO or TIM2
CH1. Add to the samples.

Signed-off-by: Michael Hope <michaelh@juju.nz>
2025-05-05 21:56:38 +02:00
b1aadb6729 drivers: pwm: add a CH32V00x General-prupose Timer Module (GPTM) driver
The GPTM is a general purpose module with a 16 bit prescaler, 16 bit
counter, and 4 compare units that can be used for PWM generation.

Use the same style as gd32 where the timer is a counter and the PWM
mode is a child node.

Signed-off-by: Michael Hope <michaelh@juju.nz>
2025-05-05 21:56:38 +02:00
Tobias Meyer
64fe434297 doc: sbom cmd more detail for build_dir
when following the example it was not clear that BUILD_DIR needs to point
to application for sysbuild builds

Signed-off-by: Tobias Meyer <tobiuhg@gmail.com>
2025-05-05 18:12:09 +02:00
Jeppe Odgaard
d9cec34c7a boards: st: nucleo_u083rc: improve pyocd flashing
`pyocd` fails the second time the MCU is flashed.

Add `pyocd` flags identical to other nucleo boards to fix the issue.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2025-05-05 18:07:45 +02:00
Bas van Loon
c020dfab41 drivers: serial: uart_mcux_lpuart: Fix pinctrl flow control
Currently the driver code does not actually request the flow control
state, it only checks if the state exists. To fix this we should
simply call pinctrl_apply_state() and if that fails, meaning no
flow control state exists, fall back to default pin mux settings.

Another case that needed fixing is run time flow control enabling
ie in the case where we have a WIFI/bluetooth module connected
and we initially operate without flow control but later enable
it after firmware download.

This patch addresses this as well by making a generic function
to achieve this.

Signed-off-by: Bas van Loon <bas@arch-embedded.com>
2025-05-05 18:07:33 +02:00
Vit Stanicek
eeaf860dfa dma_mcux_lpc: add host directions, DMA driver ctx, getter func
Add support for HOST_TO_MEMORY, MEMORY_TO_HOST directions (aliases of
MEMORY_TO_MEMORY). Implement dma_mcux_lpc_get_attribute function. Fix
missing DMA driver context.

Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
2025-05-05 18:07:15 +02:00
Jilay Pandya
4e83888a26 tests: stepper: delete duplicate test cases
deleting two test-cases from drv8424 test-suite since these test-cases
are now present in stepper-api since #88835

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-05-05 14:26:02 +02:00
Troels Nilsson
368beb9623 Bluetooth: Controller: Fix truncation by abs() call when using PAST
The abs() function only takes an int as input - use llabs() instead

Fixes EBQ failure in LL/CON/PER/BV-105-C

Signed-off-by: Troels Nilsson <trnn@demant.com>
2025-05-05 14:25:22 +02:00
Arkadiusz Balys
bee2f79dde samples: Enable OpenThread logging in all related samples
Some OpenThread logs were moved from L2 to the OpenThread module,
so enable logging from there to keep previous logging visibility.

Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
2025-05-05 14:25:13 +02:00
Arkadiusz Balys
8a9fd8d5c8 drivers: nxp: Do not use private L2 data structure.
An implementation should use a dedicated function to get
openthread instance instead of using the private L2 data.

Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
2025-05-05 14:25:13 +02:00
Arkadiusz Balys
e3fab7f89c doc: releases: add release note for OpenThread update
Add an entry to the release note and migration guide regarding
moving the OpenThread implementation from the L2 networking layer
to the OpenThread module.

The migration guide note contains information about deprecated
functions, explains what functions should be used instead and
provides a guide for required updates in users' applications.

Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
2025-05-05 14:25:13 +02:00
Arkadiusz Balys
596844a2cb openthread: Move OpenThread implementation from net to modules
Move OpenThread-related code from
zephyr/subsys/net/l2/openthread/openthread.c to
zephyr/modules/openthread/platform/openthread.c.

The primary goal of this refactor is to enable the use
of OpenThread as an independent module, without the necessity
of Zephyr's networking layer.

This change is particularly beneficial for simple applications
that have their own implementation of the IEEE802.15.4 driver
and do not require a networking layer. These applications can
now disable Zephyr's L2 and IEEE802.15.4 shim layers and
directly use the OpenThread module, saving valuable kilobytes
of memory.

In this approach if the CONFIG_NET_L2_OPENTHREAD
Kconfig option is set, Zephyr's L2 and IEEE802.15.4 layers
will be used, and everything will function as before.
The main difference is the Zephyr's L2 layer now uses
the OpenThread module, no longer implementing it.

While most of the functions in include/net/openthread.h
have been deprecated, they are still available for use to
maintain backwards compatibility.

Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
2025-05-05 14:25:13 +02:00
Dat Nguyen Duy
92cb88ff75 tests: counter: fix test_valid_function_without_alarm for count-down timer
The ticks_expected was not calculated correctly for count-down
timer, let's fix this.

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2025-05-05 14:24:54 +02:00
Markus Lassila
10bd2de235 modem: backend: uart: Add hw-flow-control for UART
Add Asynchronous UART implementation, which does not drop data
when automatic hardware-flow-control is set in the device tree.

With automatic hardware flow control, the CTS pin will be
automatically deactivated when there are no more asynchronous
UART RX buffers available. After buffer space becomes available,
and UART RX is restarted, the CTS pin will be activated.

Signed-off-by: Markus Lassila <markus.lassila@nordicsemi.no>
2025-05-05 14:24:49 +02:00
Bjarki Arge Andreasen
24dd37929c tests: modem: backends: uart: add hw flow control option
Extend test modem uart backend test suite to support testing hw
flow control, which is performed by using a small receive
buffer for the modem uart backend, and slowing down the read
of received data, ensuring the buffer will be overrun if hw flow
control is not working.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-05-05 14:24:49 +02:00
Bjarki Arge Andreasen
525d3d680d tests: modem: backends: uart: boards: add hw-flow-control
Update the board overlays to support hardware flow control for
testing.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-05-05 14:24:49 +02:00
Jordan Yates
24ede86380 boards: nordic: *dk: don't enable USE_SEGGER_RTT
Don't enable RTT by default on these development kits. They all have
a dedicated physical serial port that is intended to be the primary
serial comms channel.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-05-05 14:24:38 +02:00
Kyle Micallef Bonnici
ee940cb6dc dts: arm: nordic: nrf5340: cpuapp: peripheral: add missing reg
Add missing reg property to nrf5340_cpuapp.dts peripheral
node.

Signed-off-by: Kyle Micallef Bonnici <kylebonnici@hotmail.com>
2025-05-05 12:21:17 +02:00
Fin Maaß
0d74f6239b logging: backend: net: use sizeof to check Kconfig
Use sizeof to check if the Kconfig value had been
set, to allow the compiler to optimize.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-05-05 12:21:00 +02:00
Fin Maaß
211c0e3819 net: config: init: remove second init of syslog
Doing another init of the log_backend_net in
the net config init could lead to the
server, set during runtime, being overwritten
by the Kconfig default.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-05-05 12:21:00 +02:00
Henrik Brix Andersen
b2248b9a20 boards: others: neorv32: mention the GPTMR as being supported
Mention the NEORV32 General Purpose Timer (GPTMR) as supported and add
instruction on how to enable it in the devicetree.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2025-05-05 12:20:50 +02:00
Henrik Brix Andersen
8f8458c4b4 tests: boards: neorv32: build_all: enable GPTMR
Enable the NEORV32 General Purpose Timer (GPTMR) in the NEORV32 build_all
test suite.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2025-05-05 12:20:50 +02:00
Henrik Brix Andersen
65ec9256bb tests: drivers: counter: counter_basic_api: add NEORV32 GPTMR support
Add support for testing the NEORV32 General Purpose Timer (GPTMR).

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2025-05-05 12:20:50 +02:00
Henrik Brix Andersen
2e8a08a165 drivers: counter: add NEORV32 GPTMR driver
Add counter driver for the NEORV32 General Purpose Timer (GPTMR).

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2025-05-05 12:20:50 +02:00
Henrik Brix Andersen
bd409ab231 dts: riscv: neorv32: add GPTMR devicetree node
Add NEORV32 General Purpose Timer (GPTMR) devicetree node.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2025-05-05 12:20:50 +02:00
Henrik Brix Andersen
fc72eafe01 dts: bindings: counter: add NEORV32 GPTMR devicetree binding
Add devicetree binding for the NEORV32 General Purpose Timer (GPTMR).

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2025-05-05 12:20:50 +02:00
Abderrahmane JARMOUNI
558aaace96 samples: subsys: logging: logger: add stm32h750b-dk conf
Enable the sample to run on stm32h750b-dk board with async
UART backend

Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
2025-05-05 12:20:42 +02:00
Abderrahmane JARMOUNI
63cf0c803f logging: uart_backend: add uncached buffers support
When async UART is used & DCache is enabled, some SoCs, like STM32H7,
require UART buffers to be placed in nocache memory to avoid cache
coherence issues.

Fixes issue 87795

Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
2025-05-05 12:20:42 +02:00
Christoph Winklhofer
13054293ad tests: logging: Allow LOG_PRINTK from user space
The commit '3b29b9fa3b (tests: logging: restore userspace testing,
2025-04-18)' set CONFIG_LOG_PRINTK=n which brakes the build on the
platform 'ip_k66f'.

Without CONFIG_LOG_PRINTK=n (dependency from CONFIG_USERSPACE=y) some
tests in 'tests/subsys/logging/log_core_additional/logging.log_user'
would not build.

Remove this dependency so that LOG_PRINTK can also be used from user
space, which is possible since '77925656ab (logging: Fix runtime
message creation in user-mode thread, 2025-04-18)' and reset
CONFIG_LOG_PRINTK=y.

Fixes: #89067
Signed-off-by: Christoph Winklhofer <cj.winklhofer@gmail.com>
2025-05-05 12:20:34 +02:00
Dominik Ermel
71a329fbb0 tests: flash_map: Basic offset/length overflow tests
Test integer overflow on Flash Area operation parameters.
All functions call the same is_in_flash_area_bounds
function for parameter verification, so it was enough
to test parameter checks of flash_read.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2025-05-05 10:57:51 +02:00
Dominik Ermel
3d4b427245 storage/flash_map: Fix is_in_flash_area_bounds
Prevent possible overflow in is_in_flash_area_bounds while
validating offset and length of an operation.

Fixes #89349

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2025-05-05 10:57:51 +02:00
Robert Lubos
d60831810b net: websocket: Make use of any leftover data after HTTP processing
In case HTTP client read out more data from a socket that it processed
it will indicate there is leftover data in the receive buffer available.
Make use of it at the websocket level, so that no data is lost. As we
reuse the same receive buffer in this case, it's only needed to update
the count variable to indicate how many bytes are available.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-05-05 10:57:43 +02:00
Robert Lubos
4a85e47061 net: http: client: Notify application about unprocessed data
The HTTP client would read data from a socket up to the size of the
receiving buffer, however it may not process them all. This is usually
only the case if protocol switching takes place, where the data read may
belong to another protocol. Therefore we need a way to notify the caller
about any potential data that is already present in the buffer and needs
to be processed.

Introduce an new data_len member in struct http_request to provide the
information about the data already available in the receive buffer. If,
after HTTP response processing, the value is non-zero, the data will be
available in the beginning of the user provided receive buffer.

To make this possible however, we need to track how many bytes were
actually processed by the http_parser, therefore the code will no longer
ignore the http_parser_execute() return value. To simplify processing,
it's also been changed how the receive buffer is used. Instead of using
it in a ring-buffer-like way, the offset variable will track how many
bytes are available in the buffer, and in the rare occasions when not
all data from the buffer was processed by the HTTP parser, we'll
memmomve the remaining data to the beginning of the buffer.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-05-05 10:57:43 +02:00
Gudipudi Ramana Kumar
44ed0c60ba samples: bluetooth: Increase number of buffers for avoiding deadlocks
The central_multilink sample issues various API calls
(in particular because it does some from the bt_workq("BT RX WQ"))
this results in a deadlock since there are not enough
HCI command buffers available, this is causing deadlocks on hardware
that do not support BT_HCI_ACL_FLOW_CONTROL.

Below is the flow where assert is observed:
bt_hci_le_enh_conn_complete() -> bt_conn_connected()
-> connected() callback -> start_scan() -> bt_le_scan_start()
-> set_random_address() -> bt_hci_cmd_send_sync: opcode 0x2005
-> Controller unresponsive, command opcode 0x2005 timeout with err -11

Since the start_scan is called from the callback and BT RX WQ thread,
the command buffers are still not available for the system work queue
to process the hci commands it has to send out for starting the scan.

By adding additional buffers this deadlock can be avoided.

Signed-off-by: Gudipudi Ramana Kumar <ragudipu@silabs.com>
2025-05-05 10:57:33 +02:00
Marcin Lyda
f7280fac32 drivers: counter: Add MCP7940N property to enable VBAT backup
This PR adds a new devicetree property
that allows enabling external battery
backup functionality.

Signed-off-by: Marcin Lyda <elektromarcin@gmail.com>
2025-05-05 10:57:28 +02:00
Chris Friedt
76e1fc7713 tests: posix: move tv_to_ts to posix_clock.h
Move the private static inline function tv_to_ts() to posix_clock.h .

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-05-04 19:56:02 +02:00