Commit graph

15409 commits

Author SHA1 Message Date
Jamie McCrae
9c821eb999 mgmt: mcumgr: grp: img_mgmt: Add slot info command
Adds a new command that will return information on slots
themselves, listing the slot sizes, without any internal
information about the slot data. Will also return the maximum size
of an image for a set of slots if built using sysbuild.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-09-26 17:48:05 -04:00
David Brown
b14ed47d11 linker: Include the .ARM.extab section for Rust
This is a little complicated.  We currently just jump directly to rust's
panic, so we aren't likely to actually need these unwind tables.  But, they
would be needed if we ever reall paniced.  As of the time of this change,
the tables seem to just be 24 bytes of ROM space.

Signed-off-by: David Brown <david.brown@linaro.org>
2024-09-26 17:46:27 -04:00
Babak Arisian
c0cfe49a54 Bluetooth: BASS: Add support for dynamic registration of BASS
Added support for dynamic registration and unregistration of the
Broadcast Audio Scan Service (BASS) within the scan delegator.
This enables both scan delegator and BASS to be registered or
unregistered dynamically at runtime.

Signed-off-by: Babak Arisian <bbaa@demant.com>
2024-09-26 17:42:39 -04:00
Jamie McCrae
770482a45a mgmt: mcumgr: grp: os_mgmt: Fix issues raised in comments
Fixes an issue with structure which was previously raised in a
comment, and adds a new bool to the structure to enable this
restructure to work

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-09-26 17:42:01 -04:00
Emil Gydesen
ec2c5b0c1f Bluetooth: GATT: Replace magic number 0 with macro for auto ccc
Replace the magic number 0 with a #defined value for
the auto CCC discovery feature.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-26 17:41:24 -04:00
Alberto Escolar Piedras
b5b91b3edb ipc: icmsg & icbmsg: Add support for POSIX arch targets
Add support in this IPC backends for POSIX arch targets in general,
and ensure the nrf5340bsim defines the buffer which will be used.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-26 03:34:26 -04:00
Alberto Escolar Piedras
5dc810e261 ipc: pbuf: Provide function for Rx side initialization
Provide a new function for initializing the Rx side,
so users do not need to initialize the pointers by hand
if they did not use PBUF_DEFINE().

Let's also rename pbuf_init() to pbuf_tx_init() to clearly
signify the previous function was only meant to be used
by the Tx side.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-09-26 03:34:26 -04:00
Ryan McClelland
00b6443a55 drivers: i3c: add additional option to setdasa
struct i3c_ccc_address is intended to match the output where the address
is left shifted by 1 for SETDASA and SETNEWDA. Require the operations
calling it to shift the data.

add an additional parameter for the setdasa function which will allow for
the da to be configured rather than being hard coded.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-26 03:34:16 -04:00
Emil Gydesen
fff3ff02c5 Bluetooth: CSIP: Add bonding requirement for set lock/release
The CSIP spec states that the procedures shall only be done
on bonded devices, so a check for that was added.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-26 03:31:47 -04:00
Hubert Miś
70c9bf1da7 net: coap: add no-response option definition and values
Constrained application can require to avoid waiting for response
from a server. CoAP No-response option defined in RFC 7967 allows
to do that by suppressing selected response types.

Signed-off-by: Hubert Miś <hubert.mis@gmail.com>
2024-09-25 16:14:31 -05:00
Jukka Rissanen
765bfbbc3c net: stats: dns: Collect DNS statistics
If DNS statistics is enabled in Kconfig, then start to collect it.
This is useful in order to see how many DNS requests/responses
received or sent, and also see the amount of dropped DNS packets.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-25 13:52:15 -05:00
Jordan Yates
6db9cbc499 firmware: scmi: util: add missing macro argument docs
Add missing documentation for macro parameters, as `@param ...` is
only expected to be used with a variable argument list.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-09-25 13:50:57 -05:00
Jordan Yates
4d9724a98d llext: fix @kconfig{} pattern
The `@kconfig{}` pattern does not work properly as the first value in
the `@retval` field, leading to:
```
WARNING: zephyr/include/zephyr/llext/llext.h:296: unexpected token in
comment block while parsing the argument of command retval
```

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-09-25 13:50:57 -05:00
Jordan Yates
84a363011a devicetree: add missing macro param doc
Add missing documentation for the `compat` parameter.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-09-25 13:50:57 -05:00
Karsten Koenig
43f9488045 dts: bindings: arm: nordic: Add TDDCONF sources
For nrf54h20 a range of combinations exist to configure the test and
debug domains data sources and sinks. Expose them in DTS to allow
configuring them. Also drop the previous style which was too rigid to
extend to cover all cases cleanly. The old style was only used in a
single sample application so far.

Signed-off-by: Karsten Koenig <karsten.koenig@nordicsemi.no>
2024-09-25 12:00:04 +01:00
Luca Burelli
db451f2c46 llext: export DT devices to extensions
This change adds a new configuration option, LLEXT_EXPORT_DEVICES, which
enables exporting all devices defined in the device tree to llext
extensions. When enabled, all devices are made available to extensions
via the standard DT_ / DEVICE_* macros.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-09-25 12:59:13 +02:00
Luca Burelli
38722ecbcf llext: add wrapper to EXPORT_SYMBOL / LL_EXTENSION_SYMBOL
This patch adds an indirection level moving the current code from inside
the EXPORT_SYMBOL and LL_EXTENSION_SYMBOL macros to private Z_* macros.
This is done to allow for the official APIs to properly expand more
complex arguments, such as the DT function-like macros.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-09-25 12:59:13 +02:00
Luca Burelli
ca5f24e713 device.h: fix misleading comment
The comment for Z_DEVICE_DT_DEV_ID() is misleading: device_get_binding()
compares its inputs with values generated by the DEVICE_DT_NAME() macro,
which expands to the node's DT label or to the node's full name.

This patch updates the comment to reflect the actual behavior of
Z_DEVICE_DT_DEV_ID().

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-09-25 12:59:13 +02:00
Luca Burelli
811330bd83 device.h: fix bad error message for Z_DEVICE_NAME_CHECK
The error message for Z_DEVICE_NAME_CHECK was needlessly calling
DEVICE_NAME_GET() on the "name" string, resulting in a confusing message
being displayed.

Remove the DEVICE_NAME_GET call so that the error message shown by the
compiler contains the actual name.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-09-25 12:59:13 +02:00
Burak Gorduk
6e3c3f67e1 bluetooth: host: Use consistent API naming for CS
This change adds bt_le_cs prefix to public CS API as well as
adding le_cs prefix to CS related bt_conn callbacks. This is
to ensure consistency within CS API while maintaining the
separation between the Bluetooth LE and Classic features.

Signed-off-by: Burak Gorduk <burak.gorduk@nordicsemi.no>
2024-09-25 12:58:51 +02:00
Burak Gorduk
7b82214d29 bluetooth: host: HCI support for CS configuration
Adds following HCI support for CS configuration:
- LE CS Create Config command
- LE CS Remove Config command
- LE CS Config Complete event

Two callbacks have been added to notify the application
when a new CS configuration is created or an existing
CS configuration is removed.

Signed-off-by: Burak Gorduk <burak.gorduk@nordicsemi.no>
2024-09-25 12:58:51 +02:00
Ryan McClelland
e602590931 drivers: i3c: add iterate through i3c/i2c devices macros
Add i3c_bus_for_each_i3cdev and i3c_bus_for_each_i2cdev to more easily
iterate through each i3c or i2c device on the bus.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-25 04:04:13 -04:00
Ryan McClelland
e20b556fb4 drivers: i3c: add rstact format 2 and 3 helpers
Add rstact direct write and direct read formats helper functions.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-09-25 04:03:04 -04:00
Florian Grandel
f2d6c74875 net: net_pkt: remove deprecated functions for v4.0
Removes deprecated functions net_pkt_txtime() and net_pkt_set_txtime().

See: #76943

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-09-25 04:01:46 -04:00
Phi Bang Nguyen
0cbaea0d7e include: video: Add frame interval APIs
Add set/get/enum frame intervals APIs to support frame rate changing.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-09-24 14:23:56 -05:00
Fabrice DJIATSA
73cc021a13 dts: bindings: dma: Update stm32-dma-v1.yaml with macros
add macros in the description values and update an example

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-09-24 14:20:46 -05:00
Fabrice DJIATSA
5cea74dde5 include: zephyr: dt-bindings: dma: add macros for DMA V1 15th bit
unlike dma v2 binding where bit 15 is reserved, dma v1 binding
needs to configure the the DMA peripheral increment offset.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-09-24 14:20:46 -05:00
Emil Gydesen
1406c547d6 Bluetooth: TBS: Add support for dynamic TBS
The TBS and GTBS instances can now be dynamically registered
and unregistered, which fits better for the use cases of TBS
where specific bearers can come and go depending on the
features of the device.

For example if a SIM card is inserted, then a device can
register a TBS for the provider and remove it again if the
SIM card is removed.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-24 09:21:54 -04:00
Emil Gydesen
7c35286678 Bluetooth: BAS: Fix bad use of kconfig_dep
The kconfig_dep keyword was missing the `@`.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-24 09:20:35 -04:00
Lauren Murphy
e0bd9aef66 drivers: sensor: add mmc56x3 sensor driver
Adds Memsic MMC56X3 magnetometer and temperature
sensor driver.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2024-09-24 10:09:25 +02:00
Mateusz Kapala
77555898de mgmt: mcumgr: Add SMP SVC and CHR UUIDs to header
Added the SMP service and characteristic UUIDs to the smp_bt module
header and used those definitions.

Signed-off-by: Mateusz Kapala <mateusz.kapala@nordicsemi.no>
2024-09-23 18:10:49 -04:00
Nicolas Pitre
66853f4307 x86: add support for on-demand mappings
This makes x86 compatible with K_MEM_MAP_UNPAGED.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-09-23 18:10:38 -04:00
Fabio Baltieri
1a2d74adab device_mmio: use explicit unsigned literals for addresses
Add an explicit unsigned literal suffix (U) for addresses obtained from
devicetree, this is to work around a specific warning:

zephyrproject/zephyr/include/zephyr/arch/arm/cortex_a_r/timer.h:40:2:
warning: this decimal constant is unsigned only in ISO C90

When compling

west build -p -b qemu_cortex_a9 -T tests/lib/cpp/cxx/cpp.main.cpp98

Argueably all devicetree addresses and sizes should be unsigned but this
is enough to make CI pass, may look into changing the device.h macro as
a followup.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-09-23 18:10:30 -04:00
Fabio Baltieri
068ed1851b mspi: add a dummy byte to struct mspi_timing_cfg
Add a dummy byte to struct mspi_timing_cfg, for C++ compatibility, same
as what's done in include/zephyr/arch/structs.h,
include/zephyr/arch/arm/structs.h, include/zephyr/kernel/thread.h and
others.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-09-23 18:10:30 -04:00
Robert Lubos
8d296ba8fe net: iface: Don't require native networking to register IP address
It shouldn't be needed to enable native networking to be able to
add/delete IP addresses on network interfaces.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-09-23 14:08:34 +01:00
Fabio Baltieri
61f4ba27ad drivers: i2c: add an option to skip auto-sending stop on last message
The I2C transfer API has been recently changed to always automatically
set a STOP on the last message, which was well documented but
implemented only by few drivers.

Unfortunately, while documented, this is a change in the current
behavior and it turns out that some applications depended on it for some
complex operations.

Add a flag to temporarily restore the old behavior, buying time to fix
the application code depending on this.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-09-23 14:07:49 +01:00
Matt Rodgers
f2d8766b5d net: lib: http_server: remove dynamic resource data buffer
After introduction of struct http_response_ctx, the dynamic resource
data buffer is no longer needed for transferring data between the
application callback and the server. It is therefore removed to avoid
unnecessary copying of data.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-09-23 12:00:54 +02:00
Matt Rodgers
4cc905c513 net: lib: http_server: allow application to send headers/response code
Allow the application to send headers and response codes from a dynamic
resource callback by filling out a response context structure.

This also allows simple requests to be completed in a single execution
of the callback, by setting the final_chunk flag.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-09-23 12:00:54 +02:00
Emil Gydesen
7ef2f81413 Bluetooth: Audio: Add helpers for assisted listening stream
Added helper functions to set and get assisted listening
stream values for codec capabilities and codec configs.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-23 10:03:47 +02:00
Michał Barnaś
198e040b4e usbc: add generic TCPCI related functions
Add generic functions that will be common to all TCPCI compliant
drivers like registers reading, writing and updating.

Signed-off-by: Michał Barnaś <barnas@google.com>
2024-09-23 10:03:19 +02:00
Michał Barnaś
1e156564cd usbc: add definitions for TCPCI registers and fields
Add header file with registers and fields definitions compliant
to the Type-C Port Controller Interface Specification
Revision 2.0, Version 1.3.

Signed-off-by: Michał Barnaś <barnas@google.com>
2024-09-23 10:03:19 +02:00
Emil Gydesen
0fe97560a3 Bluetooth: BAP: Add validation of qos_pref
The QoS preference defined by ASCS has some specified
limits and values that we should enforce.

Given the current API we cannot return an error to the
unicast server if it supplies invalid values, so we have
to resort to a LOG_ERR.

For the unicast client we treat invalid QoS preferences
similar to other invalid data in the notifications.

This also adds additional documentation in the
bt_audio_codec_qos_pref struct.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-23 10:03:12 +02:00
Emil Gydesen
b800be3430 Bluetooth: BAP: Broadcast sync fail receive state bis sync value fixed
In the case that a broadcast sync fails for any reason, we need to
set the BIS_Sync value for all subgroups to 0xFFFFFFFF
(BT_BAP_BIS_SYNC_FAILED) as per the BAP spec.

This commit adds a new define for this and modifies
both the scan delegator and broadcast sink to support this.

The change is validated by a modification to the broadcast
assistant test that verifies that the value is set in the
case of an invalid broadcast code (which indicates a
failed BIG sync).

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-23 10:02:33 +02:00
Daniel Flodin
746c59c82a arch: kernel: lib: toolchain: Standardize TLS keyword
Up until now, the `__thread` keyword has been used for declaring
variables as Thread local storage. However, `__thread` is a GNU
specific keyword which thus limits compatibility with other
toolchains (for instance IAR).

This PR intoduces a new macro `Z_THREAD_LOCAL` which expands to the
corresponding C11, C23 or C++11 standard keyword based on the standard
that is specified during compilation, else it uses the old `__thread`
keyword.

Signed-off-by: Daniel Flodin <daniel.flodin@iar.com>
2024-09-23 10:01:48 +02:00
Fabian Blatz
c525dc0813 drivers: stepper: Add fake stepper driver
Add `zephyr,fake-stepper` compatible which can be used inside of unit
tests.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-09-21 12:23:19 +01:00
Emil Gydesen
e1e4f2a2af Bluetooth: Host: Set scan option type to uint8_t
Changed the scan option type from uint32_t to
uint8_t.

There are 2 reasons for this:
1) This reduces the size of the struct bt_le_scan_param.
   Since we are now storing two copies of scan parameters
   statically in the host, this is not insignficant.
2) This fixes a "hole" in the struct. There are no longer
   3 empty octets between the `type` and the `options`, which
   caused valgrind warnings when using `memcpy` and `memcmp`
   of the struct.

Currently we only need 8 bits for the options available.
If additional options are added later, the field need
to be increased. For the above reasons some additional
refactoring my be required to avoid significant size
increases and the valgrind issue.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-21 11:29:21 +02:00
Tom Chang
20b1b6ac83 dts: espi: npcx: add property for customize vw index
This CL adds the vw-index-extend-set for customize vw index.

Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
2024-09-20 15:14:57 -05:00
Declan Snyder
a8b1ac26d8 drivers: clock_control: Add MCUX SCG K4 driver
Add driver for newer SCG clock control peripheral.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-09-20 15:14:11 -05:00
Stefan Gloor
2571ae8b19 drivers: mipi_dbi: add support for parallel 8080/6800 modes using GPIO
Introduce GPIO-based driver for MIPI DBI class that allows MIPI DBI
type A and B displays to be used on general platforms.

Since each data pin GPIO can be selected individually, the bus pins are
set in a loop, which has a significant negative impact on performance.
When using 8-bit mode and all the data GPIO pins are on the same port,
a look-up table is generated to set the whole port at once as a
performance optimization. This creates a ROM overhead of about 1 kiB.

Tested 8-bit 8080 mode with ILI9486 display on nRF52840-DK board.

Signed-off-by: Stefan Gloor <code@stefan-gloor.ch>
2024-09-20 11:56:22 -05:00
Stefan Gloor
1d8c3c013b doc: update MIPI DBI API compatibility
The MIPI DBI API supports MIPI DBI controllers type A, B, and C
(except with 16 write clocks). Update the documentation accordingly.

Signed-off-by: Stefan Gloor <code@stefan-gloor.ch>
2024-09-20 11:56:22 -05:00