Commit Graph

99599 Commits

Author SHA1 Message Date
Robert Lubos
3902a990e5 net: coap: Fix underlying type for block number
The block number in block1/2 options can be encoded on up to 20 bits
according to RFC 7959, therefore the underlying type used in helper
functions to retrieve the block number should be large enough to hold
the result. Therefore, replace the container for block number with
uint32_t instead of uint8_t.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-08-02 22:12:47 -05:00
Gerhard Jörges
1fe1c961f9 clang-format: add FOREACH macros
add missing FOREACH macros to stop clang-format from moving the opening
curly brace into a new line.

Signed-off-by: Gerhard Jörges <joerges@metratec.com>
2024-08-02 22:09:22 -05:00
Manuel Argüelles
7704d4eba4 soc: nxp: s32: convert power mng to native drivers
Convert power management to native drivers retaining existing
functionalities. Presently only SoC reset support and power control
initialization is supported, but these drivers will be extended to
support power management as well.

MC_ME and MC_RGM peripherals are common enough to be reused by other NXP
S32 devices, whereas PMC has specific implementations for each SoC
series.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-08-02 21:51:12 -05:00
Markus Lassila
c44968486d soc: nordic: Fix APPROTECT with TF-M
Allow CONFIG_NRF_APPROTECT_LOCK and
CONFIG_NRF_SECURE_APPROTECT_LOCK with TF-M with all the SOC's
that support TF-M.

Signed-off-by: Markus Lassila <markus.lassila@nordicsemi.no>
2024-08-02 18:50:11 -05:00
Raffael Rostagno
fbd651e799 boards: esp32c6_devkitc: Test files for DMA and UART async, doc update
Test files for DMA and UART async. esp32c6_devkitc doc update

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-02 18:48:37 -05:00
Raffael Rostagno
f4802dd7bd gdma: esp32: Modulate interrupts with low level calls
Use LL calls to enable/disable interrupts rather than make calls to the
interrupt controller.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-02 18:48:37 -05:00
Raffael Rostagno
1b72ec0329 dma: esp32c6: Added support to GDMA
Added support of GDMA driver for C6

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-02 18:48:37 -05:00
Matthias Alleman
931628a78a drivers: ethernet: nxp_enet: Fused MAC address fixes
Add required initialisation of OCOTP. The IMXRT10XX
variants don't support fuseWords to be greater than 1.
MAC0 fuse map address is 0x22 instead of 0x620.
Fill in mac_addr buffer correctly.

Signed-off-by: Matthias Alleman <matthias.alleman@basalte.be>
2024-08-02 18:47:10 -05:00
Thales Bacelar
d6429431d6 logging: Trigger logging thread when we start to drop messages
Wake up logging thread when we start to drop messages.

Signed-off-by: Thales Bacelar <thalesbacelar@duck.com>
2024-08-02 18:45:59 -05:00
Léo BRIAND
cf0c2a5275 drivers: wifi: eswifi: Fix memory buffer allocation in off_read_work
When receiving data over the eswifi module, we currently read the data
first, then allocate a buffer, and finally write the data into the
buffer. The issue is that if we can't allocate the buffer, the data
that was read is lost. To fix this, we should first attempt to allocate
the buffer before reading any data. If we can't allocate the buffer, we
should not proceed with reading the data. By allocating a buffer with
the MTU size, we can read the packet, write it into the allocated buffer
and then resize by removing unused allocated buffer with
net_pkt_trim_buffer().

Signed-off-by: Léo BRIAND <leo.briand@smile.fr>
2024-08-02 18:42:53 -05:00
Andrej Butok
36a1cacbe7 tests: flash: erase_blocks: Add README file
Add the brief README file for the erase_blocks test.
Every test/sample should have a readme file.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-08-02 18:41:23 -05:00
Mathieu Choplain
d50e190b02 modules: Kconfig.stm32: remove duplicate Kconfig symbol for RAMCFG
Remove the duplicate `USE_STM32_HAL_RAMCFG` Kconfig symbol definition
from Kconfig.stm32, which was introduced by accident in PR #66181,
commit 6ed002ddae.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-02 18:38:13 -05:00
Joakim Andersson
816b61552a boards: nucleo_u5a5zj_q: Fix storage address
Fix start address of storage partition.
Address did not match reg address of devicetree node, and the size of
the storage partition would make it exceed flash region.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-08-02 18:37:32 -05:00
Sadik Ozer
19571e8db7 boards: arm: adi: Enable display for MAX32672FTHR board
MAX32672FTHR board has CFAL12832C-0091B display which
is Monochrome 128x32 I2C OLED graphic display.
This commit enables LVGL stack for MAX32672FTHR board

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-02 18:36:48 -05:00
Sadik Ozer
1aeb6a1ab0 dts: arm: adi: Fix MAX32672 I2C clock index
I2C clock index is 21 for MAX32672

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-02 18:36:48 -05:00
Maksim Salau
eeb24400e1 drivers: eth: nxp,enet-qos: Fix MAC address check
Switch from `DT_INST_NODE_HAS_PROP(n, zephyr_random_mac_address)`
to `DT_INST_PROP(n, zephyr_random_mac_address)` since the property
is always present and we are interested in its value.

Signed-off-by: Maksim Salau <maksim.salau@gmail.com>
2024-08-02 18:36:11 -05:00
Manuel Argüelles
d2ba31d503 drivers: intc: nxp: convert wkpu to native driver
Convert NXP WKPU to a native driver, all existing functionalities are
retained.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-08-02 15:14:33 -05:00
Carles Cufi
ebd31d3916 drivers: hwinfo: Add support for generating device id from device addr
In some ICs (including nRF54H20) the DEVICEID register is not part of
FICR, and thus it is not accessible to applications. Use instead the
device address, along with a couple of bytes from ER and IR, to
generated a unique device id.

At the same time update the pointer to the hal_nordic repo to pull in
https://github.com/zephyrproject-rtos/hal_nordic/pull/196.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-08-02 13:49:54 +01:00
Vladislav Litvinov
95622e49b2 drivers: regulator: fix reference count underflow
Fixes regulator reference count underflow and adds error code
for attempting to disable an already disabled regulator

Signed-off-by: Vladislav Litvinov <vladislav.litvinov@nordicsemi.no>
2024-08-02 13:42:01 +02:00
Rubin Gerritsen
08cd4b6cce manifest: Update nRF hw models to latest
Update the HW models module to:
3ede17158a9fe85c160e0384c0ad0306e24ee47e

Including the following:
* 3ede171 GRTC: Expose nhw_GRTC_counter_to_time()
* 2726f8b RTC: Define nhw_rtc_start_time_get()
* cc6fb0f hal: hack: Add nrf_hack function for triggering a task
* 03ca9b5 MWU: Add registers stub

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-08-02 13:41:39 +02:00
Armin Brauns
d7da085948 bluetooth: make monitor timestamps roll over less
With e.g. a 216MHz core clock, the 32-bit cycle counter overflows after
just 20 seconds. The 32-bit monitor timestamp (100us resolution) overflows
after around five days regardless of what we do, but we should try our best
to reach that.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2024-08-02 13:41:32 +02:00
Manuel Argüelles
db07ff36a6 soc: nxp: s32: fix siul2 instance for input pinmuxing
Split SIUL2 instance index for the MSCR and IMCR registers as required
by some pins. Pinmux macros definitions in hal_nxp must be updated
accordingly.

Fixes #76147

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-08-02 13:41:15 +02:00
Pieter De Gendt
0e1a98c1bc doc: build: kconfig: Update preprocessor functions
Split preprocessor functions into different categories and add newly
introduced functions.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-08-02 13:41:07 +02:00
Pieter De Gendt
555a56f262 tests: kconfig: functions: Add min/max functions
Add test case for kconfig min/max functions.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-08-02 13:41:07 +02:00
Pieter De Gendt
2f234c627c scripts: kconfig: Add min/max functions
Similar to arithmetic functions, min/max can be useful to use in kconfig.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-08-02 13:41:07 +02:00
Pieter De Gendt
1e6f39e91b tests: kconfig: functions: Fix arithmetic typo
Moved the test to a single main file, fixed a typo
arithmetric -> arithmetic

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-08-02 13:41:07 +02:00
Vinayak Kariappa Chettimada
bc4442ece7 tests: bsim: Bluetooth: Host: Fix RPA expired old time value
Fix RPA expired old time value used for rotation timeout
validation.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-02 13:40:59 +02:00
Jacob Winther
5e789c3ae0 boards: add missing deprecated board entry for adafruit feather
The adafruit feather nrf52840 express board was recently renamed
from adafruit feather, but the board deprecation entry was missed.

The previous board name also was an update to a hwmv1 board name,
which this also updates.

Signed-off-by: Jacob Winther <jacob@9.nz>
2024-08-02 13:40:50 +02:00
Fin Maaß
c008cbab1a doc: releases: litex: mention change of uart driver
Mention the change of the litex
uart driver.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-02 03:32:21 -04:00
Fin Maaß
7869e05649 dts: bindings: litex: rename uart compatible
Zero got removed from the litex
uart compatible, as it now supports
multiple instances.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-02 03:32:21 -04:00
Fin Maaß
9b6d783ceb drivers: serial: litex: support multiple instances
support multiple instances of the litex uart driver.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-02 03:32:21 -04:00
Fin Maaß
072abdcaec drivers: serial: litex: rename uart driver
As there is no LiteUART it is more fitting
to rename the uart driver. This way it is also
more coherent with the other drivers and will
match the conditions in the MAINTAINERS.yml.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-02 03:32:21 -04:00
Mark Holden
e6b683d310 coredump: Guard new kconfig for only supported arch
Add new config, ARCH_SUPPORTS_COREDUMP_THREADS, and
only enable it for ARM CORTEX M where the gdb server
can support it.

Signed-off-by: Mark Holden <mholden@meta.com>
2024-08-02 03:32:09 -04:00
Mark Holden
a56e2f86cc coredump: Enable thread understanding for arm cortex m
Add support in arm_cortex_m python script to read thread
registers off of a thread's stack when switching context.

When CONFIG_ARM_STORE_EXC_RETURN is enabled, check the exc_return value
in thread's arch struct to determine accurately where the stack pointer
is. Also, set r7 (the frame pointer register) in case the frame pointer
is not omitted.

Only 8 registers are read from the top of the stack
for other threads present in the dump. So update the
script to reflect that.

Signed-off-by: Mark Holden <mholden@meta.com>
2024-08-02 03:32:09 -04:00
Mark Holden
0b9b33c540 coredump: Enable understanding of threads in scripts
Update zephyr gdb-server scripts to understand threads.

Parse the kernel_thread_info out of the elf file to be used
for finding offsets to data from _kernel structs or from
individual threads.

Update log_parser to understand latest format change, which
allows for the presence of a new section, threads metadata.

Update gdbstub to respond to various packets to describe
the threads present in a dump, and allow switching to
thread context of each thread.

Signed-off-by: Mark Holden <mholden@meta.com>
2024-08-02 03:32:09 -04:00
Mark Holden
c35f6d1cac coredump: Add test for threads core dump config
Add z_test which uses new configs to capture multiple
threads in a core dump and with all of the context
necessary to debug the threads.

Signed-off-by: Mark Holden <mholden@meta.com>
2024-08-02 03:32:09 -04:00
Mark Holden
45684a598d coredump: Add config for capturing thread data in core dump
Update core dump file format to support a new section which contains
metadata about threads necessary for debugging.

Define configs to capture that metadata and include it in the dumps
when enabled.

Update documentation to reflect the changes.

Signed-off-by: Mark Holden <mholden@meta.com>
2024-08-02 03:32:09 -04:00
Glenn Andrews
9bd0a3f05b doc: boards NXP VMU RT1170 remove broken links
NXP and CogniPilot have removed documentation from their web pages.

Delete the broken links.

Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
2024-08-02 03:31:55 -04:00
Anke Xiao
bdaeab3537 tests: drivers: uart: uart_basic_api: add configuration for frdm_ke17z512
Add uart configuration for UART driver, add frdm_ke17z512_uart.overlay
and update testcase.yml to support UART testing.
There are LPUART and UART IPs in frdm_ke17z512 platforms, so add
additional shell tests as UART, the shell instructions can be entered
on the UART console window.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-02 03:31:38 -04:00
Anke Xiao
7b72c6f2d9 boards: nxp: frdm_ke17z512: update pinctrl dtsi file
Add uart pinctrl configuration to support uart driver.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-02 03:31:38 -04:00
Anke Xiao
ff0e69607c dts: arm: nxp: nxp_ke17z512.dtsi: add uart driver support
Update dtsi to add uart driver support, there is no error irq
on mke17z9.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-02 03:31:38 -04:00
Anke Xiao
c7562f7122 drivers: serial: uart_mcux.c: add a feature macro wrap specific code
The enableRxRTS and enableTxCTS can only be configured when the
'UART_HAS_MODEM_SUPPORT' feature is enabled.
Uart has no 'error' IRQ on frdm_ke17z512, so update irq configuration
to configure the error interrupt when it exists.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-02 03:31:38 -04:00
Grzegorz Chwierut
663786d0a4 twister: Skip scanning non-ztest tests in Twister
Twister scans C-files to find testcases that are implemented
using ZTest framework. Also runs scanning of Elf files
after building. Skip scanning files if it is not required.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2024-08-02 03:31:24 -04:00
Fabio Baltieri
f3a6454f93 pm: refactor pm_device_driver_init
Refactor pm_device_driver_init code to keep the normal execution path
inline and the early exit branches at a single indentation, this is
commonly done throughout the code base.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-08-02 03:31:17 -04:00
Chris Friedt
91e0a4b9ac misc: move lorem ipsum text to zephyr/misc/lorem_ipsum.h
Instead of duplicating Lorem Ipsum in several places, let's
consolidate in one location.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-08-02 03:31:06 -04:00
Jose Alberto Meza
c76e776b67 drivers: i3c: common: Do not tread GETCAPS failure as error for 1.0 device
If it's a I3C v1.0 device without any HDR modes do not treat as an error
if GETCAPS gives no valid response.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2024-08-02 03:30:47 -04:00
Gero Schwäricke
67f8118a72 boards: hardkernel: odroid_go: fix SiP variant
Odroid Go uses a custom ESP WROVER-E N16R4, i.e., 16 MB of flash and
4 MB of PSRAM [1].

[1] https://wiki.odroid.com/odroid_go/odroid_go#specifications

Signed-off-by: Gero Schwäricke <gero.schwaericke@posteo.de>
2024-08-02 03:30:25 -04:00
Gero Schwäricke
776ecbca0f soc: espressif: esp32: add WROVER-E-N16R4 SiP variant
It seems this SiP variant is not sold by espressif directly, but it is
used by the Odroid Go. The Odroid Go documentation calls this a "custom"
model [1].

There already exists a SiP specific device tree include file:

  zephyr/dts/xtensa/espressif/esp32/esp32_wrover_e_n16r4.dtsi

[1] https://wiki.odroid.com/odroid_go/odroid_go#specifications

Signed-off-by: Gero Schwäricke <gero.schwaericke@posteo.de>
2024-08-02 03:30:25 -04:00
Luis Ubieda
4b26f8616b doc: shields: Add section on using Source Code
Providing guidance on how to add Source Code on Shields, as well as
clarifying the purpose.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-08-02 03:30:14 -04:00
Peter Mitsis
1bb5f3a52b tests: kernel: Add ISR tests for k_thread_priority_set()
Adds tests demonstrating k_thread_priority_set() being called
from the context of an ISR.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-08-02 03:29:55 -04:00