Compare commits

...

539 commits

Author SHA1 Message Date
Manuel Argüelles
832261dbe5 boards: mr_canhubk3: enable SWT watchdog
Enable the Software Watchdog Timer instance on this board.

Now that SWT is enabled for this board and made the default watchdog,
sample.task_wdt.no_hw_fallback can be removed as is no longer needed.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-08-03 05:58:46 -05:00
Manuel Argüelles
b8928dfc3f drivers: watchdog: convert NXP SWT to native driver
Convert NXP SWT watchdog driver to a native driver and extend the
SWT supported functionalities and configuration options.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-08-03 05:58:46 -05:00
Robert Lubos
2d2ce4e78d doc: migration-guide-4.0: Add entry about CoAP block API change
Add entry about the coap_get_block1_option() and
coap_get_block2_option() API change.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-08-02 22:12:47 -05:00
Robert Lubos
5f43388308 net: coap: Parse more flag in coap_get_block2_option()
Parse the more flag in coap_get_block2_option(), so that the function
can be used not only with requests but also with replies (where the more
flag should not be ignored).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-08-02 22:12:47 -05:00
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
Peter Mitsis
8c48665868 kernel: Remove k_thread_priority_set() restriction
Removes the ISR restriction from k_thread_priority_set().
Since the first commit, the routine k_thread_priority_set() has
had a restriction preventing it from being called from within
the context of an ISR. As there does not (any longer) appear to
be a reason why the restriction exists, it is being removed.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-08-02 03:29:55 -04:00
Daniel Kampert
3bf35ce696 drivers: rtc: Change error to ENODATA in get time function
- Change the error type from ECANCELED to ENODATA

Signed-off-by: Daniel Kampert <DanielKampert@kampis-elektroecke.de>
2024-08-02 03:29:41 -04:00
Andrzej Głąbek
791ba98e7a dts: bindings: nordic: Require pinctrl-names together with pinctrl-0
... so that a clear devicetree error is reported when the pinctrl-names
property is missing, not a quite cryptic compilation error about an
undeclared PINCTRL_STATE_*_UPPER_TOKEN symbol in pinctrl.h.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-08-02 03:29:30 -04:00
Joakim Andersson
0efbbcb7fd drivers: gnss: Handle malloc returning NULL pointer
Handle malloc returning NULL pointer, set err and return from function.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-08-02 03:29:18 -04:00
Joakim Andersson
76907ff399 drivers: gnss: Do not re-assign err from helper function
Do not re-assign err from helper function, this just causes loss of
information from the helper function.
Only possible err returned is -EINVAL, so not a functional change.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-08-02 03:29:18 -04:00
Anders T. Akre
26cd98e483 modem: ubx: fix incoming byte processing
`ret` holds the amount of bytes received from the modem. However during
processing of the bytes its value is overwritten by the return value of
`modem_ubx_process_received_byte`, in practice discarding all but the
first byte read.

To prevent this, store the length in a separate variable.

Signed-off-by: Anders T. Akre <anders@akre.io>
2024-08-02 03:29:18 -04:00
Benjamin Cabé
93c9da6694 ci: manifest: fix wrong version being used for action-manifest
A typo in "1.3.0" tag is causing CI to fail since the actual tag is
"v1.3.0"

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-01 12:08:51 -04:00
Rubin Gerritsen
d31caf90b5 ring_buffer: Remove duplicate documentation line
No need to have the same documentation line twice.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-08-01 16:49:44 +01:00
Jonathan Rico
1c6510312d Bluetooth: L2CAP: Set NULL callback for PDUs
It was not being set, and thus if the user_data contained garbage from
before, then conn.c would attempt to call that garbage.

Static channels don't have this issue, as every "SDU" fits into one PDU.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Co-authored-by: Huajiang Zheng <nxf88597@lsv051208.swis.nl-cdc01.nxp.com>
2024-08-01 16:49:37 +01:00
Jonathan Rico
8d7c1bc7bc Bluetooth: remove forgotten TODO
It's already done.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-01 16:49:37 +01:00
Jonathan Rico
08706f98bc Bluetooth: adapt l2cap/userdata test
Modify the test so it checks that user_data is used and then cleared by
the stack.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-01 16:49:37 +01:00
Jonathan Rico
ea9449979b Bluetooth: L2CAP: Mark user_data as owned by the stack
Storing stuff in user_data? That's a paddlin'

We have been debugging issue after issue because ownership of this
"user" data is not clearly defined. Now it is. L2CAP owns the user_data
field entirely, as soon as `send()` is called.

Also add a warning and retval using CHECKIF.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-01 16:49:37 +01:00
Jonathan Rico
5c6cd27723 Bluetooth: allow compiling host with CONFIG_NO_RUNTIME_CHECKS
Werror fails the build on that function.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-01 16:49:37 +01:00
Jonathan Rico
d02a13d726 Bluetooth: host: add more info to conn.c log
Print user_data and callback pointers.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-01 16:49:37 +01:00
Lucas Tamborrino
7b27d4c9d5 drivers: adc: esp32: Fix calibration scheme for esp32s3
ESP32S3 requires ESP_ADC_CAL_VAL_EFUSE_TP_FIT calibration
scheme. The use of ESP_ADC_CAL_VAL_EFUSE_TP is not supported
in the SoC..

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-08-01 16:49:25 +01:00
Fabio Baltieri
f1a639ca9f console: ipm_console_sender: fix function naming camel case
Should be console_out not consoleOut.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-08-01 16:49:08 +01:00
Fabio Baltieri
e466efaf74 libc, console: declare __stdout_hook_install in libc-hooks.h
Declare __stdout_hook_install in libc-hooks.h and use it in the console
drivers rather than redeclare it every time.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-08-01 16:49:08 +01:00
Dominik Ermel
2f530cfbbd samples/soc_flash_nrf: Fix soc_flash_nrf doc and printfs
The commit fixes soc_flash_nrf sample documentation where incorrect
partition names has been used and removes information of
CONFIG_TRUSTED_EXECUTION_NONSECURE affecting which partition is used
as this is no longer true.

The printf message reporting start of sample has been modified
to print "Nordic nRF5 Flash Sample" instead of
"Nordic nRF5 Flash Testing", which is more accurate for code
residing in samples.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-08-01 16:48:30 +01:00
Carles Cufi
e898de52df github: workflows: Update manifest action to detect impostor commits
See additional info in:
https://github.com/zephyrproject-rtos/action-manifest/pull/12

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-08-01 16:47:43 +01:00
Nikodem Kastelik
43128052e7 drivers: serial: nrf: add default value for frame timeout cfg
This is needed to avoid warnings about uninitialized
structure member, which was added in nrfx 3.6.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-08-01 16:45:04 +01:00
Nikodem Kastelik
443276eccb modules: hal_nordic: nrfx: sync configs for UARTE MAGIC_BYTE option
New option is used in RX FIFO flush workaround
performed by the nrfx_uarte driver.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-08-01 16:45:04 +01:00
Nikodem Kastelik
c0ede7106e modules: hal_nordic: nrfx: remove nrfx_uarte rx cache for nrf54l15 enga
This option is no longer valid for nRF54L15 Eng A target.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-08-01 16:45:04 +01:00
Nikodem Kastelik
492a474c62 manifest: update hal_nordic revision to integrate nrfx 3.6.0
New nrfx version contains support
for nRF54L20 Eng A and nRF9230 Eng B devices.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-08-01 16:45:04 +01:00
Théo Battrel
c1a2c5b8a8 Drivers: ssd1306: Respect segment-offset DTS property
Update `ssd1306_write_default` to take into account the `segment_offset`
property. This is needed for some displays to show the image correctly.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-08-01 16:44:24 +02:00
Théo Battrel
bfb541ccbe Drivers: ssd1306: Add use_internal_iref DTS option
Necessary for supporting for EastRising 0.42 OLED display/board.

Some boards don't have external Iref set up. This is probably done in an
effort to save on component cost. This command is only documented in the
V1.1 revision of the SSD1306 datasheet.

See issue https://github.com/olikraus/u8g2/issues/1047

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-08-01 16:44:24 +02:00
Martin Stumpf
77eafac1bf linker: section_tags: fix missing include
If using `<zephyr/linker/section_tags.h>` without including
`zephyr/linker/sections.h` as well, we get a warning an the linker fails
to place the data in the desired section.

Signed-off-by: Martin Stumpf <finomnis@gmail.com>
2024-08-01 16:44:05 +02:00
Mathieu Choplain
94c375ed2f drivers: sensor: stm32_vref: update incorrect comment
The ICACHE must be disabled on STM32H5 series due to documented
behaviour of the flash controller, not to an errata.

For a more technical explaination: (see RM0492 for references)
 -  on STM32H5, the ICACHE block is interposed on C-bus between
    the Cortex-M33 and the FLASH (§2.1.1)
 -  the ICACHE determines if accesses are cacheable or non-cacheable
    based on an AHB attribute; the Cortex-M33 sets this attribute or
    not depending on the MPU configuration (§8.4.6)
 -  when a cacheable access is requested by the Cortex-M33, if the
    requested data is not present in ICACHE (cache miss), a cache line
    refill (128-bit burst read) is performed (§8.4.7)
 -  however, all accesses to OTP and Read-Only regions of the FLASH must
    be done with caching disabled (§7.3.2); indeed, the accesses MUST be
    16 or 32-bit sized - otherwise, the flash interface raises a bus
    error (§7.5.9 / Table 38 "OTP/RO access constraints").

    This is the behaviour that was observed and lead to the introduction
    of ICACHE disable code in 065a8f25e1.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-01 16:43:51 +02:00
Mathieu Choplain
bbfe499874 boards: nucleo_h753zi: disable Vbat sensor
This commit disables the Vbat sensor on the Nucleo-H753ZI
board, as the corresponding ADC is not enabled.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-01 16:43:51 +02:00
Mathieu Choplain
0a16d6fc2d boards: stm32h735g_disco: disable Vbat sensor
This commit disables the Vbat sensor on the STM32H735G
Discovery board, as the corresponding ADC is not enabled.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-01 16:43:51 +02:00
Mathieu Choplain
c77d5b8c3b drivers: sensor: stm32_vbat: handle disabled ADCs more gracefully
This commit modifies the STM32 battery voltage sensor driver
to handle erroneous usage more gracefully. More precisely,
it now fails builds with an explicit error message when the
sensor is enabled but the corresponding ADC is not. This can
only happen on STM32 series with more than one ADC (e.g., H7).

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-01 16:43:51 +02:00
Mathieu Choplain
1e0e3a874f drivers: sensor: stm32_vref: handle disabled ADCs more gracefully
This commit modifies the STM32 internal voltage reference sensor
driver to handle erroneous usage more gracefully. More precisely:
  - driver no longer builds if no ADC node is enabled
  - fail builds with an explicit error message when the sensor
    is enabled but the corresponding ADC is not. This can only
    happen on STM32 series with more than one ADC (e.g., H7).

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-01 16:43:51 +02:00
Mathieu Choplain
8d40279644 drivers: sensor: stm32_temp: handle disabled ADCs more gracefully
This commit modifies the STM32 internal temperature sensor driver
to handle erroneous usage more gracefully. More precisely:
 - driver no longer builds if no ADC node is enabled
 - fail builds with an explicit error message when the sensor
   is enabled but the corresponding ADC is not. This can only
   happen on STM32 series with more than one ADC (e.g., H7).

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-01 16:43:51 +02:00
Mathieu Choplain
47187a9ec9 dts: bindings: STM32 ADC: don't require pinctrl
This commit removes the requirement for pinctrl in the STM32 ADC binding.
This allows usage of ADC with internal channels only (no GPIO pin waste).

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-01 16:43:51 +02:00
Armin Brauns
cd7a6a4d55 coredump: use memmove instead of memcpy
With CONFIG_DEBUG_COREDUMP_MEMORY_DUMP_LINKER_RAM, buffer_output() is
called on the entire RAM memory area. This includes the stack for the
coredump thread, which is where tmp_buf is stored. Eventually, it will copy
(parts of) tmp_buf into tmp_buf itself, which invokes Undefined Behaviour
in memcpy():

> The memory areas must not overlap.  Use memmove(3) if the memory areas do
> overlap.
- memcpy(3)

With picolibc, this is detected in __memcpy_chk() and causes a fault in
__chk_fail().

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2024-08-01 16:43:41 +02:00
Jordan Yates
21a6d5608b tests: unit: list: test "safeness" of safe iteration
Add tests for removing and adding nodes to a list under
`SYS_SLIST_FOR_EACH_NODE_SAFE` and `SYS_SLIST_FOR_EACH_CONTAINER_SAFE`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-01 16:41:16 +02:00
Andrej Butok
7a1c286f5c tests: flash: erase_blocks: Add support of flash program size > 128
Fix failed test for platforms with flash program size > 128 bytes.
Update supported program size to 512 bytes, the highest supported
program size by Zephyr platforms.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-08-01 16:40:53 +02:00
Armin Brauns
12435442d2 coredump: significantly increase efficiency for small write block sizes
With FLASH_WRITE_SIZE==1, this would do a separate flash write for every
single byte.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2024-08-01 16:40:26 +02:00
Ioannis Damigos
bf7c05d147 maintainers: Fix label for Renesas RA Platforms
Fix label for Renesas RA Platforms

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-08-01 16:40:20 +02:00
Ioannis Damigos
02d2a3e213 maintainers: Add boards' files to Renesas RA Platforms
Add board files to Renesas RA Platforms

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-08-01 16:40:20 +02:00
Maureen Helm
e4f6553ec0 MAINTAINERS: Add ADI collaborators
Add ozersa and ttmut as collaborators on ADI areas. Both are ADI
employees that have contributed multiple PRs in these areas.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-08-01 16:40:11 +02:00
Robert Lubos
9764755bf8 tests: net: http_server: tls: Reduce test memory footprint
Tweak some Kconfig variables to reduce the overall memory footprint of
the test application. For some reason x86 MMu throws errors when
accessing iterable section entries when the image size is too large.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-08-01 16:40:03 +02:00
Pieter De Gendt
9894b84a2d scripts: west_commands: build: Fix empty testcase
An empty but specified testcase does not build, check if the test key
exists instead.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-08-01 16:39:51 +02:00
Fabio Baltieri
bb4af13da0 samples: fix adafruit_feather board name
This has been renamed in b6ed4ba761, the current entry is causing a CI
breakage for unrecognized platform.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-08-01 14:56:25 +02:00
Jakub Zymelka
72dd6bb554 samples: subsys: ipc: icmsg: Align to NO MULTITHREADING
Removed k_sleep dependencies and added 'printk' instead of LOG
in non-multithreaded runs.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2024-08-01 13:31:53 +02:00
Jakub Zymelka
485a2cc0bf samples: mbox: Align to NO MULTITHREADING
Removed k_sleep dependencies in non-multithreaded runs.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2024-08-01 13:31:53 +02:00
Jakub Zymelka
bb5b98f16c ipc: icmsg: Align to NO MULTITHREADING
Adapting icmsg to work without the MULTITHREADING functionality.
Dependencies for kernel work_queue, mutexes and other functions
related to running multithreaded applications have been 'ifdefed'.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2024-08-01 13:31:53 +02:00
Chen Xingyu
e503799f3d boards: nucleo_f030r8: Utilize probe-rs
This commit introduce probe-rs runner to nucleo_f030r8 board for
demonstration.

Signed-off-by: Chen Xingyu <hi@xingrz.me>
2024-08-01 12:39:28 +02:00
Chen Xingyu
0095c224fa scripts: west_commands: runners: Add support for probe-rs
probe-rs is a new programming and debugging tool written in Rust, supports
many probes and targets.

This commit introduces initial support for probe-rs to Zephyr.

Signed-off-by: Chen Xingyu <hi@xingrz.me>
2024-08-01 12:39:28 +02:00
Fin Maaß
d71ad169d4 drivers: spi: litex: add litespi driver
add litespi driver for flash.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-01 12:39:02 +02:00
Fin Maaß
0f3955cc80 drivers: spi: litex: rework spi driver
rework the litex spi driver.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-01 12:39:02 +02:00
Fin Maaß
9a7037683d drivers: spi: litex: rename driver
rename litex spi driver.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-01 12:39:02 +02:00
Chun-Chieh Li
11d086e539 samples: usb-c: sink: add support for numaker_m2l31ki
Add support for NuMaker-M2L31 board

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2024-08-01 12:38:53 +02:00
Chun-Chieh Li
9e9e409cb9 drivers: usb_c: numaker: support Nuvoton's M2L31 series
1. Support USB-C drivers TCPC, PPC, and VBUS with UTCPD H/W IP
2. UTCPD is interconnected with Timer-triggered EADC for updating
   VBUS/VCONN voltage periodically

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2024-08-01 12:38:53 +02:00
Krzysztof Chruściński
c84c2fc37d soc: nordic: common: dmm: Initialize dmm as early as possible
DMM shall be initialized as early as possible to allow drivers to
use it. For example, uart may need it early since it starts
RX during initilization in some configurations.

Making dmm_init() public and calling it in soc init function.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-08-01 12:38:44 +02:00
Jonathan Rico
11b3aa1f1f tests: Bluetooth: Add multi-central robustness test
This test's purpose is to verify we (as a peripheral) don't leak resources
when communicating with multiple centrals that connect and disconnect
intermittently.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-01 12:38:36 +02:00
cyliang tw
406d17c3c5 samples: boards: Add numaker system_off sample
Increase numaker board and add system_off sample
to illustrate power down by sys_poweroff API.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-08-01 12:37:47 +02:00
cyliang tw
5b921c53b0 soc: nuvoton: numaker: add poweroff for m46x
Add support of sys_poweroff API on m46x series.
It could support SPD standby or DPD deep power down mode.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-08-01 12:37:47 +02:00
Bjarki Arge Andreasen
371206d254 drivers: i2c: i2c_ll_stm32: Remove redundant last msg stop
The I2C API itself now enforces last msg stop, remove duplicate code
from driver.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-08-01 12:37:40 +02:00
Bjarki Arge Andreasen
3cc8350396 drivers: i2c: i2c_gd32: Remove redundant last msg stop
The I2C API itself now enforces last msg stop, remove duplicate code
from driver.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-08-01 12:37:40 +02:00
Bjarki Arge Andreasen
d8b49b0aa4 drivers: i2c: i2c_esp32: Remove redundant last msg stop
The I2C API itself now enforces last msg stop, remove duplicate code
from driver.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-08-01 12:37:40 +02:00
Bjarki Arge Andreasen
580bdafb81 drivers: i2c: i2c_dw: Remove redundant last msg stop
The I2C API itself now enforces last msg stop, remove duplicate code
from driver.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-08-01 12:37:40 +02:00
Bjarki Arge Andreasen
2b007ab784 drivers: i2c: enforce i2c stop flag in last i2c_transfer_cb msg
The i2c_transfer API specifies that the I2C_MSG_STOP flag implicitly
is set for the last message in a i2c_transfer(). This is identical to
explicitly setting the I2C_MSG_STOP flag in the last message, which is
what every driver which properly adheres to this specification does.

The i2c_transfer_cb API is seemingly identical to the i2c_transfer_api,
it references it using @see i2c_transfer(), while providing a callback,
and being available from isr context. This commit extends the wrapper
to provide the following guarantees also present in the i2c_transfer API:

- If num_msgs is 0, no transfer will occur
- The last message of the transfer implies a stop condition

This allows for users to use both functions interchangeably, while
removing handling of num_msgs = 0 and last message missing stop cond
from device drivers.

Additionally a check for num_msgs == 0 is added to prevent any transfer
and immediately call back with success then return without invoking
the transfer_cb API.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-08-01 12:37:40 +02:00
Bjarki Arge Andreasen
e7487f1777 drivers: i2c: enforce i2c stop flag in last i2c_transfer msg
The i2c_transfer API specifies that the I2C_MSG_STOP flag implicitly
is set for the last message in a i2c_transfer(). This is identical to
explicitly setting the I2C_MSG_STOP flag in the last message, which is
what every driver which properly adheres to this specification does.

This commit updates the i2c_transfer() API wrapper to explicitly set
the flag before calling the drivers API implementation, which ensures
the specification is followed, while moving this additional complexity
from the device drivers themselves.

Additinally it checks for the num_msgs being 0, in which case no
transfer shall occur, nor shall any stop condition be set. This removes
an additional check from device drivers.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-08-01 12:37:40 +02:00
Anke Xiao
bd7a6b5d79 samples: sensor: mcux_acmp: add acmp configuration for ke17z
Add acmp pinctrl configuration to support ACMP driver for NXP frdm_ke17z
and frdm_ke17z512, tested 'sample.sensor.mcux_acmp' case.
Update the index.rst to add acmp description for ke17z.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-01 12:37:23 +02:00
Anke Xiao
643e464c76 modules: Kconfig.mcux: remove HAS_MCUX_ACMP
Remove the ‘HAS_MCUX_ACMP’ Kconfig, and also remove it from
driver and soc Kconfig files. It is not needed since we already
depend on 'ACMP' enabled in the dt file, the 'HAS_MCUX_ACMP'
kconfig is a relic of the past before devicetree was stable.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-01 12:37:23 +02:00
Anke Xiao
d96b301de5 dts: arm: nxp: nxp_ke1xz.dtsi: add acmp information
Add acmp driver address and interrupt informations.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-01 12:37:23 +02:00
Francois Ramu
1c59fa5231 doc: release 3.6: no CACHE_MANAGEMENT by default on stm32h7/f7
Mentioning that stm32h7 and stm32F7 series do not have the
CONFIG_CACHE_MANAGEMENT by default. The application must
explicitly set CONFIG_CACHE_MANAGEMENT=y to activate
the cache (Icache, Dcache) on those stm32 series.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-08-01 12:37:14 +02:00
Manuel Aebischer
f1359dd9ed drivers: i2c_dw: Fixes #75463, interrupt routine for i2c target mode
When using the eeprom_target in 16-bit mode on rp2040, some issues in the
addressing have been observed where the read was executed before all writes
where finished.

Signed-off-by: Manuel Aebischer <manuel.aebischer@netmodule.com>
2024-08-01 12:37:05 +02:00
Francois Ramu
d0108b2673 drivers: udc: stm32 usb device controller in sleep mode
Force disabling the USB OTG HS and PHY clock during sleepmode
By default, that clock is enabled by clock gating during sleep
mode. Like stm32H7, it has to be kept running.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-08-01 12:36:58 +02:00
Francois Ramu
ac6bdffd01 drivers: udc: stm32 usb device controller clock and power
Special sequence to enable clock and power for the OTG HS
peripheral of the stm32U59x serie
This code is based on the stm32Cube HAL_HCD_MspInit/DeInit.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-08-01 12:36:58 +02:00
Francois Ramu
7a0c31c975 drivers: usb: stm32 usb device controller in sleep mode
Force disabling the USB OTG HS and PHY clock during sleepmode
By default, that clock is enabled by clock gating during sleep
mode. Like stm32H7, it has to be kept running.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-08-01 12:36:58 +02:00
Francois Ramu
06662fc5cc drivers: usb: stm32 usb device controller clock and power
Special sequence to enable clock and power for the OTG HS
peripheral of the stm32U59x serie
This code is based on the stm32Cube HAL_HCD_MspInit/DeInit.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-08-01 12:36:58 +02:00
Francois Ramu
edcc673d9d boards: st: stm32u5a9 disco kit has a OTG HS peripheral
Enable the USB OTG HS node of the stm32u5a9j_dk board

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-08-01 12:36:58 +02:00
Francois Ramu
e3f9293fc2 dts: arm: stm32u59x serie with OTG HS instance
Add the USB OTG HS node for the stm32U59x/5Ax/5Fx/5Gx devices

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-08-01 12:36:58 +02:00
Francois Ramu
ea6c5f0e85 drivers: usb: stm32 usb device controller correct USB PHY
Set the correct the phy_itface depending on the setting
Save few lines after resetting the priv->pcd structure
with the memset

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-08-01 12:36:58 +02:00
Armando Visconti
8bc00e1420 drivers/sensor: lis2dux12: fix mode when setting odr
In lis2dux12_set_odr(), the call to stmemsc module lis2dux12_mode_set()
API is done with the .fs field left uninitialized, so setting the
underlying device regs in an unproper way.

Suggested-by: Luis Ubieda <luisf@croxel.com>
Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-08-01 12:36:48 +02:00
Tim Lin
0980cc4390 drivers/interrupt: it8xxx2: Register interrupt number 0 to handle
In the it8xxx2 chip, the interrupt for INT0 is reserved. However,in some
stress tests, the unhandled IRQ0 issue occurs. To prevent the system from
going directly into kernel panic, we implemented a workaround by
registering interrupt number 0 and doing nothing in the IRQ0 handler.
The side effect of this solution is that when IRQ0 is triggered, it will
take some time to execute the routine. There is no need to worry about
missing interrupts because each IRQ's ISR is write-clear, and if the
status is not cleared, it will continue to trigger.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2024-08-01 12:36:23 +02:00
Tahsin Mutlugun
387239e667 tests: i2c: i2c_target_api: Add configuration for MAX32680EVKIT
Enable I2C target API tests for MAX32680EVKIT.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-08-01 12:36:14 +02:00
Furkan Akkiz
f3953351c7 tests: drivers: i2c: Add MAX32672EVKIT overlay file
Enable I2C test for MAX32672EVKIT.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-08-01 12:36:14 +02:00
Mert Ekren
3d4490caed tests: drivers: i2c: Add MAX32670EVKIT overlay file
Enable I2C test for MAX32670EVKIT.

Signed-off-by: Mert Ekren <mert.ekren@analog.com>
2024-08-01 12:36:14 +02:00
Tahsin Mutlugun
e396ff82a1 tests: i2c: i2c_target_api: Add configuration for MAX32655EVKIT
Enable I2C target API tests for MAX32655EVKIT.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-08-01 12:36:14 +02:00
Tahsin Mutlugun
72381e5e90 boards: adi: Add I2C to MAX32680EVKIT board driver list
Add I2C into 'index.rst' and '.yaml' files.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-08-01 12:36:14 +02:00
Furkan Akkiz
793ae91cd5 boards: adi: Add I2C to MAX32672 boards driver list
Add I2C into 'index.rst' and '.yaml' file of MAX32672 boards.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2024-08-01 12:36:14 +02:00
Mert Ekren
6f4befe01c boards: adi: Add I2C to MAX32670EVKIT board driver list
Add I2C into 'index.rst' and '.yaml' files.

Signed-off-by: Mert Ekren <mert.ekren@analog.com>
2024-08-01 12:36:14 +02:00
Tahsin Mutlugun
ad38831565 boards: adi: max32655: Enable I2C in MAX32655 boards
Now that I2C support has been added, include it in documentation and
YAML metadata for MAX32655FTHR and MAX32655EVKIT boards.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2024-08-01 12:36:14 +02:00
Marcin Niestroj
460b111fb4 drivers: wifi: esp_at: support listening UDP sockets in active mode
So far receving was possible in active mode, but IP and port information
was not fetched nor propagated to application layer. Support fetching that
information even in active mode, so that using bind() with recvfrom() is
working accordingly.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-08-01 12:36:07 +02:00
Marcin Niestroj
086ae6e84f drivers: wifi: esp_at: move socket allocation to cmd_ipd_parse_hdr()
This is just a step forward to make cmd_ipd_parse_hdr() capable of parsing
IP address and port when CONFIG_WIFI_ESP_AT_PASSIVE_MODE=n. After obtaining
this information (IP and port) it will be simply much easier to write this
information into 'struct esp_socket' directly, instead of passing to upper
layer.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-08-01 12:36:07 +02:00
Marcin Niestroj
0e11b68a32 drivers: wifi: esp_at: utilize esp_pull*() in cmd_ipd_parse_hdr()
Use common utilities for consuming parameters from AT response string.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-08-01 12:36:07 +02:00
Marcin Niestroj
d093783606 drivers: wifi: esp_at: handle ':' in esp_pull()
Treat ':' similar as ',', '\r' and '\n', so that AT response parameter
parsing can be gracefully stopped.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-08-01 12:36:07 +02:00
Marcin Niestroj
1caab70918 drivers: wifi: esp_at: introduce esp_pull_long() helper
Use it to get information about RSSI. In subsequent commits this helper
will be used to get other information as well.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-08-01 12:36:07 +02:00
Marcin Niestroj
806842b759 drivers: wifi: esp_at: s/ntohs/htons/ after parsing port number
'struct sockaddr_in' should contain port number in network byte order. This
means that htons() macro should be used, instead of ntohs().

This was working before since both htons() and ntohs() end up in calling
BSWAP_16().

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-08-01 12:36:07 +02:00
Jukka Rissanen
20a69f6dbf net: wifi: Add iterable_sections header file
This is related to change in commit dacb3dbfeb
("iterable_sections: move to specific header")

Until now iterable sections APIs have been part of the toolchain
(common) headers. They are not strictly related to a toolchain, they
just rely on linker providing support for sections. Most files relied on
indirect includes to access the API, now, it is included as needed.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-08-01 12:36:00 +02:00
Seppo Takalo
e86bdf952d net: lwm2m: Always emit DISCONNECTED event
When LwM2M engine is requested to stop,
emit the disconnected event unconditionally.
There is really no reason to skip the event
on network error, or if we have never been registered.

Fixes #76422

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-08-01 12:35:53 +02:00
Fabio Baltieri
60df679366 debug: thread_analyzer: fix incorrect k_thread_foreach_unlocked argument
Fix the second k_thread_foreach_unlocked argument, it's supposed to be
an instance of ta_cb_user_data as that's what's it casted back to in
thread_analyze_cb. Current code results in an exception and crash for
single core applications.

This is a regression introduced in 1b6e0f6479.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-08-01 12:35:45 +02:00
Daniel Leung
d2b072078d debug: thread_analyzer: fix casting pointer to int warning
In thread_analyzer_auto(), it casts one function argument
directly into unsigned int. However, on 64-bit platforms,
the compiler complains about casting from pointer of
different size (-Wpointer-to-int-cast). So cast it first to
uintptr_t before casting it into unsigned int.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-01 12:35:34 +02:00
Benjamin Cabé
704000eb58 ci: doc-build: compress HTML docs more efficiently
Compressing doc build to upload it to AWS S3 is talking several minutes.
Use -T0 to run xz in parallel mode to speed up the process.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-01 09:33:07 +01:00
Erwan Gouriou
ab850deb64 drivers: flash: stm32h7: Fix unused variable warning
This variable is only used under DUAL_BANK condition and a warning
is generated in !DUAL_BANK case, so move its definition accordingly.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-08-01 09:15:48 +01:00
Jordan Yates
6bbb2079f2 samples: usb: mass: filter by supported disk types
Some boards claim `sdhc` support but use the `zephyr,mmc-disk`
instead of `zephyr,sdmmc-disk` compatible, with the former not being
compatible with this sample.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-01 09:15:31 +01:00
Jordan Yates
8dd90f52f3 samples: usb: mass: move check to compile time
Move the check for valid disk drivers to compile time to enable twister
to run the configure step without errors.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-01 09:15:31 +01:00
Benjamin Cabé
45e51c08ab doc: fixed :c:enum: used in lieu of :c:enumerator:
While Breathe seems to not care,  the proper role to reference an
enumerator is :c:enumerator:

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-01 09:14:38 +01:00
Benjamin Cabé
b7166032cc doc: misc fixes to C domain types
Breathe is not very strict about the types used to reference C domain
objects (ex. referencing a struct using `:c:type:` would work, and vice
versa) but other tooling might be. This commit fixes some of such
incorrectly documented elements.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-01 09:14:38 +01:00
Benjamin Cabé
8e6b44ce66 doc: net: fix Sphinx C domain roles usage
use the proper types/syntax for referencing C elements from Networking
docs

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-01 09:14:26 +01:00
Felipe Neves
804db65928 drivers: input: cst816s: read the gesture-ID register
And report the gestures as specific device  event type
to the input subsystem.

Signed-off-by: Felipe Neves <ryukokki.felipe@gmail.com>
2024-08-01 09:14:19 +01:00
Felipe Neves
acaee9f019 dt-bindings: input: introduce INPUT_EV_DEVICE input code
For reporting specific input device events.

Signed-off-by: Felipe Neves <ryukokki.felipe@gmail.com>
2024-08-01 09:14:19 +01:00
Szymon Janc
89b129742d tests: bluetooth: tester: Enable DIS service
Previously autopts was incorrectly using GATT server service to
construct DIS.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-08-01 09:13:55 +01:00
Kamil Piszczek
f9a5699bd8 Bluetooth: DIS: integrate app version into FW revision characteristic
Integrated the application version feature of the build system with
the default configuration of the Bluetooth DIS module and its Firmware
Revision characteristic.

The firmware revision string now defaults to APP_VERSION_TWEAK_STRING
if the application version feature is used in a project. This specific
version format is used to unify version formatting with other parts of
Zephyr like the MCUboot module and its versioning Kconfig:
CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2024-08-01 09:13:39 +01:00
Matt Rodgers
47fbb8512f net: coap_client: allow application to add block2 option to requests
Allow an application to add a Block2 option to an initial request for a
resource. For any subsequent requests as part of a blockwise transfer,
drop the application-added Block2 option since the coap_client must
append a Block2 option with updated NUM and SZX fields based on the
server response.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-08-01 09:13:32 +01:00
Chun-Chieh Li
ed49d7c5e9 drivers: hwinfo: add numaker m2l31x for device id
Add Nuvoton NuMaker M2L31 series for device id

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2024-08-01 09:13:06 +01:00
Gero Schwäricke
db1adf4c7e boards: hardkernel: odroid_go: fix PSRAM size
Booting the hello world sample fails with an error on the odroid go:

  I (124) quad_psram: This chip is ESP32-D0WD
  I (124) esp_psram: Found 4MB PSRAM device
  I (124) esp_psram: Speed: 40MHz
  I (125) esp_psram: PSRAM initialized, cache is in normal (1-core) mode.
  SPIRAM size is less than configured size, aborting.
  abort()

The device features only 32 Mbit PSRAM (4 MiB), see

  dts/xtensa/espressif/esp32/esp32_wrover_e_n16r4.dtsi

included from

  boards/hardkernel/odroid_go/odroid_go_procpu.dts

Signed-off-by: Gero Schwäricke <gero.schwaericke@posteo.de>
2024-08-01 09:12:47 +01:00
Nicolas Pitre
d3bf90e641 arm64: linker: remove ARM32 remnants
- .glue7, .glue7t, .vfp11_veneer and .v4_bx are ARM32-isms

- ARM64 needs 8-bytes alignment

- remove useless/unsuited comments

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-08-01 09:12:36 +01:00
Armando Visconti
cdce68e4c8 boards: st: sensortile_box_pro: remove hts221 sensor
Remove HTS221 sensor support from sensortile_box_pro as it has been ruled
out from final version. In fact, HTS221 is in the process of being
terminated and is not recommended for new design. The candidate replacement
is SHT40 from Sensirion, which is available also as a DIL24 adapter, which
can be plugged on sensortile_box_pro board.

See SENSEVAL-SHT4XV1:
https://www.st.com/en/partner-products-and-services/senseval-sht4xv1.html

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-08-01 09:12:26 +01:00
Joakim Andersson
07c0c59655 samples: stm32: mco: Add example on how to configure MCO
The documentation does not provide any guides on how to configure
the MCO pin, and responsebility is given to the application.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-08-01 09:12:13 +01:00
Joakim Andersson
7ddcfbdc4a clock_control: Add MCO support for STM32 U5 series
Add microcontroller clock output (MCO) support for the STM32
U5 series of devices.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-08-01 09:12:13 +01:00
Fabian Blatz
23435de71e drivers: input: cst816s: Configure before enabling interrupts on init
During driver init make sure that the IRQ_CTL field is set before enabling
the interrupts. Fixes the i2c read error on startup.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-08-01 09:12:01 +01:00
Ian Morris
f5f7b18db2 boards: shields: Add support for Mikroe BLE TINY Click shield
Add support for the Mikroe BLE TINY Click shield that contains the
Renesas DA14531 Bluetooth LE Module.

Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
2024-08-01 09:11:54 +01:00
Henrik Brix Andersen
9af6ae50f4 usb: device_next: add usbd_device_set_bcd_device()
Add usbd_device_set_bcd_device() for setting the bcdDevice device
descriptor value.

The default bcdDevice is set to the version of Zephyr being used, which may
or may not be what a downstream USB device wants it to be.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-08-01 09:11:44 +01:00
Henrik Brix Andersen
196c9635d8 usb: device_next: rename usbd_device_set_bcd()
Rename usbd_device_set_bcd() to usbd_device_set_bcd_usb() to make room for
other BCD encoded values being set.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-08-01 09:11:44 +01:00
Francois Ramu
3fb0d0bf80 samples: drivers: jesd216 density expressed in bits
In the sample, print the jesd216_bfp_density is expressed
in bits. add the unit to avoid confusion with the Flash
density expressed in bytes (dw2 entry)
Page size is for programming expressed in bytes, meaning
program execution on bytes basis or here page basis.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-08-01 09:11:30 +01:00
Francois Ramu
87af1984f5 drivers: flash: stm32 qspi flash size in dual flash mode
When  QSPI configuration is the dual-flash, the total
flash size and erase size are doubled. This is handled
with a STM32_QSPI_DOUBLE_FLASH factor which doubles
the values of one qspi component.
Note that SFDP table is for ONE flash component.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-08-01 09:11:30 +01:00
Fabio Baltieri
600217c52f usb: device_next: hid: move few pointer to a config struct
Some of the fields currently in hid_device_data are constant.

Move them to a const config struct to save some RAM and drop the rest of
the data static initializers to runtime to save some flash as well.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-08-01 09:11:17 +01:00
Jacob Winther
a564bee106 boards: Add code owner for feather_nrf52840
Add myself as owner for adafruit/feather_nrf52840 as there is
no current owner.

Discussed in PR 76135.

Signed-off-by: Jacob Winther <jacob@9.nz>
2024-08-01 09:11:11 +01:00
Jacob Winther
b6ed4ba761 boards: Add Adafruit Feather nrf52840 Sense
Add support for board based on the Express variant.
Board uses uf2 as it has no swd adaptor.

Signed-off-by: Jacob Winther <jacob@9.nz>
2024-08-01 09:11:11 +01:00
Jacob Winther
4e830ec19f boards: rename adafruit_feather
Adafruit feather is a generic name that could match many
boards. Renamed to reflect actual board name:
- Adafruit Feather nrf52840 Express

There are two boards based on the nrf52840, so keeping directory
generic to support additional board defs with mostly shared dts.

Signed-off-by: Jacob Winther <jacob@9.nz>
2024-08-01 09:11:11 +01:00
Francois Ramu
83b3552050 samples: subsys: watchdog task running on the stm32f091 nucleo
Add the configuration with a board overlay to execute
the samples/subsys/task_wdt on the nucleo_f091rc
Adjust the window-watchdog clock to PASS the test.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-08-01 09:11:01 +01:00
Francois Ramu
ed08755dde dts: arm: stm32 mcu disable the iwdg node in the dtsi
Disable the iwdg node of the stm32f0 and stm32wb devices
in their .dtsi file, like other devices

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-08-01 09:11:01 +01:00
Francois Ramu
f408184b01 boards: st: stm32h750 disco kit rd/wr the sdram2
Set the Mode Register definition of the SDRAM command Mode
register to 0x230 when programming the CAS_LATENCY
of the external memory mode.
Adjust the delay on read data path.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-08-01 09:09:34 +01:00
Fin Maaß
f937e548a7 doc: releases: mention change of ethernet driver.
Mention the change of the litex
ethernet driver.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-01 08:59:37 +01:00
Fin Maaß
aeea701b2b dts: bindings: litex: rename eth comatible
Rename it from litex,eth to litex,liteeth
to reflect the new name of the driver.

Zero got removed from the litex
ethernet compatible, as it now supports
multiple instances.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-01 08:59:37 +01:00
Fin Maaß
239df9ce69 drivers: ethernet: litex: more instances
be able to use multiple instances of the
litex ethernet (liteeth) driver.

add support for vlan.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-01 08:59:37 +01:00
Fin Maaß
6ba5f6db60 drivers: ethernet: litex: rename driver
For more consistency, rename the liteeth driver to litex.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-01 08:59:37 +01:00
Fin Maaß
4ab40f442e drivers: intc: litex: add helper for interrupts
add helper for interrupts, so multiple
instances of peripherals work.

this way out-off-tree peripherals are supported.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-01 08:59:37 +01:00
Grant Ramsay
4a21035aa5 boards: shields: Allow adding source code to shields
Add shield CMakeLists.txt if it exists.
Useful for one-off shields that require C code

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2024-08-01 08:57:33 +01:00
Gerard Marull-Paretas
b5a3f7532f boards: nrf53*: remove unnecessary TF-M includes
After 6a14a0233b these TF-M includes
should not be necessary.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-01 08:56:56 +01:00
Gerard Marull-Paretas
d9a5a220b7 samples: s/CONFIG_BOARD_ENABLE_CPUNET/CONFIG_SOC_NRF53_CPUNET_ENABLE/
CONFIG_BOARD_ENABLE_CPUNET is deprecated.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-01 08:56:56 +01:00
Gerard Marull-Paretas
7123f142c3 drivers: clock_control: nrf: use SOC_NRF53_CPUNET_ENABLE
Board level option is deprecated.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-01 08:56:56 +01:00
Gerard Marull-Paretas
4a1834cef7 boards: nrf53: remove redundant cpunet initialization code
This is now handled at SoC level, avoiding code duplicates.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-01 08:56:56 +01:00
Gerard Marull-Paretas
4c84a6f658 soc: nordic: nrf53: introduce deprecated BOARD_ENABLE_CPUNET
So that existing code does not break when this option gets removed from
boards.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-01 08:56:56 +01:00
Gerard Marull-Paretas
ffe10833ea drivers: bluetooth: hci: nrf53: use nrf_spu_extdomain_set
Instead of hardcoded values and device instances.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-01 08:56:56 +01:00
Gerard Marull-Paretas
f611fdd6ad soc: nordic: nrf53: add option to enable cpunet
When not using BT, users may want to enable the cpunet core. Until now,
this has been done at board level (so duplicating unnecessary code)
using CONFIG_BOARD_ENABLE_CPUNET. The board-level options were usually
enabled automatically for BT, however, this was unnecessary as BT driver
already takes care of the setup.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-01 08:56:56 +01:00
Gerard Marull-Paretas
8bc461ebe0 drivers: bluetooth: hci: nrf53: simplify DEBUG_SETUP code
debug.h module provides dummy implementation when necessary.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-01 08:56:56 +01:00
Gerard Marull-Paretas
5a095d42a7 bluetooth: controller: nordic: provide dummy DEBUG_SETUP
So that clients do not have to understand in which situation it is not
defined.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-01 08:56:56 +01:00
Gerard Marull-Paretas
baad622063 bluetooth: controller: nordic: simplify board guarding
Since HWMv1, we also have CONFIG_$BOARD Kconfig symbols defined, ie, no
SoC/core/variant needed.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-01 08:56:56 +01:00
Emil Gydesen
1b83555d4c Samples: Bluetooth: CAP Initiator broadcast support
Add broadcast support to the CAP initiator sample.

This adds new sample-specific Kconfig options to help
select the right Kconfig options based on whether
unicast, broadcast or both is being used.

This also moves common TX functionality
to cap_initiator_tx to reuse the same TX thread
and functionality.

Finally there is a babblesim implemented for
the broadcast. There is not broadcast support for the
CAP acceptor sample yet, so this test only verifies that we
get the TX complete events from the controller.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-08-01 08:53:08 +01:00
Pisit Sawangvonganan
6211de87c0 net: mqtt: improve decoder buffer handling
Improve buffer handling logic to use local variables extensively.

This change reduces the number of pointer dereferences, which leads
to more efficient runtime and helps reduce the code size.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-31 13:08:28 +02:00
Pisit Sawangvonganan
45282a41c1 net: mqtt: improve encoder buffer handling
Improve buffer handling logic to use local variables extensively.

This change reduces the number of pointer dereferences, which leads
to more efficient runtime and helps reduce the code size.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-31 13:08:28 +02:00
Robert Lubos
349bf81e00 net: tcp: Keep track of recv window size change since last ACK
Windows TCP stack has a peculiar behavior - when running iperf, it will
fill out the RX window almost entirely, but will not set PSH flag on
packets. In result, our stack would delay the ACK and thus window
update, affecting throughputs heavily.

In order to avoid that, keep track of the most recent window size
reported to the peer, and reduce it when receiving new data. In case the
RX window, as seen from the peer perspective, drops below certain
threshold, and the real RX window is currently empty, send an ACK
immediately when updating window, so that peer can continue
with sending data.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-31 12:56:52 +02:00
TOKITA Hiroshi
e31588fcca tests: kconfig: Add tests for Kconfig arithmetrics
Add tests about kconfig function for arithmetric.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-07-31 12:56:25 +02:00
TOKITA Hiroshi
f99f862a79 scripts: kconfig: Add integer arithmetic functions
Added functions for integer arithmetic operations
(add, sub, mul, div, mod, inc, dec)

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-07-31 12:56:25 +02:00
Rubin Gerritsen
a4e43d013c Bluetooth: Samples: Use string printing functions for error codes
When developing Bluetooth applications, you typically run into some errors.
If you are an experienced Bluetooth developer, you would typically know
how to translate the error codes into string representations.
Others might not.

This commit to adds string printing of error codes for all
samples to make them more user-friendly.

Several formatting alternatives were considered. The chosen alternative
balances code readability and FLASH size (with and without string
printing).

Example output from the peripheral_hids sample when the
peer rejects pairing:

```
Bluetooth initialized
Bluetooth authentication callbacks registered.
Advertising successfully started
Connected 5E:67:02:D3:1C:DB (random)
Security failed: 5E:67:02:D3:1C:DB (random) \
level 1 err 6 BT_SECURITY_ERR_PAIR_NOT_ALLOWED
Disconnected from 5E:67:02:D3:1C:DB (random), \
reason 0x13 BT_HCI_ERR_REMOTE_USER_TERM_CONN
```

Other alternatives that were considered:

- Use of parantheses:
```
// strings enabled
Security failed: 5E:67:02:D3:1C:DB (random) level 1 \
err BT_SECURITY_ERR_PAIR_NOT_ALLOWED(6)
Disconnected from 5E:67:02:D3:1C:DB (random), reason \
BT_HCI_ERR_REMOTE_USER_TERM_CONN(0x13)
// strings disabled
Security failed: 5E:67:02:D3:1C:DB (random) level 1 err (6)
Disconnected from 5E:67:02:D3:1C:DB (random), reason (0x13)
```

- Spaces and parantheses:
```
// strings enabled
Security failed: 5E:67:02:D3:1C:DB (random) level 1 \
err BT_SECURITY_ERR_PAIR_NOT_ALLOWED (6)
Disconnected from 5E:67:02:D3:1C:DB (random), \
reason BT_HCI_ERR_REMOTE_USER_TERM_CONN (0x13)
// strings disabled
Security failed: 5E:67:02:D3:1C:DB (random) level 1 err  (6)
Disconnected from 5E:67:02:D3:1C:DB (random), reason  (0x13)
```

- Parantheses around everything:
```
// strings enabled
Security failed: 5E:67:02:D3:1C:DB (random) level 1 \
err (BT_SECURITY_ERR_PAIR_NOT_ALLOWED(6))
Disconnected from 5E:67:02:D3:1C:DB (random), \
reason (BT_HCI_ERR_REMOTE_USER_TERM_CONN(0x13))
// strings disabled
Security failed: 5E:67:02:D3:1C:DB (random) level 1 err ((6))
Disconnected from 5E:67:02:D3:1C:DB (random), reason ((0x13))
```

- Error code first, then string representation:
```
// strings enabled
Security failed: 5E:67:02:D3:1C:DB (random) level 1 \
err 6 (BT_SECURITY_ERR_PAIR_NOT_ALLOWED)
Disconnected from 5E:67:02:D3:1C:DB (random), reason \
0x13 (BT_HCI_ERR_REMOTE_USER_TERM_CONN)
// strings disabled
Security failed: 5E:67:02:D3:1C:DB (random) level 1 err 6 ()
Disconnected from 5E:67:02:D3:1C:DB (random), reason 0x13 ()
```

- Apostrophes around error printing:
```
// strings enabled
Security failed: 5E:67:02:D3:1C:DB (random) level 1 \
err "BT_SECURITY_ERR_PAIR_NOT_ALLOWED (6)"
Disconnected from 5E:67:02:D3:1C:DB (random), reason \
"BT_HCI_ERR_REMOTE_USER_TERM_CONN (0x13)"
// strings disabled
Security failed: 5E:67:02:D3:1C:DB (random) level 1 err " (6)"
Disconnected from 5E:67:02:D3:1C:DB (random), reason " (0x13)"
```

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-07-31 12:56:11 +02:00
Piotr Krzyzanowski
de664204a7 tests: drivers: pwm: extend test coverage
Extend nrf pwm driver test coverage by testing invalid port number

Signed-off-by: Piotr Krzyzanowski <piotr.krzyzanowski@nordicsemi.no>
2024-07-31 12:55:58 +02:00
Sandra Schmidt
a5a57d829e boards: st: add nucleo_h503rb support
Add board support for nucleo_h503rb.
STM32CubeProgrammer and pyocd are supported as runner.

The following samples were tested:
- samples/hello_world
- samples/basic/blinky
- samples/basic/button
- samples/subsys/task_wdt

Signed-off-by: Sandra Schmidt <sandra.schmidt@arrow.com>
2024-07-31 12:55:50 +02:00
Fabio Baltieri
7ab625c43b doc: input: add a list of general purpose drivers
Add a list of general purpose input drivers, hopefully this will make
them easier to be discovered by users.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-07-31 12:55:38 +02:00
Alberto Escolar Piedras
25b051cf56 doc: release: Remove v3.5.0 from the list of supported releases
3.5.0 went out of support end of August.

Note the end date was stated as either 2024/07/31 or 2024/07/26
in different places.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-31 12:55:29 +02:00
Fabio Baltieri
9df289e7d4 doc: migration-guide: add few input points
Add a point for the updated callback API as well as the analog axis
inversion property rename.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-07-31 12:55:11 +02:00
Fabio Baltieri
61129d8fd2 input: longpress, keymap: use an explicit callback name
Use an explicit callback name so that multiple instances of this do not
result in a:

redefinition of '_input_callback__longpress_cb'

error. This used to work when it was using unique generated wrappers,
but now it needs an index in the callback name.

Use it in one of the API tests as well, just in case.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-07-31 12:55:11 +02:00
Fabio Baltieri
6d1b880fdc input: add a INPUT_CALLBACK_DEFINE_NAMED macro
Add a INPUT_CALLBACK_DEFINE_NAMED macro, same as INPUT_CALLBACK_DEFINE
but with custom struct name, useful for declaring multiple callbacks
with different user_data on the same callback function.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-07-31 12:55:11 +02:00
Fabio Baltieri
716fa268f4 input: add a user_data pointer to the callback
Add a void *user_data pointer to the input callback structure. This is
useful for driver to get back the driver data structure and avoid
defining wrapper functions.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-07-31 12:55:11 +02:00
Vinayak Kariappa Chettimada
8bf604ee10 Bluetooth: Controller: Fix missing BT_CTLR_BROADCAST_ISO_ENC
Fix missing BT_CTLR_BROADCAST_ISO_ENC conditional compile.

Relates to commit 2d49080cb8 ("Bluetooth: Controller: Fix
BT_CTLR_LE_ENC conditional compilation").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-07-31 12:55:04 +02:00
Jukka Rissanen
03885d1cbf net: if: No need to join mcast groups if interface IPv6 is disabled
If IPv6 is not enabled for a given network interface, then there
is no need to try to join IPv6 multicast groups as it will just
cause an error print which is pointless in this case.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-07-31 12:40:32 +02:00
Emil Gydesen
427e506d5c tests: Bluetooth: Remove .bls files
The .bls files are no longer useful after the BT SIG switched
qualification tool. This will still remain in the git history
and can safely be removed.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-31 12:40:24 +02:00
Konrad Derda
4e7bf281a1 net: ipv6: routing: decide whether to set interface's LL address
While routing between interfaces source Link-Local L2 address is set
for a packet. However, it should not be done for some of the interfaces.

This commit adds helper function to check this condition in runtime.

Signed-off-by: Konrad Derda <konrad.derda@nordicsemi.no>
2024-07-31 12:40:16 +02:00
Konrad Derda
0ac5ab4a4e net: ipv6: routing: do not add route to original iface without ND
When packet is routed between interfaces new routing entry is added
to the table. This should not be done for interfaces that do not
support Neighbor Discovery protocol as they are not keep potential
neighbors in the common table.

Signed-off-by: Konrad Derda <konrad.derda@nordicsemi.no>
2024-07-31 12:40:16 +02:00
Jonathon Penix
4ddd3ebd51 samples: external_lib: Include --target in exported build flags
Appropriately setting the `--target` flag is necessary when using clang
and building for a target other than the default. Zephyr generally
accomplishes this by setting the CMAKE_<LANG>_COMPILER_TARGET variables and
allowing cmake to automatically provide the `--target` flag when building.

For the external_lib sample, however, cmake can't add the flag and it was
not otherwise exported. As such, clang typically threw errors when building
this sample for any non-default targets due to mismatches between
target-specific flags and the default target.

To fix this, ensure we select the correct target by checking if
CMAKE_C_COMPILER_TARGET has been defined and adding
`--target=<triple>` to the list of flags that are exported if so.

Signed-off-by: Jonathon Penix <jpenix@quicinc.com>
2024-07-31 10:08:33 +02:00
Manuel Argüelles
6c7d836b0c drivers: nxp: convert SIUL2 drivers to native
Convert pin control, GPIO and external interrupt controller drivers
based on SIUL2 peripheral to native drivers. This must be done in a
single commit to preserve atomicity, as these drivers depend on each
other.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-07-31 10:08:24 +02:00
Gerhard Jörges
1eed39e4ac tests: net: http_server: Add static fs tests
Add a test that checks whether the extensions are correctly assigned to
content types.

Signed-off-by: Gerhard Jörges <joerges@metratec.com>
2024-07-31 10:08:16 +02:00
Gerhard Jörges
e55278a87b net: lib: http_server: add static fs resource
adds filesystem as a resource for the http_server which serves static
(gzipped) files from a filesystem to the client.

Signed-off-by: Gerhard Jörges <joerges@metratec.com>
2024-07-31 10:08:16 +02:00
Fabian Pflug
055800ba76 net: l2: ieee802154: test association permit bit
Beacon frames can be received with association permit bit set or not,
but the correct information should be in the data given to the
application.

Signed-off-by: Fabian Pflug <fabian.pflug@grandcentrix.net>
2024-07-31 10:08:03 +02:00
Fabian Pflug
240223971f net: l2: ieee802154: decrease time for testcase
When trying to implement a testcase for the previous commit, an error
occoured, that stopped the test from executing.

As the tests require a full IPv6 stack, the usual router solicitation
(RS) messages will be scheduled by the net stack. To avoid conflict
with RS messages the active scan test must be kept shorter than one
second, otherwise a race condition with additional packages being
reported by the fake driver might occur.

Signed-off-by: Fabian Pflug <fabian.pflug@grandcentrix.net>
2024-07-31 10:08:03 +02:00
Fabian Pflug
31e91794de net: l2: ieee802154: mgmt: allow beacons without association bit
The Association permit bit shall be set to zero if the coordinator does
not accept association requests.
Not accepting association request ist not a reason to filter the
beacons from this coordinator during network scan. It is still a
network, just one you cannot associate with.

Signed-off-by: Fabian Pflug <fabian.pflug@grandcentrix.net>
2024-07-31 10:08:03 +02:00
Matt Rodgers
44d39e2028 net: coap_client: limit payload size during block transfer to block size
Limit the coap payload size passed up to the application callback to the
block size, when a block transfer is in progress and the current payload
is not the final block.

If the current payload is not part of a block transfer, or is the final
block of a transfer, then the full payload can be passed to the
application to avoid having to make another request over the network for
data that has already been received.

This avoids a problem raised in issue #76089, where a payload longer
than CONFIG_COAP_CLIENT_MESSAGE_SIZE causes the same data to be passed
to the application callback twice (once in the large packet, and once in
the next block which must have an offset that is a multiple of the block
size).

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-07-31 10:07:45 +02:00
Matt Rodgers
93f871e2d1 net: coap_client: handle truncation of received data
Use the MSG_TRUNC flag to check the total length of UDP packets
receieved by the coap_client, and hence check if the receive buffer
contains the whole message, or if it is truncated.

If the message is truncated, then use a blockwise transfer to fetch the
rest of the data.

This is related to issue #76089.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-07-31 10:07:45 +02:00
Rubin Gerritsen
d8f7f2deb7 Bluetooth: Document the execution context of bt_ready_cb_t
This should make it more clear for users that they shouldn't
run blocking code in the callback.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-07-31 10:07:37 +02:00
Pisit Sawangvonganan
16386d7b5f net: shell: use shell_xxx_impl in PR ... PR_WARNING macros
Due to the introduction of `shell_xxx_impl` wrapper functions in
PR #75340, we can minimize caller overhead by eliminating direct
`color` parameter passing.

This is achieved by using `shell_print_impl`, `shell_error_impl`,
`shell_info_impl` and `shell_warn_impl` instead of `shell_fprintf`.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-31 10:07:29 +02:00
Bjarki Arge Andreasen
279f241e2f drivers: gnss: update drivers to select reference frame
Update in-tree device drivers to depend on the reference frame
datums they support.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-07-31 10:07:19 +02:00
Bjarki Arge Andreasen
b9fbc4f936 drivers: gnss: add choice for GNSS reference frame datum
Add choice symbol for reference frame datum from which GNSS will
produce navigation data. All in-tree device drivers use WGS84 by
default, for now, this is the only available option until support
for other datums are added.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-07-31 10:07:19 +02:00
Bjarki Arge Andreasen
0a735dce52 drivers: gnss: api: Update docs to allow for leap second
Update the struct gnss_time millisecond member to specify
that a leap second is a valid value.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-07-31 10:07:19 +02:00
Benjamin Cabé
ef830d7a5e doc: fix 404 error with Zephyr project charter
The project charter has apparently changed location on
the main zephyrproject.org website.
This fixes a couple occurences of the old URL.

fixes #76433

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-07-31 10:07:11 +02:00
Jordan Yates
ccb616c967 cmake: flash: remove references to cache
The `create_runners_yaml` function no longer saves the yaml file
location in the cmake cache since 5b4c8945.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-30 18:31:19 +01:00
Pieter De Gendt
ac983f633e net: lib: http: Use Kconfig constants
Replace Kconfig values with UINT32_MAX

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-07-30 18:31:11 +01:00
Rahul Arasikere
6c4136812c drivers: ethernet: Update STM32 Ethernet driver to support MDIO if enabled.
Moved the definition of the phy device from depending on stm32hx
series SOC to its own #if...#else...#endif. This way mdio support
can be enabled on any stm32 soc that supports it by defining the
mdio node in the devicetree.

I have tested this in a custom board.

Signed-off-by: Rahul Arasikere <arasikere.rahul@gmail.com>
2024-07-30 18:31:02 +01:00
Alberto Escolar Piedras
8b01f83157 github: Update security page for v3.7.0 release
Updates the GitHub security page with the current supported versions
after the v3.7.0 release.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-30 18:30:41 +01:00
Robert Lubos
3eafc19835 tests: net: http_server: Remove harness requirement
The HTTP server tests are self-contained, they do not require network
environment to execute, hence should not specify "harness: net".

The consequence of specifying the harness was that HTTP server tests in
the CI were only built, and not executed, which doesn't make much sense.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-30 18:30:36 +01:00
Filip Kokosinski
81cb80d923 samples/synchronization: fix thread b pinning
This commit adds a brief thread b suspend while the sample sets its
affinity mask.

If the call to `k_thread_cpu_pin` is being made while the thread is
actively running, then we get `-EINVAL` and the affinity mask is left
unchanged.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-07-30 18:30:30 +01:00
Rubin Gerritsen
39a70be4a0 Bluetooth: Only enable data length extensions when needed
We should disable the feature when it is not needed to
save flash and RAM.
There is no point in enabling data length extensions
when the maximum packet size used is always smaller or equal
to 27 bytes. Then data length updates would only use
parameters (octets=27, time=T) where T is some supported value
which would not improve throughput or power consumption.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-07-30 18:30:22 +01:00
Rubin Gerritsen
063cf397ed bluetooth: controller: Enable data length update in ctrl_collision test
The test expects this feature to be enabled.
We should therefore enable explicitly instead of relying on
default values.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-07-30 18:30:22 +01:00
Eivind Jølsgard
697588f4df boards: nordic: nrf9160dk: Correct board check for nrf52840_reset
With HWMv2 CONFIG_BOARD_NRF9160DK_NRF9160 is not defined when building
the non-secure target, so it has to be specified.

Signed-off-by: Eivind Jølsgard <eivind.jolsgard@nordicsemi.no>
2024-07-30 18:30:13 +01:00
Fabio Baltieri
2455291da8 samples: button: add a note about the input subsystem and samples
The button sample is really a gpio interrupt sample, one may easily miss
the debounced driver and think it's not provided.

Add a note in the basic button sample documentation to refer to the
input subsystem doc and sample.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-07-30 18:29:50 +01:00
Christophe Dufaza
2b2a0e04b2 west: blobs: verify fetched blobs after downloading
Running 'west blobs fetch' does not verify the digest of downloaded files:
1. if the checksum of the previously downloaded file does match
   that in the blob metadata (status BLOB_PRESENT), do nothing
2. if the checksum of the previously downloaded file does not match
   that in the blob metadata (status BLOB_OUTDATED),
   download the "up to date" file
3. if the blob has not yet been downloaded (status BLOB_NOT_PRESENT),
   download it

None of the 2) and 3) code paths will verify that the checksum of the file
just downloaded actually matches the digest in the blob's metadata.

In the event that the metadata of a module is incorrect, then the user
will not notice anything, and may rely on an unexpected binary,
e.g. a static library for a different architecture.

According to the Binary Blobs documentation [1], the expected
behavior is to check the blob digest after downloading.

[1] Fetching blobs, Zephyr 3.6.0 (still applies to Zephyr 3.7.0rc3)
docs.zephyrproject.org/3.6.0/contribute/bin_blobs.html#fetching-blobs

Signed-off-by: Christophe Dufaza <chris@openmarl.org>
2024-07-30 18:29:39 +01:00
Christophe Dufaza
ae9326c920 west: blobs: prefer constants to literals for blob status
Replace blob status literals with the corresponding
constants defined in zephyr_module.

Signed-off-by: Christophe Dufaza <chris@openmarl.org>
2024-07-30 18:29:39 +01:00
Johann Fischer
043aa837fd drivers: udc_stm32: remove wrong header and fix udc_ep_enable()
Driver includes wrong header zephyr/usb/usb_device.h and uses defines
from include/zephyr/drivers/usb/usb_dc.h.
Also fix udc_ep_enable() implementation in general. HAL_PCD_EP_Open()
takes the ep_type parameter as uint8_t integer type and the shim driver
should not just pass int type.
It is recommended that drivers use ep_cfg or cfg for struct
udc_ep_config, fix this as well.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-30 18:29:26 +01:00
Francois Ramu
9ec7697bdb drivers: usb: stm32 udc driver get the global otg interrupt
The global otg interrupt hs/fs is enabled by the udc_stm32
driver. Get it in the list of interrupts of the OTG node.
Use UDC_STM32_IRQ naming.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-07-30 18:29:17 +01:00
Benjamin Cabé
0f05f58bf5 boards: disco_l475_iot1: fix arduino_i2c config
disco l475 board exposes I2C3 on standard Arduino Uno pins A4/A5,
not I2C1.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-07-30 18:28:59 +01:00
Rahul Arasikere
cc11b26a7d soc: st: stm32f765xx: Correct total number of IRQS.
The total number of IRQs for this chip is 110.
Refer to the reference manual table 46 for IRQs.

Signed-off-by: Rahul Arasikere <arasikere.rahul@gmail.com>
2024-07-30 18:28:53 +01:00
Anke Xiao
ef10a9b23b tests: drivers: gpio: gpio_basic_api: add ke17z overlay file
Add frdm_ke17z_fgpio.overlay to add fgpio configuration, and
add update testcase.yml to add FGPIO driver test for frdm_ke17z
and frdm_ke17z512 platforms.
Updated ke17z512 gpio test pins to avoid conflicts with I2C pin.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-07-30 18:28:43 +01:00
Anke Xiao
22c6f32a1f dts: arm: nxp: nxp_ke1xz.dtsi: add FGPIO support
Add FPIO support for NXP frdm_ke17z and frdm_ke17z512,
the Fast GPIO(FGPIO) and GPIO share physical pins on the board.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-07-30 18:28:43 +01:00
Lasse Fröhner
08ad963589 boards: st: nucleo_g431rb: fix user button polarity
The B1 user button has an active-high polarity, but was configured
active-low in the DTS file. This commit fixes that.

Fixes #75867

Signed-off-by: Lasse Fröhner <lasse@starcopter.com>
2024-07-30 18:28:26 +01:00
Pieter De Gendt
0b453c6cdc tests: drivers: uart: uart_emul: Add device emulation test
Add an emulated UART device test case. Demonstrate using the
zephyr,uart-emul bus for passing data to an emulated implementation for a
UART device driver.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-07-30 18:28:17 +01:00
Pieter De Gendt
8bbb88999b tests: drivers: uart: uart_emul: Fix RX remaining check
The UART interrupt emulation test checks the wrong variable for remaining
RX bytes.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-07-30 18:28:17 +01:00
Pieter De Gendt
92019b1dac emul: Support UART device emulation
Add support to the existing UART emulated bus, to have a client device
emulator.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-07-30 18:28:17 +01:00
Declan Snyder
804d383854 MAINTAINERS: Fix NXP Drivers missing some drivers
Some NXP drivers were not being associated with any
NXP maintainer areas. Fix by using regex to include them.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-30 18:27:57 +01:00
Vinayak Kariappa Chettimada
6808f344f0 Bluetooth: Controller: Fix missing BIS data enqueue for skipped events
Fix implementation to consider event latencies due to
BIG events being skipped due to overlap with other state or
role, and generate any received/buffered pre-transmissions
towards the Host.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-07-30 18:27:46 +01:00
Vinayak Kariappa Chettimada
cf9a956c54 Bluetooth: Controller: Fix missed PTO subevent for subsequent BIS
Fix missing PTO subevent reception for second or more BISes
when current payload count associated PDUs where already
received in previous ISO events as pre-transmissions.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-07-30 18:27:46 +01:00
Krzysztof Chruściński
fb2d9ecde5 samples: zbus: work_queue: Enable synchronous printk
twister expects regex print from logging used in the sample. Sample
is using minimal logging which does not protect against logs being
interleaved if printed from various contexts. Minimal logging is
just mapping of logging API to printk. Add CONFIG_PRINTK_SYNC to
ensure that printing of each log is synchronous (with lock) and
logs are never interleaved.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-07-30 18:27:40 +01:00
Francois Ramu
a4400dbe6c boards: st: stm32h5 boards has openOCD runner from upstream
Define the support /openocd.cfg and the board.cmake to add the openOCD
as runner for the stm32h5x boards.
Note that the openOCD is hack downloaded and build from
from https://github.com/STMicroelectronics/OpenOCD

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-07-30 18:27:31 +01:00
Derek Snell
765a3bc927 boards: nxp: mimxrt1160_evk: added MIPI DSI display support.
Added MIPI and I2C connectors to enable display shields.  Tested with
shields rk055hdmipi4m, rk055hdmipi4ma0, and g1120b0mipi.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2024-07-30 18:27:23 +01:00
Derek Snell
1ae8533bf9 boards: shields: g1120b0mipi: enable for mimxrt1160_evk
add overlay to use with mimxrt1160_evk.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2024-07-30 18:27:23 +01:00
Maciej Baczmanski
040a942a63 manifest: net: openthread: Regular openthread upmerge to e10a925.
Regular openthread upmerge to `e10a92570f94ff1e0bc5e0da9ecf0ee135d955a6`.

Additionally commit aligns platform implementation with diag changes:
https://github.com/openthread/openthread/pull/10354

based on:
https://github.com/openthread/ot-nrf528xx/pull/822

Signed-off-by: Maciej Baczmanski <maciej.baczmanski@nordicsemi.no>
2024-07-30 18:27:15 +01:00
Maarten Scherpenisse
e8827b5a62 boards: shields: mb1166_a09: replace RGB888 by ARGB8888
When enabling DMA2D (Chrom-ART) original line leads to display issues.

Signed-off-by: Maarten Scherpenisse <git@maartenscherpenisse.nl>
2024-07-30 18:26:53 +01:00
Piotr Koziar
c44106c726 dts: nrf54h20: add missing global dppic and ipct configs
Adds device tree configs for dppic and ipct connections
between the Radio core and the Global domains.

The connections are required by the radio driver.

Signed-off-by: Piotr Koziar <piotr.koziar@nordicsemi.no>
2024-07-30 18:26:35 +01:00
Murali Karicheri
05643e700e samples: drivers: flash_shell: allow run on stm32h745i_disco/stm32h745xx/m4
Now that flash controller driver is supported on M4 of stm32h745i_disco,
remove it from platform_exclude list and add an overlay for flash_shell
sample.

Signed-off-by: Murali Karicheri <murali.karicheri@sandc.com>
2024-07-30 18:26:20 +01:00
Murali Karicheri
4e0b02ef66 samples: drivers: flash_shell: allow run on stm32h747i_disco/stm32h747xx/m4
Now that flash controller driver is supported on M4 of stm32h747i_disco,
remove it from platform_exclude list and add an overlay for flash_shell
sample

Signed-off-by: Murali Karicheri <murali.karicheri@sandc.com>
2024-07-30 18:26:20 +01:00
Murali Karicheri
d2d0289750 drivers: flash : stm32h7: Fix the offset for get_sector()
The offset is wrong when the second bank is used by M4 as the
offset is relative to the base which is 0. So add the least
significant 6 nibbles from the CONFIG_FLASH_BASE_ADDRESS to
find the sector.

Signed-off-by: Murali Karicheri <murali.karicheri@sandc.com>
2024-07-30 18:26:20 +01:00
Murali Karicheri
188fe4d5d1 drivers: flash: stm32h7: support flash controller driver on M4
Currently flash controller driver builds and runs only on M7.
This patch supports enablement of the driver on M4 CPUs. The
main issue in using the driver on M4 is that LL_GetFlashSize()
to read the flash size works only on M7 as the internal register
is not accessible from M4. So to use the driver on M4, add a dt
property, bank2-flash-size, to configure flash size of bank2.
this will allow gradual support of flash controller driver
on M4 of all supported STMH7 boards by defining the above
dt property and testing it. Currently this is verified only
on STM32H747i-disco board.

Signed-off-by: Murali Karicheri <murali.karicheri@sandc.com>
2024-07-30 18:26:20 +01:00
Johann Fischer
76fadf90f7 drivers: udc_dwc2: enable Internal DMA support by default
Remove BUILD_ASSERT for Internal DMA and DCACHE if both are enabled, and
enable Internal DMA support by default.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-30 18:26:04 +01:00
Johann Fischer
9bf32320f2 drivers: udc_mcux_ehci: remove bounce buffer
UDC_BUF_POOL_*_DEFINE macro will place buffer pool in __nocache
section if NOCACHE_MEMORY is enabled.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-30 18:26:04 +01:00
Johann Fischer
67caae3aca usb: device_next: introduce UDC_BUF_POOL_*_DEFINE macros
Introduce UDC_BUF_POOL_*_DEFINE macros based on NET_BUF_POOL_*_DEFINE
macros but use our own version of alloc and unref callbacks to get
buffers with specific alignment and granularity. Also, do not use ref
callback because it breaks alignment.
Also introduces helper macros for defining and checking UDC
driver-compliant static buffers.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-30 18:26:04 +01:00
Rubin Gerritsen
bfc0cdc905 Bluetooth: Conditionally print out HCI error codes as strings
When developing Bluetooth applications, you typically run into
some errors. If you are an experienced Bluetooth developer,
you would typically have an HCI error lookup table in your memory.
Others might not.

This commit utilizes defines CONFIG_BT_DEBUG_HCI_ERR_TO_STR
and utilizes bt_hci_err_to_str() to print out HCI error strings
when enabled to improve the user experience.

Several alternatives where considered. This approach was chosen
as it had the best balance between readability, code size, and
implementation complexity.

The alternatives are listed below as a reference.

1. Macro defined format specifier:

```c
  #define HCI_ERR_FMT "%s"
  #define BT_HCI_ERR_TO_STR(err) (err)
  #define HCI_ERR_FMT "%d"
  #define BT_HCI_ERR_TO_STR(err) bt_hci_err_to_str((err))

LOG_INF("The event contained " HCI_ERR_FMT " as status",
	BT_HCI_ERR_TO_STR(err));
```
Advantage: Space efficient: Code size does not increase
Disadvantage: Code becomes hard to read

2. Format specifier to always include both integer and string:

```c
static inline const char bt_hci_err_to_str(err)
{
	return "";
}

LOG_INF("The event contained %s(0x%02x) as status",
	bt_hci_err_to_str(err), err);
```

Advantage: Simple to use, implement, and read,
Disadvantage: Increases code size when CONFIG_BT_DEBUG_HCI_ERR_TO_STR
is disabled. The compiler seems unable to optimize away the unused
format specifier. Note: The size increase is only present when
logging is enabled.

3. Always print as string, allocate a stack variable when printing:

```c
const char *bt_hci_err_to_str(char *dst, size_t dst_size, uint8_t err)
{
  snprintf(dst, dst_size, 0x%02x, err);
  return dst;
}

LOG_INF("The event contained %s as status", BT_HCI_ERR_TO_STR(err));
```

Advantage: Very easy to read.
Disadvantage: Printing error codes becomes slow as it involves calling
snprint.

4. Implement a custom printf specifier, for example E.

   This requires a global CONFIG_ERR_AS_STR as I assume we cannot have
   one specifier for each type of error code.
   Also, I assume we cannot start adding specifiers for each subsystem.

```c
  #define BT_HCI_ERR_TO_STR(err) (err)
  #define BT_HCI_ERR_TO_STR(err) bt_hci_err_to_str((err))

LOG_INF("The event contained %E as status", BT_HCI_ERR_TO_STR(err));
```

Advantage: Both efficient code and readable code.
Disadvantage: This requires a global CONFIG_ERR_AS_STR as I assume
we cannot have one specifier for each type of error code.
Also, I assume we cannot start adding specifiers for each subsystem.
That is, this approach is hard to implement correctly in a scalable
way.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-07-30 18:25:56 +01:00
Emil Gydesen
a94bfe03a4 tests: Bluetooth: Audio: Move role specific mocks files
For the LE Audio unittests there exists a few mock files
that implement mock versions, or callbacks, for some of the
roles and features tested.

These have been moved to where they are actually used,
reducing the scope of these files.

This both allows the individual tests to implement their own
versions of it, but more importantly it prevents issues when
adding tests for these roles. For example, due to the
bap_unicast_client.c mock file, it is impossible to implement
unit tests for the unicast client, as the functions are already
defined.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-30 18:25:47 +01:00
Jyri Sarha
1b6e0f6479 debug: thread_analyzer: Option to analyze threads on each core separately
Add implementation to analyze threads on each cpu separately. This
feature can be enabled with THREAD_ANALYZER_AUTO_SEPARATE_CORES Kconfig
option. If enabled, an analyzer thread is started for each cpu, and
the threads will only analyze thread on the cpu its running on.

This feature is needed for Intel ADSP platform, where cpu specific
caches are not synchronized between the cpu. It is also probably
needed by other platforms having CONFIG_KERNEL_COHERENCE=y, so default
to THREAD_ANALYZER_AUTO_SEPARATE_CORES=y for those platform.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2024-07-30 18:25:40 +01:00
Jyri Sarha
28215fc788 kernel: thread: Add k_thread_runtime_stats_cpu_get()
Add k_thread_runtime_stats_cpu_get() to get runtime statistics of
the specified core.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2024-07-30 18:25:40 +01:00
Jyri Sarha
b8a1a62048 kernel: thread: Add k_thread_foreach_filter_by_cpu() and unlocked version
Add functions k_thread_foreach_unlocked_filter_by_cpu() and
k_thread_foreach_filter_by_cpu() to loop through the threads on the
specified cpu only.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2024-07-30 18:25:40 +01:00
Théo Battrel
b764238e0d west: Update fish completion for boards
With the recent change to hwmv2, loading the
boards is extremely slow and can take several
seconds.

To solve that problem this commit add a cache
of the boards. The cache is updated based on:
    - when the latest commit of the manifest
    file directory is updated or;
    - when the manifest file directory is not
    a git directory, when the manifest file
    content itself is updated.

At the same time:
    - update how the board completion is
    displayed by including the board vendor to it;
    - add missing `--board` and `--board-dir`
    options;
    - remove `hwmv1` board completion code.

Signed-off-by: Théo Battrel <theo.util@protonmail.ch>
2024-07-30 18:25:28 +01:00
Théo Battrel
377eed6251 west: add vendor to boards format
Add the new `vendor` formatter argument to display board vendor.

Signed-off-by: Théo Battrel <theo.util@protonmail.ch>
2024-07-30 18:25:28 +01:00
Tomi Fontanilles
48d69b4e7e tests: modem: cmux: add missing timeout param
Add the missing timeout parameter to `modem_pipe_open()` and
`modem_pipe_close()` calls.
10 seconds is the default value used in the Zephyr tree.

Fixes a regression introduced in
https://github.com/zephyrproject-rtos/zephyr/pull/74325.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-07-30 11:44:04 +02:00
Jordan Yates
e2549cc3c9 lora: rylrxxx: add missing timeout
Add the missing timeout parameter to `modem_pipe_open`. 10 seconds
appears to be the default value added to other in-tree drivers.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-30 11:44:04 +02:00
Rubin Gerritsen
3bcaa6f8d6 Bluetooth: Controller: Handle return value of ll_deinit()
This call may fail. Handling the return value makes it easier
to catch bugs.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-07-29 14:30:04 +02:00
Rubin Gerritsen
d7e6d6e2c0 Bluetooth: Controller: Fix deinitialization of the LFCLK
This fixes a bug where the stack may get stuck in the
POWER_CLOCK ISR after enabling and disabling the Bluetooth
stack a couple of times. It happens after calling
`onoff_request()` after a failing call to `onoff_release()`.
Then the `lf_cli`s next points to itself, generating a
circular list of clients.

Calling `onoff_release()` may fail if there is an outstanding
request. By calling `onoff_cancel()` we enter a state where
we can safely remove the client.

This was not seen earlier because the return value
from `ll_deinit()` in `hci_driver_close()` was ignored.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-07-29 14:30:04 +02:00
Fin Maaß
1cc82003e7 soc: riscv: litex: use value from dts
use value from dts for
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-07-29 14:29:20 +02:00
Martin Åberg
1320dc7d99 soc/gr716a: Enable GPIO support on LEON GR716A
GR716A has two GRGPIO2 controllers.

This adds the GPIO controller description to the DTS and
makes the GPIO option available in the kernel configuration.

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2024-07-29 14:27:15 +02:00
Martin Åberg
7dbc5f09ed drivers/gpio: Add support for GRLIB GRGPIO2
This adds support for the GRLIB GRGPIO2 controller used in
LEON and NOEL-V systems.

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2024-07-29 14:27:15 +02:00
Ryan McClelland
147df87fa4 drivers: i3c: add ddr, ibi tir, direct ccc def byte support
Revision 1p7 of the silicon added support for IBI TIR, full word fifo
while target usage, defining byte with direct CCCs. This also adds
support of HDR-DDR.

This also fixes short ccc commands where multiple targets in a
payload for the same ccc.

Modification of the i3c_target_tx_write had to be done in order to
distinguish the difference for each fifo to be written to.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-07-29 14:23:43 +02:00
Dominik Ermel
1b5f986404 tests/stream_flash: Replace one-line config overlays with extra_configs
The commit removes one-line overlay files, when copyrights excluded,
with direct Kconfig options selection inside testcase.yaml.
The overlays have been removed.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-07-29 14:23:11 +02:00
Miguel Gazquez
f6f03867d8 samples: accel_polling: set sampling frequency when necessary
The accel_polling sample uses various sensor, but doesn't set a sampling
rate. But some sensors (like st,lsm6dso) have a default sampling
frequency of 0. So, depending on the sensor, the sample may not always
work.

There are two ways to fix this: either all drivers must set a valid
sampling rate, or the sample shall at least try to set a value if there
is none.

We propose here the second approach, wich should allow the sample to
work on more sensors out of the box.

Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
2024-07-29 14:21:24 +02:00
Miguel Gazquez
c44c567780 boards: arduino_nano_33_ble: add lsm9ds1 sensor to device tree
Describe the lsm9ds1 sensor available in the Arduino Nano 33 BLE through
I2C.
Set the accel0 alias.

Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
2024-07-29 14:21:24 +02:00
Miguel Gazquez
26be1da3e7 drivers: sensor: add driver for lsm9ds1 sensor
The LSM9DS1 is a system-in-package featuring
a 3D digital linear acceleration sensor, a 3D digital angular rate
sensor and a 3D digital magnetic sensor.

This driver implements only the linear acceleration sensor and the
angular rate sensor, on the I2C bus.

This driver is without trigger support.

The driver is based on the stmemsc HAL.

link: https://www.st.com/resource/en/datasheet/lsm9ds1.pdf

Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
2024-07-29 14:21:24 +02:00
Miguel Gazquez
f712f9554b dts: bindings: add DT binding for lsm9ds1
This commit adds a description for the lsm9ds1 sensor,
with a .h file containing all configuration options.

Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
2024-07-29 14:21:24 +02:00
Tomasz Leman
44464c4d4f drivers: dai: intel: ssp: Introduce DMA control set API
This commit adds a new API function, `dai_ssp_dma_control_set`, to the
Intel SSP DAI driver. This function is designed to set DMA control
parameters specifically for the SSP interface.

The addition of this API function allows for more granular control of
DMA settings, which can be beneficial in scenarios where DMA
configuration needs to be modified independently of other DAI settings.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-07-29 14:20:18 +02:00
Tomasz Leman
5084decbc4 drivers: dai: intel: ssp: Refactor TLV parsing into a separate function
Refactor the TLV parsing code from the dai_ssp_parse_aux_data function
into a new, separate function called dai_ssp_parse_tlv. This change
improves the modularity of the code and allows for the TLV parsing logic
to be reused in other contexts where only TLV data needs to be parsed
without the entire configuration blob.

The new dai_ssp_parse_tlv function takes a pointer to the TLV data and
its length as parameters, enabling it to process a buffer containing
multiple TLV entries. The original dai_ssp_parse_aux_data function is
now simplified to prepare the TLV data and call the new parsing
function.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-07-29 14:20:18 +02:00
Tomasz Leman
230709e4ae include: dai: Introduce runtime DAI configuration update API
This patch introduces a new API function, `dai_config_update`, in the
DAI driver API to enable runtime updates to the DAI configuration. This
function allows bespoke configuration parameters to be set, enabling
updates that are specific to the DAI implementation and can be applied
outside of the regular configuration flow.

The addition of this API provides greater flexibility for adjusting DAI
settings at runtime, which is particularly useful in scenarios where
only specific parameters need to be modified without the need to
reconfigure the entire DAI interface.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-07-29 14:20:18 +02:00
Daniel Kampert
73c05e2079 drivers: rtc: Add support for Micro Crystal RV-8263-C8
Remove redundant code

Signed-off-by: Daniel Kampert <DanielKampert@kampis-elektroecke.de>
2024-07-29 14:19:47 +02:00
Daniel Kampert
37d6bc0827 drivers: rtc: Add support for Micro Crystal RV-8263-C8
- Add Micro Crystal RV-8263-C8 RTC driver

Signed-off-by: Daniel Kampert <DanielKampert@kampis-elektroecke.de>
2024-07-29 14:19:47 +02:00
Ayush Singh
99d6a82d5b samples: drivers: adc: Add beagleconnect freedom overlay
- Add support for beagleconnect freedom

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2024-07-29 14:18:39 +02:00
Ayush Singh
a37a1237d3 manifest: Update hal_ti revision
- Fixes https://github.com/zephyrproject-rtos/zephyr/issues/73468

Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
2024-07-29 14:18:39 +02:00
Nick Ward
c8526bc53f net: lwm2m: shell: add observations cmd
Outputs observation configurations.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2024-07-29 14:18:10 +02:00
Nick Ward
0645609b0b net: lwm2m: observations: add attr type to str
Allows strings used to be exposed outside of file.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2024-07-29 14:18:10 +02:00
Florian Larysch
22d6bfa0bd logging: backend: swo: add Kconfig option for SWO protocol
The TPIU supports serializing the data stream both using an UART-like NRZ
protocol as well as using Manchester encoding. Using Manchester encoding
has the advantage that it enables receivers that support it to recover the
clock from the SWO signal itself. This is particularly useful in situations
where the clock rate changes dynamically or is unknown (for example when
debugging the clock tree setup or working with a device with a misbehaving
main oscillator).

Add a Kconfig choice to switch the protocol, keeping the current default of
using the NRZ encoding.

Signed-off-by: Florian Larysch <larysch@fixme.gmbh>
2024-07-29 14:17:33 +02:00
Martin Stumpf
706ba43bb5 dts: fix warnings in nxp_rt11xx.dtsi
Caused by a simple typo.

Signed-off-by: Martin Stumpf <finomnis@gmail.com>
2024-07-29 14:16:18 +02:00
Bjarki Arge Andreasen
372c7183ef modem: pipe: Add explicit timeout to sync APIs
The modem pipe APIs include synchronous calls to open/close,
which internally use a fixed timeout of 10 seconds. The timeout
should be configurable through the APIs, anywhere from K_NO_WAIT
to K_FOREVER.

This commit adds timeout parameters to the open/close APIs, and
updates in-tree usage of the open/close APIs to explicitly
provide the previously implicit timeout of 10 seconds.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-07-29 14:14:42 +02:00
Yong Cong Sin
def7f37c83 tests: posix: unistd_h: mark fsync() & ftruncate() as supported
These functions have been supported, update the test
accordingly.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-07-29 14:14:33 +02:00
Yong Cong Sin
88c13020aa posix: fs: mark _POSIX_SYNCHRONIZED_IO as supported
The `_POSIX_SYNCHRONIZED_IO` option group is now fully
supported.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-07-29 14:14:33 +02:00
Yong Cong Sin
91abf0e329 posix: fs: implement fdatasync()
`fdatasync()` is basically equivalent to `fsync()` according
to the standards.

Added test for it.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-07-29 14:14:33 +02:00
Yong Cong Sin
11bd1dae33 doc: posix: option_groups: mark msync as supported
`msync()` has been implemented in #73799.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-07-29 14:14:33 +02:00
Anke Xiao
c6f5aad754 samples: drivers: i2c: target_eeprom: add frdm_ke17z support
Added i2c configuration to test target_eeprom case for frdm_ke17z
Added `sample.drivers.i2c.target.kinetis` in sample.yaml for frdm_ke17z
and frdm_ke17z512 automatically run the tests

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-07-29 14:14:23 +02:00
Anke Xiao
08799ada6a boards: nxp: frdm_ke17z: enable i2c driver
Added lpi2c support for NXP FRDM-KE17Z board, which has only one
instance of lpi2c0.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-07-29 14:14:23 +02:00
Sreeram Tatapudi
eebc998a5a drivers: flash: Support for IFX QSPI Flash driver
Initial version

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2024-07-29 14:14:10 +02:00
Jamie McCrae
5646e15f9a samples: sysbuild: hello_world: Add support for nrf54l15pdk
Adds support for building this sample for the nrf54l15pdk board

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-07-29 14:13:48 +02:00
Théo Battrel
f477d9d7eb Bluetooth: Gap: Add missing AD types
Add the following AD types:
- `BT_DATA_DEVICE_CLASS`
- `BT_DATA_SIMPLE_PAIRING_HASH_C192`
- `BT_DATA_SIMPLE_PAIRING_RAND_C192`
- `BT_DATA_DEVICE_ID`
- `BT_DATA_PAWR_TIMING_INFO`
- `BT_DATA_ESL`

Note that `BT_DATA_DEVICE_ID` has the same value as
`BT_DATA_SM_TK_VALUE` (0x10), this is not a mistake from the author but
a mistake in the Core Specification, specifically the Assigned Numbers
document with the version date 2024-04-10.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-07-29 14:13:34 +02:00
Patryk Kuniecki
c227ff3d63 tests: exclude drivers/watchdog/wdt_basic_api from running on it8xxx2_evb
There is problem with running this test in validation,
because of DBGR mode watchdog can't reset board by itself,
and it needs cold reset. This proves that test is not automated,
and should be exluded on this board.

Signed-off-by: Patryk Kuniecki <patryk.kuniecki@intel.com>
2024-07-29 14:13:21 +02:00
Tim Sørensen
86032bcf85 bluetooth: avoid USB starvation in bap_broadcast_sink
fix to ensure that USB audio interface is not starved when
no audio data is received over bluetooth.

Signed-off-by: Tim Sørensen <tims@demant.com>
2024-07-29 14:13:10 +02:00
Adrien Leravat
8d81554c42 samples: tfm_integration: tfm_ipc: update readme
Updates the output sample to more closely resemble the output for a
recent Zephyr version (current was v1.14). Fixes #76275.
Updates broken tf-m documentation link to their new URL.

Signed-off-by: Adrien Leravat <adrien.leravat@gmail.com>
2024-07-29 14:13:02 +02:00
Jordan Yates
5f3ff52b6b gnss: gnss_u_blox_protocol: fix typos
Fix several typos in define names.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-29 14:12:53 +02:00
Tomasz Moń
f0677e5a3b drivers: udc_dwc2: Respect maximum fifo depth
When dynamic fifo sizing is enabled the driver can assign fifo size
lower or equal to the reset value. Software must respect the maximum
sizes because fifo width registers are optimized during synthesis and
the larger values simply get discarded.

Use 16-bit values for FIFO depths because maximum FIFO depth the vendor
can configure the DWC2 otg is 32768.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-07-29 14:12:02 +02:00
Alberto Escolar Piedras
f09ea4753f doc: releases: add working draft release notes + guide for v4.0.0
Add working drafts for the release notes and migration guide for v4.0.0

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-29 09:11:35 +01:00
Alexandre Bailon
988e4cf770 boards: ti: Add support of CC1352P7 Launchpad
This adds support of CC1352P7 Lauchpad.
This based on the CC1352R1 LaunchXL.

Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
2024-07-28 07:31:52 +03:00
Alexandre Bailon
200e8d481f boards: ti: Create a common folder to share code between boards
This creates a common folder in order to share code between similar
boards. This is mostly for the CC1352P1 and CC1352P7 launchpad which
are very similar but it could be probably useful for some other boards.

Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
2024-07-28 07:31:52 +03:00
Adrien Ricciardi
b09972b445 fs: nvs: Allow application to switch sector to get free space
Add an API function allowing the application to determine the amount of
free bytes in the current sector.

Add a second API function allowing the application to switch to the next
NVS sector, calling the garbage collector on such sector.

The goal is togive more granularity to the application to control when
the garbage collector is triggered.

Signed-off-by: Adrien Ricciardi <aricciardi@baylibre.com>
2024-07-28 07:31:44 +03:00
Jiafei Pan
ea1a0a6950 board: imx93_evk: enable ENET support for Cortex-A Core
Add ENET 1G support on Cortex-A Core, enable it in DTS.
Updated board document for supported features.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-07-28 07:31:32 +03:00
Jiafei Pan
fa9a131029 drivers: clock_control: mcux_ccm_rev2: add ENET clk for imx93
Add ENET clock support in the ccm driver for imx93.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-07-28 07:31:32 +03:00
Jiafei Pan
5663a327b8 board: imx8mp_evk: enable ENET for A53 SMP variant
Add ENET support for Cortex-A Core SMP board variant.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2024-07-28 07:31:32 +03:00
Saravanan Sekar
c143cbaa7c drivers: crypto: use reset api for crypto peripheral reset
Replace direct HAL api by zephyr reset api framework for crypto
peripheral block reset.

Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
2024-07-28 07:31:25 +03:00
Saravanan Sekar
2a457d8d04 dts: arm: st: add reset control for crypto peripheral
add reset control registers information for crypto peripheral reset.

Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
2024-07-28 07:31:25 +03:00
Piotr Kosycarz
0225e0e488 tests: boards: nrf: qdec: add tests for qdec for nrf
Expand testing for QDEC at nrf platforms.
It uses general sensor API,
however there are also nrf driver specific assumptions.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-07-28 07:31:15 +03:00
Emil Gydesen
38d09af445 Bluetooth: BAP: Scan delegator add src without PA sync
Modify the bt_bap_scan_delegator_add_src to take an address and
a sid instead of a PA sync object, so that the scan delegator
can add a source without syncing to the PA.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-28 07:31:06 +03:00
Bartosz Miller
0d59c1a780 tests: drivers: add more test cases to the i2c_bme688 test suite
Test NACK handling, bus recovery and FAST speed read.
Signed-off-by: Bartosz Miller <bartosz.miller@nordicsemi.no>
2024-07-28 07:30:59 +03:00
Andreas Ålgård
a5850b794c net: lib: dhcpv4_server: Add callback to allow user to set address
This functionality is useful to allow for conditional or static leases.

Signed-off-by: Andreas Ålgård <aal@ixys.no>
2024-07-28 07:30:48 +03:00
Dean Sellers
dfe7cb58cb drivers: ethernet: enc28j60: Add DT property to set random mac
Use the DT property zephyr,random-mac-address to set a boot time
random mac address.

Signed-off-by: Dean Sellers <dsellers@evos.com.au>
2024-07-28 07:30:39 +03:00
Ren Chen
aa3470ba7e tests: usb: desc_sections: raise the description span to 201
Raise the descriptor table span to 201 due to the inclusion of the USB
configuration descriptor.

Tested with:
$ west build -p -b it82xx2_evb tests/subsys/usb/desc_sections
  -T usb.desc_sections

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2024-07-28 07:30:30 +03:00
Ren Chen
fdd488b38e usb: device: add USB_CONFIGURATION_STRING_DESC KConfig option
This change adds a Kconfig option "USB_CONFIGURATION_STRING_DESC_ENABLE"
to enable the USB configuration string descriptor. The default
configuration string is specified in "USB_CONFIGURATION_STRING_DESC."

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2024-07-28 07:30:30 +03:00
Sadik Ozer
330ab4bf61 boards: arm: Enable TRNG driver for APARD32690
TRNG enabled for APARD32690 board

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-07-28 07:30:20 +03:00
Sadik Ozer
4a758fdeed boards: arm: Enable TRNG driver for MAX32672 boards
TRNG enabled for MAX32672EVKIT and MAX32672FTHR boards

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-07-28 07:30:20 +03:00
Sadik Ozer
4dbde44fc2 boards: arm: Enable TRNG driver for MAX32680EVKIT
TRNG enabled for MAX32680EVKIT

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-07-28 07:30:20 +03:00
Sadik Ozer
434825cdfd boards: arm: Enable TRNG driver for MAX32670EVKIT
TRNG enabled for MAX32670EVKIT

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-07-28 07:30:20 +03:00
Sadik Ozer
66c41de782 boards: arm: Enable TRNG driver for MAX32690EVKIT
TRNG enabled for MAX32690EVKIT

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-07-28 07:30:20 +03:00
Sadik Ozer
f3f2f214b2 boards: arm: Enable TRNG driver for MAX32655 boards
TRNG enabled for MAX32655EVKIT and MAX32655FTHR boards

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-07-28 07:30:20 +03:00
Sadik Ozer
c34cafd980 dts: Add TRNG inside devicetree
Add TRNG register and binding file

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-07-28 07:30:20 +03:00
Sadik Ozer
915ce7548a drivers: trng: Add TRNG driver for MAX32xxx MCUs
Added TRNG driver for MAX32xxx MCUs

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-07-28 07:30:20 +03:00
Jukka Rissanen
f6b10bb7ac samples: net: zperf: Start DHCPv4 when needed
If config library is disabled but DHCPv4 client is enabled,
then start DHCPv4 when zperf application starts.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-07-28 07:30:12 +03:00
Kacper Dalach
52197b515a drivers: eth: native_posix: if_name from cmd line
Iface name which is used by native posix ethernet driver can only be
specified at compile-time. I wanted to run two instances of the same
program on native posix but did not want to make two separate builds only
to change the iface name. I have implemented getting the iface name from
command line.

Signed-off-by: Kacper Dalach <dalachowsky@gmail.com>
2024-07-28 07:30:02 +03:00
Marcin Gasiorek
313a92baf9 net: openthread: Set CIDR for NAT64
Implementation of functionality whitch configure CIDR for OT NAT64.

Signed-off-by: Marcin Gasiorek <marcin.gasiorek@nordicsemi.no>
2024-07-28 07:29:50 +03:00
Marcin Gasiorek
ac0a9d79ab net: openthread: Add NAT64 send and receive callbacks.
Packets are routed between OT and Zephyr net stacks.
For IPv4 these packets are managed by NAT64 by default.

Signed-off-by: Marcin Gasiorek <marcin.gasiorek@nordicsemi.no>
2024-07-28 07:29:50 +03:00
Cong Nguyen Huu
f9dddbe0ac drivers: nxp_s32_canxl: improve CANXL error report
Update to enable CANXL_INT_RXSMB_OVER and
CAN_INT_ERR_FAST(ERR for CAN-FD).

Statistic CAN errors and count CAN TX and RX errors via
BCANXL that uses CANXL MRU to exchange informations with CAN host.

Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
2024-07-28 07:29:39 +03:00
Hao Luo
6ed058887e drivers: spi: simplified spi_ambiq_xfer function
Simplified spi transfer process to make it more readable

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-07-28 07:29:28 +03:00
Hao Luo
8379f64393 drivers: bluetooth: hci_ambiq: get the spi cfg from the device
Use the SPI configuration from the SPI device for data transaction.

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-07-28 07:29:28 +03:00
Hao Luo
3faaaaba59 drivers: spi: Change to use software controlled cs in default
Added support for software controlled cs in Ambiq SPI drivers

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-07-28 07:29:28 +03:00
Pisit Sawangvonganan
444e135679 net: if: streamline interface name checking logic
This commit reduces `#if / #endif` pairs by leveraging the
`IS_ENABLED` macro:
- Removed `#ifdef / #endif` around `NET_L2_DECLARE_PUBLIC` in `net_l2.h`,
  enabling compilation without affecting link time if the configuration
  is unavailable.

`set_default_name` function:
- Replaced multiple `if` statements with `else if` to use the last `else`
  without indirectly checking `name[0] == '\0'`.
- Since `snprintk` guarantees null-termination if `sizeof(name) > 0`,
  the `-1` subtraction is unnecessary, eliminating the need for
  zero initialization in `char name[CONFIG_NET_INTERFACE_NAME_LEN + 1];`.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-28 07:29:01 +03:00
Vineeta S Narkhede
232c802c05 net: hostname: Add a function to set the hostname postfix as is.
Fixes: #72363

The existing function to set the postfix is converting postfix
string to hexadecimal. Adding a new function to handle a use case
where the provided postfix should be used as is without any conversion.

Signed-off-by: Vineeta S Narkhede <VineetaSNarkhede@Eaton.com>
2024-07-28 07:28:51 +03:00
Pisit Sawangvonganan
b5fdbc21bf modem: cmux: optimize modem_cmux_frame structure padding
Downsize `dlci_address` field from `uint16_t` to `uint8_t` in
`modem_cmux_frame` for better memory alignment.

Note: The maximum value of `dlci_address` is 63, which fits
within `uint8_t`.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-27 20:51:42 +03:00
Pisit Sawangvonganan
c43b20e85c modem: cmux: apply static const to reduce RAM usage
Added `static const` to various `struct modem_pipe_api` and
`frame` in `modem_cmux_connect_handler` to make these structures
immutable and reduce RAM usage.

Corrected a typo, changing "consequtive" to "consecutive".

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-27 20:51:42 +03:00
Pisit Sawangvonganan
ba30e7b350 modem: pipe: make modem_pipe_api a pointer to constant
Changed the `api` field in the `modem_pipe` structure to be
a pointer to constant.

This ensures that the `api` field remains immutable after
initialization.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-27 20:51:42 +03:00
Szymon Janc
d434eac86f tests: bluetooth: tester: Fix zero length array in middle of struct
Zero length arrays are only allowed at the end of the structure. Here
those were used as placeholders for BTP response creation and can be
easily replaced with common member.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-07-27 20:51:30 +03:00
Bas van Loon
85f6409043 net: if: Add net_if_ipv4_get_gw as helper function.
Most set functions have a get function as well, add the missing
function to get the set gateway IPv4 address.

Signed-off-by: Bas van Loon <basvanloon@betronic.nl>
2024-07-27 20:51:21 +03:00
Jonathan Rico
dc053dc6d2 Bluetooth: shell: Enable sysbuild for nRF5340
Enable sysbuild for nRF5340 app core.

This automatically builds the image for the network core, making a
better user experience.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-07-27 20:51:10 +03:00
Piotr Koziar
4df79b5503 modules: hal_nordic: adjust HFCLK ramp-up time.
Changes the ramp-up time from 1000us to 550us
on nRF54H20.
The time must fit inside general preconditions ramp up.

The hfclk time can be adjsuted this way because
the current solution is not precise until
the clock_control is available.

Signed-off-by: Piotr Koziar <piotr.koziar@nordicsemi.no>
2024-07-27 20:50:32 +03:00
Aleksander Wasaznik
e37140b219 Bluetooth: Host: Remove work cancel before submit
Refactor. The deferred work is rescheduled just after it's canceled.
This is hopefully equivalent to just the reschedule, so the cancel can
be removed.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-07-27 20:50:21 +03:00
Pisit Sawangvonganan
d5cd47fbb2 shell: introduce shell_xxx_impl wrapper functions for output macros
Refactor shell output macros to minimize caller overhead by eliminating
direct `color` parameter passing:
- Introduce wrapper functions: `shell_info_impl`, `shell_print_impl`,
  `shell_warn_impl`, `shell_error_impl`.
- Replace `shell_fprintf` in macros with these new wrappers.
- Update `shell_hexdump_line` to use the new wrappers,
  minimizing caller overhead.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-27 20:50:12 +03:00
Andrey Dodonov
0e699eb251 net: lib: dhcpv4: parse multiple DNS servers received from DHCP
If we receive multiple DNS servers via DHCP only the first one is used,
regardless of CONFIG_DNS_RESOLVER_MAX_SERVERS constant.
Parse DHCP option and save addresses that fit

Signed-off-by: Andrey Dodonov <Andrey.Dodonov@endress.com>
2024-07-27 20:49:57 +03:00
Tim Lin
6a4a164b54 soc: it8xxx2: linker: Move zephyr library to RAM to enhance performance
Place zephyr library in ILM. This can improve performance.

test:
Print the message 10000 times with 1ms sleep interval to compare the
time difference before and after adding RAM code on the it82002bw evb.

                         RAM code size     save time
original:                1954 bytes
libzephyr.a:            +16974 bytes      -608ms

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2024-07-27 20:49:47 +03:00
Tim Lin
2ab908bcf2 soc: it8xxx2: linker: Move kernel library to RAM to enhance performance
Place kernel library in ILM. This can improve performance.

test:
Print the message 10000 times with 1ms sleep interval to compare the
time difference before and after adding RAM code on the it82002bw evb.

                         RAM code size    save time
original:                1954 bytes
libkernel.a:            +8941 bytes      -649ms

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2024-07-27 20:49:47 +03:00
Tim Lin
c5cf53b690 soc: it8xxx2: linker: Move serial library to RAM to enhance performance
Place serial library in ILM. This can improve performance.

test:
Print the message 10000 times with 1ms sleep interval to compare the
time difference before and after adding RAM code on the it82002bw evb.

                         RAM code size    save time
original:                1954 bytes
libdrivers__serial.a:   +2282 bytes      -226ms

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2024-07-27 20:49:47 +03:00
Kacper Dalach
32eb346e05 posix: can: if name from command-line
This commit introduces the ability to set the CAN
interface from command-line. This is helpful
if we want to run multiple instances of the app
with different CAN interfaces without making
separate compilations for each instance.

Signed-off-by: Kacper Dalach <dalachowsky@gmail.com>
2024-07-27 20:49:38 +03:00
Emil Gydesen
72d98692dc tests: Bluetooth: Add encrypted BAP broadcast test
Added test to test encrypted broadcast

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-27 20:49:25 +03:00
Pieter De Gendt
ad63ca284e kconfig: replace known integer constants with variables
Make the intent of the value clear and avoid invalid ranges with typos.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-07-27 20:49:15 +03:00
Pieter De Gendt
dfdebc9cef kconfig: Add variables for integer constants
Add a Kconfig.constants file that defines variables for different known
integer minimum and maximum values.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-07-27 20:49:15 +03:00
Ian Morris
33ce6845a9 boards: renesas: ek_ra8m1: added mikrobus node labels
Added mikrobus_serial and mikrobus_header node labels to EK-RA8M1 device
tree board definition, allowing compatible shield boards to be used.

Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
2024-07-27 20:48:46 +03:00
Pisit Sawangvonganan
a2e0b1d366 drivers: serial: remove '&' when assigning init_fn
Remove address-of operator ('&') when assigning `init_fn`
function pointer in `DEVICE_DT_INST_DEFINE` macro.

This change aims to maintain consistency among the drivers in
`drivers/serial`, ensuring that all function pointer assignments
follow the same pattern.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-27 20:48:34 +03:00
Henrik Brix Andersen
24b098e78f boards: nxp: lpcxpresso55s16: enable ctimer devicetree nodes
Enable the CTimer devicetree nodes on the NXP LPCxpresso55S16 development
board.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-07-27 20:48:21 +03:00
Henrik Brix Andersen
5acaeece07 dts: arm: nxp: lpc55s1x: add ctimer nodes
Add CTimer devicetree nodes for the NXP LPC55S1x.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-07-27 20:48:21 +03:00
Pisit Sawangvonganan
2e0e9b1a18 kernel: reduce k_spin_unlock calls using if-else if-else structure
Reduce `k_spin_unlock` calls in `k_obj_core_stats_xxx` functions by
consolidating error handling into an `if-else if-else` structure and
using a single return variable `rv`.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-27 20:48:07 +03:00
Yong Cong Sin
7db18ab721 arch: riscv: stacktrace: fix user thread stack bound check
According to the riscv's `arch.h`:

 +------------+ <- thread.arch.priv_stack_start
 | Guard      | } Z_RISCV_STACK_GUARD_SIZE
 +------------+
 | Priv Stack | } CONFIG_PRIVILEGED_STACK_SIZE
 +------------+ <- thread.arch.priv_stack_start +
                   CONFIG_PRIVILEGED_STACK_SIZE +
                   Z_RISCV_STACK_GUARD_SIZE

The start of the privilege stack should be:

  `thread.arch.priv_stack_start + Z_RISCV_STACK_GUARD_SIZE`

Instead of

  `thread.arch.priv_stack_start - CONFIG_PRIVILEGED_STACK_SIZE`

For the `end`, use the same equation of `top_of_priv_stack` in
the `arch_user_mode_enter()`

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-07-27 20:47:51 +03:00
Stefan Petersen
840e93fd60 drivers: flash: spi_nor: Print flash size properly when < 1 MiByte
When using SPI-NOR SFDP autodeteection, the flash size printed to
the log is rounded to 1 MiByte. If flash is smaller than 1 MiByte
it is printed as 0 MiByte.

With this patch smaller flash sizes are printed in kiByte, for instance
512 kiByte is printed correctly.

Signed-off-by: Stefan Petersen <spe@ciellt.se>
2024-07-27 20:47:39 +03:00
Emil Gydesen
7ed8bb5020 Bluetooth: BAP: Add PAST Kconfig dependency for BASS
The broadcast assistant will only be able to send
BT_BAP_BASS_PA_REQ_SYNC_PAST if
CONFIG_BT_PER_ADV_SYNC_TRANSFER_SENDER is enabled.

Similarly the scan delegator will only set
past_supported = true if
CONFIG_BT_PER_ADV_SYNC_TRANSFER_RECEIVER is enabled.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-27 20:47:26 +03:00
Fabio Baltieri
32fafc7176 input: analog_axis: add output inversion
The driver right now only allows inverting the input value, which can be
useful for differential channels but is quite confusing for single ended
ones. Implement a simple output inversion flag instead to make up for
that.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-07-27 20:47:18 +03:00
Gaofeng Zhang
27270fa14d modules: hostap: fix disconnect print fail log
WIFI_REASON_DISCONN_UNSPECIFIED is 1, when disconnect reason is 0,
wpas_to_wifi_mgmt_disconn_status return the
WIFI_REASON_DISCONN_UNSPECIFIED and print error log "Disconnection
request failed (1)"

Signed-off-by: Gaofeng Zhang <gaofeng.zhang@nxp.com>
2024-07-27 15:19:56 +03:00
Emil Gydesen
8be6db67fc Bluetooth: ISO/BAP: Refactor BIS bitfield
Refactors teh BIS bitfield values used for ISO
and BAP.

Previously BIT(1) meant BIS index 1, which was a Zephyr choice
in the early days of ISO, as the BT Core spec did not use
a bitfield for BIS indexes.

Later the BASS specification came along and defined that
BIT(0) meant BIS index 1, which meant that we had to shift BIS
bitfields between BAP and ISO.

This commit refactors the ISO layer to use BIT(0) for Index 1 now,
which means that there is no longer a need for conversion
between the BAP and ISO layers, and that we can use a value
range defined by a BT Core spec (BASS).

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-27 15:19:46 +03:00
Carles Cufi
539f3a1600 scripts: west_commands: nrfjprog: Change tool-opt help text
The current option used as an example, --recover, is actually a separate
option in the runner itself. Instead use --clockspeed as an example,
which is applicable to all nrfjprog commands.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-07-27 15:19:39 +03:00
Carles Cufi
7eb364b082 scripts: west_commands: nrfjprog: Add support for --qspiini
Allow for users to provide a --qspiini parameter that is passed directly to
the nrfjprog executable but only in the --program operation. This is
required since e073210ec2 enabled the
-O/--tool-opt for all operations, but --qspiini is only allowed combined
with --program.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-07-27 15:19:39 +03:00
Chun-Chieh Li
f77023e649 drivers: hwinfo: add NuMaker support for device id
Add device id for Nuvoton NuMaker series

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2024-07-27 15:19:23 +03:00
Jordan Yates
5e2a4bca06 disk: flashdisk: init in POST_KERNEL
Initialise flashdisk devices in `POST_KERNEL` instead of `APPLICATION`.
This aligns with the other disk drivers, which are all `POST_KERNEL`,
and causes no problems as `disk_access_register` is a purely software
action and does not perform any operations on the underlying device.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-27 15:19:14 +03:00
Jordan Yates
9cb58cf53a disk: flashdisk: default enable if dts exists
Enable `DISK_DRIVER_FLASH` by default if the devicetree node exists, as
the other disk drivers do.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-27 15:19:14 +03:00
Jordan Yates
6bd77c848c disk: use standard DT kconfig dependencies
Use `depends on DT_HAS_* default y` instead of `default y if DT_HAS_*`
as the driver depends on devicetree instance.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-27 15:19:14 +03:00
Jordan Yates
c9b1daa7ae tests: fs: fat_fs_api: disable flash disk in RAM test
Disable the flash disk driver in the RAM driver test to prevent the
test using the wrong disk in the tests.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-27 15:19:14 +03:00
Marcin Niestroj
35059a1b3a west: runners: esp32: respect --esp-device during erase
When --erase was specified, esp32 runner was autodetecting serial port to
be used, regardless of --esp-device argument.

Append '--port SERIAL_DEVICE' parameter earlier, so that erase command
invocation uses explicitly specified serial device.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-07-27 15:19:01 +03:00
Jonathan Rico
147ee3daaf Bluetooth: host: Send host num completes as early as possible
The Softdevice Controller now sends the disconnect event only after
receiving all Host Num Completes for the packets it sent to the host.
This is done for security reasons.

In our current reassembly logic, it does not really matter when we
withhold the num complete.

Before this patch, it's the first fragment that is withheld, and after
the patch it will be the last fragment that is withheld until the host
is done processing.

The flow control properties are maintained, just in a different way.

Co-authored-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-07-27 15:18:51 +03:00
Jonathan Rico
32212bfb63 Bluetooth: host: extract sending of host num complete
The functionality is moved in preparation of the next commit which will
re-use this function from somewhere else.

Also add (default-on) asserts that we are able to allocate and send the
command. If that is not the case, we will leak buffers from the PoV of
the controller, leading to a stall in data transfer.

Depending on the error, we could probably recover using a disconnection.
For now, do the safe thing and stop the whole stack.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-07-27 15:18:51 +03:00
Sean Madigan
4284f99870 bluetooth: host: hci_core: Safer checking of conn complete events
The spec only guarantees the connection complete event parameters
are valid if the status is BT_HCI_ERR_SUCCESS. When the status is
not BT_HCI_ERR_SUCCESS, the host shall ignore the other parameters.

See Vol 4, Part E, 4.5 Command error handling:
"""
If an error occurs for a command for which an HCI_Command_Complete event
is returned, the Return Parameters field may only contain some of the
return parameters specified for the command.
...
The above also applies to commands that have associated command specific
completion events with a Status parameter in their completion event, with
the exceptions shown in Table 4.1, Event Valid parameters
...
Event                           | Valid parameters
------------------------------------------------------------
LE_Connection_Complete          | none
LE_Enhanced_Connection_Complete | none
"""

Refactor `le_legacy_conn_complete`, `le_enh_conn_complete_v2` and
`le_enh_conn_complete` to check and handle the status before handling
any other parameters.

An issue was seen where SDC returned event with status
`BT_HCI_ERR_UNKNOWN_CONN_ID`, but because adv_handle and sync_handle
were not invalid the event was not handled.

Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
2024-07-27 15:18:32 +03:00
Ryan McClelland
ec41afaa5d drivers: i3c: add KConfig to perform rstact during bus init
Sometimes, performing a rstact which will reset all devices during init
on the bus may not be ideal. Add a KConfig to easily turn off.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-07-27 15:18:18 +03:00
Daniel Leung
b2f3d801b4 twister: pytest: use test timeout as the default base timeout
The default base timeout for pytest is statically set by
the TwisterHarnessConfig class to be 60 seconds. However,
sometimes it takes longer than 60s before the app starts
to run, especially on emulator/simulator where it takes
quite some time to start. So pass the test timeout as
the base timeout via pytest command line argument.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-07-27 15:18:01 +03:00
Andreas Klinger
dda519d48c drivers: gnss: remove dangerous loop
When ubx_m10_ubx_cfg_rst is returning something negative there is a loop
in the code which in turn can easily turn into an endless loop if the
function is never returning something positive or zero.

Signed-off-by: Andreas Klinger <ak@it-klinger.de>
2024-07-27 15:17:52 +03:00
Andreas Klinger
a1eb11bb59 drivers: gnss: remove sleep during init
It's not allowed to sleep during initialization of driver as called by
bg_thread_main --> z_sys_init_run_level(INIT_LEVEL_POST_KERNEL)
               --> do_device_init  -->  ubx_m10_init

There is no thread_base.timeout struct setup so far.

Signed-off-by: Andreas Klinger <ak@it-klinger.de>
2024-07-27 15:17:52 +03:00
Andreas Klinger
7c8033f8d8 drivers: gnss: cleanup function returning
Cleanup more returns and gotos as they are redundant.

Signed-off-by: Andreas Klinger <ak@it-klinger.de>
2024-07-27 15:17:52 +03:00
Andreas Klinger
f89f2ae46c drivers: gnss: clean up labels
Clean up labels no longer needed.

Signed-off-by: Andreas Klinger <ak@it-klinger.de>
2024-07-27 15:17:52 +03:00
Andreas Klinger
8d8fe9d169 drivers: gnss: fix setting of baudrate
ubx_m10_init_pipe is calling modem_backend_uart_init which in turn is
memsetting the backend data structure and thus also overwrites the work
queue function pointer in it.

Remove call to ubx_m10_init_pipe as data structures are already set up.

Tested with u-blox NEO M9N.

Signed-off-by: Andreas Klinger <ak@it-klinger.de>
2024-07-27 15:17:52 +03:00
Fabio Baltieri
03f1dd413d input: paw32xx: only reschedule the handler if motion is asserted
The motion event handler is currently setup to always retrigger until
there's no more motion data from the sensor. Change that to only
retrigger if the motion pin is asserted when the handler has finished
running, this saves a bunch of unnecessary spi transactions.

Ideally this driver would use a level interrupt, but I'd rather avoid
that as that is unsupported by many gpio controllers.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-07-27 15:17:38 +03:00
Chris Friedt
d0808473f2 tests: posix: net: open native_sim in c++,posix,net,native case
Prior to the fixes in the previous commits, combining a build
for native_sim with

CONFIG_CPP=y
CONFIG_POSIX_API=y
CONFIG_STD_CPP20=y
CONFIG_REQUIRES_FULL_LIBCPP=y

would fail.

It succeeds now.

This change adds a testcase to monitor that scenario in CI.

Note: this was partially necessary because the deprecation of
CONFIG_NET_SOCKETS_POSIX_NAMES is not yet complete, so there
is a dependency cycle, and also because <sys/types.h> was
pulling in the host <sys/types.h> instead of Zephyr's or one
of the embedded OSes we support.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-07-27 15:17:24 +03:00
Chris Friedt
6cf557d64a posix: posix_types.h: simplify conditions on pthread types
Simplify the conditions for pthread type declaration

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-07-27 15:17:24 +03:00
Chris Friedt
6667b500c6 posix: sys/stat.h: move declarations to posix_types.h
A number of types such as uid_t, gitd_t, etc, were defined in
sys/stat.h to workaround compatibility issues many years ago.

Since posix_types.h is slated to become equivalent to
sys/types.h in terms of standard headers, move these types
to where they belong.

For more information, please see

https://pubs.opengroup.org/onlinepubs/9699919799/\
 basedefs/sys_types.h.html

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-07-27 15:17:24 +03:00
Chris Friedt
81f5205006 net + posix: avoid host includes when building for native_sim
A corner case involving C++, posix, networking, and native_sim
was causing problems.

Even though C and C++ builds should include zephyr/posix/.. in
the default search path with `CONFIG_POSIX_API=y`, for some
reason, the native compiler pulls in /usr/include first anyway.

The stat.h header pulled in <sys/types.h> (which is normally
fine) but due to the native build, it was pulling in
/usr/include/sys/types.h, from the host toolchain.

Explicitly include <zephyr/posix/posix_types.h> instead of
<sys/types.h> from stat.h, and continue using the workarounds
for native builds (explicitly including zephyr/posix/arpa/net.h
from net/sockets.h .

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-07-27 15:17:24 +03:00
Chris Friedt
6a0593d554 Revert "net: socket: fix sys/_timespec.h not found error"
This reverts commit 269729a5db.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-07-27 15:17:24 +03:00
Pisit Sawangvonganan
b34349eed9 net: utils: improve hex digit character checking in net_bytes_from_str
Several refactors and improvements for `net_bytes_from_str` as follows:
- Replaced manual hex digit checks with `isxdigit()`.
- Changed variable `i` from unsigned int to size_t for consistency with
  the `strlen()` return type.
- Added `src_len` to store the result of `strlen(src)` to avoid
  multiple calls to `strlen` in the `for-loop`.
- Ensured casting to `unsigned char` before passing to `isxdigit()` to
  prevent undefined behavior.
- Explicitly cast the result of `strtol()` to `uint8_t` to match
  the buffer type.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-27 15:16:42 +03:00
Jordan Yates
7b18cc112c flash: nrf_qspi_nor: don't auto call pm_device_runtime_enable
Device drivers should not be calling `pm_device_runtime_enable` on
themselves, it should be left up to the application. If automatic
enablement is desired, `zephyr,pm-device-runtime-auto` exists as a
devicetree property.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-27 15:16:23 +03:00
Jordan Yates
0b935295c6 flash: nrf_qspi_nor: remove PM_DEVICE_RUNTIME guards
The `pm_device_runtime_get` and `pm_device_runtime_put` functions work
correctly regardless of whether `PM_DEVICE_RUNTIME` is enabled or not.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-27 15:16:23 +03:00
Jordan Yates
db87eface2 flash: nrf_qspi_nor: remove excessive semaphore
The `count` semaphore was being used as an atomic counter, so replace
it with an atomic variable, which is a simpler solution and enables
removing the conditionals with `PM_DEVICE_RUNTIME`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-27 15:16:23 +03:00
Jun Lin
51cfbd8c5f drivers: espi: host_subs: npcx: fix LDN register definition of PMCH
The register offset definition of the I/O port Data Base Address
register (0x60, 0x61) and Command/Status Base Address register
(0x62, 0x63) are reversed. This commit fixes it to avoid confusion.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2024-07-27 15:15:22 +03:00
Rubin Gerritsen
893c4ed4f9 modules: hal_nordic: Support EGU130 driver instance
Adds the glue code to enable this.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-07-27 15:15:07 +03:00
Rubin Gerritsen
73ec3467e7 modules: hal_nordic: Support nRF54L15 EGU driver instances
Adds the glue code to enable those.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-07-27 15:15:07 +03:00
Sebastian Kwaśniak
7f6210af81 boards: riscv: neorv32: Add platform and model name
NEORV32 doesn't provide platform and model name in it's dts file.
This makes hard for some tools to determine with what board they're
working with. Fixed it by adding model and platform name in it's dts file.

Signed-off-by: Sebastian Kwaśniak <skwasniak@internships.antmicro.com>
Signed-off-by: Mateusz Hołenko <mholenko@antmicro.com>
2024-07-27 15:14:46 +03:00
Olivier Lesage
de147d1ce8 samples: bluetooth: minor logging changes in PAwR samples
Some minor logging improvements based on my user experience

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
2024-07-27 15:14:37 +03:00
Olivier Lesage
94d86b9501 samples: bluetooth: fix periodic_sync_rsp sample connection
Was broken after BT_LE_ADV_OPT_USE_NAME and
BT_LE_ADV_OPT_FORCE_NAME_IN_AD were deprecated.

The periodic_adv_rsp sample
looks for the string "PAwR sync sample" and connects based on that.

So, the periodic_sync_rsp sample needs to advertise this string.

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
2024-07-27 15:14:37 +03:00
Flavio Ceolin
5822267c23 serial: uart_async_rx: Avoid possible division by zero
Ensures that config->but_cnt is not zero.

Fixes #66800
CID #338107

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-07-27 15:14:26 +03:00
Daniel Berlin
08e44f9dae bl5340_dvk: Move MIPI_DBI interface back to spi4
Commit 3dbbb73 accidentally changed the MIPI_DBI spi interface from
spi4 to spi2 for this board during conversion to use the MIPI_DBI wrapper.

This does not work, and this change reverts it back to spi4.

Tested on actual boards (bl5340, bl5340pa).
Before this change LVGL demo displays nothing, after this change it works
fine again.

Signed-off-by: Daniel Berlin <dberlin@dberlin.org>
2024-07-27 15:14:15 +03:00
Manuel Argüelles
ec7289039b soc: s32k3: fix RAM retention
Initialize TCM and SRAM contents only after a destructive reset (e.g.
PoR reset). SRAM retains content during functional reset through a
hardware mechanism, therefore accesses do not cause content
corruption errors.

Fixes #75912

Signed-off-by: Manuel Argüelles <marguelles.dev@gmail.com>
2024-07-27 15:14:01 +03:00
Emanuele Di Santo
271ef88e05 drivers: mbox: nrf_bellboard: only clear events that raised the IRQ
The current implementation is such that if two or more events are
generated in quick succession, only one is handled. This would
have happened as follows.

At the beginning of the ISR, the contents of INTPEND are read.
Then, the ISR unconditionally clears all events that are set.

When two (or more) events are generated in rapid succession,
it may happen that by the time we enter the ISR, INTPEND is set
only for one event, but while we process the ISR, EVENTS_TRIGGERED
will be set for more than just that one event (more events are
generated).

By unconditionally clearing all events, we can potentially lose
all events that are generated during ISR processing.

This patch changes the ISR so that it only clears those events
that have a corresponding bit set in INTPEND at the time it is read.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2024-07-27 15:13:45 +03:00
Gerard Marull-Paretas
4ba5ad99cc drivers: i3c: fix/improve Doxygen
- Use references whenever possible instead of literals (e.g. `@c`)
- Remove incorrect usages of `@see`
- Fix incorrect usage of INTERNAL_HIDDEN blocks
- Detail Kconfig-dependent options with `@kconfig{}`
- Other minor enhancements

Ref. https://www.doxygen.nl/manual/autolink.html

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-27 15:13:27 +03:00
Gerard Marull-Paretas
003244e069 drivers: i3c: avoid duplicating BCR/LVR docs
Instead use Doxygen anchors to reference to a single source of truth.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-27 15:13:27 +03:00
Gerard Marull-Paretas
6f0b470bba drivers: i3c: use GENMASK/FIELD_GET if possible
This avoids the need to define a position shift macro, and makes code less
verbose.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-27 15:13:27 +03:00
Gerard Marull-Paretas
6ce0b0aab2 drivers: i3c: improve/fix include list
Include what is strictly needed.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-27 15:13:27 +03:00
Robert Lubos
bfe958a7f1 net: sockets: tls: Fix poll update event check
In case POLLIN is set, and no new application data has been detected,
the ztls_poll_update_ctx() should only return -EAGAIN if no other events
are available for the socket. Otherwise, the function may end up
busy-looping, in case for example POLLOUT is also monitored for the
socket.

Current check verifying that was wrong, as it caused to function to
return -EAGAIN even if some other events could've been reported for the
socket.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-27 15:13:17 +03:00
Vidar Lillebø
9b7c9ea720 dts: nordic: nrf54l15: Fix secure GPIOTE IRQn
Updates dts files to use the same GPIOTE interrupt lines as NRFX
for zephyr when TF-M is used.

Signed-off-by: Vidar Lillebø <vidar.lillebo@nordicsemi.no>
2024-07-27 15:13:00 +03:00
Fin Maaß
da090f1cb9 drivers: ethernet: phy: phy_mii: use no-reset option
the dts binding of the ethernet-phy has the option
"no-reset" and the according driver already has the
right logic to make use of it, but unfortunately
the connection between them was missing.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-07-27 15:12:49 +03:00
Emil Gydesen
f338bf6fae Bluetooth: Host: Discard advertising data if not explicit scanning
If the application is not explicitly scanning, then there is not
really any need to parse advertising reports nor send them to the
application.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-27 15:12:39 +03:00
Jimmy Zheng
421f81a243 arch: riscv: remove PMP stack guard for stack overflow handler
When RISCV_ALWAYS_SWITCH_THROUGH_ECALL is enabled, do_swap() enables PMP
checking in is_kernel_syscall.
If the PMP stack guard is triggered and do_swap() is called from the
fault handler, a PMP error occurs because the stack usage violates the
previous PMP setting.

Remove the stack guard setting during a stack overflow handler to allow
enabling PMP checking safely in fault handler.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2024-07-27 15:12:25 +03:00
Jimmy Zheng
58bda887ce arch: riscv: update PMP setting to privileged mode for fault handler
When RISCV_ALWAYS_SWITCH_THROUGH_ECALL is enabled, do_swap() enables PMP
checking in is_kernel_syscall.
If a user thread violates memory protection and do_swap() is called from
the fault handler, a PMP error occurs because the thread is in privileged
mode but still using the old user mode PMP setting.

Update the PMP setting to privileged mode for fault handler.
This also enables the stack guard for user thread's privileged stack in
fault handler.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2024-07-27 15:12:25 +03:00
Declan Snyder
9f56ff5d64 drivers: mdio: Clear interrupt signal in ISR
Apparently, disabling the intterupt is not enough,
because without clearing the flag, some errors are occurring.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-07-27 15:10:42 +03:00
Tom Burdick
5474b611cb icm42688: Fix divide by zero potential
There were code paths that could have lead to divide by zero given an
invalid scale setting for accel or gyro. In practice this should be an
invalid setup even before getting to these conversion functions. The
conversion functions now better show all valid values are accounted for
by using CODE_UNREACHABLE in the default case.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-07-27 15:10:27 +03:00
Vinayak Kariappa Chettimada
04e3d0081b Bluetooth: Controller: Fix Advertising PDU memory allocation
Fix Advertising PDU memory allocation for redundant Periodic
Advertising related PDU allocations. The buffer count
related to Periodic Advertising was included twice.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-07-27 15:09:39 +03:00
Maochen Wang
bf42164084 net: wifi: Fix the nm type check error
Fix the NM iface type check error, should use (1 << WIFI_TYPE_STA),
instead of WIFI_TYPE_STA. Same for WIFI_TYPE_SAP.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-07-27 15:09:20 +03:00
Anas Nashif
2a39132645 device: remove const qualifier from node label copy
k_usermode_string_copy does not accept const in its arguements.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-27 15:09:10 +03:00
Anas Nashif
c5e6416a65 tests: device: test CONFIG_DEVICE_DT_METADATA=y
Looks like this option is not tested with userspace enabled.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-07-27 15:09:10 +03:00
Rubin Gerritsen
2967bd847f Bluetooth: HCI: Expose bt_hci_conn_lookup_handle()
When implementing vendor specific HCI APIs and events,
we want to be able to convert between host objects,
handles and back again.

Exposing this API makes that possible

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-07-27 15:09:00 +03:00
Rubin Gerritsen
e28207d61b Bluetooth: HCI: Expose bt_hci_per_adv_sync_lookup_handle()
When implementing vendor specific HCI APIs and events,
we want to be able to convert between host objects,
handles and back again.

Exposing this API makes that possible.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-07-27 15:09:00 +03:00
Rubin Gerritsen
5b14748616 Bluetooth: HCI: Expose bt_hci_adv_lookup_handle()
When implementing vendor specific HCI APIs and events,
we want to be able to convert between host objects,
handles and back again.

Exposing this API makes that possible.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-07-27 15:09:00 +03:00
Robert Lubos
dd0a95ec15 tests: net: lib: http_server: core: Add test for RST_STREAM frame
Add test case verifying that stream is closed when RST_STREAM frame is
received.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-27 15:08:40 +03:00
Robert Lubos
338e41a063 tests: net: lib: http_server: core: Add test for trailing header frame
Add test case covering a scenario when a client sends a trailing header
frame in a request.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-27 15:08:40 +03:00
Robert Lubos
a99f70ce42 tests: net: lib: http_server: core: Add tests for continuation frame
Add test cases for continuation frame processing.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-27 15:08:40 +03:00
Robert Lubos
71e0b9fac2 tests: net: lib: http_server: core: Add tests for header with priority
Add test cases verifying that request containing header frame with
priority flag set is processed properly.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-27 15:08:40 +03:00
Robert Lubos
1da42b6626 tests: net: lib: http_server: core: Add tests for frames with padding
Add tests verifying that requests which include frames with padding are
processed correctly.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-27 15:08:40 +03:00
Robert Lubos
d1ebddb110 tests: net: lib: http_server: core: Add tests for dynamic POST/GET
Add tests cases covering interaction with dynamic resources with
POST/GET requests.

Simplify HTTP2 request generation to facilitate adding more tests.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-27 15:08:40 +03:00
Robert Lubos
938088641c tests: net: lib: http_server: core: Add test for connection close
Add test case verifying that the server keeps the connection open if no
Connection: close header is present in the request.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-27 15:08:40 +03:00
Robert Lubos
a6d494b16f tests: net: lib: http_server: core: Clarify existing tests
Remove pointless helper functions, the test code can simply be included
in the test case w/o code duplication.

Clarify the naming of existing test cases. Backward compatibility simply
tests HTTP1. The upgrade test wasn't really testing HTTP upgrade, so
rename the test case too. Add a new test case actually verifying HTTP
upgrade.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-27 15:08:40 +03:00
Robert Lubos
ff65815a3b tests: net: lib: http_server: core: Extend start/stop test
Ensure it's possible to restart the server w/o issues after a client
connected.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-27 15:08:40 +03:00
Robert Lubos
5a23c2d602 tests: net: lib: http_server: core: Cleanup before adding more tests
Do some cleanup regarding naming used in the test suite to prepare it
for adding more test cases.

Extract common setup/teardown into respective before and after ztest
functions to simplify test code. Proper before and after functions also
ensure that individual test case failure does not disrupt other tests
operation.

Split the tests into two separate test suites, one for those which
require pre-setup and second for those which don't.

Finally, enable receive timeout on the client socket to ensure tests
won't stall in case of errors.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-27 15:08:40 +03:00
Robert Lubos
1e2b2c79a5 tests: net: lib: http_server: Rename prototype test suite
"prototype" is ambiguous in this regard, as it doesn't really tell what
the test suite is testing. As tests in this test suite verify core HTTP
server functionality, rename it to "core".

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-27 15:08:40 +03:00
Gerard Marull-Paretas
a1de1d6cb3 modules: hal_nordic: nrf-regtool: enforce in-tree devicetree package
It looks like nrf-regtool depends on the
https://pypi.org/project/devicetree/ Python package, which contains an
old copy (https://github.com/zephyrproject-rtos/python-devicetree) of
the in-tree devicetree package.

Because no major changes have happened in the devicetree scripts, this
likely went unnoticed. However, realized today that such old package is
not able to parse bindings with multiple buses (e.g. in I3C, where we
have `bus: [i3c, i2c]`).

While a proper solution is discussed, inject `PYTHONPATH` with the
in-tree library.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-27 15:08:30 +03:00
Dmitrii Golovanov
c59412b1bf ztest: shell: Fix compilation error for NEWLIB_LIBC
Fix compilation error implicit declaration of function 'free'
in case of `CONFIG_NEWLIB_LIBC`.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-07-27 15:08:14 +03:00
Jordan Yates
56343079a4 samples: bt: ext_adv: don't terminate invalid conn
If the remote side has already terminated the connection (or the
connection failed to establish), don't attempt to terminate an invalid
connection object. Instead, start advertising again immediately.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-27 15:07:55 +03:00
Jordan Yates
a96b017e3e modules: mbedtls: rename MBEDTLS_PSA_CRYPTO_RND_SOURCE
Rename `MBEDTLS_PSA_CRYPTO_RND_SOURCE`->`MBEDTLS_PSA_CRYPTO_RNG_SOURCE`
as all other options use `RNG` for random number generator instead of
`RND` for random number.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-27 15:07:44 +03:00
Fin Maaß
27aa4bc988 drivers: ethernet: add get_phy function
add get_phy function to the ethernet drivers.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-07-27 15:07:26 +03:00
Fin Maaß
1f38d9dfef net: shell: iface: add infos from eth phy
add information about the ethernet
phy and the current link speed to the
net iface command.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-07-27 15:07:26 +03:00
Fin Maaß
2fb983a427 net: l2: ethernet: add way to access phy
add a way to access the ethernet phy
device via the ethernet device.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-07-27 15:07:26 +03:00
Manuel Argüelles
a8ebb05506 soc: nxp: s32k1: obtain system clock freq from dt
In S32K1 devices, Arm Systick clock frequency is equal to the
CPU core clock frequency, and its value can be obtained from
devicetree.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-07-27 15:07:00 +03:00
Johann Fischer
28b2051bda usb: device_next: add support for configuration string descriptor
Change USBD_CONFIGURATION_DEFINE macro to take the address of a string
descriptor node as an argument. This is a breaking change for macro
users, but quite convenient and easy to implement.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-27 15:06:09 +03:00
Johann Fischer
1540ba19d7 usb: device_next: remove unnecessary usbd_device_unlock()
Remove unnecessary usbd_device_unlock() in usbd_add_configuration().

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-27 15:06:09 +03:00
Fin Maaß
ba5b4ae817 drivers: flash: spi_nor: doc: correct comment
the durations in the spi_nor_config struct
are in milliseconds not in microseconds.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-07-27 10:48:33 +03:00
Jamie McCrae
db5a5fa109 samples: tfm_integration: psa_crypto: Disable sample
Disables running this sample as doing so requires qcbor, which
is not apache licensed

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-07-27 10:48:23 +03:00
Emil Gydesen
34f4d2d496 Bluetooth: TBS: Add missing endian handling in TBS
TBS had 2 cases where 16-bit values were not properly
converted to LE before being sent over air.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-27 10:48:09 +03:00
Pisit Sawangvonganan
1100393b79 net: lwm2m: optimize socket_loop by using local variables
Changes include:
- Introducing a local `ctx` variable to replace multiple
  `sock_ctx[i]` references.
- Using a local `revents` variable to simplify repeated
  `sock_fds[i].revents` checks.
- Consolidating conditional checks for socket events
  (ZSOCK_POLLERR, ZSOCK_POLLNVAL, and ZSOCK_POLLHUP) as they are
  individual bit definitions, allowing them to be checked simultaneously.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-27 10:47:58 +03:00
Peter Mitsis
20dee1a6e9 kernel: Tweak z_unpend_thread_no_timeout() API
Removes the ALWAYS_INLINE attribute from the definition of the
routine z_unpend_thread_no_timeout() to fix an unresolved symbol
error that was occurring with some compilers.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-07-27 10:47:41 +03:00
Peter Mitsis
9efb8fde61 kernel: Remove z_sched_abort() prototype
The routine z_sched_abort() no longer exists.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-07-27 10:47:41 +03:00
Johann Fischer
18c624e8df include: usb: fix designator order in usbd.h header
Fix "designator order for field 'usbd_desc_node::ptr' does not match
declaration order in 'usbd_desc_node'" error when building applications
with CONFIG_CPP enabled.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-27 10:47:00 +03:00
Ryan McClelland
919d908d73 drivers: i3c: shell: add i2c scan command
This adds a workaround command to perform an I2C scan on
an I3C bus.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-07-27 10:46:50 +03:00
Konrad Derda
ec0d6ab885 net: l2: openthread: set multicast loop by default
When multicast packet is forwarded to the OpenThread stack it has to
have its "multicast loop" flag enabled to be processed by the stack
itself instead of only propagating it further.

Signed-off-by: Konrad Derda <konrad.derda@nordicsemi.no>
2024-07-27 10:46:38 +03:00
aab5730d0f drivers: mipi_dbi: reduce the RAM overhead
Constify the config and reorder the data fields for better packing.
This reduces the RAM usage of `mipi_dbi_spi` by 20 bytes.

Signed-off-by: Michael Hope <mlhx@google.com>
2024-07-27 10:45:34 +03:00
Gaofeng Zhang
a5781547d6 net: ipv4: Fix tx_pkts slab leak in send_ipv4_fragment
In the send_ipv4_fragment function, if net_pkt_get_data returns
fail, a tx_pkts slab leak will occur. If leak exceeds the
maximum number CONFIG_NET_PKT_TX_COUNT of tx_pkts slab, tx_ptks
will be used up, and the related modules(dhcp, ping and so on)
of net cannot alloc tx_pkt slab, and will sleep and can not
return successfully until available slab.
dhcp work or ping work cannot be executed beacause can't alloc
memory, and ping command cannot return, console also fails to
input commands, and the console hang problem occurs.

Signed-off-by: Gaofeng Zhang <gaofeng.zhang@nxp.com>
2024-07-27 10:45:14 +03:00
Ian Morris
a6a27aa43e drivers: sensor: tmp116: Add ability to set conversion averaging mode
Adds support for setting the number of conversion results that are
collected and averaged before updating the temperature register.

Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
2024-07-27 10:45:01 +03:00
Robert Lubos
dfbdfb05da tests: net: sockets: misc: Fix SO_BINDTODEVICE test
The test case for SO_BINDTODEVICE socket option was flaky, the client
socket always sent the datagram to the IP address of the second
interface, so in theory every packet should end up on that interface.
In practice though, due to imperfect loopback packet handling, the test
worked as the packet ended up on the interface it was sent from.

The test should send datagrams to the IP addresses of the interface 1
and 2 alternatively. The server socket binds to ANY address, so w/o
interface binding it should receive all datagrams, so it allows to
verify if SO_BINDTODEVICE filtering works fine.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-27 10:44:48 +03:00
Konrad Derda
c2747acbff net: ipv6: routing: move checking for an own source address
When IPv6 packet is received, there is a check of the packet's source
address to verify that it is not interface's non-tentative address.

This commit moves this check to the later stages of processing as
packets that can be routed are dropped in the early stage otherwise.

Signed-off-by: Konrad Derda <konrad.derda@nordicsemi.no>
2024-07-27 10:44:48 +03:00
Konrad Derda
b41b7d5da8 net: ipv6: routing: do not loop back already routed packets
If the packet was routed between interfaces by IPv6 module it should
not be looped back but has to be passed to the destination interface
instead.

Signed-off-by: Konrad Derda <konrad.derda@nordicsemi.no>
2024-07-27 10:44:48 +03:00
Konrad Derda
807daf3788 net: ipv6: routing: do not use an original source address for NS
When a packet's transmission is prepared and Neighbor Solicitation is
sent its souce address is always the same as of a packet awaiting -
also for packets routed from an other interface.

Quote from the RFC:
If the source address of the packet prompting the solicitation is the
same as one of the addresses assigned to the outgoing interface, that
address SHOULD be placed in the IP Source Address of the outgoing
solicitation.  Otherwise, any one of the addresses assigned to the
interface should be used.

This commit fixes the behavior.

Signed-off-by: Konrad Derda <konrad.derda@nordicsemi.no>
2024-07-27 10:44:48 +03:00
Konrad Derda
79f7b400cb net: ipv6: routing: match destination address to a given interface
Before packet is routed there is a check verifying if the destination
address is not the device's one. However, the check should be limited
to the packet's original interface. Otherwise, packet cannot be routed
if it is destined for an other interface of the device.

Signed-off-by: Konrad Derda <konrad.derda@nordicsemi.no>
2024-07-27 10:44:48 +03:00
Seppo Takalo
6addba5698 net: lwm2m: Verify X509 hostname when URI contains valid name
Enable hostname verification in DTLS handshake when server URI contains
valid hostname.
When URI is given just as IP address, don't fill up the
ctx->desthosname or enable hostname verification.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-07-27 10:44:27 +03:00
Seppo Takalo
9fc2048bcc tests: lwm2m: Add Portfolio testcases
Add testcases:
* LightweightM2M-1.1-int-1630 - Create Portfolio Object Instance
* LightweightM2M-1.1-int-1635 - Delete Portfolio Object Instance

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-07-27 10:44:12 +03:00
Guennadi Liakhovetski
1497f77cc8 intel: adsp: make SRAM power-off configurable
Currently the code suggests, that setting the SRAM disabling mask to
0 skips powering off SRAM, whereas in fact it's the address of the
mask variable that's checked for NULL. Make this consistent and let
platforms select whether SRAM power down should be selected.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-07-27 10:44:02 +03:00
Bjarki Arge Andreasen
280fbec58e net: lib: sockets: socketpairs: Update socketpair mem alloc
The memory allocation for socketpairs is not conformant to the new
MEM_POOL_ADD_SIZE_ mechanism for allocating heap memory.

Specifically CONFIG_NET_SOCKETPAIR_HEAP can not be selected unless
the user has specified CONFIG_HEAP_MEM_POOL_SIZE. We should be
using MEM_POOL_ADD_SIZE_ to add to the heap if the user wants to
use it for socketpair allocation.

Additionally increase the size of pre-allocated sockets to 8 from 1
to support larger devices by default, taking into consideration the
required socketpairs and buffer sizes when using
WIFI_NM_WPA_SUPPLICANT.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-07-27 10:43:32 +03:00
Robert Lubos
35fe353ad6 net: lib: coap_client: Replace send_mutex with more generic lock
Introduce a more generic mutex for protecting coap_client structure.

This allows to avoid a certain race condition when sending consecutive
CoAP requests. The case was, that when a CoAP receive thread notified
the application that a complete response was received, and the
application wanted to send another request from the application thread,
the consecutive call to coap_client_req() might've failed if the
application thread has higher priority than the CoAP receive thread
because of the request context cleanup is done after calling the
application callback.
Having a mutex, which is locked while processing the response, and when
attempting to send a new request allows to synchronize threads as
expected.

As this new mutex seemed redundant with the more specialized send_mutex
already present in the coap_client, the latter was removed (i. e.
transmission is also protected with the new mutex).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-27 10:43:15 +03:00
Robert Lubos
2555612265 net: lib: coap_client: Add static keyword where missing
Make sure internal functions are static. Remove unused function.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-27 10:43:15 +03:00
Yong Cong Sin
58f66623aa tests: gdbstub: add build-only test
Add build-only test for existing boards.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-07-27 10:42:59 +03:00
Yong Cong Sin
b97d97ff17 tests: gdbstub: minor refactor to the testcase.yaml
Change the `platform_allow` to multi-line format so that newly
supported archs/boards can be added as a new line.

Refactor the tags out to `common`, and add
`CONFIG_ARCH_HAS_GDBSTUB` filter

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-07-27 10:42:59 +03:00
Yong Cong Sin
79ed64909f arm: debug: gdbstub: fix header
`exc.h` should be `exception.h` now, fix  it.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-07-27 10:42:59 +03:00
Fabian Pflug
ca53d2bf80 net: l2: ieee802154: mgmt: allow beacon payload
The standard does allow for a optional beacon payload, which gets lost
during scan, that could be interesting for the application to access
in the NET_EVENT_IEEE802154_SCAN_RESULT callback.

See section 7.3.1.6 in IEEE Std 802.15.4 for more information about
the beacon payload field. And section 7.3.1 and figure 7-5 about general
beacon frame format.

Signed-off-by: Fabian Pflug <fabian.pflug@grandcentrix.net>
2024-07-27 10:42:45 +03:00
Guennadi Liakhovetski
293fa118df intel: adsp: fix firmware image in IMR overwriting
The IMR is used by the firmware to hold its own copy for hot-booting
and for an "L3 heap," used for slow large allocations like loadable
libraries. The beginning of the L3 heap is currently hard-coded and
now the firmware has grown too large to fit into the dedicated area
so that it gets overwritten by heap allocations. This is a critical
bug that needs an urgent solution, for which we increase the offset,
but a real fix must calculate the L3 heap offset automatically.

BugLink: https://github.com/thesofproject/sof/issues/9308
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-07-27 10:42:27 +03:00
Gerard Marull-Paretas
a0da850497 drivers: i3c: common: add reference to address restrictions
This makes actions taken by the code easier to follow for newbies like
me.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-27 10:42:14 +03:00
Gerard Marull-Paretas
ba0ccae924 drivers: i3c: common: improve slot bit position code readability
Perform the modulo operation on `bitpos` before using it. This should
make code slightly more clear.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-27 10:42:14 +03:00
Jimmy Zheng
89250adea6 drivers: interrupt_controller: intc_nuclei_eclic: fixed $ra polluted
Both $ra and $t2 are caller-saved registers and may be modified in ISR
callback. Save $ra to stack to follow the calling convention.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2024-07-27 10:42:03 +03:00
Fabio Baltieri
a7c8ce52f5 lib: os: change __printk_get_hook return type to printk_hook_fn_t
Not sure why this was returning a void * but it seems to make sense to
return the correct type instead.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-07-27 10:41:01 +03:00
Fabio Baltieri
36768aa7ff lib: os: use a typedef for __printk_hook_install argument
Use a typedef for the printk hook function argument.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-07-27 10:41:01 +03:00
Fabio Baltieri
ef14c9b867 lib: os: add a header for printk hook functions
Add a zephyr/printk.h header for the __printk_hook functions, these are
currently manually declared by all console drivers for no good reason.

Move the documentation into the header and also unify the way that
console drivers call the function.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-07-27 10:41:01 +03:00
Fabio Baltieri
84cddc6ab3 lib: os: make _char_out static
Looks like this was really meant to be static, there are explicit
getters and setters for it anyway.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-07-27 10:41:01 +03:00
Muhammad Munir
04011dafe0 net: lib: dhcpv4: added router id in response options
When running dhcp, it was not assigning gateway/router
address to the client devices. It is fixed in this PR.

Signed-off-by: Muhammad Munir <muhammad.munir@zintechnologies.com>
2024-07-27 10:40:17 +03:00
Patryk Kuniecki
3904384ab7 docs: ite: Replace old links
ITE website had rework, and some of the links don't work.

Signed-off-by: Patryk Kuniecki <patryk.kuniecki@intel.com>
2024-07-27 10:40:04 +03:00
Jukka Rissanen
cf552905f4 net: context: Check null pointer in V6ONLY getsockopt
Make sure we are not accessing NULL pointer when checking
if the IPv4 mapping to IPv6 is enabled.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-07-27 10:39:40 +03:00
Anke Xiao
e22b533818 samples: subsys: fs: littlefs: add ke17z littlefs test support
Update sample.yaml allows frdm_ke17z and frdm_ke17z512 to test littleFs.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-07-27 10:39:32 +03:00
Anke Xiao
79f96d90cd boards: nxp: update DTS for frdm_ke17z and frdm_ke17z512 boards
Update flash0 configuration to add boot, slot0, slot1 and storage
partitions to test FTFE/FTFA driver and flash.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-07-27 10:39:32 +03:00
Lyle Zhu
f987057eb3 Bluetooth: BR: SM: Fix ltk derive issue
The BR SMP fixed channel BR/EDR Security Manager
(CID 0x0007) cannot be set in L2CAP Information
Response. It is caused by the invalid fix channel
definition used.

Move macro `BT_L2CAP_BR_CHANNEL_DEFINE` to
`l2cap_br_interface.h`, that the macro can be
accessed in smp.c. And remove duplicated
header file include `#include "classic/l2cap_
br_interface.h"` from smp.c.

Define fixed channel, BR/EDR Security Manager
(CID 0x0007), by using `BT_L2CAP_BR_CHANNEL_DEFINE`.

Fix the smp L2CAP channel of BR cannot be found
issue. Use `bt_l2cap_br_lookup_tx_cid` to get
the BR SMP L2CAP channel instead of using
`bt_l2cap_le_lookup_tx_cid`.

Fix the invalid SMP L2CAP channel used when
the BR smp failed.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-07-27 10:39:17 +03:00
Rubin Gerritsen
e23345b4d1 Bluetooth: Host: Fix compiling PAwR Sync without PAST RX
The function `bt_hci_le_past_received_v2()` is not compiled
in for this configuration, so the reference needs to be removed.

Fixes #76268.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-07-27 10:37:56 +03:00
Robert Lubos
33d59f8148 include: zephyr: net: Add version information to public network APIs
Add \since and \version doxygen tags to the networking APIs, so that
they render correctly on the API overview page.

The version used for \since tag was determined, based on the commit that
introduced the header or in individual cases, when the API was
introduced as a part of a larger header (mostly apply for the oldest,
core network APIs).

The version of the API was set as follows:
* components that use EXPERIMENTAL Kconfig symbol were assigned with
  0.1.0
* The oldest, "core" networking APIs were marked as "stable" (1.0.0).
* Everything else ended up as "unstable" (0.8.0).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-27 10:37:41 +03:00
Robert Lubos
1df711420f inlcude: zephyr: net: Fix copy-paste doxygen errors
Use proper description for the socket_can and socket_net_mgmt groups.

Additionally, socket_can group was defined twice, which is incorrect.
For socketcan_utils.h use @addtogroup instead to merge the API
documentation into the socket_can group defined in socketcan.h.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-27 10:37:41 +03:00
Johann Fischer
c7767e30cf drivers: udc_kinetis: emit Start of Frame events
Everything is in place, just emit SOF events.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-27 10:37:27 +03:00
Armando Visconti
a1f9793e0e drivers/sensor: lis2dux12: fix temperature conversion
Return to sensor_api i/f the temperature in Celsius instead
of the register raw value in LSB.

Fixes #75686

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-07-27 10:37:11 +03:00
Armando Visconti
cf20aa050d drivers/sensor: lis2dux12: fix odr and range
The current implementation assumes that sensor odr and range are
always configured in the Device Tree at compile time which might
not be the case.

Instead, application can set odr and range either at compile time
through the DT or using SENSOR_ATTR_SAMPLING_FREQUENCY and
SENSOR_ATTR_FULL_SCALE attributes at runtime, so each driver instance
must keep trace of the latest values set and use them in the sensor
APIs which require them (e.g. lis2dux12_mode_set).

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-07-27 10:37:11 +03:00
Armando Visconti
2eaec8b779 sensor: lis2dux12: fix SENSOR_ATTR_FULL_SCALE case
When setting the full scale through SENSOR_ATTR_FULL_SCALE the
driver must convert the g value (i.e. one of 2g/4g/8g/16g) to
the corrispondent sensor fs raw value.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-07-27 10:37:11 +03:00
Armando Visconti
878b5a9d2e samples/shields: x-nucleo-iks4a1: Add lsm6dsv16x temp display
Extended the x-nucleo-iks4a1 shield standard sample adding lsm6dsv16x
sensor die temperature display.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-07-27 10:37:11 +03:00
Alberto Escolar Piedras
948277e770 release: Zephyr v3.7.99
Set the version to v3.7.99

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-26 21:14:10 +02:00
Alberto Escolar Piedras
36940db938 release: Zephyr v3.7.0
Set the version to v3.7.0

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-26 13:17:55 +02:00
Alberto Escolar Piedras
07ed4b04e3 doc: release: Finalize v3.7.0 release notes and migration guide
Remove working draft status from the v3.7.0 release notes and migration
guide.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-26 13:17:55 +02:00
Alberto Escolar Piedras
0483685642 doc: release: Add v3.7.0 to the list of supported releases
Adds v3.7.0 to the list of supported releases.
The EOL data is currently set as 2.5 years after release
which is the minimum support period we claim.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-26 13:17:55 +02:00
Jan Kowalewski
51c39d7d3f doc: release-notes-3.7: add ctcc/nrf52840
Add ctcc/nrf52840 entry to newly added boards.

Signed-off-by: Jan Kowalewski <jkowalewski@cthings.co>
2024-07-26 10:01:28 +02:00
Jan Kowalewski
58f3714d01 boards: ct: ctcc: add M.2 picture and fix pictures quality
Provides a picture of M.2 version of a card and fixes quality
mPCIe version.

Signed-off-by: Jan Kowalewski <jkowalewski@cthings.co>
2024-07-26 10:01:28 +02:00
Alberto Escolar Piedras
257f9dcb09 doc: 3.7 migration guide: Remove empty headings
Remove headings without content

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-26 09:57:50 +02:00
Alberto Escolar Piedras
4b26e2698d doc: 3.7 migration guide: Minor fixes
Minor fixes to the migration guide

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-26 09:57:50 +02:00
Alberto Escolar Piedras
edb8409e01 doc: 3.7 release_notes: Remove empty headings
Remove headings without content

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-26 09:57:50 +02:00
Alberto Escolar Piedras
48f66a6997 doc: 3.7 release_notes: Remove mention of never introduced options
ac52bd629d removed from the
tree some kconfig options which weren't there for a full release.
Let's also not mention them in the release notes so we avoid
broken links.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-26 09:57:50 +02:00
Alberto Escolar Piedras
66feacc781 doc: 3.7 release_notes: Fix minor issues
Fix a few typos, minor grammar mistakes and simplify grammar
in a couple of sentences.
Also fix indentation in one list.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-07-26 09:57:50 +02:00
Thomas Stranger
cad3320cef doc: release notes: add 1-wire release notes for 3.7
No significant changes to 1-Wire master drivers for the 3.7 release.
Only the changes in the pull-up configuration of the zephyr,w1-gpio
driver added in the migration guide.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2024-07-25 12:25:49 +02:00
Tomi Fontanilles
45ae95241a modules: tf-m: fix git clone during build
As of v2.1.0 TF-M has updated to CMSIS v6 and switched from hosting
the sources to depending on the upstream repository, cloning it at
build time.

To prevent a download from happening during the build, CMSIS v6 sources
are pushed to Zephyr's fork of TF-M and the `CMSIS_PATH` CMake variable
is set to point to them.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-07-25 12:25:32 +02:00
Luis Ubieda
0910c86231 snippets: nus-console: doc: Remove invalid device-tree requirements
These were copied-over from cdc-acm-console by mistake. It's not valid
for this snippet, therefore it's being removed.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-07-25 09:26:20 +02:00
Jamie McCrae
2aa6b81b64 retention: Fix documentation issue
Fixes a minor issue with the return value in the documentation

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-07-25 09:25:21 +02:00
Lyle Zhu
b88948d4e7 doc: release-notes-3.7: Add info for bt_foreach_bond and HCI Driver
Add information support for BR key traversal by bt_foreach_bond.
Add information support for NXP IW612.

Change "Added support for NXP platforms." to
"Added support for NXP RW61x.".

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-07-25 09:24:04 +02:00
Rubin Gerritsen
c3dd1e8a74 Bluetooth: Host: Fix bt_disable() for IPC giving HCI Reset timeout
Some HCI drivers issue HCI reset when disabling, like the IPC HCI
driver. We need to keep the RX thread running to allow receiving
the command complete.

This commit postpones aborting the RX thread until this is done.
The issue happens started occuring after commit
d0e75ab87c4b53d66008c941c38709a2fca9dbea.

Fixes #76202.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-07-25 09:14:39 +02:00
Pisit Sawangvonganan
d6afb8fb52 doc: releases: fix typo release-notes-3.7.rst
Utilize a code spell-checking tool to correct spelling errors
in `doc/releases/release-notes-3.7.rst` file.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-07-24 09:00:47 +02:00
Emil Gydesen
27d0aad70c doc: Bluetooth: Update LE Audio and iso in the BT features page
Added Isochronous channels to the controller
Moved Isochronous channels from LE Audio to the host
Changed the LE Audio to refer to the page where
the feature is more detailed described.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-24 08:59:24 +02:00
Chris Friedt
95d117259a doc: posix: options: explicitly note kconfig options
Note which Kconfig options activate which POSIX Options
and Option Groups.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-07-24 08:59:07 +02:00
Chris Friedt
3ec76e82eb doc: posix: options: make column size consistent
For some reason, when the "Supported" coumn of the posix option
documentation included large strings, it would distort the size
of the entire table.

Move blurbs about undefined behaviour and failing with ENOSYS
to a paragraph above the table, so that all tables have a
homogeneous size.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-07-24 08:59:07 +02:00
Chris Friedt
31c7773484 doc: posix: options: decrement header level
Decrement the header level of option group items so that they
are not listed in the outline.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-07-24 08:59:07 +02:00
Chris Friedt
d95d5a640d doc: posix: options: alphabetize order of options, groups
Reorder posix options and option groups so that they are
in alphabetical order in the documentation.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-07-24 08:59:07 +02:00
Johan Hedberg
099209b7d5 doc: release-notes-3.7: Add more details for Bluetooth HCI drivers
Make sure all added (and removed) HCI drivers are mentioned, and also
provide a reference to the new HCI driver API.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-07-23 12:16:32 +02:00
Johan Hedberg
541479c479 doc: migration-guide-3.7: Group Bluetooth sections together
Move Bluetooth HCI section under the existing Bluetooth top-level section.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-07-23 12:16:32 +02:00
Evgeniy Paltsev
f2259ccd7a doc: add release-notes for Synopsys / ARC architecture and platforms
Add release notes for ARC for 3.7 release

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2024-07-23 09:14:12 +02:00
Joakim Andersson
276850ca02 testsuite: Remove reference to deprecated ztest API
Remove reference to deprecated ztest_test_suite function from API
description.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-07-23 09:14:04 +02:00
Martin Jäger
5681d422fe doc: release-notes-3.7: add DAC release notes
Add newly added DACs for this release.

Signed-off-by: Martin Jäger <martin@libre.solar>
2024-07-22 18:04:22 +02:00
Filip Kokosinski
d472dd8864 doc/releases/release-note-3.7: add notes for Renesas RZ/T2M SoC
This commit adds release notes for the Renesas RZ/T2M SoC.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-07-22 18:03:39 +02:00
Martin Jäger
6a1a3658fe doc: release-notes-3.7: add Task Watchdog section
Mention the newly added shell for the task watchdog subsystem.

Signed-off-by: Martin Jäger <martin@libre.solar>
2024-07-22 18:03:14 +02:00
TOKITA Hiroshi
098376e036 doc: release: 3.7: Add note on RaspberryPi Pico related changes
Adds notes on changes about rpi_pico

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-07-22 18:02:51 +02:00
TOKITA Hiroshi
a004f44b9f doc: release: 3.7: Add note on Renesas RA related changes
Adds notes on changes about rpi_pico

- Add support for Renesas RA8 series

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-07-22 18:02:29 +02:00
Théo Battrel
f2b6490dee Docs: Bluetooth: Update qualification page
With the new Bluetooth Qualification process the QDID and link to
launchstudio are outdated, remove them.

Also remove the ICS listing as it hasn't been updated for a while.
Instead add a download link to the Zephyr Bluetooth Host ICS file.

Update the documentation configuration script to include the ICS file
(`*.pts`) in the external contents.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-07-22 03:29:29 -04:00
Flavio Ceolin
f9de58efb9 pm: Do not select deprecated symbol
PM_DEVICE_RUNTIME_EXCLUSIVE was deprecated and its behavior
is achived with PM_DEVICE_SYSTEM_MANAGED=n.

Fixes #76037

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-07-22 03:28:54 -04:00
1280 changed files with 27438 additions and 12677 deletions

View file

@ -39,6 +39,7 @@ ForEachMacros:
- 'FOR_EACH_IDX'
- 'FOR_EACH_IDX_FIXED_ARG'
- 'FOR_EACH_NONEMPTY_TERM'
- 'FOR_EACH_FIXED_ARG_NONEMPTY_TERM'
- 'RB_FOR_EACH'
- 'RB_FOR_EACH_CONTAINER'
- 'SYS_DLIST_FOR_EACH_CONTAINER'
@ -68,8 +69,16 @@ ForEachMacros:
- 'Z_GENLIST_FOR_EACH_NODE'
- 'Z_GENLIST_FOR_EACH_NODE_SAFE'
- 'STRUCT_SECTION_FOREACH'
- 'STRUCT_SECTION_FOREACH_ALTERNATE'
- 'TYPE_SECTION_FOREACH'
- 'K_SPINLOCK'
- 'COAP_RESOURCE_FOREACH'
- 'COAP_SERVICE_FOREACH'
- 'COAP_SERVICE_FOREACH_RESOURCE'
- 'HTTP_RESOURCE_FOREACH'
- 'HTTP_SERVER_CONTENT_TYPE_FOREACH'
- 'HTTP_SERVICE_FOREACH'
- 'HTTP_SERVICE_FOREACH_RESOURCE'
IfMacros:
- 'CHECKIF'
# Disabled for now, see bug https://github.com/zephyrproject-rtos/zephyr/issues/48520

6
.github/SECURITY.md vendored
View file

@ -11,9 +11,9 @@ updates:
At this time, with the latest release of v3.6, the supported
versions are:
- v2.7: Current LTS
- v3.5: Prior release
- v3.6: Current release
- v3.7: Current LTS
- v3.6: Prior release
- v2.7: Prior LTS
## Reporting process

View file

@ -149,9 +149,9 @@ jobs:
- name: compress-docs
run: |
tar cfJ html-output.tar.xz --directory=doc/_build html
tar cfJ api-output.tar.xz --directory=doc/_build html/doxygen/html
tar cfJ api-coverage.tar.xz coverage-report
tar --use-compress-program="xz -T0" -cf html-output.tar.xz --directory=doc/_build html
tar --use-compress-program="xz -T0" -cf api-output.tar.xz --directory=doc/_build html/doxygen/html
tar --use-compress-program="xz -T0" -cf api-coverage.tar.xz coverage-report
- name: upload-build
uses: actions/upload-artifact@v4

View file

@ -26,12 +26,13 @@ jobs:
west init -l . || true
- name: Manifest
uses: zephyrproject-rtos/action-manifest@v1.2.2
uses: zephyrproject-rtos/action-manifest@v1.3.0
with:
github-token: ${{ secrets.ZB_GITHUB_TOKEN }}
manifest-path: 'west.yml'
checkout-path: 'zephyrproject/zephyr'
use-tree-checkout: 'true'
check-impostor-commits: 'true'
label-prefix: 'manifest-'
verbosity-level: '1'
labels: 'manifest'

View file

@ -41,6 +41,7 @@
/soc/riscv/riscv-privileged/gd32vf103/ @soburi
/soc/starfive/jh71xx/ @pfarwsi
/soc/riscv/riscv-privileged/niosv/ @sweeaun
/boards/adafruit/feather_nrf52840/ @jacobw
/boards/ene/ @ene-steven
/boards/arm/96b_argonkey/ @avisconti
/boards/arm/96b_avenger96/ @Mani-Sadhasivam
@ -326,7 +327,6 @@
/drivers/serial/uart_altera.c @gohshunjing
/drivers/serial/*ns16550* @dcpleung @nashif @gdengi
/drivers/serial/*nrfx* @anangl
/drivers/serial/uart_liteuart.c @mateusz-holenko @kgugala @pgielda
/drivers/serial/Kconfig.mcux_iuart @Mani-Sadhasivam
/drivers/serial/uart_mcux_iuart.c @Mani-Sadhasivam
/drivers/serial/Kconfig.rtt @carlescufi @pkral78

19
Kconfig.constants Normal file
View file

@ -0,0 +1,19 @@
# Constant variables to be used across Kconfig options
# Copyright (c) 2024 basalte bv
# SPDX-License-Identifier: Apache-2.0
INT8_MIN := -128
INT16_MIN := -32768
INT32_MIN := -2147483648
INT64_MIN := -9223372036854775808
INT8_MAX := 127
INT16_MAX := 32767
INT32_MAX := 2147483647
INT64_MAX := 9223372036854775807
UINT8_MAX := 255
UINT16_MAX := 65535
UINT32_MAX := 4294967295
UINT64_MAX := 18446744073709551615

View file

@ -5,6 +5,8 @@
# Copyright (c) 2023 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
source "Kconfig.constants"
osource "${APPLICATION_SOURCE_DIR}/VERSION"
# Include Kconfig.defconfig files first so that they can override defaults and

View file

@ -3208,6 +3208,8 @@ ADI Platforms:
maintainers:
- MaureenHelm
collaborators:
- ozersa
- ttmut
- galak
- microbuilder
files:
@ -3444,6 +3446,9 @@ NXP Drivers:
- manuargue
- dbaluta
- MarkWangChinese
files-regex:
- ^drivers/.*nxp.*
- ^drivers/.*mcux.*
files:
- drivers/*/*imx*
- drivers/*/*lpc*.c
@ -3676,13 +3681,14 @@ Renesas RA Platforms:
- thaoluonguw
files:
- boards/arduino/uno_r4/
- boards/renesas/*ra8*/
- drivers/*/*renesas_ra*
- drivers/pinctrl/renesas/ra/
- dts/arm/renesas/ra/
- dts/bindings/*/*renesas,ra*
- soc/renesas/ra/
labels:
- "platforms: Renesas RA"
- "platform: Renesas RA"
description: >-
Renesas RA SOCs, dts files, and related drivers. Boards based
on Renesas RA SoCs.
@ -3889,7 +3895,6 @@ LiteX Platforms:
files:
- boards/enjoydigital/litex_vexriscv/
- drivers/*/*litex*
- drivers/spi/spi_litespi*
- drivers/*/Kconfig.litex
- dts/bindings/*/litex*
- dts/riscv/riscv32-litex-vexriscv.dtsi
@ -4381,6 +4386,7 @@ West:
- MaureenHelm
collaborators:
- ozersa
- ttmut
files: []
labels:
- "platform: ADI"

View file

@ -1,5 +1,5 @@
VERSION_MAJOR = 3
VERSION_MINOR = 7
PATCHLEVEL = 0
PATCHLEVEL = 99
VERSION_TWEAK = 0
EXTRAVERSION = rc3
EXTRAVERSION =

View file

@ -32,6 +32,7 @@ config ARM
bool
select ARCH_IS_SET
select ARCH_SUPPORTS_COREDUMP if CPU_CORTEX_M
select ARCH_SUPPORTS_COREDUMP_THREADS if CPU_CORTEX_M
# FIXME: current state of the code for all ARM requires this, but
# is really only necessary for Cortex-M with ARM MPU!
select GEN_PRIV_STACKS
@ -654,6 +655,9 @@ config ARCH_HAS_NESTED_EXCEPTION_DETECTION
config ARCH_SUPPORTS_COREDUMP
bool
config ARCH_SUPPORTS_COREDUMP_THREADS
bool
config ARCH_SUPPORTS_ARCH_HW_INIT
bool

View file

@ -330,7 +330,7 @@ config ZERO_LATENCY_IRQS
config ZERO_LATENCY_LEVELS
int "Number of interrupt priority levels reserved for zero latency"
depends on ZERO_LATENCY_IRQS
range 1 255
range 1 $(UINT8_MAX)
help
The amount of interrupt priority levels reserved for zero latency
interrupts. Increase this value to reserve more than one priority

View file

@ -226,6 +226,13 @@ void _Fault(struct arch_esf *esf)
unsigned int reason = K_ERR_CPU_EXCEPTION;
if (bad_stack_pointer(esf)) {
#ifdef CONFIG_PMP_STACK_GUARD
/*
* Remove the thread's PMP setting to prevent triggering a stack
* overflow error again due to the previous configuration.
*/
z_riscv_pmp_stackguard_disable();
#endif /* CONFIG_PMP_STACK_GUARD */
reason = K_ERR_STACK_CHK_FAIL;
}

View file

@ -347,6 +347,21 @@ no_fp: /* increment _current->arch.exception_depth */
*/
li t1, RISCV_EXC_ECALLU
beq t0, t1, is_user_syscall
#ifdef CONFIG_PMP_STACK_GUARD
/*
* Determine if we come from user space. If so, reconfigure the PMP for
* kernel mode stack guard.
*/
csrr t0, mstatus
li t1, MSTATUS_MPP
and t0, t0, t1
bnez t0, 1f
lr a0, ___cpu_t_current_OFFSET(s0)
call z_riscv_pmp_stackguard_enable
1:
#endif /* CONFIG_PMP_STACK_GUARD */
#endif /* CONFIG_USERSPACE */
/*

View file

@ -511,6 +511,37 @@ void z_riscv_pmp_stackguard_enable(struct k_thread *thread)
csr_set(mstatus, MSTATUS_MPRV);
}
/**
* @brief Remove PMP stackguard content to actual PMP registers
*/
void z_riscv_pmp_stackguard_disable(void)
{
unsigned long pmp_addr[PMP_M_MODE_SLOTS];
unsigned long pmp_cfg[PMP_M_MODE_SLOTS / sizeof(unsigned long)];
unsigned int index = global_pmp_end_index;
/* Retrieve the pmpaddr value matching the last global PMP slot. */
pmp_addr[global_pmp_end_index - 1] = global_pmp_last_addr;
/* Disable (non-locked) PMP entries for m-mode while we update them. */
csr_clear(mstatus, MSTATUS_MPRV);
/*
* Set a temporary default "catch all" PMP entry for MPRV to work,
* except for the global locked entries.
*/
set_pmp_mprv_catchall(&index, pmp_addr, pmp_cfg, ARRAY_SIZE(pmp_addr));
/* Write "catch all" entry and clear unlocked entries to PMP regs. */
write_pmp_entries(global_pmp_end_index, index,
true, pmp_addr, pmp_cfg, ARRAY_SIZE(pmp_addr));
if (PMP_DEBUG_DUMP) {
dump_pmp_regs("catch all register dump");
}
}
#endif /* CONFIG_PMP_STACK_GUARD */
#ifdef CONFIG_USERSPACE

View file

@ -58,12 +58,12 @@ static inline bool in_user_thread_stack_bound(uintptr_t addr, const struct k_thr
/* See: zephyr/include/zephyr/arch/riscv/arch.h */
if (IS_ENABLED(CONFIG_PMP_POWER_OF_TWO_ALIGNMENT)) {
start = thread->arch.priv_stack_start - CONFIG_PRIVILEGED_STACK_SIZE;
end = thread->arch.priv_stack_start;
start = thread->arch.priv_stack_start + Z_RISCV_STACK_GUARD_SIZE;
} else {
start = thread->stack_info.start - CONFIG_PRIVILEGED_STACK_SIZE;
end = thread->stack_info.start;
}
end = Z_STACK_PTR_ALIGN(thread->arch.priv_stack_start + K_KERNEL_STACK_RESERVED +
CONFIG_PRIVILEGED_STACK_SIZE);
return (addr >= start) && (addr < end);
}

View file

@ -10,6 +10,7 @@
void z_riscv_pmp_init(void);
void z_riscv_pmp_stackguard_prepare(struct k_thread *thread);
void z_riscv_pmp_stackguard_enable(struct k_thread *thread);
void z_riscv_pmp_stackguard_disable(void);
void z_riscv_pmp_usermode_init(struct k_thread *thread);
void z_riscv_pmp_usermode_prepare(struct k_thread *thread);
void z_riscv_pmp_usermode_enable(struct k_thread *thread);

View file

@ -205,7 +205,7 @@ config MAX_IRQ_LINES
config IRQ_OFFLOAD_VECTOR
int "IDT vector to use for IRQ offload"
default 33
range 32 255
range 32 $(UINT8_MAX)
depends on IRQ_OFFLOAD
config PIC_DISABLE

View file

@ -42,13 +42,13 @@ config X86_EXCEPTION_STACK_TRACE
config SCHED_IPI_VECTOR
int "IDT vector to use for scheduler IPI"
default 34
range 33 255
range 33 $(UINT8_MAX)
depends on SMP
config TLB_IPI_VECTOR
int "IDT vector to use for TLB shootdown IPI"
default 35
range 33 255
range 33 $(UINT8_MAX)
depends on SMP
# We should really only have to provide one of the following two values,

View file

@ -17,3 +17,5 @@ if(EXISTS ${BOARD_DIR}/CMakeLists.txt)
add_subdirectory(${BOARD_DIR} ${build_dir})
endif()
add_subdirectory(shields)

View file

@ -1,10 +0,0 @@
# Adafruit Feather nRF52840 Express board configuration
# Copyright (c) 2020 Tobias Svehagen
# SPDX-License-Identifier: Apache-2.0
config BOARD_ENABLE_DCDC
bool "DCDC mode"
select SOC_DCDC_NRF52X
default y
depends on BOARD_ADAFRUIT_FEATHER

View file

@ -1,5 +0,0 @@
board:
name: adafruit_feather
vendor: adafruit
socs:
- name: nrf52840

View file

@ -0,0 +1,18 @@
# Adafruit Feather nRF52840 Express board configuration
# Copyright (c) 2020 Tobias Svehagen
# Copyright (c) 2024 Jacob Winther
# SPDX-License-Identifier: Apache-2.0
config BOARD_ENABLE_DCDC
bool "DCDC mode"
select SOC_DCDC_NRF52X
default y
depends on BOARD_ADAFRUIT_FEATHER_NRF52840_EXPRESS || BOARD_ADAFRUIT_FEATHER_NRF52840_SENSE
if BOARD_ADAFRUIT_FEATHER_NRF52840_SENSE
config BOARD_SERIAL_BACKEND_CDC_ACM
bool "USB CDC"
default y
endif # BOARD_ADAFRUIT_FEATHER_NRF52840_SENSE

View file

@ -1,11 +1,8 @@
# Adafruit Feather nRF52840 Express board configuration
# Copyright (c) 2020 Tobias Svehagen
# Copyright (c) 2024 Jacob Winther
# SPDX-License-Identifier: Apache-2.0
if BOARD_ADAFRUIT_FEATHER
config BT_CTLR
default BT
endif # BOARD_ADAFRUIT_FEATHER
config BOARD_ADAFRUIT_FEATHER_NRF52840_EXPRESS
select SOC_NRF52840_QIAA

View file

@ -1,7 +1,8 @@
# Adafruit Feather nRF52840 Express board configuration
# Copyright (c) 2020 Tobias Svehagen
# Copyright (c) 2024 Jacob Winther
# SPDX-License-Identifier: Apache-2.0
config BOARD_ADAFRUIT_FEATHER
config BOARD_ADAFRUIT_FEATHER_NRF52840_SENSE
select SOC_NRF52840_QIAA

View file

@ -0,0 +1,54 @@
# Adafruit Feather nRF52840 Express board configuration
# Copyright (c) 2020 Tobias Svehagen
# Copyright (c) 2024 Jacob Winther
# SPDX-License-Identifier: Apache-2.0
if (BOARD_ADAFRUIT_FEATHER_NRF52840_EXPRESS || BOARD_ADAFRUIT_FEATHER_NRF52840_SENSE)
config BT_CTLR
default BT
if BOARD_SERIAL_BACKEND_CDC_ACM
config USB_DEVICE_STACK
default y
config USB_CDC_ACM
default SERIAL
config UART_CONSOLE
default CONSOLE
config USB_DEVICE_INITIALIZE_AT_BOOT
default y if CONSOLE
config SHELL_BACKEND_SERIAL_CHECK_DTR
default SHELL
depends on UART_LINE_CTRL
config UART_LINE_CTRL
default SHELL
config USB_DEVICE_REMOTE_WAKEUP
default n
if LOG
# Logger cannot use itself to log
config USB_CDC_ACM_LOG_LEVEL
default 0
# Set USB log level to error only
config USB_DEVICE_LOG_LEVEL
default 1
# Wait 1500ms at startup for logging
config LOG_PROCESS_THREAD_STARTUP_DELAY_MS
default 1500
endif # LOG
endif # BOARD_SERIAL_BACKEND_CDC_ACM
endif # BOARD_ADAFRUIT_FEATHER_NRF52840_EXPRESS || BOARD_ADAFRUIT_FEATHER_NRF52840_SENSE

View file

@ -1,5 +1,6 @@
/*
* Copyright (c) 2020 Tobias Svehagen
* Copyright (c) 2024 Jacob Winther
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -11,25 +12,16 @@
#include <zephyr/dt-bindings/input/input-event-codes.h>
/ {
model = "Adafruit Feather nRF52840 Express";
compatible = "adafruit,feather-nrf52840";
chosen {
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,uart-mcumgr = &uart0;
zephyr,bt-mon-uart = &uart0;
zephyr,bt-c2h-uart = &uart0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
zephyr,ieee802154 = &ieee802154;
};
leds {
compatible = "gpio-leds";
led0: led_0 {
gpios = <&gpio1 15 0>;
label = "Red LED";
};
led1: led_1 {
@ -119,7 +111,7 @@
writeoc = "pp4o";
readoc = "read4io";
sck-frequency = <16000000>;
jedec-id = [c8 40 15];
jedec-id = [ c8 40 15 ];
size = <16777216>;
has-dpd;
t-enter-dpd = <20000>;
@ -132,43 +124,6 @@
status = "okay";
};
&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 0x0000C000>;
};
slot0_partition: partition@c000 {
label = "image-0";
reg = <0x0000C000 0x00067000>;
};
slot1_partition: partition@73000 {
label = "image-1";
reg = <0x00073000 0x00067000>;
};
scratch_partition: partition@da000 {
label = "image-scratch";
reg = <0x000da000 0x0001e000>;
};
/*
* The flash starting at 0x000f8000 and ending at
* 0x000fffff is reserved for use by the application.
*/
/* Storage partition will be used by FCB/NFFS/NVS if enabled. */
storage_partition: partition@f8000 {
label = "storage";
reg = <0x000f8000 0x00008000>;
};
};
};
zephyr_udc0: &usbd {
compatible = "nordic,nrf-usbd";
status = "okay";

View file

@ -0,0 +1,66 @@
/*
* Copyright (c) 2020 Tobias Svehagen
* Copyright (c) 2024 Jacob Winther
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include "adafruit_feather_nrf52840_common.dtsi"
/ {
model = "Adafruit Feather nRF52840 Express";
compatible = "adafruit,feather_nrf52840-express";
chosen {
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,uart-mcumgr = &uart0;
zephyr,bt-mon-uart = &uart0;
zephyr,bt-c2h-uart = &uart0;
zephyr,code-partition = &slot0_partition;
};
leds {
led0: led_0 {
gpios = <&gpio1 15 0>;
};
};
};
&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 0x0000C000>;
};
slot0_partition: partition@c000 {
label = "image-0";
reg = <0x0000C000 0x00067000>;
};
slot1_partition: partition@73000 {
label = "image-1";
reg = <0x00073000 0x00067000>;
};
scratch_partition: partition@da000 {
label = "image-scratch";
reg = <0x000da000 0x0001e000>;
};
/*
* The flash starting at 0x000f8000 and ending at
* 0x000fffff is reserved for use by the application.
*/
/* Storage partition will be used by FCB/NFFS/NVS if enabled. */
storage_partition: partition@f8000 {
label = "storage";
reg = <0x000f8000 0x00008000>;
};
};
};

View file

@ -1,4 +1,4 @@
identifier: adafruit_feather/nrf52840
identifier: adafruit_feather_nrf52840_express
name: Adafruit Feather nRF52840 Express
type: mcu
arch: arm

View file

@ -0,0 +1,78 @@
/*
* Copyright (c) 2020 Tobias Svehagen
* Copyright (c) 2024 Jacob Winther
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include "adafruit_feather_nrf52840_common.dtsi"
/ {
model = "Adafruit Feather nRF52840 Sense";
compatible = "adafruit,feather_nrf52840-sense";
chosen {
zephyr,console = &cdc_acm_uart0;
zephyr,shell-uart = &cdc_acm_uart0;
zephyr,uart-mcumgr = &cdc_acm_uart0;
zephyr,bt-mon-uart = &cdc_acm_uart0;
zephyr,bt-c2h-uart = &cdc_acm_uart0;
zephyr,code-partition = &code_partition;
};
leds {
led0: led_0 {
gpios = <&gpio1 9 0>;
};
};
};
&i2c0 {
SHT3XD: sht3xd@44 {
compatible = "sensirion,sht3xd";
reg = <0x44>;
};
};
&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
/* To enable flashing with UF2 bootloader, we
* must reserve a partition for SoftDevice.
* See https://learn.adafruit.com/
* introducing-the-adafruit-nrf52840-feather?view=all#hathach-memory-map
*/
reserved_partition_0: partition@0 {
label = "SoftDevice";
reg = <0x000000000 DT_SIZE_K(152)>;
};
code_partition: partition@26000 {
label = "Application";
reg = <0x00026000 DT_SIZE_K(796)>;
};
/*
* The flash starting at 0x000ed000 and ending at
* 0x000f4000 is reserved for use by the application.
*/
storage_partition: partition@ed000 {
label = "storage";
reg = <0x0000ed000 DT_SIZE_K(28)>;
};
boot_partition: partition@f4000 {
label = "UF2";
reg = <0x000f4000 DT_SIZE_K(48)>;
};
};
};
zephyr_udc0: &usbd {
cdc_acm_uart0: cdc_acm_uart0 {
compatible = "zephyr,cdc-acm-uart";
};
};

View file

@ -0,0 +1,19 @@
identifier: adafruit_feather_nrf52840_sense
name: Adafruit Feather nRF52840 Sense
type: mcu
arch: arm
toolchain:
- zephyr
- gnuarmemb
- xtools
supported:
- adc
- usb_device
- usb_cdc
- ble
- watchdog
- counter
- feather_serial
- feather_i2c
- feather_spi
vendor: adafruit

View file

@ -0,0 +1,25 @@
# SPDX-License-Identifier: Apache-2.0
# Enable MPU
CONFIG_ARM_MPU=y
# enable GPIO
CONFIG_GPIO=y
# enable uart driver
CONFIG_SERIAL=y
# enable console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
# 32kHz clock source
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_500PPM=y
# enable bossac
CONFIG_BOOTLOADER_BOSSA=y
CONFIG_BOOTLOADER_BOSSA_ADAFRUIT_UF2=y
# Build UF2 by default, supported by the Adafruit nRF52 Bootloader
CONFIG_BUILD_OUTPUT_UF2=y

View file

@ -2,6 +2,9 @@
board_runner_args(jlink "--device=nRF52840_xxAA" "--speed=4000")
board_runner_args(pyocd "--target=nrf52840" "--frequency=4000000")
if(CONFIG_BOARD_ADAFRUIT_FEATHER_NRF52840_SENSE)
include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake)
endif()
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
include(${ZEPHYR_BASE}/boards/common/blackmagicprobe.board.cmake)

View file

@ -0,0 +1,9 @@
boards:
- name: adafruit_feather_nrf52840_express
vendor: adafruit
socs:
- name: nrf52840
- name: adafruit_feather_nrf52840_sense
vendor: adafruit
socs:
- name: nrf52840

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

View file

@ -1,7 +1,7 @@
.. _adafruit_feather_nrf52840:
Adafruit Feather nRF52840 Express
#################################
Adafruit Feather nRF52840 (Express, Sense)
##########################################
Overview
********
@ -25,9 +25,19 @@ nRF52840 ARM Cortex-M4F CPU and the following devices:
* :abbr:`USB (Universal Serial Bus)`
* :abbr:`WDT (Watchdog Timer)`
.. figure:: img/adafruit_feather_nrf52840.jpg
:align: center
:alt: Adafruit Feather nRF52840 Express
.. tabs::
.. group-tab:: Express
.. figure:: img/adafruit_feather_nrf52840_express.jpg
:align: center
:alt: Adafruit Feather nRF52840 Express
.. group-tab:: Sense
.. figure:: img/adafruit_feather_nrf52840_sense.jpg
:align: center
:alt: Adafruit Feather nRF52840 Sense
Hardware
********
@ -39,7 +49,14 @@ Hardware
- 2 User LEDs
- 1 NeoPixel LED
- Reset button
- SWD connector
- SWD connector (Express only)
- SWD solder pads on bottom of PCB (Sense only)
- LSM6DS33 Accel/Gyro (Sense only)
- LIS3MDL magnetometer (Sense only)
- APDS9960 Proximity, Light, Color, and Gesture Sensor (Sense only)
- MP34DT01-M PDM Microphone sound sensor (Sense only)
- SHT3X Humidity sensor (Sense only)
- BMP280 temperature and barometric pressure/altitude (Sense only)
Supported Features
==================
@ -85,13 +102,25 @@ Other hardware features have not been enabled yet for this board.
Connections and IOs
===================
The `Adafruit Feather nRF52840 Express Learn site`_ has detailed
information about the board including `pinouts`_ and the `schematic`_.
.. tabs::
.. group-tab:: Express
The `Adafruit Feather nRF52840 Express Learn site`_ has
detailed information about the board including
`pinouts (Express)`_ and the `schematic (Express)`_.
.. group-tab:: Sense
The `Adafruit Feather nRF52840 Sense Learn site`_ has
detailed information about the board including
`pinouts (Sense)`_ and the `schematic (Sense)`_.
LED
---
* LED0 (red) = P1.15
* LED0 (red) = P1.15 (Express)
* LED0 (red) = P1.9 (Sense)
* LED1 (blue) = P1.10
Push buttons
@ -103,33 +132,56 @@ Push buttons
Programming and Debugging
*************************
Applications for the ``adafruit_feather/nrf52840`` board configuration
can be built and flashed in the usual way (see :ref:`build_an_application`
and :ref:`application_run` for more details).
Flashing
========
Flashing Zephyr onto the ``adafruit_feather_nrf52480`` board requires
an external programmer. The programmer is attached to the SWD header.
Flashing Zephyr onto the ``adafruit_feather_nrf52480_express`` board is possible
using an external programmer. The programmer is attached to the SWD header.
Build the Zephyr kernel and the :zephyr:code-sample:`blinky` sample application.
The Feather nRF52840 ships with the `Adafruit nRF52 Bootloader`_ which
supports flashing using `UF2`_. This allows easy flashing of new images,
but does not support debugging the device.
.. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
:board: adafruit_feather/nrf52840
:goals: build
:compact:
#. Build the Zephyr kernel and the :zephyr:code-sample:`blinky` sample application.
Flash the image.
.. tabs::
.. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
:board: adafruit_feather/nrf52840
:goals: flash
:compact:
.. group-tab:: Express
You should see the red LED blink.
.. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
:board: adafruit_feather_nrf52840_express/nrf52840
:goals: build
:compact:
.. group-tab:: Sense
.. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
:board: adafruit_feather_nrf52840_sense/nrf52840
:goals: build
:compact:
#. If using UF2, connect the board to your host computer using USB.
#. Tap the reset button twice quickly to enter bootloader mode.
A mass storage device named `FTHR840BOOT` for (Express) or
`FTHRSNSBOOT` (Sense) should appear on the host. Ensure this is
mounted.
#. Flash the image.
.. tabs::
.. group-tab:: Sense
.. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
:board: adafruit_feather_nrf52840_sense
:goals: flash
:compact:
#. You should see the red LED blink.
References
**********
@ -139,8 +191,23 @@ References
.. _Adafruit Feather nRF52840 Express Learn site:
https://learn.adafruit.com/introducing-the-adafruit-nrf52840-feather/
.. _pinouts:
.. _pinouts (Express):
https://learn.adafruit.com/introducing-the-adafruit-nrf52840-feather/pinouts
.. _schematic:
.. _schematic (Express):
https://learn.adafruit.com/introducing-the-adafruit-nrf52840-feather/downloads
.. _Adafruit Feather nRF52840 Sense Learn site:
https://learn.adafruit.com/adafruit-feather-sense
.. _pinouts (Sense):
https://learn.adafruit.com/adafruit-feather-sense/pinouts
.. _schematic (Sense):
https://learn.adafruit.com/adafruit-feather-sense/downloads
.. _Adafruit nRF52 Bootloader:
https://github.com/adafruit/Adafruit_nRF52_Bootloader
.. _UF2:
https://github.com/microsoft/uf2

View file

@ -93,6 +93,10 @@
status = "okay";
};
&trng {
status = "okay";
};
arduino_serial: &uart1 {
clock-source = <ADI_MAX32_PRPH_CLK_SRC_IBRO>;
pinctrl-0 = <&uart1a_tx_p2_16 &uart1a_rx_p2_14>;

View file

@ -13,5 +13,6 @@ supported:
- gpio
- serial
- spi
- trng
ram: 1024
flash: 3072

View file

@ -113,6 +113,8 @@ Below interfaces are supported by Zephyr on APARD32690.
+-----------+------------+------------------------------------+
| ADIN1110 | spi | ADIN1110 10BASE-T1L mac/phy |
+-----------+------------+------------------------------------+
| TRNG | on-chip | entropy |
+-----------+------------+------------------------------------+
Connections and IOs

View file

@ -87,6 +87,10 @@ Below are the interfaces supported by Zephyr on MAX32655EVKIT.
+-----------+------------+-------------------------------------+
| UART | on-chip | serial |
+-----------+------------+-------------------------------------+
| TRNG | on-chip | entropy |
+-----------+------------+-------------------------------------+
| I2C | on-chip | i2c |
+-----------+------------+-------------------------------------+
Connections and IOs
===================

View file

@ -91,3 +91,7 @@
&gpio3 {
status = "okay";
};
&trng {
status = "okay";
};

View file

@ -10,5 +10,7 @@ toolchain:
supported:
- gpio
- serial
- trng
- i2c
ram: 128
flash: 512

View file

@ -100,6 +100,10 @@ Below are the interfaces supported by Zephyr on MAX32655FTHR.
+-----------+------------+-------------------------------------+
| UART | on-chip | serial |
+-----------+------------+-------------------------------------+
| TRNG | on-chip | entropy |
+-----------+------------+-------------------------------------+
| I2C | on-chip | i2c |
+-----------+------------+-------------------------------------+
Push Buttons
************

View file

@ -125,3 +125,7 @@
&gpio3 {
status = "okay";
};
&trng {
status = "okay";
};

View file

@ -10,5 +10,7 @@ toolchain:
supported:
- gpio
- serial
- trng
- i2c
ram: 128
flash: 512

View file

@ -106,6 +106,10 @@ Below interfaces are supported by Zephyr on MAX32670EVKIT.
+-----------+------------+-------------------------------------+
| UART | on-chip | serial |
+-----------+------------+-------------------------------------+
| TRNG | on-chip | entropy |
+-----------+------------+-------------------------------------+
| I2C | on-chip | i2c |
+-----------+------------+-------------------------------------+
Connections and IOs

View file

@ -71,3 +71,7 @@
&gpio1 {
status = "okay";
};
&trng {
status = "okay";
};

View file

@ -10,5 +10,7 @@ toolchain:
supported:
- gpio
- serial
- trng
- i2c
ram: 160
flash: 384

View file

@ -99,6 +99,10 @@ Below interfaces are supported by Zephyr on MAX32672EVKIT.
+-----------+------------+-------------------------------------+
| UART | on-chip | serial |
+-----------+------------+-------------------------------------+
| TRNG | on-chip | entropy |
+-----------+------------+-------------------------------------+
| I2C | on-chip | i2c |
+-----------+------------+-------------------------------------+
Connections and IOs

View file

@ -71,3 +71,7 @@
&gpio1 {
status = "okay";
};
&trng {
status = "okay";
};

View file

@ -10,5 +10,7 @@ toolchain:
supported:
- gpio
- serial
- trng
- i2c
ram: 200
flash: 1024

View file

@ -0,0 +1,36 @@
# MAX32672FTHR boards configuration
# Copyright (c) 2024 Analog Devices, Inc.
# SPDX-License-Identifier: Apache-2.0
if BOARD_MAX32672FTHR
if DISPLAY
if LVGL
# LVGL should allocate buffers equal to size of display
config LV_Z_VDB_SIZE
default 64
# Default Dot Per Inch. [px/inch]
# Used to initialize default sizes such as widgets sized, style paddings.
config LV_DPI_DEF
default 128
config LV_Z_BITS_PER_PIXEL
default 1
# Use offloaded render thread
config LV_Z_FLUSH_THREAD
default y
choice LV_COLOR_DEPTH
default LV_COLOR_DEPTH_1 # 1 byte per pixel
endchoice
endif # LVGL
endif # DISPLAY
endif # BOARD_MAX32672FTHR

View file

@ -101,6 +101,10 @@ Below interfaces are supported by Zephyr on MAX32672FTHR.
+-----------+------------+-------------------------------------+
| UART | on-chip | serial |
+-----------+------------+-------------------------------------+
| TRNG | on-chip | entropy |
+-----------+------------+-------------------------------------+
| I2C | on-chip | i2c |
+-----------+------------+-------------------------------------+
Connections and IOs

View file

@ -20,6 +20,7 @@
zephyr,shell-uart = &uart0;
zephyr,sram = &sram3;
zephyr,flash = &flash0;
zephyr,display = &ssd1306;
};
leds {
@ -105,3 +106,30 @@
&gpio1 {
status = "okay";
};
&trng {
status = "okay";
};
&i2c2 {
pinctrl-0 = <&i2c2a_scl_p0_18 &i2c2a_sda_p0_19>;
pinctrl-names = "default";
clock-frequency = <I2C_BITRATE_FAST>;
status = "okay";
ssd1306: ssd1306@3d {
compatible = "solomon,ssd1306fb";
reg = <0x3d>;
width = <128>;
height = <32>;
segment-offset = <0>;
page-offset = <0>;
display-offset = <0>;
multiplex-ratio = <31>;
segment-remap;
com-invdir;
com-sequential;
prechargep = <0x22>;
inversion-on;
};
};

View file

@ -10,5 +10,7 @@ toolchain:
supported:
- gpio
- serial
- trng
- i2c
ram: 200
flash: 1024

View file

@ -110,6 +110,10 @@ Below interfaces are supported by Zephyr on MAX32680EVKIT.
+-----------+------------+-------------------------------------+
| UART | on-chip | serial |
+-----------+------------+-------------------------------------+
| TRNG | on-chip | entropy |
+-----------+------------+-------------------------------------+
| I2C | on-chip | i2c |
+-----------+------------+-------------------------------------+
Connections and IOs
===================

View file

@ -81,3 +81,7 @@
&gpio2 {
status = "okay";
};
&trng {
status = "okay";
};

View file

@ -10,5 +10,7 @@ toolchain:
supported:
- gpio
- serial
- trng
- i2c
ram: 128
flash: 512

View file

@ -113,6 +113,8 @@ Below interfaces are supported by Zephyr on MAX32690EVKIT.
+--------------------------------------------------------------+
| I2C | on-chip | i2c |
+-----------+------------+-------------------------------------+
| TRNG | on-chip | entropy |
+-----------+------------+-------------------------------------+
Connections and IOs

View file

@ -87,3 +87,7 @@
parity = "none";
status = "okay";
};
&trng {
status = "okay";
};

View file

@ -12,5 +12,6 @@ supported:
- serial
- spi
- i2c
- trng
ram: 1024
flash: 3072

View file

@ -69,67 +69,31 @@
group1 {
pinmux = <M0SCK_P5>, <M0MISO_P6>, <M0MOSI_P7>;
};
group2 {
pinmux = <NCE11_P11>;
drive-push-pull;
ambiq,iom-nce-module = <0>;
ambiq,iom-num = <0>;
};
};
spi1_default: spi1_default {
group1 {
pinmux = <M1SCK_P8>, <M1MISO_P9>, <M1MOSI_P10>;
};
group2 {
pinmux = <NCE14_P14>;
drive-push-pull;
ambiq,iom-nce-module = <1>;
ambiq,iom-num = <1>;
};
};
spi2_default: spi2_default {
group1 {
pinmux = <M2SCK_P27>, <M2MISO_P25>, <M2MOSI_P28>;
};
group2 {
pinmux = <NCE15_P15>;
drive-push-pull;
ambiq,iom-nce-module = <3>;
ambiq,iom-num = <2>;
};
};
spi3_default: spi3_default {
group1 {
pinmux = <M3SCK_P42>, <M3MISO_P43>, <M3MOSI_P38>;
};
group2 {
pinmux = <NCE12_P12>;
drive-push-pull;
ambiq,iom-nce-module = <0>;
ambiq,iom-num = <3>;
};
};
spi4_default: spi4_default {
group1 {
pinmux = <M4SCK_P39>, <M4MISO_P40>, <M4MOSI_P44>;
};
group2 {
pinmux = <NCE13_P13>;
drive-push-pull;
ambiq,iom-nce-module = <1>;
ambiq,iom-num = <4>;
};
};
spi5_default: spi5_default {
group1 {
pinmux = <M5SCK_P48>, <M5MISO_P49>, <M5MOSI_P47>;
};
group2 {
pinmux = <NCE16_P16>;
drive-push-pull;
ambiq,iom-nce-module = <0>;
ambiq,iom-num = <5>;
};
};
mspi0_default: mspi0_default{

View file

@ -106,6 +106,7 @@
compatible = "ambiq,spi";
pinctrl-0 = <&spi0_default>;
pinctrl-names = "default";
cs-gpios = <&gpio0_31 11 GPIO_ACTIVE_LOW>;
clock-frequency = <DT_FREQ_M(1)>;
status = "okay";
};

View file

@ -69,73 +69,31 @@
group1 {
pinmux = <M0SCK_P5>, <M0MISO_P6>, <M0MOSI_P7>;
};
group2 {
pinmux = <NCE11_P11>;
drive-push-pull;
ambiq,iom-mspi = <1>;
ambiq,iom-nce-module = <0>;
ambiq,iom-num = <0>;
};
};
spi1_default: spi1_default {
group1 {
pinmux = <M1SCK_P8>, <M1MISO_P9>, <M1MOSI_P10>;
};
group2 {
pinmux = <NCE34_P34>;
drive-push-pull;
ambiq,iom-mspi = <1>;
ambiq,iom-nce-module = <1>;
ambiq,iom-num = <1>;
};
};
spi2_default: spi2_default {
group1 {
pinmux = <M2SCK_P27>, <M2MISO_P25>, <M2MOSI_P28>;
};
group2 {
pinmux = <NCE15_P15>;
drive-push-pull;
ambiq,iom-mspi = <1>;
ambiq,iom-nce-module = <3>;
ambiq,iom-num = <2>;
};
};
spi3_default: spi3_default {
group1 {
pinmux = <M3SCK_P42>, <M3MISO_P43>, <M3MOSI_P38>;
};
group2 {
pinmux = <NCE29_P29>;
drive-push-pull;
ambiq,iom-mspi = <1>;
ambiq,iom-nce-module = <0>;
ambiq,iom-num = <3>;
};
};
spi4_default: spi4_default {
group1 {
pinmux = <M4SCK_P39>, <M4MISO_P40>, <M4MOSI_P44>;
};
group2 {
pinmux = <NCE13_P13>;
drive-push-pull;
ambiq,iom-mspi = <1>;
ambiq,iom-nce-module = <1>;
ambiq,iom-num = <4>;
};
};
spi5_default: spi5_default {
group1 {
pinmux = <M5SCK_P48>, <M5MISO_P49>, <M5MOSI_P47>;
};
group2 {
pinmux = <NCE16_P16>;
drive-push-pull;
ambiq,iom-mspi = <1>;
ambiq,iom-nce-module = <0>;
ambiq,iom-num = <5>;
};
};
mspi0_default: mspi0_default{

View file

@ -106,6 +106,7 @@
compatible = "ambiq,spi";
pinctrl-0 = <&spi0_default>;
pinctrl-names = "default";
cs-gpios = <&gpio0_31 11 GPIO_ACTIVE_LOW>;
clock-frequency = <DT_FREQ_M(1)>;
status = "okay";
};

View file

@ -13,10 +13,10 @@ config BT_BUF_ACL_TX_COUNT
default 14
config BT_BUF_CMD_TX_SIZE
default 255
default $(UINT8_MAX)
config BT_BUF_EVT_RX_SIZE
default 255
default $(UINT8_MAX)
config BT_BUF_ACL_TX_SIZE
default 251

View file

@ -77,81 +77,41 @@
group1 {
pinmux = <M0SCK_P5>, <M0MISO_P7>, <M0MOSI_P6>;
};
group2 {
pinmux = <NCE72_P72>;
drive-push-pull;
ambiq,iom-nce-module = <0>;
};
};
spi1_default: spi1_default {
group1 {
pinmux = <M1SCK_P8>, <M1MISO_P10>, <M1MOSI_P9>;
};
group2 {
pinmux = <NCE11_P11>;
drive-push-pull;
ambiq,iom-nce-module = <4>;
};
};
spi2_default: spi2_default {
group1 {
pinmux = <M2SCK_P25>, <M2MISO_P27>, <M2MOSI_P26>;
};
group2 {
pinmux = <NCE37_P37>;
drive-push-pull;
ambiq,iom-nce-module = <8>;
};
};
spi3_default: spi3_default {
group1 {
pinmux = <M3SCK_P31>, <M3MISO_P33>, <M3MOSI_P32>;
};
group2 {
pinmux = <NCE85_P85>;
drive-push-pull;
ambiq,iom-nce-module = <12>;
};
};
spi4_default: spi4_default {
group1 {
pinmux = <M4SCK_P34>, <M4MISO_P36>, <M4MOSI_P35>;
};
group2 {
pinmux = <NCE54_P54>;
drive-push-pull;
ambiq,iom-nce-module = <16>;
};
};
spi5_default: spi5_default {
group1 {
pinmux = <M5SCK_P47>, <M5MISO_P49>, <M5MOSI_P48>;
};
group2 {
pinmux = <NCE60_P60>;
drive-push-pull;
ambiq,iom-nce-module = <20>;
};
};
spi6_default: spi6_default {
group1 {
pinmux = <M6SCK_P61>, <M6MISO_P63>, <M6MOSI_P62>;
};
group2 {
pinmux = <NCE30_P30>;
drive-push-pull;
ambiq,iom-nce-module = <24>;
};
};
spi7_default: spi7_default {
group1 {
pinmux = <M7SCK_P22>, <M7MISO_P24>, <M7MOSI_P23>;
};
group2 {
pinmux = <NCE88_P88>;
drive-push-pull;
ambiq,iom-nce-module = <28>;
};
};
mspi0_default: mspi0_default{
group1 {

View file

@ -71,7 +71,7 @@
status = "okay";
};
&iom0 {
&i2c0 {
compatible = "ambiq,i2c";
pinctrl-0 = <&i2c0_default>;
pinctrl-names = "default";
@ -79,15 +79,16 @@
status = "okay";
};
&iom1 {
&spi1 {
compatible = "ambiq,spi";
pinctrl-0 = <&spi1_default>;
pinctrl-names = "default";
cs-gpios = <&gpio0_31 11 GPIO_ACTIVE_LOW>;
clock-frequency = <DT_FREQ_M(1)>;
status = "okay";
};
&iom4 {
&spi4 {
pinctrl-0 = <&spi4_default>;
pinctrl-names = "default";
status = "okay";

View file

@ -86,82 +86,41 @@
group1 {
pinmux = <M0SCK_P5>, <M0MISO_P7>, <M0MOSI_P6>;
};
group2 {
pinmux = <NCE72_P72>;
drive-push-pull;
ambiq,iom-nce-module = <0>;
};
};
spi1_default: spi1_default {
group1 {
pinmux = <M1SCK_P8>, <M1MISO_P10>, <M1MOSI_P9>;
};
group2 {
pinmux = <NCE11_P11>;
drive-strength = "0.5";
drive-push-pull;
ambiq,iom-nce-module = <4>;
};
};
spi2_default: spi2_default {
group1 {
pinmux = <M2SCK_P25>, <M2MISO_P27>, <M2MOSI_P26>;
};
group2 {
pinmux = <NCE37_P37>;
drive-push-pull;
ambiq,iom-nce-module = <8>;
};
};
spi3_default: spi3_default {
group1 {
pinmux = <M3SCK_P31>, <M3MISO_P33>, <M3MOSI_P32>;
};
group2 {
pinmux = <NCE85_P85>;
drive-push-pull;
ambiq,iom-nce-module = <12>;
};
};
spi4_default: spi4_default {
group1 {
pinmux = <M4SCK_P34>, <M4MISO_P36>, <M4MOSI_P35>;
};
group2 {
pinmux = <NCE79_P79>;
drive-push-pull;
ambiq,iom-nce-module = <16>;
};
};
spi5_default: spi5_default {
group1 {
pinmux = <M5SCK_P47>, <M5MISO_P49>, <M5MOSI_P48>;
};
group2 {
pinmux = <NCE60_P60>;
drive-push-pull;
ambiq,iom-nce-module = <20>;
};
};
spi6_default: spi6_default {
group1 {
pinmux = <M6SCK_P61>, <M6MISO_P63>, <M6MOSI_P62>;
};
group2 {
pinmux = <NCE30_P30>;
drive-push-pull;
ambiq,iom-nce-module = <24>;
};
};
spi7_default: spi7_default {
group1 {
pinmux = <M7SCK_P22>, <M7MISO_P24>, <M7MOSI_P23>;
};
group2 {
pinmux = <NCE88_P88>;
drive-push-pull;
ambiq,iom-nce-module = <28>;
};
};
mspi0_default: mspi0_default{
group1 {

View file

@ -82,6 +82,7 @@
compatible = "ambiq,spi";
pinctrl-0 = <&spi1_default>;
pinctrl-names = "default";
cs-gpios = <&gpio0_31 11 GPIO_ACTIVE_LOW>;
clock-frequency = <1000000>;
status = "okay";
};

View file

@ -104,6 +104,7 @@
blue-pwm-led = &blue_pwm_led;
spi = &spi2;
watchdog0 = &wdt0;
accel0 = &lsm9ds1;
};
};
@ -166,6 +167,12 @@ arduino_i2c: &i2c0 {
pinctrl-0 = <&i2c1_default>;
pinctrl-1 = <&i2c1_sleep>;
pinctrl-names = "default", "sleep";
lsm9ds1: lsm9ds1@6b {
compatible = "st,lsm9ds1";
reg = <0x6b>;
};
};
/* SPI2 is used because SPI1/0 shares conflicts with I2C1/0 */

View file

@ -0,0 +1,4 @@
# SPDX-License-Identifier: Apache-2.0
board_set_flasher_ifnset(probe-rs)
board_finalize_runner_args(probe-rs)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View file

@ -21,12 +21,17 @@ This board has following features:
* :abbr:`USB (Universal Serial Bus)`
* :abbr:`WDT (Watchdog Timer)`
.. figure:: img/ctcc_nrf52840.webp
.. figure:: img/ctcc_nrf52840_mpcie.webp
:align: center
:width: 300
:alt: CTCC nRF52840
:alt: CTCC nRF52840 mPCIe
ctcc/nrf52840 board target
ctcc/nrf52840 mPCie board
.. figure:: img/ctcc_nrf52840_m2.webp
:align: center
:alt: CTCC nRF52840 M.2
ctcc/nrf52840 M.2 board
More information about the board can be found at the
`ctcc_nrf52840 Website`_ and for SoC information: `Nordic Semiconductor Infocenter`_.

View file

@ -29,8 +29,11 @@ set(actinius_icarus_som_dk_ns_DEPRECATED
set(actinius_icarus_som_ns_DEPRECATED
actinius_icarus_som/nrf9160/ns
)
set(adafruit_feather_DEPRECATED
adafruit_feather_nrf52840_express
)
set(adafruit_feather_nrf52840_DEPRECATED
adafruit_feather
adafruit_feather_nrf52840_express
)
set(adafruit_itsybitsy_nrf52840_DEPRECATED
adafruit_itsybitsy

View file

@ -7,7 +7,7 @@ if BOARD_ESP32_DEVKITC_WROOM_ESP32_PROCPU
config HEAP_MEM_POOL_ADD_SIZE_BOARD
int
default 65535 if WIFI && BT
default $(UINT16_MAX) if WIFI && BT
default 51200 if WIFI
default 40960 if BT
default 4096

View file

@ -5,7 +5,7 @@ if BOARD_ESP32_DEVKITC_WROVER_ESP32_PROCPU
config HEAP_MEM_POOL_ADD_SIZE_BOARD
int
default 65535 if WIFI && BT
default $(UINT16_MAX) if WIFI && BT
default 51200 if WIFI
default 40960 if BT
default 4096

View file

@ -14,7 +14,7 @@ endchoice
config HEAP_MEM_POOL_ADD_SIZE_BOARD
int
default 65535 if WIFI && BT
default $(UINT16_MAX) if WIFI && BT
default 51200 if WIFI
default 40960 if BT
default 4096

View file

@ -5,7 +5,7 @@
config HEAP_MEM_POOL_ADD_SIZE_BOARD
int
default 65535 if WIFI && BT
default $(UINT16_MAX) if WIFI && BT
default 51200 if WIFI
default 40960 if BT
default 4096

View file

@ -5,7 +5,7 @@
config HEAP_MEM_POOL_ADD_SIZE_BOARD
int
default 65535 if WIFI && BT
default $(UINT16_MAX) if WIFI && BT
default 51200 if WIFI
default 40960 if BT
default 4096

View file

@ -100,6 +100,8 @@ Current Zephyr's ESP32-C6-DevKitC board supports the following features:
+------------+------------+-------------------------------------+
| SPI DMA | on-chip | spi |
+------------+------------+-------------------------------------+
| GDMA | on-chip | dma |
+------------+------------+-------------------------------------+
System requirements
*******************

View file

@ -9,6 +9,7 @@ supported:
- gpio
- watchdog
- uart
- dma
- spi
testing:
ignore_tags:

View file

@ -7,7 +7,7 @@ if BOARD_ESP32S3_DEVKITC_ESP32S3_PROCPU
config HEAP_MEM_POOL_ADD_SIZE_BOARD
int
default 65535 if WIFI && BT
default $(UINT16_MAX) if WIFI && BT
default 51200 if WIFI
default 40960 if BT
default 4096

View file

@ -7,7 +7,7 @@ if BOARD_ESP32S3_DEVKITM_ESP32S3_PROCPU
config HEAP_MEM_POOL_ADD_SIZE_BOARD
int
default 65535 if WIFI && BT
default $(UINT16_MAX) if WIFI && BT
default 51200 if WIFI
default 40960 if BT
default 4096

View file

@ -7,7 +7,7 @@ if BOARD_ESP_WROVER_KIT_ESP32_PROCPU
config HEAP_MEM_POOL_ADD_SIZE_BOARD
int
default 65535 if WIFI && BT
default $(UINT16_MAX) if WIFI && BT
default 51200 if WIFI
default 40960 if BT
default 4096

View file

@ -1,15 +0,0 @@
# Copyright (c) 2019 Nordic Semiconductor ASA.
# Copyright (c) 2021-2023 Laird Connectivity.
# SPDX-License-Identifier: Apache-2.0
if((CONFIG_BOARD_BL5340_DVK_NRF5340_CPUAPP OR CONFIG_BOARD_BL5340_DVK_NRF5340_CPUAPP_NS)
AND CONFIG_BOARD_ENABLE_CPUNET)
zephyr_library()
zephyr_library_sources(bl5340_dvk_nrf5340_cpunet_reset.c)
if(CONFIG_BUILD_WITH_TFM)
zephyr_library_include_directories(
$<TARGET_PROPERTY:tfm,TFM_BINARY_DIR>/api_ns/interface/include
)
endif()
endif()

View file

@ -21,26 +21,9 @@ config BOARD_ENABLE_DCDC_HV
select SOC_DCDC_NRF53X_HV
default y
config BOARD_ENABLE_CPUNET
bool "NRF53 Network MCU"
select SOC_NRF_GPIO_FORWARDER_FOR_NRF5340 if \
$(dt_compat_enabled,$(DT_COMPAT_NORDIC_NRF_GPIO_FORWARDER))
help
This option enables releasing the Network 'force off' signal, which
as a consequence will power up the Network MCU during system boot.
Additionally, the option allocates GPIO pins that will be used by UARTE
of the Network MCU.
Note: GPIO pin allocation can only be configured by the secure Application
MCU firmware, so when this option is used with the non-secure version of
the board, the application needs to take into consideration, that the
secure firmware image must already have configured GPIO allocation for the
Network MCU.
default y if (BT || NRF_802154_SER_HOST)
config DOMAIN_CPUNET_BOARD
string
default "bl5340_dvk/nrf5340/cpunet"
depends on BOARD_ENABLE_CPUNET
help
The board which will be used for CPUNET domain when creating a multi
image application where one or more images should be located on

View file

@ -111,7 +111,7 @@
compatible = "zephyr,mipi-dbi-spi";
reset-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
dc-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
spi-dev = <&spi2>;
spi-dev = <&spi4>;
write-only;
#address-cells = <1>;
#size-cells = <0>;

View file

@ -1,61 +0,0 @@
/*
* Copyright (c) 2019-2021 Nordic Semiconductor ASA.
* Copyright (c) 2021-2023 Laird Connectivity
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/kernel.h>
#include <zephyr/init.h>
#include <zephyr/logging/log.h>
#include <soc.h>
#include <hal/nrf_reset.h>
LOG_MODULE_REGISTER(bl5340_dvk_cpuapp, CONFIG_LOG_DEFAULT_LEVEL);
#if defined(CONFIG_BT_CTLR_DEBUG_PINS_CPUAPP)
#include <../subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/debug.h>
#else
#define DEBUG_SETUP()
#endif
static void remoteproc_mgr_config(void)
{
#if !defined(CONFIG_TRUSTED_EXECUTION_NONSECURE) || defined(CONFIG_BUILD_WITH_TFM)
/* Route Bluetooth Controller Debug Pins */
DEBUG_SETUP();
#endif /* !defined(CONFIG_TRUSTED_EXECUTION_NONSECURE) || defined(CONFIG_BUILD_WITH_TFM) */
#if !defined(CONFIG_TRUSTED_EXECUTION_NONSECURE)
/* Retain nRF5340 Network MCU in Secure domain (bus
* accesses by Network MCU will have Secure attribute set).
*/
NRF_SPU->EXTDOMAIN[0].PERM = 1 << 4;
#endif /* !defined(CONFIG_TRUSTED_EXECUTION_NONSECURE) */
}
static int remoteproc_mgr_boot(void)
{
/* Secure domain may configure permissions for the Network MCU. */
remoteproc_mgr_config();
#if !defined(CONFIG_TRUSTED_EXECUTION_SECURE)
/*
* Building Zephyr with CONFIG_TRUSTED_EXECUTION_SECURE=y implies
* building also a Non-Secure image. The Non-Secure image will, in
* this case do the remainder of actions to properly configure and
* boot the Network MCU.
*/
/* Release the Network MCU, 'Release force off signal' */
nrf_reset_network_force_off(NRF_RESET, false);
LOG_DBG("Network MCU released.");
#endif /* !CONFIG_TRUSTED_EXECUTION_SECURE */
return 0;
}
SYS_INIT(remoteproc_mgr_boot, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE);

View file

@ -35,3 +35,11 @@
jedec-id = [c2 20 19];
};
};
&gpio0 {
status = "okay";
};
&gpio1 {
status = "okay";
};

View file

@ -10,6 +10,7 @@ toolchain:
supported:
- netif
- spi
- gpio
testing:
ignore_tags:
- net

View file

@ -15,12 +15,12 @@ config ESP_SPIRAM
default y if !MCUBOOT
choice SPIRAM_TYPE
default SPIRAM_TYPE_ESPPSRAM64
default SPIRAM_TYPE_ESPPSRAM32
endchoice
config HEAP_MEM_POOL_ADD_SIZE_BOARD
int
default 65535 if WIFI && BT
default $(UINT16_MAX) if WIFI && BT
default 51200 if WIFI
default 40960 if BT
default 4096

View file

@ -4,6 +4,6 @@
# SPDX-License-Identifier: Apache-2.0
config BOARD_ODROID_GO
select SOC_ESP32_WROVER_E_N16R2
select SOC_ESP32_WROVER_E_N16R4
select SOC_ESP32_PROCPU if BOARD_ODROID_GO_ESP32_PROCPU
select SOC_ESP32_APPCPU if BOARD_ODROID_GO_ESP32_APPCPU

View file

@ -7,7 +7,7 @@ if BOARD_HELTEC_WIFI_LORA32_V2_ESP32_PROCPU
config HEAP_MEM_POOL_ADD_SIZE_BOARD
int
default 65535 if WIFI && BT
default $(UINT16_MAX) if WIFI && BT
default 51200 if WIFI
default 40960 if BT
default 4096

Some files were not shown because too many files have changed in this diff Show more