Commit graph

101123 commits

Author SHA1 Message Date
Yannis Damigos
dc1353a336 boards/odroid_go: Fix update partitions size
Update partitions size to utilize the entire flash

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2024-09-03 14:39:43 +01:00
Lukasz Stepnicki
83e3c2eb78 drivers: watchdog: nrfx wdt without IRQs
Add config option to build nrfx wdt driver with
NRFX_WDT_CONFIG_NO_IRQ enabled.

Signed-off-by: Lukasz Stepnicki <lukasz.stepnicki@nordicsemi.no>
2024-09-03 14:39:37 +01:00
Grygorii Strashko
e638602b6a fs: fatfs: Add CONFIG_FS_MULTI_PARTITION
This option switches support for multiple volumes on the physical drive. By
default (0), each logical drive number is bound to the same physical drive
number and only a first FAT volume found on the physical drive will be
mounted.
When this function is enabled (1), each logical drive number can be bound
to arbitrary physical drive and partition listed in the VolToPart[].
The VolToPart[] is expected to be provided by Zephyr application.

For example, 2 FAT partition on SD disk ("SD" index 3) in terms of Zephyr:
   {3, 1} - mount point "/0:"
   {3, 2} - mount point "/1:"
The mount points have to be numbered in this case.

Code example of mounting a second FATFS partition places on SD-card:

static FATFS fat_fs;
static struct fs_mount_t mp = {
	.type = FS_FATFS,
	.fs_data = &fat_fs,
       .mnt_point = "/1:
};

/*
 * 2 FAT partition on SD disk
 * PARTITION.pd - Physical drive number. "SD" has index 3 in terms of
 * Zephyr (see FF_VOLUME_STRS)
 * PARTITION.pt - Partition (0:Auto detect, 1-4:Forced partition). So 1 for
 * the first FATFS partition and 2 - for second.
 */
PARTITION VolToPart[FF_VOLUMES] = {
    [0] = {3, 1},     /* "0:" ==> 1st partition on the pd#0 */
    [1] = {3, 2},     /* "1:" ==> 2nd partition on the pd#0 */
    [2] = {0, -1},     /* "2:" ==> 3rd partition on the pd#0 */
    [3] = {0, -1},
    [4] = {0, -1},
    [5] = {0, -1},
    [6] = {0, -1},
    [7] = {0, -1},
};

fs_mount(&mp);

Signed-off-by: Grygorii Strashko <grygorii_strashko@epam.com>
2024-09-03 14:39:18 +01:00
Grygorii Strashko
01f72f92b4 fs: fatfs: Add CONFIG_FS_FATFS_LBA64
The Kconfig option enables support for 64-bit LBA, which also allows
to enable  GUID Partition Table (GPT) support.

Signed-off-by: Grygorii Strashko <grygorii_strashko@epam.com>
2024-09-03 14:39:18 +01:00
Michael R Rosen
cba339a6f4 dts: arm: st: correct npgios for all stm32 gpio controllers
For almost all STM32 GPIO controllers, the number of supported GPIO
pins managed by a single controller is 16 (with some exceptions for
fewer). However, the default for ngpios in the device tree bindings
for gpio-controllers is 32; leading to inaccuracies in handling GPIO
for these controllers, such as presenting too many GPIOs in the GPIO
shell. This patch redefines the default for ngpios for "st,stm32-gpio"
compatible devices to 16 and adds the correct ngpios for the few
exceptions Zephyr current supports.

Signed-off-by: Michael R Rosen <mrrosen@alumni.cmu.edu>
2024-09-03 10:44:06 +02:00
Emil Gydesen
0e4e7628fd Bluetooth: CAP: Add check for streaming state when starting unicast
When calling bt_cap_initiator_unicast_audio_start on a set of streams
that are all in the streaming state we return early with -EALREADY.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-03 10:43:59 +02:00
Emil Gydesen
4279cebcbd tests: Bluetooth: CAP: Ensure that unicast_start works in any state
The unicast_start procedure should take a stream in any state
and put it in the streaming state. Adds tests with streams
in various states.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-03 10:43:59 +02:00
Emil Gydesen
316a551ff1 Bluetooth: CAP: Remove check for ep in valid_unicast_audio_start_param
This allows the procedure to work for streams in the non-idle state,
e.g. we can start one of more streams in the codec configured
or even enabling state.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-03 10:43:59 +02:00
Emil Gydesen
8b8f727761 Bluetooth: BAP: Add support for reconfiguring unicast group
This allows applications to modify the values set by an
existing unicast group, assuming that none of the streams in
the CIG has been connected.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-03 10:43:53 +02:00
Krzysztof Chruściński
175855e0d8 soc: nordic: Use 31250 Hz as system tick rate for GRTC
So far 10 kHz tick rate was used but it has 2 drawbacks:
- kernel timer precision is limited to 100 us which is worse compared
to 30 us on platforms which use RTC (which had 32768 Hz tick rate)
- GRTC has 1 MHz frequency so tick rate requires dividing by 100 during
 timeout calculation. When 31250 Hz is used (which is 1000000 / 32)
then dividing can be done with bit shifting and it is faster (> 2 times
faster on Cortex-M33 and >8 times faster on VPR - RISCV).

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-03 10:43:30 +02:00
Troels Nilsson
63da4963a0 Bluetooth: Controller: Implement Secondary_Advertising_Max_Skip
Behaviour is unchanged for max_skip == 0

For max_skip > 0, use a slightly different calculation to ensure
we can pass LL/DDI/ADV/BV-28-C

Signed-off-by: Troels Nilsson <trnn@demant.com>
2024-09-03 10:43:20 +02:00
Troels Nilsson
e816a13b24 Bluetooth: Fix the host side not setting sec_adv_max_skip
Set sec_adv_max_skip

Signed-off-by: Troels Nilsson <trnn@demant.com>
2024-09-03 10:43:20 +02:00
Nazar Palamar
7a31df456f drivers: wifi/airoc: Update condition to enable NET_STATISTICS
Updated condition to enable NET_STATISTICS. Changed
CONFIG_NET_STATISTICS_ETHERNET to CONFIG_NET_STATISTICS_WIFI
in airoc_wifi.c

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-09-03 10:43:10 +02:00
Nazar Palamar
d627a30eb3 modules: hal_infineon: Remove dependency on IFX SOC for ABSTR_RTOS
Issue:
Kconfig WIFI_AIROC should not depend on infineon SOC family selection
for the connection. See issue#77012 for details.

Fix:
- update modules/hal_infineon/Kconfig to be able enable
USE_INFINEON_ABSTRACTION_RTOS for non Infineon SOC family.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-09-03 10:43:10 +02:00
Olivier Lesage
063991424c bluetooth: host: Ignore HCI err 0xC when setting own addr when initiating
Ignores "command disallowed" if the host privacy implementation tries
to change the device's random address while scanning or initiating.
This is not allowed by spec. It's caused by scan_update() in scan.c.

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
2024-09-03 10:42:56 +02:00
Félix Piédallu
d9d5043667 Bluetooth: Controller: Use BT_LLL_VENDOR_* to selectively build LLL
CONFIG_SOC_COMPATIBLE_* is not configurable but CONFIG_BT_LLL_VENDOR_* is.

This allows an alternate LLL to be built on nordic and OpenISA chips.

Signed-off-by: Félix Piédallu <felix@piedallu.me>
2024-09-03 10:42:48 +02:00
Peter Ujfalusi
9fd2e11944 drivers: dma: intel-adsp-hda: Report total_copied bytes on ACE2/3
With ACE2/3 the HDA DMA includes registers to read the Linear Link
Position.
Previous platforms (CAVS, ACE1) was able to report the LLP for GPDMA. Since
ACE2 all links are handled with HD-DMA, hence the new register has been
added for the firmware to report the LLP to the host.

Set the total_copied to 0 for older ACE1/CAVS platforms and in case of
host DMA on ACE2/3 since the informatiojn is not available.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2024-09-03 10:42:25 +02:00
Jilay Pandya
fda97de253 drivers: stepper: refactor gpio stepper driver
This commit refactors gpio stepper driver

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-09-03 10:42:19 +02:00
Jilay Pandya
28cd1c8439 stepper: fix: introduce step count check in gpio stepper
This commit introduces step count check before updating
actual position.

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-09-03 10:42:19 +02:00
Jilay Pandya
95f8292329 test: drivers: stepper: add tests for stepper api
This commit adds tests for stepper api

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-09-03 10:42:19 +02:00
Sergio R. Caprile
360522a403 drivers: eth: fix stm32_hal PHY address resolution
Fixes: #77705

Fix wrong macro.
Tested with all the boards mentioned in that issue, build now works.

Signed-off-by: Sergio R. Caprile <scaprile@gmail.com>
2024-09-03 10:42:07 +02:00
Junho Lee
fe24cac70b Bluetooth: Mesh: Clarify log to run out of retransmission attempt
The logs for retransmission attempts for sending segments and ack
retransmission attempts for receiving segments were the same, making it
difficult to distinguish between them. This can be solved by adding
information to the log of ack retransmission.

Signed-off-by: Junho Lee <tot0roprog@gmail.com>
2024-09-03 10:41:52 +02:00
Grzegorz Chwierut
392304706b twister: Pass device flash timeout to pytest-harness.
Pass flashing timeout to pytest-harness and use them

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2024-09-03 10:41:45 +02:00
Jamie McCrae
4384e4b575 tests: mgmt: mcumgr: enum_mgmt: Fix removed zcbor function
Fixes use of a function that has been removed

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-09-03 10:41:11 +02:00
Magdalena Pastula
0237d375de arch: riscv: add an option for empty spurious interrupt handler
Add the possibility to disable fault handling in spurious
interrupt handler on RISCs and replacce it with an infinite loop.

Signed-off-by: Magdalena Pastula <magdalena.pastula@nordicsemi.no>
2024-09-02 12:35:57 -04:00
Qiankun Li
f44146a6cd samples: net: wifi: boards: rdrw612bga: Modify CONFIG_POSIX_MAX_FDS config.
[Reproduce issue]
1. Connect In-STA to Ex-AP
   wifi connect WiFi_STA_HE_1.1.8 1234567890 3 2 2

2. Start APUT with ACS using below commands
   wifi ap enable nxp-AP 161 1234567890 3

3. Connect Ex-STA to APUT and verify association using ping traffic

4. Now start two TCP server
  zperf tcp download -I ml 5001 192.168.0.252
  zperf tcp download -I up 6002 192.168.10.1

Observed behavior:
=============

Second TCP server fails to start

[Analysis]
1. After starting uap and a tcp server,
   there is only one allocatable fd resource
   left in the fdtable.
2. When two TCP clients try to establish a connection
   with the server at the same time, the second client
   cannot be assigned an fd, resulting in a failure.

[Fix]
Increase the maximum number of open file descriptors.

Signed-off-by: Qiankun Li <qiankun.li@nxp.com>
2024-09-02 12:33:50 -04:00
Yong Cong Sin
3754bb27f8 Revert "arch: riscv: ARCH_STACK_PTR_ALIGN should be 4 for RV32E"
This reverts commit 87b95be52a.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-02 12:33:36 -04:00
Yong Cong Sin
ed8dd0fa63 arch: riscv: stacktrace: undo the fp/sp alignment check in #76045
The change of alignment check in #76045 could be wrong and
isn't unnecessary to fix the stack traces output, undo it for
now.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-02 12:33:36 -04:00
Matt Rodgers
989fdadfe2 net: lib: http_server: prevent falsely matching HTTP headers
Using strncasecmp to match HTTP headers can give unexpected results when
the strings to be compared match up until the end of one string, but the
other string contains additional characters. This can result in falsely
matching a HTTP header value, for example:

strncasecmp("Upgrade-Something", "Upgrade", sizeof("Upgrade") - 1) --> 0

In this case we know that both strings are NULL terminated since one is
a string literal and we have just length-checked and explicitly NULL
terminated the other. So we can just use strcasecmp without a max
length.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-09-02 12:33:03 -04:00
Hyunsu Yoon
db890a201a net: lwm2m: fix buffer size check for U16 resource
The lwm2m_check_buf_sizes() function was not checking resources of
type LWM2M_RES_TYPE_U16, which could lead to potential overflows
when writing larger data types into U16 resources. Add a case for
LWM2M_RES_TYPE_U16 to properly validate the buffer size.

Fixes #77016

Signed-off-by: Hyunsu Yoon <piedroconti@naver.com>
2024-09-02 12:32:50 -04:00
Øyvind Rønningstad
5a08d537fe lwm2m_senml_cbor_encode.c: Fix line lengths
clang-format made lines too long

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2024-09-02 12:32:40 -04:00
Øyvind Rønningstad
7b0e202282 lwm2m_senml_cbor: Regenerate zcbor code using zcbor 0.9.0
And update the patch file and shell script

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2024-09-02 12:32:40 -04:00
Øyvind Rønningstad
4fa098f5d0 doc: Add sections about zcbor 0.9.0
to release notes and migration guide.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2024-09-02 12:32:40 -04:00
Øyvind Rønningstad
7a10226590 west.yml: Update zcbor to 0.9.0
from 0.8.2

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2024-09-02 12:32:40 -04:00
Jukka Rissanen
27260c818e net: dns: Add more error codes to gai_strerror()
Add more DNS error code mappings that the gai_strerror()
function can return.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-02 12:32:22 -04:00
Jukka Rissanen
92fda17385 net: Make sure net_buf data size is large enough for IPv6
If IPv6 is enabled, the fixed size net_buf data needs to be
large enough so that the full IPv6 header with extensions
can fit to one net_buf packet.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-02 12:32:10 -04:00
Guennadi Liakhovetski
dd50ff5585 llext: add dependencies
When an LLEXT object uses symbols of another such object, it depends
on it. Such dependencies have to be tracked to prevent their
accidental unloading. Ideally we should be able to track arbitrary
numbers of such dependencies, but this is a bit difficult. In this
first implementation we use a fixed-size array, currently consisting
of 8 entries.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-02 12:31:52 -04:00
Guennadi Liakhovetski
c5e305fce6 llext: fix flag evaluation for section grouping
When deciding which sections to group together, only the low 3
section attribute bits are relevant, ignore the rest.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-02 12:31:52 -04:00
Guennadi Liakhovetski
a8db637ead llext: export a symbol needed for immediate logging
Using the immediate logging option from LLEXT modules requires
one more symbol export.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-02 12:31:52 -04:00
Guennadi Liakhovetski
fe609dd8e8 llext: look for symbols in other LLEXT objects too
LLEXT objects can also export symbols for use by other such objects.
That means, that when linking an LLEXT object we have to look for
unresolved symbols in previously loaded objects too.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-02 12:31:52 -04:00
Guennadi Liakhovetski
19ccec6a03 llext: use EXPORT_SYMBOL() universally
Replace LL_EXTENSION_SYMBOL() with EXPORT_SYMBOL() in all tests and
samples.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-02 12:31:52 -04:00
Guennadi Liakhovetski
bd09a5c739 llext: make EXPORT_SYMBOL() universal
Currently LLEXT has two ways to export symbols:
EXPORT_SYMBOL() to exort symbols from the main firmware to extensions
LL_EXTENSION_SYMBOL() to export symbols from extensions
but it is possible to write code, that needs to export symbols
regardless of whether it is built into the main image or an
extension. And in fact there's no real need in two distinct macros -
we can use one for both cases and recognise at build time which
direction exporting is happening. This patch extends EXPORT_SYMBOL()
to also work from extensions.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-02 12:31:52 -04:00
Guennadi Liakhovetski
92a7c772d9 llext: remove an unused variable
Remove a loop counter, that isn't actually used for anything.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-02 12:31:52 -04:00
Jordan Yates
ae046fe5ea adc: adc_nrfx_saadc: support ADC_ACQ_TIME_MAX
Support the `ADC_ACQ_TIME_MAX` define in addition to
`ADC_ACQ_TIME_DEFAULT`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-09-02 12:31:17 -04:00
Chaitanya Tata
d1e700e9d8 samples: wifi: Add nRF70 tests to twister
Now that we have a build only mode, this ensures that nRF Wi-Fi driver
builds.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-09-02 12:31:06 -04:00
Chaitanya Tata
a449b748cb Revert "tests: wifi: nm: exclude nrf7002dk"
This reverts commit 65af3ab34c.

Build only mode is now supported without FW blobs.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-09-02 12:31:06 -04:00
Chaitanya Tata
803f59f3e1 drivers: wifi: nrf: Add support for twister CI build
Add a mode to build the driver without FW blobs, this is mainly for
twister to run and catch any build issues without depending on any FW
blobs.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-09-02 12:31:06 -04:00
Pavel Vasilyev
2f02474448 bluetooth: host: adv: Release buf if failed to set addr
The `bt_id_set_adv_own_addr` function itself tries to allocate a buffer
for the command and it failes due to lack of buffers, it returns error.
However, the `le_ext_adv_param_set` function doesn't handle the error
properly and keeps its own allocated buffer.

This commit releases the allocated buffer.
Partially fixes mesh in #77241.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-09-02 12:30:18 -04:00
Szymon Janc
ad0c1e12f6 tests: bluetooth: tester: Fix buffer sizes on nRF5340
This was affecting multiple CAP/INI/UST qualification tests.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-09-02 12:30:06 -04:00
Gerard Marull-Paretas
726c8abf32 soc: nordic: nrf54l15: add missing include
Add nrf5x binding header, as NRF5X_REG_MODE_DCDC is used in a macro
comparison. Missing header prevented evaluation to become true and so
enable DC/DC module.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-09-02 12:29:51 -04:00