Commit Graph

98696 Commits

Author SHA1 Message Date
Tahsin Mutlugun
700ebe1b55 tests: drivers: i2c: i2c_target_api: Use address-width property
Boards that use 1024 byte EEPROM buffers need 16-bit address widths
otherwise eeprom_target driver will cause build failure.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-07-02 19:24:13 -04:00
Tahsin Mutlugun
223447262c tests: drivers: i2c: i2c_target_api: Support 16-bit word addresses
Existing tests fail when 16-bit address width is used. Adjust the code
to support 16-bit addresses as well.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-07-02 19:24:13 -04:00
Fabio Baltieri
36d90be198 drivers: udc_stm32: only check for HS_SPEED if defined
Seems like not all stm32 devices define USBD_HS_SPEED in the HAL, only
check for USBD_HS_SPEED if defined. Fixes a build failure with the new
stack on F1 MCUs.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-07-02 19:23:35 -04:00
Erwan Gouriou
6700a154be west.yml: hal_stm32: Remove autoconf.h
Sync with hal_stm32 PR

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-07-02 14:25:14 +02:00
Eve Redero
cc3558ba00 doc: detail how to find the drop-down version selector
Adding more guidance in the documentation website top banner

Signed-off-by: Eve Redero <eve.redero@gmail.com>
2024-07-02 14:19:46 +02:00
Benjamin Bigler
81556d6150 drivers: ethernet: phy_mii: check if there is a mdio config
In fixed-link mode, mdio remains unconfigured. This results in a null
pointer dereference, triggering a bus fault

Signed-off-by: Benjamin Bigler <benjamin.bigler@securiton.ch>
2024-07-02 14:18:46 +02:00
Jonathan Rico
85c57c2da3 Bluetooth: host: ensure ownership of conn on TX path
This is a bug-fix:

When upper layers want to send something, they add a `conn` object to a
list. They do so by adding a node on `struct conn` rather than the object
itself.

We forgot to increase the reference count of the connection object when
doing so. This means that there can be a scenario where the conn object is
destroyed and re-used while still being on the TX list/queue.

This is bad for obvious reasons.

This patch fixes that by:
- increasing the refcount when putting on the TX list
- decreasing the refcount *only* when popping off the TX list
- passing a new reference from `get_conn_ready` into `bt_conn_tx_processor`

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-07-02 14:18:23 +02:00
Robert Lubos
71f668d1f3 samples: net: dhcpv4_client: Enable DNS in the sample
The DHCP server can distribute DNS addresses, hence enable DNS resolver
in the sample to show this functionality.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-02 14:17:16 +02:00
Robert Lubos
28ed03afc4 samples: net: dhcpv4_client: Replace example DHCP server with kea
Currently used DHCP server in the sample, dhcpd, is no longer maintained
and reached EOL. Therefore, update the sample's readme file with a
sample configuration for its successor, kea.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-02 14:17:16 +02:00
Yong Cong Sin
4f1ee4b753 arch: riscv: irq: include util_macro.h for the macros
Macros like `BIT()` & `BIT64()` from the `util_macro.h` are
used, include their header to compile properly.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-07-02 14:14:35 +02:00
Jukka Rissanen
9647db8808 net: dns: Avoid superfluous error message
If we have configured the DNS dispatcher to be only as a
responder but receive a query response, or if we are only
as a resolver but receive a query, then the dispatcher just
ignores the packet and returns -ENOENT.

Unfortunately we print an error message in this case

[00:10:18.818,000] <err> net_dns_dispatcher: DNS recv error (-2)

which is totally unnecessary and causes confusion so do not
print an error message in this case.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-07-02 14:11:15 +02:00
Sreeram Tatapudi
d0474cefde tests: bluetooth: shell: Enable flow control
Enabling UART flow control for CYW20829

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2024-07-02 09:35:33 +02:00
Sreeram Tatapudi
e3f4a63ac0 soc: infineon: cyw20829: Updates linker script
Add missed #include <zephyr/toolchain/common.h>
in linker script to fix build error with
samples/subsys/bindesc/hello_bindesc

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2024-07-02 09:35:33 +02:00
Sreeram Tatapudi
28b03b86b7 samples: bluetooth: Update samples to support cyw920829m2evk_02
Update bluetooth projects to support cyw920829m2evk_02 platform

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2024-07-02 09:35:33 +02:00
Yong Cong Sin
e912a95355 arch: riscv: update the description of INCLUDE_RESET_VECTOR Kconfig
Update the description of the `INCLUDE_RESET_VECTOR` Kconfig so
that it is more clear to the user what it does.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-07-02 09:24:44 +02:00
Yong Cong Sin
6de21fc1d2 Revert "soc: riscv-privileged: support SoCs without reset vector"
This reverts commit 75f5d98002.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-07-02 09:24:44 +02:00
Yong Cong Sin
5ee20e11ef soc: nordic: vpr: select INCLUDE_RESET_VECTOR for default implementation
For SOCs that do not implement a custom `__reset` function,
select `INCLUDE_RESET_VECTOR` so that Zephyr provides a default
implementation that simply jumps to `__initialize`

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-07-02 09:24:44 +02:00
Henrik Brix Andersen
e5aad45bb1 west: commands: runners: canopen: increase default SDO timeout
Increase the default SDO timeout for the CANopen program download west
runner from 0.3 seconds to 1 second. Depending on the flash size and speed,
a full erase may take slightly longer than 300 ms.

The timeout can be customized by using the --sdo-timeout runner parameter.

Fixes: #73987

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-07-02 09:20:57 +02:00
Declan Snyder
94815e7955 tests: arm_irq_vector_table: Fix RT/WXXX
Fix preprocessor expression for custom vector table due
to OS timer isr being needed. The parentheses are missing.
Also add RW6xx to the list which has the same isr needed for ostimer.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-02 09:19:46 +02:00
Gerson Fernando Budke
768b8bbca3 scripts: west robot & simulation: Fix OOT
The current version of scipts do not consider OOT boards use cases and
the tests with robot now are strict to only one robot file, which is
not realistic for real environment. This address those issues and allow
multiple testsuits at command line and lists at tests entries. It add
another test parameter to allow configure robotframework options.

Fixes: #74563

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2024-07-01 16:10:35 -04:00
Krzysztof Chruściński
0825f24910 soc: nordic: nrf54h: DMM shall be applied only to rad&app
cpuppr can only use slow peripherals and uses RAM3 as RAM so
it does not need to use DMM.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-01 16:08:39 -04:00
Krzysztof Chruściński
7a6b355535 tests: boards: nrf: dmm: Adjust test to dmm changes
After changing dmm to not apply data cache line alignment for all
regions test needs to be aligned.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-01 16:08:39 -04:00
Krzysztof Chruściński
5f32265459 soc: nordic: common: dmm: Fix memory utilization
DMM was enforcing cache line alignment all memory regions, including
those which were not cacheable. Fixing it by using memory attribute
from the device tree to determine if alignment needs to be applied.

Because of that memory usage was significantly increased because
even 1 byte buffers (e.g. for uart_poll_out) was consuming 32 bytes
(cache line size).

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-01 16:08:39 -04:00
Xudong Zheng
19c1f9f6c5 drivers: serial: pl011: add support for hardware flow control
Flow control will be enabled for UART if hw-flow-control is set.

Signed-off-by: Xudong Zheng <7pkvm5aw@slicealias.com>
2024-07-01 16:08:23 -04:00
Pisit Sawangvonganan
94b752d2b4 lib: smf: use while (true) in get_child_of for better clarity
Replace the condition-less `for` loop (`;;`) in `get_child_of` with
a `while (true)` loop and remove the redundant `return NULL;`
at the end, which is never reached.

This change aims to enhance readability since `while (true)` is better
suited for this scenario.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-01 16:08:05 -04:00
Hakan Jansson
f371ea4b97 boards: infineon: cyw920829m2evk_02: update documentation
Update documentation, mainly to clarify use of onboard KitProg3 debug
adapter and Infineon custom OpenOCD.

Signed-off-by: Hakan Jansson <hakan.jansson@infineon.com>
2024-07-01 16:07:42 -04:00
Krzysztof Chruściński
ce157c689d tests: lib: spsc_pbuf: Do not run test with cache
Test was using a configuration which enforces cache management in the
packet buffer. However it shall not be used if producer and consumer
is the same core. Testing this configuration on a single core does
not make sense as it actually fails on cores with data cache.

Making this configuration build_only so it is checked against
compilation errors.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-01 16:07:30 -04:00
Krzysztof Chruściński
0bb25d2e17 lib: os: spsc_pbuf: Clarify using cache management in the module
Packet buffer can be used for sharing data between cores. In that
case when any core has data cache then data cache handling must
be enabled in the module. However, it shall never be enabled when
the packet buffer is used on a single core. Adding that information
to the documentation.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-01 16:07:30 -04:00
Jan Zyczkowski
b737598dcf boards: nordic: Change NRFS logs to debug level
Change NRFS logs to debug level not to break tests.

Signed-off-by: Jan Zyczkowski <jan.zyczkowski@nordicsemi.no>
2024-07-01 16:07:15 -04:00
Johann Fischer
6aaad0a5cd drivers: udc_stm32: handle ZLP flag
A function, such as CDC ECM, can set the ZLP flag to handle a
class-specific protocol. This is not to be confused with the ZLP role in
control transfers.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-01 16:06:26 -04:00
Johann Fischer
de728c393b drivers: udc_stm32: implement driver API to get actual device speed
Implement driver API to get actual device speed.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-01 16:06:26 -04:00
Henrik Brix Andersen
c4c5f168e8 ci: ignore changes to the CANopen program download runner
Ignore changes to the CANopen program download west runner in CI.

This script is only executed when performing a DFU using the CANopen
protocol via CAN, which is never triggered in CI anyways.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-07-01 16:05:44 -04:00
Henrik Brix Andersen
f14697d4c3 MAINTAINERS: put the CANopen runner script under the CAN area
Put the scripts/west_commands/runners/canopen_program.py script under the
CAN area.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-07-01 16:05:44 -04:00
Emil Gydesen
0eb612b28b doc: Bluetooth: Audio: Remake zephyr_gaf.svg to graphviz
Remake the Zephyr Generic audio framework (GAF) figure to a graphviz
version.
This makes it easier to modify it directly in the .rst file.

This also adds the missing GMAP/GMAS.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-01 18:15:20 +02:00
Emil Gydesen
05b11e58eb doc: Bluetooth: Audio: Remake gaf.svg to graphviz
Remake the Generic audio framework (GAF) figure to a graphviz version.
This makes it easier to modify it directly in the .rst file.

This also adds the missing GMAP/GMAS.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-01 18:15:20 +02:00
Emil Gydesen
0b4d7523fd doc: Bluetooth: Audio: Remake audio_arch to graphviz
Remake the Bluetooth Audio Architecture figure to a graphviz
version. This makes it easier to modify it directly in the
.rst file.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-01 18:15:20 +02:00
Nikolay Agishev
80fe531119 ARCMWDT: Fix issues with posix types
Fix posix pid_t type redifiniton (zephyr vs arcmwdtlib).
Add omitted in arcmwdtlib type sigevent.

This Fixes https://github.com/zephyrproject-rtos/zephyr/issues/75105

Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
2024-07-01 18:14:34 +02:00
Emil Gydesen
fa447948d2 Bluetooth: BAP: Scan del: Overwrite metadata if len == 0
If the metadata length is 0 in the mod source operation,
we set the length to 0 and memset the stored value.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-01 18:14:14 +02:00
Benjamin Cabé
1f0c22eb01 net: ptp: fix incorrect req_timestamp decoding
Removed incorrect use of ntoh to decode Delay_Req timestamp

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-07-01 18:13:42 +02:00
Benjamin Cabé
a89a5ee52d net: ptp: fix offset check by adding missing int64_t cast
Add cast to NSEC_PER_SEC macro to correctly check offset.
Prior to this commit, the would eval to true incorrectly.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-07-01 18:13:42 +02:00
Benjamin Cabé
5a07cf4e0d doc: esp32: fix rendering of MCUboot note
Use proper syntax to ensure rendering of the
CONFIG_BOOTLOADER_MCUBOOT snippet is correct.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-07-01 18:12:43 +02:00
Henrik Brix Andersen
fa4537df8f ci: move github runners from macos-11 to macos-14
Move the GitHub runners currently on macos-11 to macos-14 as the former is
no longer supported by GitHub.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-07-01 18:12:21 +02:00
Gerard Marull-Paretas
574f939432 device: only define/initialize metadata for DT devices
Check if node identifier is valid to define and initialize device
metadata. Without this patch, "software devices", ie, DEVICE_DEFINE,
would fail to compile when enabling the device metadata feature.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-01 09:25:27 -04:00
Gerard Marull-Paretas
91e16f16b3 device: add missing comma to Z_DEVICE_INIT
When PM_DEVICE is enabled, pm_base needs to be expanded with a trailing
comma.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-01 09:25:27 -04:00
Alex Fabre
9b9d455f02 boards: st: fix sysbuild multi image flash
Problem:

When flashing a multi-image project with STLink through sysbuild,
the flash utility is told to erase the whole flash between each
single image flash.

Resulting in a partial flash where only the last image is effectively
stored on flash...

Correction:

A `west flash` must not implicitly perform a mass erase on its own.

If a flash erase is required, the option has to be passed manually.

The problem is discussed in the following issue:
zephyrproject-rtos/zephyr#69582

Due to CI tests errors, the correction is not applied on
eval board `b_u585i_iot02a`.

See following issue:
zephyrproject-rtos/zephyr#75164

Signed-off-by: Alex Fabre <alex.fabre@rtone.fr>
2024-07-01 09:06:50 -04:00
Guillaume Gautier
c93d6b8559 drivers: adc: stm32: apply extended calibration on u5
Some STM32U5 can apply an extended calibration to enhance the ADC
performance.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-07-01 09:06:22 -04:00
Guillaume Gautier
aa670f7e4a drivers: adc: stm32: check ldo ready bit
For STM32H7, U5 and WBA, check the LDORDY bit of the ADC ISR register
after enabling the internal regulator. This method is safer than the
delay.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-07-01 09:06:22 -04:00
Hao Luo
faa5fa1ab0 drivers: i2c: bugfix for ambiq i2c driver
Added k_sem_give for error return case.
Changed enabled interrupt bits.

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-07-01 09:06:05 -04:00
Valerio Setti
3dac7cb936 MAINTAINERS: add valeriosetti as collaborator for Mbed TLS module
Previous commit 8defc560fe forgot
to add valeriosetti also in "West project: mbedtls". This commit
fixes this.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-07-01 09:05:45 -04:00
Krzysztof Chruściński
e367231f29 drivers: uart: uart_elementary: Add missing pull-ups to nrf54h20dk
Add missing pull-up for RX pin in nrf54h20dk dual uart configuration.
Lack of pull-up was causing test failures.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-01 09:05:33 -04:00