Commit graph

117012 commits

Author SHA1 Message Date
Emil Gydesen
aa6ac8e650 Samples: Bluetooth: HR: Remove use of ISO config for IPC
When compiling with sysbuild and IPC the samples would use the
nrf5340_cpunet_iso-bt_ll_sw_split.conf config file, which was
incompatible with the sample's host configuration.

Instead of using the ISO configuration file, define a hci_ipc
overlay in each sample with the necessary configurations
that support all host configurations.

This commit also updates the sample.yaml files to split
configurations for single- and multicore builds, as what
needs to be configured for each type is different.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-06-11 10:19:05 -07:00
Fin Maaß
09a270e59f docs: migration-guide: mention ethernet api changes
Mention ethernet api changes.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-06-11 10:17:37 -07:00
Fin Maaß
ed4d421ace drivers: ethernet: remove phy related configs from eth config
remove phy related configs from eth config.
phy related configs chould go directly into the phy.
Most ethernet drivers didn't support the now removed
functions yet. Users should instead use `phy_configure_link()`
together with the `net_eth_get_phy()` function.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-06-11 10:17:37 -07:00
Fin Maaß
c169ac07a0 drivers: ethernet: remove get configs that are unused
remove get configs that are unused by the
ethernet mgmt api.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-06-11 10:17:37 -07:00
Jamie McCrae
99650914c5 tests: lib: devicetree: Add sub-partition tests
Adds tests for sub-partition macros

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-06-11 10:13:56 -07:00
Jamie McCrae
709526007f storage: flash_map: Add support for sub-partitions
Adds support for sub-partitions to the default flash map

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-06-11 10:13:56 -07:00
Jamie McCrae
656b6f37da devicetree: fixed-partition: Add sub-partition macros
Adds some macros for usage with sub-partitions

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-06-11 10:13:56 -07:00
Matthias Ringwald
e50f03404e bluetooth: cyw43xxx: support autobaud feature
Newer AIROC controllers like the CYW55573 don't support changing the
baudrate in Download Mode. However, a higher baud rate can be used
directly to sent HCI Reset.

This commit adds the KConfig flag CONFIG_AIROC_DOWNLOAD_MODE to enable
the new behaviour.

Signed-off-by: Matthias Ringwald <matthias@ringwald.ch>
2025-06-11 10:12:24 -07:00
Adam Kondraciuk
bdab748bcf Revert "tests: arm_thread_swap: Add overlay for nRF54H20"
This reverts commit 28bd478a0b.

This commit can be reverted as the cause of test failure
has been removed in ipc service by increasing workqueue stack size.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2025-06-11 10:09:02 -07:00
Adam Kondraciuk
31689690c9 ipc: ipc_service: Parametrize workqueue stack size
Add `IPC_SERVICE_BACKEND_ICBMSG_EP_BOUND_WORK_Q_STACK_SIZE` config
and parametrize its value depending on the optimization level.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2025-06-11 10:09:02 -07:00
Maksim Salau
c2fd84fdd5 modbus: serial: Ignore received data when reception is disabled
A byte received when reception has been disabled
corrupts internal state of the server
(e.g. during transmission of a reply in server mode).
The reponse packet is corrupted and its transmission is aborted and the
data in the buffer is treated by the server as a new incoming packet.
Since the buffer is corrupted CRC doesn't match and the following log
message is printed:

  <wrn> modbus_serial: Calculated CRC does not match received CRC

This condition happens when uart_irq_rx_ready() returns true if there is
a new byte in the receive FIFO even with disabled RX interrupt.

The issue has been discovered on a nucleo_u083rc board with a RS485
transceiver with the RI signal floating (a pull-down gives more stable
reproduction). The pull-down ensures that RI is low during transmission
which is seen as byte 0 with a framing error by the receiver.
The byte is received by the MCU and corrupts the response.
Similar effect can be achieved by not disabling the receiver during
transmission (i.e. nRE is driven by the MCU and is fixed low).

The fix discards any data received when reception has been disabled.

Signed-off-by: Maksim Salau <msalau@iotecha.com>
2025-06-11 10:08:25 -07:00
Benjamin Cabé
66f5d701bd shell: fix alignment issue
Casting a char* to a struct* requires checking alignment as this can fail
on platforms requiring strict alignment (ex. Xtensa)

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-11 08:56:04 -07:00
Emil Gydesen
9b4bebbdf3 Bluetooth: ASCS: Sonarcloud fixes
Made a few complex functions simpler
Added missing default cases in switches
Fixes a bad cast that removed const
Moved loop iterators to inner loop

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-06-11 08:58:09 -04:00
Emil Gydesen
314678c48d Bluetooth: AICS Client: Fix sonarcloud issues
Fixes a few bad casts that ignored const
Add a few missing final else statement
Refactored aics_discover_func to be less complex by
moving some parts of it into a new function.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-06-11 08:57:26 -04:00
Emil Gydesen
bf8570256f Bluetooth: AICS: Fix sonarcloud issues
Add missing else and refactored write_aics_control to
be less complex.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-06-11 08:57:26 -04:00
Alberto Escolar Piedras
6d7744209b manifest lvgl: Update to fork with hotfix for Zephyr
Update to fork from lvgl's master branch with the following fix:
* fix: ifdef function to avoid unused function build warning
Which fixes this issue being triggered in Zephyr's CI.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-06-11 11:06:41 +02:00
Mike J. Chen
9075d53355 kernel: fix timeout bugs
When CONFIG_TIMEOUT_64BIT is y, positive values are relative/delta
timeouts and negative values are absolute timeouts, except
for two special values. -1 is K_WAIT_FOREVER and 0 is K_NO_WAIT.
The reserved value of -1 means INT64_MAX is not a valid argument
to K_TIMEOUT_ABS_TICKS(), but there was no check. If a literal
was passed, a preprocessor/compiler warning would be generated
for overflow, but if a variable was passed as the argument,
then the code would compile but not work correctly since the
absolute timeout would be changed to a relative one. One
example of this is task_wdt_init() if no channels are enabled.

Rather than just fixing task_wdt, and trying to find other cases
in an adhoc way, this CL changes K_TIMEOUT_ABS_TICKS() to
limit the larges value to (INT64_MAX-1). It does so silently,
but given the range of int64_t, there should be no practical
difference.

Also, change the implementation for Z_IS_TIMEOUT_RELATIVE() to
fix the case where INT64_MAX relative timeout was being
improperly reported as being not a relative timeout. This was
again due to the -1 reserved value.

Add some tests for these changes to the timer_api test.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2025-06-11 09:56:13 +02:00
sudarsan N
6d88a62417 drivers: adc: fix underflow in lmp90xxx_adc_start_read channel check
Prevent integer underflow when sequence->channels is 0.
Add an explicit check before calling find_msb_set().

Coverity CID: 487765

Signed-off-by: sudarsan N <sudarsansamy2002@gmail.com>
2025-06-11 09:55:42 +02:00
Benjamin Cabé
660d2b3e7a audio: codec: shell: adopt SHELL_HELP
have audio codec shell commands use the new SHELL_HELP macro

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-11 09:55:21 +02:00
Benjamin Cabé
3096ea0216 watchdog: shell: adopt SHELL_HELP
have wdt shell commands use the new SHELL_HELP macro

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-11 09:55:21 +02:00
Benjamin Cabé
b84294c156 w1: shell: adopt SHELL_HELP
have w1 shell commands use the new SHELL_HELP macro

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-11 09:55:21 +02:00
Benjamin Cabé
9ab0ea73a8 shell: Introduce structured help message
In order to enable better and more consistent help messages for shell
commands, this commit introduces a new SHELL_HELP macro that allows to
document a command's description and usage in a more structured way.

This will allow to get rid of inconsistent (and duplicated!) variations
of "Syntax: ...", "Syntax:\n ...", "Usage: ...", in the commands, and
formatting of the description+usage will be taken care of by the shell
when it detects the help message is using the "structured" format.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-11 09:55:21 +02:00
Benjamin Cabé
7bdeffb5a6 shell: fix margin handling after newlines in formatted help text
Lines following newlines in shell help text were not properly indented.
For example, in "abc def\ndef ghi\njkl mno", the lines "def ghi" and
"jkl mno" would appear without the expected left margin.

The issue was that after processing a newline and setting proper cursor
position, the function would fall through to z_shell_raw_fprintf() which

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-11 09:55:21 +02:00
Ling Pei Lee
75bfd799c4 net: shell: iface: Add link speed settings command
Add this to set link speed through net_shell.
Current zephyr version doesn't have user interface to change
speed, hence adding this to accomodate it. Full duplex will
be set by default for each link speed.

Able to change link speed using command below:
net iface set_link <iface idx> <speed> <optional:h(half)/f(full)>
eg: net iface set_link 1 100 h
    net iface set_link 1 10 f
    net iface set_link 1 1000

Able to set multiple link speed like below:
net iface set_link <iface idx> <speed1> <speed2> <optional:h/f>
eg: net iface set_link 1 10 100 h
    net iface set_link 1 1000 f 10

Signed-off-by: Ling Pei Lee <pei.lee.ling@intel.com>
2025-06-11 09:54:56 +02:00
Maochen Wang
6d161802a8 samples: net: wifi: nxp: supplicant enterprise enabledment on IW610
Add mbedtls config file to support enterprise mode.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2025-06-11 09:54:46 +02:00
Abhinav Kulkarni
703fa22b11 samples: net: wifi: shell: nxp: HostAP support for IW416
Added host AP support for IW416 and IW612 socs.
Adding conf files which can be used along with shield for compilation to
test HostAP and WPA supplicant.

Signed-off-by: Abhinav Kulkarni <abhinav.kulkarni@nxp.com>
2025-06-11 09:54:46 +02:00
Eden Uhde
436fabeb0a doc: build: signing: Correct typo – 'singing' to 'signing'
Fixing a typo in two places
Signed-off-by: Eden Uhde <eden@cutegirls.club>
2025-06-11 08:28:30 +02:00
Fabio Baltieri
33f6b76110 drivers: i2c: i2c_dw: only includ cmsis_core on ARM platforms
Only include cmsis_core.h on ARM platforms, including it unconditionally
as it is now causes a build failure on all other platforms, namely x86
on the weekly build run.

Tested with:

west build -p -b up_squared/apollo_lake tests/drivers/build_all/led
(and others)

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-06-11 08:20:40 +02:00
Alberto Escolar Piedras
3b1cf79f62 ci: bsim tests: Trigger on any change on tests/bluetooth
As time passes we are adding more babblesim tests which depend on code/
tests from tests/bluetooth just like we have many based on samples from
samples/bluetooth.
Let's also trigger the Babblesim CI job when anything changes in
tests/bluetooth, instead of trying to pinpoint the specific folders we
use, as otherwise every now and then we have coverage holes and issues
are introduced in main.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-06-11 08:20:19 +02:00
Fabian Blatz
c7a61d6418 tests: lib: gui: lvgl: Remove LV_FONT_SIMSUN_16_CJK symbol
In 9.3 due to font licensing issues LV_FONT_SIMSUN_16_CJK was deprecated.
Instead select now LV_FONT_SOURCE_HAN_SANS_SC_16_CJK symbol.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2025-06-11 08:20:09 +02:00
Fabian Blatz
8a110a6252 samples: modules: lvgl: demos: Update to v9.3
Update the sample to show upstream demos to v9.3. The samples for flex
layout, scrolling and multilanguage have been removed upstream, so also
remove their respective LV_Z_* entry.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2025-06-11 08:20:09 +02:00
Fabian Blatz
768e43ae98 modules: lvgl: Add lv_os_get_idle_percent to OSAL
Adds an implementation of lv_os_get_idle_percent to the zephyr OSAL.
This is needed for usage of the system monitor.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2025-06-11 08:20:09 +02:00
Fabian Blatz
0b0fd7d674 modules: lvgl: Update CMakeLists to v9.3
Add new/moved files introduced in v9.3 into the CMakeLists.
Also for using the system monitor the osal is required to have a method to
measure the CPU idle time so the lvgl_zephyr_osal file needs to be always
added.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2025-06-11 08:20:09 +02:00
Fabian Blatz
a01c8e464f manifest: Update LVGL to v9.3
Update the west yaml to point to the new LVGL version.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2025-06-11 08:20:09 +02:00
Jordan Yates
b64fb93d93 lib: posix: dedicated symbol for POSIX system headers
Add a dedicated symbol for including the POSIX system headers path
directly into the include path, enabling (for example)
`#include <time.h>` instead of `#include <zephyr/posix/time.h>`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-06-11 08:19:54 +02:00
TOKITA Hiroshi
ba48d83bec devicetree: Use IS_EQ() for DT_SAME_NODE()
`DT_SAME_NODE()` is judged by `==` and cannot be used as
a condition for `COND_CODE_1()`.
Using `IS_EQ()` to make it possible for compile-time
calculation.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2025-06-11 08:19:41 +02:00
Michael Estes
bd0efcc948 drivers: serial: uart_xlnx_uartlite: set irq flags per device tree
PG142 from AMD specifically says the uartlite IP generates a
"rising-edge sensitive interrupt" when interrupts are enabled. When
using this IP on a ZynqMP platform with
CONFIG_UART_INTERRUPT_DRIVEN enabled, the GIC does not get
configured correctly to detect these interrupts. Update driver to heed
the flags set by the interrupts property in the device tree.

Signed-off-by: Michael Estes <michael.estes@byteserv.io>
2025-06-11 08:19:28 +02:00
Benjamin Cabé
25dc5fe968 drivers: dac: esp32: avoid out-of-range channel ID
Fix channel ID check in dac_esp32_channel_setup as it was allowing to
set up a channel with ID greater than the number of channels.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-11 08:19:09 +02:00
Benjamin Cabé
aa8386929e drivers: intc_wch_pfic: replace shift operations with BIT macro
Updated intc_wch_pfic driver to use BIT() macro for clarity.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-11 08:18:58 +02:00
Benjamin Cabé
b15f942684 drivers: intc_wch_pfic: correct/optimize interrupt disable logic
The IRER registers are write-only and clear the enable bit for the
provided interrupt. Use a direct write instead of a read/modify/write
sequence to avoid generating a bogus read access and improve performance

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-11 08:18:58 +02:00
Jordan Yates
7189ade82d drivers: voltage_divider: handle ADC PM
Some ADC's draw significant power while enabled, so make sure the
driver can handle ADC's that have device runtime PM enabled.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-06-11 08:18:39 +02:00
Johann Fischer
79a80730b2 usb: device_next: allow to use label as interface string descriptor
The intention was to use the "interface-name" string property in the
interface string descriptor, but using the label property is acceptable
again. Therefore, allow the use of the DT label property string in the
interface string descriptor.

Follow exactly the same approach as in the CDC ACM implementation
introduced in the commit b0791400f6
("usb: device_next: cdc_acm: allow setting the interface description").

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-11 08:18:30 +02:00
Luca Burelli
204a1cf30d tests: llext-edk: increase test timeout
The llext-edk test case is timing out on some workloads, so increase the
timeout to 120 seconds to accommodate longer execution times.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-06-11 08:18:20 +02:00
Lyle Zhu
55c0f00f23 Bluetooth: Classic: SDP: Avoid invalid session->param be accessed
The `session->param` should be updated to date whatever the function
`sdp_client_ssa_search()`, `sdp_client_sa_search()` or
`sdp_client_ss_search()` can be executed properly.

Update the `session->param` to the new `param` when executing the
function.

Fixes #91156

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-06-11 08:17:57 +02:00
Andrej Butok
3728a80929 boards: nxp: mcxn947: enable the default MCU-Boot swap mode
- Enables MCU-Boot default Swap mode for the FRDM-MCXN947 and MCX-N9XX-EVK,
  after the flash driver was upgraded to support the 16-byte programming.
- Fixes flash-controller for frdm_mcxn947_mcxn947_cpu0_qspi.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2025-06-11 08:17:33 +02:00
Pete Dietl
c9e48c8c01 drivers: spi: sam0: Reset SPI peripheral on init
Reset the SPI peripheral to its default state
and register values on init by setting its SWRST bit.
This is important since the driver assumes that certain
registers are at their default values.

Signed-off-by: Pete Dietl <petedietl@gmail.com>
2025-06-11 08:15:06 +02:00
Pete Dietl
3b40a91dbc drivers: spi: sam0: Handle 32-bit length extension
The sam0 SPI driver does not ensure that it clears the 32-bit extension
option during init. The 32-bit extension option, which comprises of a field
in the CTRLC register and the LENGTH register enables better bus
utilization by allowing 32-bit writes to the SPI DATA register
(as opposed to the usual 8-bit writes). The driver breaks down if this
option is enabled by causing each intended byte of output to become
four bytes. We fix this by explicitly disabling the 32-bit extension
option in init.

Signed-off-by: Pete Dietl <petedietl@gmail.com>
2025-06-11 08:15:06 +02:00
Keith Packard
107198204c zephyr/linker: Move .tbss section back to ROMABLE_REGION
Placing this in RAMABLE_REGION messes up the TLS offsets computed by the
linker, presumably because it's not adjacent to the .tdata section.

In any case, it doesn't really matter as all we want the linker to do is
compute offsets from the TLS base value for all .tdata and .tbss values.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-11 08:14:46 +02:00
Emil Gydesen
e82cabb809 tests: Bluetooth: Audio: Add common TEST_SAMPLE_SIRK
Add a common definition of the TEST_SAMPLE_SIRK used by
the BSIM tests.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-06-10 22:13:14 +02:00
Keith Packard
513e6ed5d2 arch/common: Mark interrupt tables const when !DYNAMIC_INTERRUPTS
When not using dynamic interrupt mapping, various interrupt tables are
configured to be stored in read-only memory in the linker script.. Mark
them const so that the linker doesn't complain.

This affects _sw_isr_table, _irq_vector_table, and z_shared_sw_isr_table in
arch/common along with _VectorTable in arch/arc.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-10 22:13:09 +02:00