Commit graph

113524 commits

Author SHA1 Message Date
Pisit Sawangvonganan
7abda99fe3 shell: mqtt: use ring_buf_reset to flush rx_rb
The `sh_mqtt_rx_rb_flush` function was intended to flush `rx_rb` when
get an error return from `mqtt_read_publish_payload_blocking`.
Instead of retrieving values from `rx_rb` one by one, calling
`ring_buf_reset` achieves the same result more efficiently.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2025-04-09 22:06:05 +02:00
Pisit Sawangvonganan
24dabdd5fb shell: mqtt: optimize module-scoped sh_mqtt variable access
Introduce a local pointer, `struct shell_mqtt *sh`, to minimize access
to the module-scoped `sh_mqtt` variable.
This allows `sh` to be stored in a CPU register, resulting in more
compact code and improved execution efficiency.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2025-04-09 22:06:05 +02:00
James Roy
285b8ac933 style: edtlib: Use a more efficient expression
Replaced nested loops with a list comprehension
to improve performance. Execution time improved
from 0.0046203136444s to 0.0040774345397s

Signed-off-by: James Roy <rruuaanng@outlook.com>
2025-04-09 22:05:22 +02:00
Christoph Winklhofer
fc37c02eb1 json: improve parsing and serializing of 'float' and 'double'
Up to now, the handling of type float was offloaded to the users of the
JSON utility, with the token JSON_TOK_FLOAT.

Improve handling of floating point types and support the types 'float'
and 'double' in a built-in way so that they can be directly parsed to
and serialized from variables (of type float or double).

The types are serialized in the shortest representation, either as a
decimal number or in scientific notation:
  * float (with JSON_TOK_FLOAT_FP): encoded with maximal 9 digits
  * double (with JSON_TOK_DOUBLE_FP): encoded with maximal 16 digits
  * NaN, Infinity, -Infinity: encoded and decoded as:
    {"nan_val":NaN,"inf_pos":Infinity,"inf_neg":-Infinity}

Enable the floating point functionality with the Kconfig option:
  JSON_LIBRARY_FP_SUPPORT=y

It requires a libc implementation with support for floating point
functions: strtof(), strtod(), isnan() and isinf().

Fixes: #59412
Signed-off-by: Christoph Winklhofer <cj.winklhofer@gmail.com>
2025-04-09 22:05:14 +02:00
Christoph Winklhofer
c7b7ec2faf json: Support floating point values NaN and Infinity for numbers
Add support to decode the special floating point values NaN, Infinity
and -Infinity. For example:
  {"nan_val":NaN,"inf_pos":Infinity,"inf_neg":-Infinity}

Note that this commit is a preparation for the built-in support of
floating point values and these are only accepted when compiled with
the flag -DCONFIG_JSON_LIBRARY_FP_SUPPORT.

Signed-off-by: Christoph Winklhofer <cj.winklhofer@gmail.com>
2025-04-09 22:05:14 +02:00
Christoph Winklhofer
f07f2da8dc json: support scientific notation for numbers
Add support to decode floating point numbers in scientific notation,
e.g. 3.40282347e+38. Only the lower-case specifier 'e' is allowed.

Signed-off-by: Christoph Winklhofer <cj.winklhofer@gmail.com>
2025-04-09 22:05:14 +02:00
Luis Ubieda
6feb1c639b tests: spi_loopback: Extend RTIO fallback messages to 5
Loopback test requires this in order to properly execute half
transactions. Otherwise, testsuite fails.

It was overlooked when fixing #85894.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-04-09 21:10:53 +02:00
Sylvio Alves
0e8a324e9f boards: xiao_esp32c6: add multi-core support
ESP32-C6 now supports both HP and LP core app.
This fixes and updates XIAO board to support that as well.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-04-09 21:10:27 +02:00
Sylvio Alves
b1e169f226 boards: esp32c6_devkitc: remove cpp build tests
LP core is not intended to support CPP due to low
footprint. Ignore it.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-04-09 21:10:27 +02:00
Sylvio Alves
b0bb6e1e9c samples: cpp: hello_world: add cpp target tag
Add missing 'cpp' tag to ensure consistent sample tagging.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-04-09 21:10:27 +02:00
Håkon Amundsen
76a825c5fa tests: spi_controller_peripheral: fix CTRLSEL conflict
Both EXMIF and SPIS peripherals are claiming GPIO port 6 pin 0, but
with different CTRLSEL values. This will trigger a build error with
nrf-regtool 9.0.0 as it is not possible to apply this configuration
to hardware.

Fix the issue by disabling the EXMIF node that is enabled by default.

Signed-off-by: Håkon Amundsen <haakon.amundsen@nordicsemi.no>
2025-04-09 21:10:19 +02:00
Declan Snyder
4c6883b7ab include: spi.h: Fix documentation oddities
The recent change to spi.h doc merged a bit too early on accident and
some oddities were left over, fix them, including:

- Weird command causing strange broken topics section in output
- spi_iodev_api should probably be hidden, looks strange in its own
  section on the doc output
- Fix return values of transceive based functions to match transceive
  description

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-04-09 21:10:08 +02:00
Adam Openshaw
797e03258b drivers: gicv3: fixed typo
fixed typo

Signed-off-by: Adam Openshaw <quic_adamo@quicinc.com>
2025-04-09 21:09:43 +02:00
Adam Openshaw
1146574b67 drivers: gicv3: Add Support for Extended SPI
Added support to gicv3 driver to utilize the
extended SPI MMIO registers introduced in
GICv3.1 for the extended SPI range.

Documentation for the Extended Shared
Peripheral Interrupts extension can be found
in the ARM General Interrupt Controller
Architecture Specification:

https://developer.arm.com/documentation/ihi0069/latest/

Signed-off-by: Adam Openshaw <quic_adamo@quicinc.com>
2025-04-09 21:09:43 +02:00
Adam Openshaw
b664d3a925 drivers: gicv3: clang-format
Formatting files for compliance

Signed-off-by: Adam Openshaw <quic_adamo@quicinc.com>
2025-04-09 21:09:43 +02:00
Anisetti Avinash Krishna
89623fcae4 boards: acrn: acrn: Add support for ADL-n board
Add support to build zephyr to run on ADL-n board
as a VM on ACRN hypervisor.

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2025-04-09 19:34:22 +02:00
Anisetti Avinash Krishna
a660bcb6b0 boards: acrn: acrn: Updated soc name for acrn_ehl_crb
Updated soc name for acrn_ehl_crb to atom as
CONFIG_ATOM is selected for ACRN_EHL_CRB in
Konfig.acrn_ehl_crb but given soc elkhart_lake
in board.yml

Added common config ACRN_COMMON to enable common
configs of ACRN.

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2025-04-09 19:34:22 +02:00
Jason Yu
530f9163db modules: hal_nxp: mcux-sdk-ng: Fix cmake variable scope error
The CMakeLists.txt files in folders modules/hal_nxp/mcux/mcux-sdk-ng/*/
are loaded in modules/hal_nxp/mcux/mcux-sdk-ng/CMakeLists.txt using
cmake function `add_subdirectory`.

One issue is, when variables defined in one CMakeLists.txt are needed
by another CMakeLists.txt, then the variables need be exposed to parent
scope. This is not convenient.

Another issue is, to expose variables, the function `set_variable_ifdef`
sets the variables as global variables. The CMake global variables
named `CONFIG_xxx` will be collected by Kconfig, and results in build
fail.

The solution is:
1. Replace `add_subdirectory` with `include`, so that the variables will
be in the same file scope, don't need to expose them.
2. Modify the implementation of `set_variable_ifdef`, don't set
variables as global variables.

Resolves #88135

Signed-off-by: Jason Yu <zejiang.yu@nxp.com>
2025-04-09 19:34:10 +02:00
Jan Behrens
f75c057e85 drivers: stepper: Renamed DRV8424 to DRV84XX
Renamed the drv8424 stepper driver to indicate its support of the drv8424,
drv8425, drv8426, drv8434 and drv8436 stepper controllors. Also made the
microstep pins optional. All test files are renamed as well.

Signed-off-by: Jan Behrens <jan.behrens@navimatix.de>
2025-04-09 19:34:00 +02:00
Jan Behrens
d486c7794a drivers: stepper: DRV8424 Fault Event
Adds support for the fault event via the fault pin to the drv8424 driver.

Signed-off-by: Jan Behrens <jan.behrens@navimatix.de>
2025-04-09 19:34:00 +02:00
Jan Behrens
c8c79a9fc6 drivers: stepper: Renamed Fault Event + Non Static Event Trigger
Renamed fault event to be more in line with other events and added it to
the stepper shell.
Makes the event callback trigger function of the step-dir implementation
non-static so that step-dir stepper drivers can use it to trigger events
themself.

Signed-off-by: Jan Behrens <jan.behrens@navimatix.de>
2025-04-09 19:34:00 +02:00
Nitin Pandey
2b8af597ce driver: wifi: siwx91x: Handle MFP configuration
- Handled MFP configuration for STA and AP modes
- Updated the MFP configuration based on security modes

Signed-off-by: Nitin Pandey <nitin.pandey@silabs.com>
2025-04-09 19:32:26 +02:00
Nitin Pandey
0259bf56c8 driver: wifi: siwx91x: Add check for SAE password
- Modified conditions in WIFI_CONNECT()
  function to reject SAE password and
  PSK based on length parameter

Signed-off-by: Nitin Pandey <nitin.pandey@silabs.com>
2025-04-09 19:32:26 +02:00
Jordan Yates
c7bc268656 sensor: current_amp: add a noise threshold
ADC output values can have noise, even if the input is 0V. Add a noise
threshold so that raw ADC readings below the threshold can be zeroed
out. By default the threshold is disabled.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-04-09 19:32:02 +02:00
Furkan Akkiz
98f14b3ef0 samples: subsys: usb: Enable samples for MAX32690EVKIT board
Add max32690evkit board to integration_platforms in a few samples.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2025-04-09 19:31:24 +02:00
Furkan Akkiz
ce9077e2b5 boards: arm: adi: Add USB to MAX32690EVKIT board
Added 'zephyr_udc0' label to usbhs node and enabled it for MAX32690EVKIT
board.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2025-04-09 19:31:24 +02:00
Furkan Akkiz
59f709273d dts: arm: adi: Add USBHS instance to MAX32690
Insert USBHS instance to MAX32690 devicetree.
Add bindings for MAX32 UDC driver.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2025-04-09 19:31:24 +02:00
Furkan Akkiz
65883ed513 drivers: udc: Add MAX32xxx UDC driver
Add UDC driver for MAX32xxx USB device controller.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2025-04-09 19:31:24 +02:00
Benjamin Cabé
acfe49d75f dts: gpio: fix typo in mikro-bus binding description
There are 6 right-side pins so numbering is 6-11,
not 6-10.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-04-09 17:33:10 +02:00
Mathieu Choplain
fe9f0a9711 drivers: entropy: stm32: configure prescaler on STM32WB09
The STM32WB09 TRNG has a prescaler that defaults (on reset) to 256, making
the entropy generation process unbearably slow. Change the prescaler value
to 1 instead, in order to make the IP about as fast as other STM32's.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2025-04-09 17:32:59 +02:00
Gerhard Jörges
fb032af6e9 doc: migration-guide-4-2: http_server: concurrent connections
update to reflect changes in 3ebecd15615197b81efe79fcde6e4bedc0f6b09d

Signed-off-by: Gerhard Jörges <joerges@metratec.com>
2025-04-09 17:32:50 +02:00
Gerhard Jörges
235a363e63 tests: net: http_server: concurrent connections
update to reflect changes in 3ebecd15615197b81efe79fcde6e4bedc0f6b09d

Signed-off-by: Gerhard Jörges <joerges@metratec.com>
2025-04-09 17:32:50 +02:00
Gerhard Jörges
a01f344d64 samples: net: http_server: concurrent connections
update to reflect changes in 3ebecd15615197b81efe79fcde6e4bedc0f6b09d

Signed-off-by: Gerhard Jörges <joerges@metratec.com>
2025-04-09 17:32:50 +02:00
Gerhard Jörges
9d0d7ad3b8 net: lib: http_server: implement concurrent
only accept new connections until the configured value for concurrent
connections is reached. Also set the backlog of the listening socket
to the configured value.

Signed-off-by: Gerhard Jörges <joerges@metratec.com>
2025-04-09 17:32:50 +02:00
Ivar Bjerling
4344b8bc05 boards: add support for IAR STM32F429II-ACA
Adds support for the IAR STM32F429II-ACA evaluation board

Signed-off-by: Ivar Bjerling <ivar@ivarbjerling.com>
2025-04-09 17:32:38 +02:00
Okan Sahin
826ac55454 tests: drivers: build_all: Add build test for AD4130 driver
This commit adds build-only test of ad4130 spi based
adc.

Signed-off-by: Okan Sahin <Okan.Sahin@analog.com>
2025-04-09 17:32:29 +02:00
Okan Sahin
be1218081a drivers: adc: Introduce AD4130 adc driver
This commit introduces ad4130 adc driver.

Signed-off-by: Okan Sahin <Okan.Sahin@analog.com>
2025-04-09 17:32:29 +02:00
Okan Sahin
5785c09255 dts: bindings: adc: Add AD4130 binding
This commit adds bindings and analog inputs
for AD4130 ADC.

Signed-off-by: Okan Sahin <Okan.Sahin@analog.com>
2025-04-09 17:32:29 +02:00
Gerard Marull-Paretas
d0fdd384db maintainers: drop gmarull from device driver model
I won't be able to work on this area.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2025-04-09 15:24:23 +02:00
Gerard Marull-Paretas
7c89ce0594 maintainers: set gmarull as pin control collaborator
I won't be able to actively maintain this subsystem, but maybe help
reviewing on my spare time. The API has not changed from its
introduction, it's been mostly new drivers.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2025-04-09 15:24:23 +02:00
Gerard Marull-Paretas
66dfca5267 maintainers: drop gmarull as collaborator from a few areas
I won't be available to collaborate in MFD, Input or GD32 areas, so
let's drop my collaborator entries.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2025-04-09 15:24:23 +02:00
Gerard Marull-Paretas
117b7582d9 maintainers: set gmarull as docs collaborator
@kartben has been doing a great job maintaining docs, so we're good in
this area. I'll stay as collaborator so I can still follow what's going
on.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2025-04-09 15:24:23 +02:00
Peter van der Perk
818d9dc286 drivers: serial: uart_mcux_lpuart: RX IRQ Enable RxOverrun flag
If the RX FIFO buffer is full and there's nothing being transmitted
no LPUART interrupt will fire anymore. Thus the application will not
receive any bytes anymore. By enabling kLPUART_RxOverrunInterruptEnable
we will receive interrupts even though RX FIFO is full so we can recover
from this.

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2025-04-09 15:24:11 +02:00
Krzysztof Chruściński
a4a613036c dts: common: nordic: nrf54h20: Update exit-latency-us timing
Update exit-latency-us with newly measured values. Measurement is
taking into account additional timing compared to wakeup from
WFI.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-04-09 15:24:02 +02:00
Krzysztof Chruściński
a36b154fd1 soc: nordic: nrf54h: power: Enable cache as early as possible
Add nrf_cache_power_up and nrf_cache_power_down functions. In case of
s2ram power up cache as early as possible, before restoring ARM core
registers. It improves restore time from 180 us to 33 us.

As a minor optimization nrf_memconf_ramblock_control_mask_enable_set is
used which allows to control ram blocks for icache and dcache in a
single register write.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-04-09 15:24:02 +02:00
Emil Gydesen
0270704bcb tests: Bluetooth: Tester: Fix bad check for valid RX
The check was incorrect, and only reported invalid ISO
packages instead of valid.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-04-09 15:23:39 +02:00
Eivind Jølsgard
ab341e0afe arch: arm: core: cortex_m: Make relocate_vector_table weak
Allow relocate_vector_table() to be overwritten. This is necessary if
the IRQ vector table is handled proprietary, e.g. before the zephyr
kernel is initialized. In this case we want this function to be empty to
avoid overriding the previous configuration.

Co-authored-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Signed-off-by: Eivind Jølsgard <eivind.jolsgard@nordicsemi.no>
2025-04-09 15:23:25 +02:00
Tomasz Moń
33b9811536 drivers: udc_nrf: Remove doxygen comments
Update the comments to reflect refactored driver state.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-04-09 15:23:12 +02:00
Tomasz Moń
6f08055388 drivers: udc_nrf: Keep track of endpoint armed state
Arm OUT endpoints only when enqueueing first buffer. Disarm IN and OUT
endpoints on endpoint disable. Prevent ISO endpoints from being armed
twice before SOF.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-04-09 15:23:12 +02:00
Tomasz Moń
229fc1558e drivers: udc_nrf: Simplify control transfer processing
Use USB stack state instead of former HAL state to determine what to do
with control transfer buffers.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-04-09 15:23:12 +02:00