Commit graph

117430 commits

Author SHA1 Message Date
Benjamin Cabé
1fc628b0b5 tests: unit: util: add test_byteswp
add test for bytecpy() with full line and branch
coverage

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-17 16:08:38 +02:00
Benjamin Cabé
6b1ee04a10 tests: unit: util: add test_bytecpy
add test for bytecpy() with full line and branch
coverage

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-17 16:08:38 +02:00
Benjamin Cabé
14fb0f39d1 tests: unit: util: add test_arithmetic_shift_right
add test for arithmetic_shift_right() with full line and branch
coverage

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-17 16:08:38 +02:00
Fin Maaß
c23dba7e22 doc: migration guide: ethernet: phy: mention phy_configure_link change
mention change of phy_configure_link().

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-06-17 16:08:22 +02:00
Fin Maaß
66329deb9c drivers: ethernet: phy: phy_mii: start autoneg in cfg_link
already (re-)start autonegotiation in phy_mii_cfg_link.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-06-17 16:08:22 +02:00
Fin Maaß
97c9f0edad drivers: ethernet: phy_mii: check return values in init
check return values in init.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-06-17 16:08:22 +02:00
Fin Maaß
38fb41a9cb drivers: ethernet: phy_mii: check condition explicitly
check condition explicitly.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-06-17 16:08:22 +02:00
Fin Maaß
6838c57679 drivers: ethernet: phy_mii: add support for disabling auto-neg
Adds support for disabling auto-negotiation.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-06-17 16:08:22 +02:00
Fin Maaß
89006fbe1b net: shell: iface: support deactivating auto-neg
support deactivating auto-neg in face shell.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-06-17 16:08:22 +02:00
Fin Maaß
f24426b31f drivers: net: ethernet: phy: add support for disabling auto-negotiation
Add option in enum phy_link_speed to disable auto-negotiation.
This allows PHY drivers to support disabling auto-negotiation.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-06-17 16:08:22 +02:00
Fin Maaß
847be49dbd drivers: ethernet: phy: add common functions for PHYs
This commit adds common functions for PHYs to the mii driver.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-06-17 16:08:22 +02:00
Fin Maaß
62b5785d7a drivers: ethernet: mii: provide bit val
Provide bit value for control registers
to be able to use WRITE_BIT() macro.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-06-17 16:08:22 +02:00
Fin Maaß
b051c7e550 drivers: ethernet: phy: remove unused/wrong cfg_link
if we can't use cfg_link to (re-)configure the link,
we don't need it and shouldn't have it.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-06-17 16:08:22 +02:00
Jakub Michalski
c47cc3abda drivers: virtio: fix cleanup upon failure during virtqueues initialization
This commit fixes infinite loop reported in
https://github.com/zephyrproject-rtos/zephyr/issues/91242, not deallocating
array with virtqueues and not deactivating the virtqueues in case of
failure

Signed-off-by: Jakub Michalski <jmichalski@antmicro.com>
2025-06-17 16:08:06 +02:00
Davi Herculano
d5bb10bf98 samples: video: Set vertical flip in esp32s3_eye capture config
Add vertical flip to esp32s3_eye capture configuration file.

Signed-off-by: Davi Herculano <herculanodavi@gmail.com>
2025-06-17 16:07:54 +02:00
Davi Herculano
9d62132ef1 samples: video: Add vertical flip option to capture
Add KConfig option in video/capture sample to
vertically flip the image.

Signed-off-by: Davi Herculano <herculanodavi@gmail.com>
2025-06-17 16:07:54 +02:00
Venkatesh Odela
b052a086a4 ethernet: phy: dp83867: Add support for configurable internal RGMII delays
Add support for setting RGMII RX and TX internal delays via DT properties:
`ti,rx-internal-delay` and `ti,tx-internal-delay`.

Signed-off-by: Venkatesh Odela <venkatesh.odela@amd.com>
2025-06-17 16:07:42 +02:00
Keith Packard
87029f7422 drivers/flash: Fix #if condition for is_area_readable for mcux
is_area_readable is used for SOCS other than LPC55XXX chips, not just
chips other than LPC55S36. Change the condition which elides this code
to avoid a GCC 14.3 warning.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-17 16:06:21 +02:00
Keith Packard
fc24bd8449 tests/nrf: Use memcpy instead of strncpy to avoid gcc warnings
While strncpy will work here, this isn't testing strings, it's testing
byte arrays, so use memcpy

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-17 16:06:21 +02:00
Keith Packard
ec38e9ef64 wifi/esp32: Fix overflow in SSID copy
In the previous code, strnlen could have returned WIFI_SSID_MAX_LEN, and
the following statement ensuring NUL termination would have written one
past the end of the array.

Replace this with code that ensures a NUL termination within the bounds
of the array and then use strlen to compute the length.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-17 16:06:21 +02:00
Keith Packard
df1cd1b0b1 tests/stack_unwind: Avoid inlining and tail-calls
We want the stack trace to show the correct nesting of functions,
so we need to prevent the compiler from in-lining functions or
performing tail-call optimizations.

Add __noinline to prevent inlining. Add another printf in each
function to avoid tail calls.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-17 16:06:21 +02:00
Keith Packard
f50ee8c1d3 fs/ext2: Missing error check in ext2_inode_remove_blocks
Don't assume that get_level_offsets will succeed.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-17 16:06:21 +02:00
Keith Packard
eb351f05fe test/kernel: Initialize stack_sem in obj_validation test
GCC 14.3 is not happy when this variable is left uninitialized, although
we don't actually care about the contents, just the address.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-17 16:06:21 +02:00
Keith Packard
d44f8065da soc/esp32c6: Discard .note.GNU-stack sections while linking
These sections are simple stack behavior annotations and are not
needed in the final executable.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-17 16:06:21 +02:00
Keith Packard
27318b2771 samples/zbus: Increase dyn_channel stack sizes
Sparc needs more than 1k for these stacks.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-17 16:06:21 +02:00
Keith Packard
97f96afbd7 linker_script: Remove all SUBALIGN usage for iterable sections
SUBALIGN forces alignment to the specified value, even if the object
requires stricter alignment. This causes mis-aligned access when accessing
the resulting value.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-17 16:06:21 +02:00
Keith Packard
ff8b24b6bd cmake/modules: Make SUBALIGN parameter to zephyr_iterable_sections optional
Most uses of this macro should *not* include SUBALIGN as that can reduce
the alignment requirement for data and cause unaligned access faults in
the processor. Leave support for this in place in case there are
still uses for it.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-17 16:06:21 +02:00
Keith Packard
08bd120063 linker: Do not emit SUBALIGN for iterable sections
SUBALIGN forces alignment of input sections to the specified value, even
if they require stricter alignment.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-17 16:06:21 +02:00
Keith Packard
ce7bd57618 soc/sensry: Discard .note.GNU-stack sections while linking
These sections are simple stack behavior annotations and are not
needed in the final executable.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-17 16:06:21 +02:00
Keith Packard
246c8272cc soc/openisa: Discard .note.GNU-stack sections while linking
These sections are simple stack behavior annotations and are not
needed in the final executable.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-17 16:06:21 +02:00
Keith Packard
34a03fb436 posix: Use 'char' for posix_condattr bitfields
Ensure that posix_condattr is smaller than pthread_condattr by keeping it
under one byte.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-17 16:06:21 +02:00
Keith Packard
32452dfb05 samples/tflite-micro: Include <cstdint> before using uint8_t
inference_process.hpp depended on the C library implicitly including
stdint.h through some path, which is not defined behavior. Explicitly
include <cstdint> to ensure that uint8_t is defined.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-17 16:06:21 +02:00
Filip Kokosinski
15b73eda7d subsys/tracing: select backend name in Kconfig
This commit allows tracing backend name selection through Kconfig.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2025-06-17 16:05:59 +02:00
Xinyu Hong
95d945504d drivers: wifi: nxp: add channel load support
Add WIFI_CHANNEL_LOAD macro to support wifi channel load feature

Signed-off-by: Xinyu Hong <xinyu.hong@nxp.com>
2025-06-17 16:05:45 +02:00
Filip Kokosinski
ef20311522 subsys/tracing: add names to Kconfig choice symbols
This commit adds names to Kconfig choice sysmbols. This allows for their
selection from Kconfig, e.g.:

    choice TRACING_FORMAT_CHOICE
    	default TRACING_TEST if CONFIG_FOO
	default TRACING_CTF if CONFIG_BAR
    endchoice

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2025-06-17 16:05:29 +02:00
Tommi Kangas
941dcd31e7 shell: Make TX mutex timeout configurable
The 50 ms TX mutex timeouts introduced in commit b0a0feb cause
dropped messages when used with the shell log backend. This
commit makes time timeout configurable using the
CONFIG_SHELL_TX_TIMEOUT_MS Kconfig option and makes the
default timeout longer when shell log backend is enabled.

Link: #90215

Signed-off-by: Tommi Kangas <tommi.kangas@nordicsemi.no>
2025-06-17 16:05:20 +02:00
Rex Chen
cc5b1477ff drivers: wifi: nxp: support monitor mode tx frame
Add WIFI_HOST_TXRX_MGMT_FRAME macro to support tx frame
in monitor mode.

Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
2025-06-17 16:04:54 +02:00
Emil Gydesen
6885a368d4 Bluetooth: Host: Add advertising state to bt_le_ext_adv_info
The bt_le_ext_adv_info struct has been extended to also
contain the advertising and periodic advertising states.

Additionally, the function verifies the input to avoid
NULL pointer access, and the addr field is more
properly documented.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-06-17 16:04:42 +02:00
Glenn Andrews
94084e5aba Lib: SMF: Add return code to signal event propagation
See Discussion https://github.com/zephyrproject-rtos/zephyr/discussions/83659
for information about the purpose of this change.

Modifies run actions of hierarchical state machines
to return a value indicating if the event was handled
by the run action or should be propagated up to the
parent run action. Flat state machines are not affected,
and their run action returns void.

smf_set_handled() has been removed and replaced by
this return value. smf_set_state() will not propagate
events regardless of the return value as the transition
is considered to have occurred.

Documentation, tests, samples, has been updated.
USB-C and hawkBit use SMF and have been updated to use
the new return codes.

Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
2025-06-17 16:04:04 +02:00
Glenn Andrews
1bee2920f9 Lib: hawkBit: apply clang-format
Apply clang-format in preparation for code changes.

Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
2025-06-17 16:04:04 +02:00
Glenn Andrews
d4a9cc12b9 Lib: USB-C: Apply clang-format
Apply clang-format to USB-C in preparation for code changes

No code is changed, only formatting.

Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
2025-06-17 16:04:04 +02:00
James Roy
92b22be24c doc: Add a new migration guide entry
Bindings now use hyphens(-) instead of
underscores(_) as property separators.

Signed-off-by: James Roy <rruuaanng@outlook.com>
2025-06-17 16:03:54 +02:00
James Roy
4240853a06 scripts: ci: Add CI bindings style checker
Implement a check in the CI pipeline to enforce
that property names in device tree bindings do
not contain underscores.

Signed-off-by: James Roy <rruuaanng@outlook.com>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2025-06-17 16:03:54 +02:00
James Roy
9cf9416dec scripts: Add bindings style migration script
This script replaces all underscore(_)
separation in a binding with hyphens(-).

Signed-off-by: James Roy <rruuaanng@outlook.com>
2025-06-17 16:03:54 +02:00
Johann Fischer
3c2dffa601 scripts: trace_capture_usb: disable tracing on exit
Disable tracing on exit and do not discard data immediately after
enabling tracing. The length of the data depends on the timings of the
host and targets and may simply be an arbitrary length that does not fit
any trace format or frame.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-17 16:03:44 +02:00
Johann Fischer
1174308df8 tracing: port USB backend to the new USB device stack
Port USB backend to the new USB device stack.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-17 16:03:44 +02:00
Johann Fischer
d52f76f9e1 samples: tracing: remove USB backend configuration for testing format
Not all the hooks for k_events, k_lifo, k_fifo, k_msgq, and k_queue are
implemented in tracing_test.h and tracing_test.c and therefore the
testing format cannot be used with the new USB device stack.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-17 16:03:44 +02:00
Carles Cufi
5a13cdcf52 scripts: trace_usb_capture: Clean up on exit
When the user presses Ctrl+c to exit the infinite capturing loop, ensure
that the cleanup funciton is always executed.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2025-06-17 16:03:44 +02:00
Jun Lin
8ab712a235 drivers: i2c: npcx: prevent unexpected target address match ISR
This commit prevents the hardware from generating an unexpected
target slave address match ISR by the following change:
1. Enable the New Match Interrupt Enable bit (NMINTEN) only when
   necessary.
2. Explicitly clear all SMBnADDRx registers because they are not
   cleared when the I2C hardware is disabled. It will cause the
   asynchrinization between SMBnADDRx and registered_target_mask if the
   system jumps from the RO image to the RW image.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
2025-06-17 08:20:39 +02:00
Youssef Zini
8bfb08fbda boards: add gpio, button and led support
Add gpio support for STM32MP257F-EV1 board.
Add the orange (&led0) LED to the device tree and enable GPIOJ.
Add the user button USER2 to the device tree and enable GPIOG.
This step allows building and debugging the blinky and button sample
applications.

Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
2025-06-17 08:20:33 +02:00