Commit graph

103041 commits

Author SHA1 Message Date
Nikodem Kastelik
de82f2f4cb manifest: update hal_nordic revision to have nrfx 3.7.0
Bring latest release of nrfx: 3.7.0.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-10-07 18:42:14 +02:00
Gerard Marull-Paretas
c39ad845f3 scripts: ci: check_compliance: add BOARD_REVISION in Kconfig.board.v2
This is required if boards make use of such definition in their Kconfig
files. In Kconfig.board.v2, only `boards/Kconfig.v2` is loaded, but
BOARD_REVISION is part of `boards/Kconfig`, which can't be loaded in this
context.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-10-07 18:42:14 +02:00
Francois Gervais
736344b310 tests: coap_client: optimize/reduce sleep time
The goal of this commit is to reduce the overall test time by optimizing
the time spent sleeping.

However while doing so, a few glitches became apparent and those have
been fixed as well.

1. The way the ZSOCK_POLLIN event is managed has been modified

In most tests, the event would stick for the whole test and this would
sometimes results in the client receiving more data than intended which
in turn would results in various unexpected warnings and errors.

The management of the ZSOCK_POLLIN event has now been mostly moved to
the send/receive overrides which better represent how things would
happen outside of the test scenario.

For example, when sending data, if this send would normally result in
receiving some response, the send function sets the ZSOCK_POLLIN event.
Then when receiving, we clear the event as the data has been received.

There are a few exceptions to this for cases where we need to simulate
some specific abnormal behavior.

2. The `messages_needing_response` queue now includes a valid bit

The test manages a queue of messages id to be able to respond to the
correct id in the receive hooks.

It was built in a way that the id 0 would be treated as invalid
although it is a valid id.
In practice, it would not be an issue in most cases however, it would
result in an unexpected behavior if the `test_multiple_requests` test
would be run first.

To fix this issue in the simplest way, the queue has been changed to
uint32_t which gives us 16 extra bits for the management of the queue,
1 of which is used to tell if the entry is valid or not.

Signed-off-by: Francois Gervais <francoisgervais@gmail.com>
2024-10-07 17:13:47 +01:00
Maximilian Deubel
fd686a25b3 drivers: dp: swdp_bitbang: Update SWD clock calculation
This patch updates the SWD clock calculation to the latest behavior
of DAPLink.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
2024-10-07 17:13:37 +01:00
Maximilian Deubel
621a6000d5 drivers: dp: swdp_bitbang: hardcode nRF53 SYSCLK
Since CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC is tied to the slow RTC clock
for the nRF53, use the default SYSCLK of 64MHz instead.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
2024-10-07 17:13:37 +01:00
Andrej Butok
4511662fe5 boards: nxp: Add Serial Recovery button alias
Fixes MCUBoot Serial Recovery compilation error
"Serial recovery/USB DFU button must be declared
in device tree as 'mcuboot_button0'"

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-10-07 17:13:28 +01:00
Ioannis Damigos
1fdbd7e16a da1469x_dk_pro: Add user button
Add user button.

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-10-07 17:13:14 +01:00
Daniel Schultz
836370f67c MAINTAINERS: Add PHYTEC Platforms
PHYTEC currently supports five boards in Zephyr, with another in
development. Given the growing interest from our customers and our
commitment to expanding support for PHYTEC platforms, I am
volunteering to take over the maintenance of these boards.

This will help streamline contributions and reduce the workload on
the silicon vendor maintainers.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
2024-10-07 17:13:08 +01:00
Benjamin Cabé
07d6632201 boards: Fix duplicate image in MAX32666FTHR board doc
Front picture was listed twice, despite the back picture
(max32666fthr_img2.jpg) actually being checked into the repo, so switch
to that one.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-10-07 17:12:52 +01:00
Abram Early
583f4956dc modbus: reset wait semaphore before tx
A response returned after a request times out would increment the
semaphore and stay until the next request is made which will immediately
return when k_sem_take is called even before a response is returned. This
will once again have the same problem when the actual response arrives.
So the wait semaphore just needs to be reset before transmitting.

Signed-off-by: Abram Early <abram.early@gmail.com>
2024-10-07 17:12:44 +01:00
Pisit Sawangvonganan
a378440116 drivers: intc: stm32: correct inconsistent parameter names
Correct several inconsistent parameter names in the following functions:
- stm32_gpio_intc_select_line_trigger: rename `trigger` to `trg`
  to match the header file.
- stm32_gpio_intc_set_irq_callback: rename the callback argument to `user`
  to match the `stm32_gpio_irq_cb_t` type.
- stm32_exti_get_line_src_port: rename `pin` to `line` to align with
  the Doxygen comment and implementation.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-10-07 17:12:34 +01:00
Chaitanya Tata
2dec9313e4 modules: hostap: Use net_mgmt context
Using a separate workqueue causes issues without any special locking to
synchronize with networking threads e.g., interface being removed while
the workqueue is trying to synchronize with WPA supplicant.

It's easier to use the net_mgmt thread which is in better sync with
networking.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-07 17:12:24 +01:00
Chaitanya Tata
56d7e9a487 modules: hostap: Fix typo in NM unregistration
The module name is not modified in remove.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-07 17:12:24 +01:00
Chaitanya Tata
c44aa6b18e modules: hostap: Fix double free in case of error conditions
In case of error conditions post successfully sending the message, the
event is already freed but we attempt to free it again.

Rejig the labels to easily reflect thier purpose.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-07 17:12:24 +01:00
Chaitanya Tata
2d7c995395 modules: hostap: Fix double free of the event
When an event is sent the receiver gets is asynchronously and hence is
responsible for free the event, the sender should only free in case of
error conditions i.e., unable to send.

Else, this causes a tough to debug double-free.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-07 17:12:24 +01:00
Chaitanya Tata
1da74ef705 net: wifi: Fix DPP disabled build
In case WPA supplicant disabled DPP, we need to compile out the
corresponding DPP code in Wi-Fi shell too.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-07 17:12:16 +01:00
TOKITA Hiroshi
86da989a52 tests: drivers: build_all: display: Add config for solomon,ssd1327fb
Add configuration for "solomon,ssd1327fb" to enable build test.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-07 17:11:58 +01:00
TOKITA Hiroshi
8529e93501 tests: drivers: build_all: display: Add mipi-dsi devices to build test
Add build tests for the following devices.

- himax,hx8394
- frida,nt35510
- orisetech,otm8009a
- raydium,rm67162
- raydium,rm68200

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-07 17:11:58 +01:00
TOKITA Hiroshi
3f6bddc2bf drivers: mipi_dsi: Change MIPI_DSI priority to the same as DISPLAY
These priorities can be resolved automatically with the sub-priority
mechanism, so set them to the same value.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-07 17:11:58 +01:00
TOKITA Hiroshi
ef3847c3d8 drivers: mipi_dsi: Add dummy driver for vnd,mipi-dsi
Add dummy driver for "vnd,mipi-dsi" to use in build_all tests.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-10-07 17:11:58 +01:00
Xudong Zheng
e8c4867806 usb: cdc_acm: disable logging if used for shell with logging
This prevents recursive logging loop when USB CDC ACM is used for shell
with logging.

Change affects both USB stacks.

Signed-off-by: Xudong Zheng <7pkvm5aw@slicealias.com>
2024-10-07 17:11:44 +01:00
Guillaume Gautier
2a67664c55 doc: releases: migration guide: stm32 adc async clock
Update the migration guide to indicate that the STM32 ADC that selects an
asynchronous clock also need to set a domain clock.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-10-07 13:40:06 +02:00
Guillaume Gautier
3c261c273b dts: bindings: adc: stm32: update adc bindings doc
Update ADC bindings documentation to state that a domain clock is now
necessary if asynchronous clock is selected.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-10-07 13:40:06 +02:00
Guillaume Gautier
9566d4ecb5 drivers: adc: stm32: add a check for asynchronous clock source
Add a compile-time check to verify that a domain clock is explicitly
defined if a STM32 ADC is configured to use an asynchronous clock.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-10-07 13:40:06 +02:00
Guillaume Gautier
111b2bb150 boards: st: add adc clock source if asynchronous clock is used
For all STM32 boards that define an asynchronous clock for ADC, specify
which clock is to be used in the clock node.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-10-07 13:40:06 +02:00
Guillaume Gautier
1d639aabe4 dts: arm: st: add default clock source for asynchronous ADC
For STM32L1, U5 and WBA, the ADC always uses an asynchronous clock source,
so we add the default clock source in the clock node.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-10-07 13:40:06 +02:00
Guillaume Gautier
46d4be75e0 drivers: clock_control: st: add missing bus source clocks
Add missing bus source clocks for STM32H5, U5 and WBA

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-10-07 13:40:06 +02:00
Guillaume Gautier
b27e36242b include: zephyr: dt-bindings: clock: st: add bus source clocks
Add missing bus source clocks define for STM32H5, L1, U5 and WBA

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-10-07 13:40:06 +02:00
Mateusz Holenko
aa7c367f44 drivers: led_strip: Fix formatting of log message
The previous version generated compilation warnings.

Signed-off-by: Mateusz Hołenko <mholenko@antmicro.com>
2024-10-07 13:39:59 +02:00
Vinayak Kariappa Chettimada
c334ed515b Bluetooth: Controller: Fix multiple Extended Adv chain reception
Fix assertion when enabling simultaneous multiple Extended
Advertising chain reception that is enabled by increasing
supported auxiliary scan contexts.

ULL sets the association of aux context to scan and sync
context, and LLL resets the association; this is safer
compared to earlier implementation where ULL did both the
association and reset which caused aux context memory
leak.

Supported auxiliary scan contexts can be increased using
CONFIG_BT_CTLR_SCAN_AUX_SET value.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-10-07 13:39:53 +02:00
Frode van der Meeren
29b78abd16 bluetooth: tester: audio: Add verification for bis stopping
Adds a semaphor to make sure the stream has properly been stopped by the
controller before returning from btp_bap_broadcast_source_stop.

Signed-off-by: Frode van der Meeren <frode.vandermeeren@nordicsemi.no>
2024-10-07 13:39:33 +02:00
Raffael Rostagno
d41fefe665 west.yml: hal_espressif: Update for SDK 0.16.9-rc2 bump fix
Update for SDK 0.16.9-rc2 bump fix

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-10-07 13:39:12 +02:00
Alberto Escolar Piedras
afbba5fb9b boards native_sim docs: Clarify which SDL version is needed
One needs the 32bit version of the SDL development library when
building for 32bit native_sim, and for the 64bit native_sim the
64bit version. Let's clarify this.

Also fix the SDL2 link.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-10-07 13:39:00 +02:00
Tomi Fontanilles
571e6019d7 doc: secure_storage: add documentation for the secure storage subsystem
It includes both the high-level documentation of the subsystem and
that of APIs defined in code (PSA Secure Storage and internal APIs of
the subsystem).

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-10-07 13:38:43 +02:00
Tomi Fontanilles
c9a59dd02d samples: psa: persistent_key: add the persistent_key sample
Add a sample to demonstrate use of persistent keys in the PSA Crypto API.

The implementation of the PSA ITS API that allows storage of persistent
keys is provided either by the just-introduced secure storage subsystem
or by TF-M.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-10-07 13:38:43 +02:00
Tomi Fontanilles
d6bee54986 samples: psa: its: add the psa_its sample
Add a sample to demonstrate direct use of the PSA ITS API.

The implementation of the API is provided either by the just-introduced
secure storage subsystem or by TF-M.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-10-07 13:38:43 +02:00
Tomi Fontanilles
85a56b5ee3 tests: secure_storage: add tests for the secure storage subsystem
Add one suite to test the PSA ITS API directly, and another to test it
through the PSA Crypto API.

The PSA ITS API test suite is run with different configurations to also
test customization possibilities that the secure storage subsystem offers.

Both test suites also have a test scenario with TF-M instead of the
secure storage subsystem.
This serves as compatibility testing to ensure that the PSA Secure
Storage API behaves the same from the user's point of view regardless
of the underlying implementation provider.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-10-07 13:38:43 +02:00
Tomi Fontanilles
4b479016a7 modules: mbedtls: enable persistent keys when CONFIG_SECURE_STORAGE
With the secure storage subsystem now providing an implementation of
the PSA ITS API, let Mbed TLS use it when it's enabled.
This allows the use of persistent keys in the PSA Crypto API.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-10-07 13:38:43 +02:00
Tomi Fontanilles
bf0e6d7c83 secure_storage: introduce the secure storage subsystem
Implements RFC https://github.com/zephyrproject-rtos/zephyr/issues/75275.

See also the PR (https://github.com/zephyrproject-rtos/zephyr/pull/76222)
for more information.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-10-07 13:38:43 +02:00
Maureen Helm
d022d315d2 tracing: Fix sysview for soc families not subdivided into series
Fixes the systemview tracing backend for soc families, such as max32,
that don't subdivide into soc series and therefore don't define
CONFIG_SOC_SERIES. Use CONFIG_SOC_FAMILY instead in the system
description since it should always be defined.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-10-06 20:51:27 +01:00
Maureen Helm
82a00c9cb8 soc: adi: max32: Indicate Segger RTT support
Sets CONFIG_HAS_SEGGER_RTT on the max32 soc family to allow using RTT
backends in the logging, shell, and tracing subsystems.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-10-06 20:51:27 +01:00
Marcel Krüger
38c9a74099 kernel.h: Fix k_msgq_get retval doxygen
Added a hint about -ENOMSG being returned when the
queue is purged.

Signed-off-by: Marcel Krüger <marcel.krueger@ithinx.io>
2024-10-06 20:51:18 +01:00
Chris Friedt
b6aed5c505 kernel: dynamic: use 4k stack size for x86
x86 architectures require a dynamic stack size that is a multiple
of 4096 bytes due to mmu restrictions.

For example, this test would previously fail when using the
default dynamic stack size of 1024 bytes for 32-bit
platforms.

```
west build -p auto -b qemu_x86/atom/nopae -t run \
  tests/posix/common/ -- -DCONFIG_USERSPACE=y
```

It would pass with an additional argument
```
west build -p auto -b qemu_x86/atom/nopae -t run \
  tests/posix/common/ -- -DCONFIG_USERSPACE=y \
  -DCONFIG_DYNAMIC_THREAD_STACK_SIZE=4096
```

Add a special default for x86 when using dynamic thread stacks.

The x86 default removes the need for `boards/qemu_x86*.conf`,
with the exception of `qemu_x86_tiny`.

qemu_x86_tiny did not have sufficient memory (or configuration)
to run the non-userspace tests, so bump up the available ram
from 256k to 512k for this test and clone the .conf from the
demand paging tests.

Eventually, the common posix test should be split into more
concise functional categories.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-05 14:13:18 -04:00
Rex Chen
82ec1d7862 net: wifi: shell: add wps support
Add wps pin and wps pbc L2 layer cmd support.

Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
2024-10-05 14:07:48 -04:00
Pisit Sawangvonganan
7d1953918a net: wifi: shell: enhance consistency in cmd_wifi_dpp_ap_auth_init
The `cmd_wifi_dpp_ap_auth_init` function was added but is not yet
aligned with others.
This update enhances consistency with the following changes:
- Unified the order of declaration for `opt`, `opt_index`,
  `state`, and `long_options`.
- Wrapped lines in the `long_options` declaration to prevent them
  from extending too far to the right.
- Applied `struct option` as `static const`
- Unified the wrapping of `getopt_long` calls, regardless of
  the length of the `options` string.
- Using `getopt_state` to access `optarg` and also `optopt` offers
  a better alternative to direct global access.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-10-05 14:07:33 -04:00
Lyle Zhu
3756429b6c Bluetooth: BREDR: L2CAP: Recover ident when conn is pending
The `ident` of L2CAP BR connection req will be cleared if
function l2cap_br_conn_req_reply called to send L2CAP BR
connection rsp with result `BT_L2CAP_BR_PENDING`.

Then the invalid `ident` (it is zero) will be filled in
the L2CAP BR connection rsp after the ACL connection is
encrypted.

Recover `ident` if the result of the connection rsp is
`BT_L2CAP_BR_PENDING`.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-05 14:07:24 -04:00
Lyle Zhu
c7c1f73045 Bluetooth: SSP: Support security level 4
Currently, error code `-ENOTSUP` will be
returned if start security with security
level 4.

For SC supported case, level 4 for ssp
should be supported.

Remove the code limitation to support
security level 4.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-05 14:07:15 -04:00
Lyle Zhu
7e54f13e7b Bluetooth: l2cap_br: Support Multi-Command Packet
Improve L2CAP BR to handle more than one
signaling command in one receiving L2CAP packet.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-05 14:07:09 -04:00
Lyle Zhu
3561540110 Bluetooth: L2CAP_BR: Set flags in CFG RSP
The flags of L2CAP_CONFIGURATION_REQ are set.
But in L2CAP_CONFIGURATION_RSP, all bits of
flags are cleared.

When used in the L2CAP_CONFIGURATION_RSP
packet, the continuation flag shall be set
to one if the flag is set to one in the
Request.

Copy flags from Request to Response if it
is a successful result.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-05 14:07:00 -04:00
Lyle Zhu
b7ab7c9d45 Bluetooth: L2CAP_BR: Process all defined OPTs
Currently, Only configuration opt MTU is handled.

For opt `Flush timeout`, `QOS`, `Retransmission
and Flow Control`, and `FCS`, response wilt
result `BT_L2CAP_CONF_UNACCEPT`.

For opt `extended flow specification` and
`extended windows size`, response wilt result
`BT_L2CAP_CONF_REJECT`.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-10-05 14:06:55 -04:00