Commit graph

126,787 commits

Author SHA1 Message Date
Jonas Berg
d5b90a74bd samples: Allow compile-testing of RTC shields in samples/drivers/rtc
Create a testcase without "depends_on: rtc", to allow compile test
the overlay files for shields.

Signed-off-by: Jonas Berg <jonas.s.t.berg@gmail.com>
2025-09-24 09:43:44 +02:00
TaiJu Wu
623d8fa540 kernel: cleanup thread state checks and nunecessary CONFIG check
The commit replaces negative thread state checks with a new,
 more descriptivepositive check.
The expression `!z_is_thread_prevented_from_running()`
is updated to `z_is_thread_ready()` where appropriate, making
the code's intent clearer.

 Removes a redundant `IS_ENABLED(CONFIG_SMP)`, they are included #ifdef.

Finally, this patch add the missing `#endif` directive.

Signed-off-by: TaiJu Wu <tjwu1217@gmail.com>
2025-09-24 09:43:30 +02:00
TaiJu Wu
e069ce242c kernel: Consolidate thread state checking functions
This patch moves `is_aborting()` and `is_halting()`
from `kernel/sched.c` to `kernel/include/kthread.h`
and renames them to `z_is_thread_aborting()` and `z_is_thread_halting()`,
for consistency with other internal kernel APIs.

It replaces the previous inline function definitions in `sched.c`
with calls to the new header functions. Additionally, direct bitwise
checks like `(thread->base.thread_state & _THREAD_DEAD) != 0U`
are updated to use the new `z_is_thread_dead()` helper function.
This enhances code readability and maintainability.

Signed-off-by: TaiJu Wu <tjwu1217@gmail.com>
2025-09-24 09:43:30 +02:00
Pete Johanson
979adfd1c9 MAINTAINERS: Add Pete Johanson as hal_adi collaborator
Adding Pete Johanson (ADI TSC member) to the collaborators for the hal_adi.

Signed-off-by: Pete Johanson <pete.johanson@analog.com>
2025-09-24 09:42:54 +02:00
Kamil Krzyżanowski
bd344be413 drivers: serial: stm32: use hardware rx timeout interrupt when available
Use the RTO interrupt for RX timeouts when using the async API.
The workqueue based approach is sensitive to load and has a higher latency
than using hardware timeouts.

Signed-off-by: Kamil Krzyżanowski <kamnxt@kamnxt.com>
2025-09-24 09:42:33 +02:00
Kamil Krzyżanowski
50d6eac5a2 drivers: serial: stm32: fix some formatting
Fix some formatting, because the clang-format compliance test was
complaining.

Signed-off-by: Kamil Krzyżanowski <kamnxt@kamnxt.com>
2025-09-24 09:42:33 +02:00
Vladislav Pejic
3db00489f1 sample: adc_stream: Add sample app for ADC stream
Add sample application to demonstrate new ADC stream APIs.
Two tests are also added:
- ad4052-stream
- max32-stream

Signed-off-by: Vladislav Pejic <vladislav.pejic@orioninc.com>
2025-09-23 17:50:25 -04:00
Vladislav Pejic
8c4647761c boards: adi: apard32690: Fix for gpio-map
Fix for gpio-map-mask and gpio-map-pass-thru to enable use of
MAX32_GPIO_VSEL_VDDIOH and other defines with arduino_header connector.

Signed-off-by: Vladislav Pejic <vladislav.pejic@orioninc.com>
2025-09-23 17:50:25 -04:00
Dimitrije Lilic
0c4c305c9a drivers: adc: max32: Support for RTIO stream
Updated MAX32 driver with RTIO  stream functionality.

Signed-off-by: Dimitrije Lilic <dimitrije.lilic@orioninc.com>
2025-09-23 17:50:25 -04:00
Vladislav Pejic
bc0683b6a2 driver: adc: ad405x: Add RTIO stream
Added support for RTIO stream.
Also added sampling_period property to the DTS. This is for setting the
sampling period when streaming is used.
Hardware or kernel timer can be
used for this.
To use hardware timer you need to add it to the DTS. Example:

{
	chosen {
		zephyr,adc-clock = &counter0;
	};
};

Signed-off-by: Vladislav Pejic <vladislav.pejic@orioninc.com>
2025-09-23 17:50:25 -04:00
Vladislav Pejic
9c770bc34a boards: shields: EVAL-AD4052-ARDZ comp and overlay
Fix for compatible property.
Addition of hardware timer to be used with APARD32690 board.

Signed-off-by: Vladislav Pejic <vladislav.pejic@orioninc.com>
2025-09-23 17:50:25 -04:00
Vladislav Pejic
1d02d57413 driver: adc: Added stream APIs for ADC
Introduce a streaming APIs for ADC devices.
Two new APIs are added to the adc_driver_api: submit and get_decoder.
Added decoder following APIs: get_frame_count, get_size_info, decode,
has_trigger.

Supported triggers are:
- ADC_TRIG_DATA_READY
- ADC_TRIG_FIFO_WATERMARK
- ADC_TRIG_FIFO_FULL
Supported operations to be done on trigger:
- include - whatever data is associated with the trigger
- nop - do nothing with data associated with the trigger
- drop - clear data associated with the trigger

Some changes to the linker scripts were needed to add decoder APIs.

Signed-off-by: Vladislav Pejic <vladislav.pejic@orioninc.com>
2025-09-23 17:50:25 -04:00
Gerard Marull-Paretas
a2b1c594f1 boards: sf32lb52_devkit_lcd: define buttons and led
Define the two keys and LED available in the board. Also enable
CONFIG_GPIO=y (considered minimal in Zephyr).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2025-09-23 17:50:16 -04:00
Gerard Marull-Paretas
290ae4ba5b drivers: gpio: sf32lb: add initial driver
Add initial driver for SF32LB.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2025-09-23 17:50:16 -04:00
Gerard Marull-Paretas
c89b3a877a dts: arm: sifli: sf32lb52x: define gpioa nodes
Add nodes for the GPIO controller (controlling pins PA00-44). Naming is
a bit confusing. In some places you'll find HPSYS_GPIO, other GPIO1,
pins are named PA00-PA44... I've chosen "GPIOA". Because the Zephyr GPIO
API assumes a maximum of 32 pins per controller, we have to split the
controller into 32-bit wide blocks. In reality, the controller
internally works like that (see the `reg` addresses), however, the whole
block is clocked by a single RCC _switch_.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2025-09-23 17:50:16 -04:00
Gerard Marull-Paretas
3eca7ef291 dts: bindings: gpio: add sifli,sf32lb-gpio
Add bindings for the SF32LB GPIO controller.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2025-09-23 17:50:16 -04:00
Gerard Marull-Paretas
3a56ded095 dts: bindings: gpio: add sifli,sf32lb-gpio-parent
SiFli SF32LB SoCs have a single GPIO controller block which manages all
pins (> 32). However, Zephyr API expects ports to have up to 32 pins. So
in order to make things compatible, we introduce a Zephyrism in
devicetree: a parent node with common properties (e.g. IRQ, RCC clock,
etc.) and children nodes for each 32 pin block. See upcoming devicetree
definition for more details.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2025-09-23 17:50:16 -04:00
Gerard Marull-Paretas
e22844325f dts: bindings: pinctrl: sifli,sf32lb52-pinmux: add port/offset cells
So we can reference later to any of the PAD_XX_YY registers from e.g.
GPIO nodes, where we need to write pad configs like pull-ups.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2025-09-23 17:50:16 -04:00
Josuah Demangeon
8e2e62a0c0 MAINTAINERS: add @josuah as collaborator for BFLB platform
Add myself as collaborator to help with reviews and occasional
contributions for the Bouffalo Labs SoC peripherals, configurations,
and HAL.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-09-23 17:50:05 -04:00
Michael Zimmermann
366d129146 samples: mqtt_sn: add support for IPv6
Like other samples, this moves to net_ipaddr_parse, which can handle IPv4
and IPv6. Additionally, it parses the port as well which removes the need
to have separate Kconfigs for addresses and ports, thus simplifying the
code.

Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
2025-09-23 17:49:56 -04:00
Michael Zimmermann
7f55e702eb net: mqtt_sn: udp: fix joining v6 multicast group
GCC gave the following warning:

mqtt_sn_transport_udp.c: In function ‘tp_udp_init’:
mqtt_sn_transport_udp.c:117:9: warning: ‘memcpy’ forming offset [12, 105]
is out of the bounds [0, 12] of object ‘mreqn’ with type ‘struct ip_mreqn’
[-Warray-bounds=]
  117 |         memcpy(&mreqn.imr_multiaddr, &udp->bcaddr.data[2], si...
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mqtt_sn_transport_udp.c:48:25: note: ‘mreqn’ declared here
   48 |         struct ip_mreqn mreqn;
      |                         ^~~~~

And it turns out that it's right. The original code looks like it tries to
copy the IP address to imr_multiaddr in a way that works for both v4 and
v6. It ignores, that bcaddr.data may be way larger than even a v6 addr,
because it's a buffer that's big enough to hold many other structs as well.

Not only that, IP_ADD_MEMBERSHIP is for IPv4 only and imr_multiaddr can
only hold an IPv4 address anyway.

This modifies the code to have separate code paths for v4 and v6 and call
the correct APIs. This also gets rid of the memcpy, since it can be a
simple struct assignment now.

Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
2025-09-23 17:49:56 -04:00
Michael Zimmermann
557d2aa0e0 net: mqtt_sn: allow using all of CONFIG_MQTT_SN_LIB_MAX_ADDR_SIZE
The check didn't allow the address to be exactly this size.

Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
2025-09-23 17:49:56 -04:00
Michael Zimmermann
8ae28567d3 net: mqtt_sn: udp: fix warning: ‘port’ may be used uninitialized
This can't happen, but GCC doesn't see the relation between out and port.

Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
2025-09-23 17:49:56 -04:00
Michael Zimmermann
38b890e5e4 net: mqtt_sn: udp: fix typo in log message
It's called Broadcast, not Brodcast.

Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
2025-09-23 17:49:56 -04:00
Pete Johanson
630520112a tests: drivers: memc: Fix test on MAX32690 evkit
Properly adjust the init priorities on the max32690evkit to account for
initialization levels of the MAX32 HPB memc driver.

Signed-off-by: Pete Johanson <pete.johanson@analog.com>
2025-09-23 17:49:47 -04:00
Aksel Skauge Mellbye
cfa2992a64 pm: Mark pm_device_driver_init as boot function
Mark pm_device_driver_init() as a boot function to support using it
for early init on devices with demand paging.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-09-23 17:49:38 -04:00
Fin Maaß
34039c90b8 drivers: sdhc: stm32: add forgotten if around options
add forgotten if around Kconfig options.
This applied the default of 32 to all
CONFIG_SDHC_BUFFER_ALIGNMENT.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-09-23 12:11:53 -04:00
Erwan Gouriou
d3d7a65863 include: net: lldp.h: Include required headers
net_if.h and net_pkt.h are 2 headers required by lldp.h
as it needs to know net_if and net_pkt structs.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2025-09-23 12:10:30 -04:00
Jan Masek
09cea656b6 eswifi: fix include path to use tls credentials
Include path is missing when CONFIG_TLS_CREDENTIALS is set.
Fixes #92243

Signed-off-by: Jan Masek <jan.masek@spotflow.io>
2025-09-23 12:08:22 -04:00
Bjarki Arge Andreasen
568f7d8252 doc: releases: document PM_S2RAM and PM_S2RAM_CUSTOM_MARKING refactor
Document the refactoring of the PM_S2RAM and PM_S2RAM_CUSTOM_MARKING
in the release notes and migration guide for release 4.3

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-09-23 12:07:59 -04:00
Bjarki Arge Andreasen
1767f131aa pm: refactor PM_S2RAM_CUSTOM_MARKING option to be promptless
The config PM_S2RAM_CUSTOM_MARKING is not an optional config for a
user to select, it is required by some soc implementations of S2RAM,
in which case it must be selected by the soc.

Refactor the configuration to be HAS_PM_S2RAM_CUSTOM_MARKING, and
make the currently only soc which needs it select it. Then update
samples which previously had to select this option for this soc.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-09-23 12:07:59 -04:00
Bjarki Arge Andreasen
4626f6b776 pm: bind the PM_S2RAM kconfig option to devicetree
Currently it is possible to have an enabled (status="okay")
"suspend-to-ram" "zephyr,power-state" in the devicetree,
CONFIG_PM=y, but CONFIG_PM_S2RAM=n

This means the presence and state of the "suspend-to-ram" power
state in the devicetree does not match the PM_S2RAM option,
despite PM_S2RAM being dependent on the devicetree state.

This commit makes the devicetree the "source of truth" for
whether one or more s2ram power states shall be included and
supported, by enabling PM_S2RAM if any s2ram power state with
status "okay" is present in the devicetree. To disable the
s2ram power state, like with any other state, disable it by
setting its state to "disabled".

The help of the now promptless PM_S2RAM config has been
updated to reflect the new meaning. It previously held
cortex-m specific implementation details, these have been
removed as these details are already present in the file
pointed to as well (arch/arm/core/cortex_m/pm_s2ram.c
line 22)

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-09-23 12:07:59 -04:00
Jordan Yates
cd41477c2f modem: modem_cellular: registration status callback
Add a new callback event for registration status changes.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-09-23 12:07:40 -04:00
Benjamin Cabé
e29c173251 driver: timer: ti_dmtimer: TI DM Timer header should not be public
ti_dmtimer.h contains mask definitions only used internally by the
driver. Make it a private header.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-09-23 12:07:29 -04:00
Erwan Gouriou
73dc2e4aeb boards: st: stm32n6570_dk: Clarify RAMLOAD instructions
Review RAMLOAD section to hopefully avoid possible confusions.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2025-09-23 12:07:02 -04:00
Ayush Singh
676fff10d4 boards: beagle: pocketbeagle_2: a53: Enable uart0 and uart5
- Both UART5 and UART0 are default states of some of the header pins.
- As such, it's best to enable them by default.
- We also do not have to care too much about code size for a53s due to
  the large (for zephyr) RAM.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-09-23 12:06:42 -04:00
Ayush Singh
bb18dad309 boards: beagle: pocketbeagle_2: a53: Add UART0 and UART5 pinmux
- Both these UARTs are present as default states for the headers in the
  pb2 schematic.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-09-23 12:06:42 -04:00
Piotr Kosycarz
23188321bc tests: drivers: flash: common: require external_flash fixture
Add "external_flash" fixture to the no_explicit_erase testcase
in order to run twister only on boards with such HW setup.
Other runnable test cases has it already.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2025-09-23 12:06:34 -04:00
Cla Mattia Galliard
c8540e8644 samples: net: sockets: echo_service: Move accept-loop to socket-service
Move the accept-loop into a socket-service. No dedicated thread is needed
just for the accept loop. This better demonstrates the power of the
socket-service in removing the need for dedicated threads. Make some tiny
improvments and necessary changes to the udp-side of the service.

Signed-off-by: Cla Mattia Galliard <clamattia@gmail.com>
2025-09-23 12:06:18 -04:00
Cla Mattia Galliard
b83a34f4f6 samples: net: sockets: echo_service: enable multiple tcp clients
Improve the sample to enable multiple tcp clients to connect to the
echo-service.

Signed-off-by: Cla Mattia Galliard <clamattia@gmail.com>
2025-09-23 12:06:18 -04:00
Fin Maaß
48e5cda802 drivers: flash: spi_nor: use DEV_CFG in spi_nor_write_protection_set
use DEV_CFG in spi_nor_write_protection_set

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-09-23 12:06:02 -04:00
Fin Maaß
e9ed34fbbc drivers: flash: spi_nor: simplify checks for write_protect
simplify checks for write_protect

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-09-23 12:06:02 -04:00
Fin Maaß
f08f63c93a drivers: flash: spi_nor: allow ulbpr be optimized away
allow the requirement for ulbpr be optimized away
by the compiler, if no instance uses it.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-09-23 12:06:02 -04:00
Fin Maaß
43db13d11f drivers: flash: spi_nor: remove redundant write enable/disable
write enable already happens in the write/erase loop
before every write and erase. It is done in the loop,
because it is self cleaning after erase and write.
That is also the reason we don't need to disable it,
as it is automatically disabled after each write and erase.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-09-23 12:06:02 -04:00
Maureen Helm
909bd5e6f9 cmake: emu: Don't require ARMFVP_BIN_PATH environment variable
Enhance the armfvp emulator cmake handling to allow additional options
for setting ARMFVP_BIN_PATH, relaxing the previous requirement to set in
an environment variable. This makes it possible to run twister with
multiple armfvp platforms located in different paths.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2025-09-23 12:05:30 -04:00
Tomi Fontanilles
b8aa511424 manifest: psa-arch-tests: update to 24.03_API1.6_CRYPTO_1.1.0
Fixup to the TF-M 2.2.0 update.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2025-09-23 12:05:17 -04:00
Tomi Fontanilles
74c6e344df manifest: tf-m-tests: bring in fix for TF-M 2.2.0
Fixup to the TF-M 2.2.0 update.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2025-09-23 12:05:17 -04:00
Khaoula Bidani
18484fb7a2 drivers: adc: stm32: Add unit check for acquisition_time
Add an explicit check to ensure that the acquisition_time
parameter is encoded with the ADC_ACQ_TIME macro and uses
the TICKS unit, as required by the API.
If the unit is not correct, log an error and return -EINVAL.

Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
2025-09-23 12:04:29 -04:00
Chekhov Ma
1ea2c63081 drivers: gpio: retire pca6416a driver
pca6416a driver can be replaced by pca_series driver, which covers a
larger number of devices.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2025-09-23 12:04:12 -04:00
Chekhov Ma
deb699b68a drivers: gpio: pca_series: select i2c when enabled
On certain platforms I2C is not enabled by default, causing build error.
Change pca_series driver to select I2C.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2025-09-23 12:04:12 -04:00