Commit graph

117401 commits

Author SHA1 Message Date
Bartosz Miller
8aa6557c95 tests: boards: nrf: i2c: Fix nrf52 and nrf53 pin assignment
Fix the i2c loopbacks pins assignments for nrf52 and nrf53 to allow
automated testing.

Signed-off-by: Bartosz Miller <bartosz.miller@nordicsemi.no>
2025-06-17 16:10:59 +02:00
Benjamin Cabé
5c422a9d27 tests: drivers: comparator: increase test coverage for await_trigger
Test user-provided timeout value

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-17 16:10:46 +02:00
Benjamin Cabé
e564bab82e tests: drivers: comparator: fix typos
Fixed a few dummy asserts

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-17 16:10:46 +02:00
Koen Van Herck
4ae5c1e505 boards: raspberrypi: rpi_pico2: Add jlink runner for rpi_pico2 board
jlink runner works fine for the Pico2, just like Pico1 (rpi_pico).
Copied relevant lines from rpi_pico/board.cmake.
Fixed typo in documentation.

Signed-off-by: Koen Van Herck <koen.v.herck@gmail.com>
2025-06-17 16:10:32 +02:00
Benjamin Cabé
2dd0b4fee0 tests: drivers: gnss: add test for get_fix_rate()
Add a test for this previously untested function

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-17 16:10:04 +02:00
Benjamin Cabé
64446d2f67 drivers: gnss: emul: increase GNSS_EMUL_MIN_FIX_INTERVAL_MS
Make the GNSS emul driver less capable w.r.t fix interval so that we can
exercise more error paths if e.g. user requests a fix interval of 100ms.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-17 16:10:04 +02:00
Guennadi Liakhovetski
87e3e1fed2 llext: move 2 prototypes to llext_internal.h
arch_elf_relocate_global() and arch_elf_relocate_local() aren't LLEXT
API functions, they're internal implementation functions, move them
to llext_internal.h

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2025-06-17 16:09:50 +02:00
Guennadi Liakhovetski
53a179ac4e llext: make unresolved symbol errors fatal
With experience it becomes clear, that failing to resolve symbols
during the linking process is likely fatal for the module loading and
a simple warning isn't enough. Fail loading instead.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2025-06-17 16:09:50 +02:00
Grzegorz Swiderski
64bb8b6796 scripts: kconfig: Add hex variants of arithmetic functions
Functions like `add` and `sub` can only return base 10 integers, which
means they can't really be used to define Kconfig symbols of type `hex`.

For the same reason, there already exist pairs of devicetree functions
named e.g., `dt_node_reg_addr_(int|hex)` after different return types.

Introduce `add_hex`, `sub_hex`, and friends.

To avoid confusion, it should be possible for those new functions to
accept arguments in base 16 as well. It's actually easier to let all
arithmetic functions take their inputs in "any" base, by leveraging
Python's built-in: `int(..., base=0)`.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2025-06-17 16:09:41 +02:00
sudarsan N
139cdfc243 drivers: uc81xx: fix unchecked return from mipi_dbi_reset()
Check return value to handle potential failure.

Fixes: CID 524752

Signed-off-by: sudarsan N <sudarsansamy2002@gmail.com>
2025-06-17 16:09:27 +02:00
Johan Stridkvist
df0db6a7a3 samples: Bluetooth: hci_ipc: __ASSERT on fail to deliver complete message
The hci_ipc sample does not support fragmentation of IPC-messages.
Give an ASSERT if only parts of an IPC-message is delivered.
This would happen for instance when the underlying transport mechanism
cannot hold the complete message.

Background:
The open-amp backend uses RPMSG_BUFFER_SIZE=512

Most applications and controllers use HCI-packets which are at most
255 bytes. In some cases a controller may deliver HCI-packets beyond
255 bytes.

This may for instance be the case if the controller delivers large ISO
SDUs as a single HCI-packet.

Signed-off-by: Johan Stridkvist <johan.stridkvist@nordicsemi.no>
2025-06-17 16:09:17 +02:00
Benjamin Cabé
639cb9b3bc tests: unit: util: increase coverage of utf-8 utils
Test all possible UTF-8 sequence lengths for utf8_trunc()

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-17 16:09:06 +02:00
Benjamin Cabé
f899ff2475 include: util: fix doxygen comment for utf8_trunc
Properly format code block

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-17 16:09:06 +02:00
Jukka Rissanen
8704b3add7 net: ppp: Bind DNS to device ppp network interface
Make sure received DNS server information is bound to the
ppp network interface.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-06-17 16:08:56 +02:00
Jukka Rissanen
0e57844b2d drivers: wifi: esp_at: Bind DNS to device net interface
Make sure received DNS server information is bound to the
wifi network interface.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-06-17 16:08:56 +02:00
Jukka Rissanen
57c452fb79 net: shell: conn: Print packet socket information correctly
The "net conn" command printed AF_PACKET socket as AF_UNK(3).
Fix this by printing "AF_PACKET" in this case.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-06-17 16:08:56 +02:00
Jukka Rissanen
514cdd6b3a net: dns: Add uninitialized state to resolver context
Make sure that uninitialized state is 0 so that we can catch
when the context is not initialized properly.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-06-17 16:08:56 +02:00
Jukka Rissanen
cb9052459a net: dns: Properly cleanup DNS servers per network interface
Make sure we cleanup only those DNS servers that belong to
certain network interface when the interface goes down.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-06-17 16:08:56 +02:00
Jukka Rissanen
248cb3d251 net: dhcpv6: Honor network interface for DNS servers
Bind the network interface to the network interface we
have received the DNS servers from. This is now the default.
The previous behavior can be restored by disabling the
CONFIG_NET_DHCPV6_DNS_SERVER_VIA_INTERFACE option.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-06-17 16:08:56 +02:00
Jukka Rissanen
1224c5a43a net: dhcpv4: Honor network interface for DNS servers
Bind the network interface to the network interface we
have received the DNS servers from. This is now the default.
The previous behavior can be restored by disabling the
CONFIG_NET_DHCPV4_DNS_SERVER_VIA_INTERFACE option.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-06-17 16:08:56 +02:00
Jukka Rissanen
2af5dba995 net: dns: Allow reconfiguration with network interfaces
Allow user to specify which network interfaces to bind the
server to when reconfiguring the DNS system.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-06-17 16:08:56 +02:00
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