Commit graph

15409 commits

Author SHA1 Message Date
Yishai Jaffe
010d33c239 cfb: typo fixes
Fixed CFB_DISPLAY_HEIGH typo to CFB_DISPLAY_HEIGHT.
Fixed widht typo to width.
Fixed "cfb draw point" shell command's help message to "<x> <y>" instead
of "<x> <y0>".

Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
2025-04-02 10:30:50 +02:00
Hubert Miś
502982bf03 drv: ft8xx: extend single-letter function argument names
Replace single-letter function argument names in the FT8xx coprocessor
API with full names of the arguments for better code clarity.

The arguments in the ft8xx_reference_api.h are left as single-ltters to
keep the same function declarations as described in the FT8xx
programming guides.

Signed-off-by: Hubert Miś <hubert.mis@gmail.com>
2025-04-02 05:29:46 +02:00
Luis Ubieda
9df68a4c48 sensor: pat9136: Add basic functionality
- Basic support with Read/Decode API for one-shot reads.
- Supported channels:
    - SENSOR_CHAN_POS_DX.
    - SENSOR_CHAN_POS_DY.
    - SENSOR_CHAN_POS_DXYZ.
    - SENSOR_CHAN_POS_DX_MM (private channel).
    - SENSOR_CHAN_POS_DY_MM (private channel).
    - SENSOR_CHAN_POS_DXYZ_MM (private channel).

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-04-02 05:29:23 +02:00
Lyle Zhu
8d819954e8 Bluetooth: Classic: Refactor query and deletion of bonding information
In current implementation, the bonding information of classic is
queried by calling the function `bt_foreach_bond()`. And the bonding
information of classic is deleted by calling `bt_unpair()`.

There are two issues if the LE and classic are bonded at same time for
dual mode peer device.
Issue 1, for the function `bt_foreach_bond()`, there are two bonding
information will be found. But there is no way to find which bonding
information belongs to LE or classic.
Issue 2, For the function `bt_unpair()`, all bonding information will
be deleted if the passed address is the public address. But there is
no way to delete the bonding information of LE or classic.

Remove the calling of function `bt_foreach_bond_br()` from the
function `bt_foreach_bond()`. And rename it to `bt_br_foreach_bond()`,
and public it as an API to query the bonding information of classic.

Remove the calling of function `bt_keys_link_key_clear_addr()` from
the function `bt_unpair()`. Add an API `bt_br_unpair()` to delete the
bonding information of classic.

Add a `br_bond_deleted` to structure `bt_conn_auth_info_cb` for
classic. The callback will be triggered if the bonding information has
been deleted by the function `bt_br_unpair()`.

Add a `clear` shell command for classic to delete the bonding
information.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-04-01 22:18:40 +02:00
Patrik Sieverding
3eb6016e74 drivers: i2c: add function to check if an I2C_IODEV is ready
The i2c driver is missing the option to check if a I2C_IODEV is ready for
use. The proposed function works the same as the check for a SPI_IODDEV
to keep the use consistent across different bus systems.

Signed-off-by: Patrik Sieverding <sieverdp@uni-bremen.de>
2025-04-01 22:14:59 +02:00
Nicolas Pitre
11021cdd4f kernel: sys_heap: decouple realloc from aligned_realloc
When sys_heap_realloc() is expressed in terms of sys_heap_aligned_realloc()
it invokes a longer aligned allocation code path with an extra runtime
overhead even though no alignment is necessary.

Let's reference and invoke the aligned allocation code path only when an
actual aligned allocation is requested. This opens the possibility for
the linker to garbage-collect the aligning code otherwise.

Improve realloc documentation while at it.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2025-04-01 22:13:04 +02:00
Nicolas Pitre
9da06456f2 kernel: kheap: decouple simple alloc from aligned_alloc
When k_heap_alloc() is expressed in terms of k_heap_aligned_alloc()
it invokes a longer aligned allocation code path with an extra runtime
overhead even though no alignment is necessary.

Let's reference and invoke the aligned allocation code path only when an
actual aligned allocation is requested. This opens the possibility for
the linker to garbage-collect the aligning code otherwise.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2025-04-01 22:13:04 +02:00
Robert Lubos
7fbdc6d734 net: lib: mqtt: Add extra MQTT 5.0 ifdefs to prevent compile errors
Add some extra ifdefs around MQTT 5.0 specific structures to prevent
compiler errors due to undefined symbols in certain configurations.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-04-01 16:27:41 +02:00
Ryan Chu
c9240cc99f bluetooth: host: Report status of Channel Sounding complete events
If the HCI status of a complete event is not BT_HCI_ERR_SUCCESS,
the remaining parameters could be invalid.

In this case, the params is passed as NULL pointer to the callbacks.
- LE CS Read Remote Supported Capabilities Complete event
- LE CS Read Remote FAE Table Complete event
- LE CS Config Complete event
- LE CS Security Enable Complete event
- LE CS Procedure Enable Complete event

This change avoids forwarding the invalid fileds to the applications.

Signed-off-by: Ryan Chu <ryan.chu@nordicsemi.no>
2025-04-01 16:26:58 +02:00
Krzysztof Chruściński
c8d7d577a6 logging: frontend_stmesp: Fix string addresses from remote core
When decoding logs from a remote core with memory that APP can
access, wrong address of an array with string addresses was used.
Log message contains index of a string and APP strings array was
used instead of remote core. Extend STMESP logging so that address
of string array of a remote core is send during startup to the APP
and APP is using this array to decode strings from remote cores.
Bug applies only to PPR and FLPR as APP has no access to RAD memory.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-04-01 16:26:50 +02:00
Sudan Landge
d4d09225ca arch: arm: fix ci failure
This is to fix ci failure caused by commit d5d4d57

In the above commit, it's wrongly assumed that ROM_ADDR and RAM_ADDR
are same **only** when CONFIG_XIP is not defined.
Since aarch64 was taken as reference in the review,
we missed to see that CONFIG_FLASH_SIZE is also part of the condition
to define ROM_ADDR as RAM_ADDR.
CONFIG_XIP is not defined for qemu_cortex_a9/xc7z007s however,
CONFIG_FLASH_SIZE is not 0 so the assumption fails
and the required reset to RAM_ADDR is not applied leading to the test
failure.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2025-04-01 16:26:12 +02:00
Jonathon Penix
e72f35b5bd toolchain: llvm: Use clang's __INTN_C/__UINTN_C macros for clang 20+
clang recently began providing predefined __INTN_C/__UINTN_C macros
resulting in macro redefinition warnings in toolchain/llvm.h. This
change was landed in clang in late Jan. 2025 and clang/LLVM 20 is the
first official release that has this support (see the PR linked below).

Prefer the definitions provided by clang and avoid redefining these macros
for clang versions 20 and later to avoid said warnings.

Link: https://github.com/llvm/llvm-project/pull/123514

Signed-off-by: Jonathon Penix <jpenix@quicinc.com>
2025-03-31 14:43:56 +02:00
Emil Hammarström
01ba1bf8ce fs: zms: clarify need to re-mount after zms_clear
Clarify that the file system needs to be re-mounted after clearing.
It was not clear that zms_clear both cleared and unmounted the fs.

Signed-off-by: Emil Hammarström <emil.hammarstrom1@assaabloy.com>
2025-03-31 14:32:08 +02:00
Simon Maurer
d5d4d5791f arch: arm: cortex_a_r/cortex_m: fix text region overlap with ram in !XIP
ROM_ADDR and RAM_ADDR is same when CONFIG_XIP is not defined.
If we reset the location for RAMABLE region to RAM_ADDR text region,
which is part of rom, overlaps with initial ram region.
This commit tries to avoid this incorrect behaviour for cortex_a
and cortex_m

Signed-off-by: Simon Maurer <mail@maurer.systems>
2025-03-31 14:31:36 +02:00
Håvard Reierstad
47f5d1b898 Bluetooth: docs: Add enum names to bt.h and gatt.h
Adds enum names to `bluetooth.h` and `gatt.h` to make them easier to
reference. Adds Doxygen references where relevant.

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2025-03-31 11:30:48 +02:00
Chew Zeh Yang
fa1e385b77 drivers: udc_ambiq: fix compilation issue after dwc2 header removal
udc_ambiq was using USB test mode definition in dwc2 header, which
the include was removed, hence compilation now fails. This commit
fixes the compilation failure.

Signed-off-by: Chew Zeh Yang <zeon.chew@ambiq.com>
2025-03-31 08:06:47 +02:00
Tomasz Bursztyka
e8185990ac include: debug: Fix indentation in coredump.h
A nano fix in the header.

Signed-off-by: Tomasz Bursztyka <tobu@bang-olufsen.dk>
2025-03-29 07:44:11 -04:00
Jukka Rissanen
663867dbb0 net: if: Add helper to get src interface and address from dst address
Instead of calling various network interface API functions to get
the network interface and related source IP address, have a single
function that can return both data.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-28 21:51:57 +01:00
Jukka Rissanen
525b8e58a2 net: l2: virtual: Add support for VPN public/private key set/get
Add support for getting public address and setting private
key for the virtual interface.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-28 21:51:57 +01:00
Jukka Rissanen
e72190a47e net: events: Add VPN connectivity events
Add enablers for sending VPN connectivity events.

Signed-off-by: Jukka Rissanen <jukka.rissanen@gmail.com>
2025-03-28 21:51:57 +01:00
Jukka Rissanen
d95d391968 net: stats: Add VPN statistics support
Enable collection of VPN statistics and allow user to fetch it.

Signed-off-by: Jukka Rissanen <jukka.rissanen@gmail.com>
2025-03-28 21:51:57 +01:00
Jukka Rissanen
b7dec6c195 net: Add option for VPN enablement
Add support for setting up VPN enablers in the network stack.
These are to be used by the VPN implementation like Wireguard.

Signed-off-by: Jukka Rissanen <jukka.rissanen@gmail.com>
2025-03-28 21:51:57 +01:00
Triveni Danda
7b6f2572e5 net: lib: wifi_credentials: Use getopt API for adding network options
Use getopt API to process arguments for `cred add` command.

Signed-off-by: Triveni Danda <triveni.danda@nordicsemi.no>
2025-03-28 16:10:36 +01:00
Triveni Danda
c9821ff2c4 include: zephyr: net: Fix docstrings in wifi_credentials header
Fix all docstrings in header to ensure compliance
with Zephyr's documentation guidelines.

Signed-off-by: Triveni Danda <triveni.danda@nordicsemi.no>
2025-03-28 16:10:36 +01:00
Zihao Gao
a0efdb2112 Bluetooth: AVRCP: Move the handling of transaction labels to the App.
According to AVCTP v1.4: On the controller and the target side,
handling of transaction labels is dependent on the application.

Signed-off-by: Zihao Gao <gaozihao@xiaomi.com>
2025-03-28 16:10:05 +01:00
Zihao Gao
3f747839c5 Bluetooth: AVRCP: expose macros to upper layer.
This patch expose BT_AVRCP_COMPANY_ID_SIZE to applications.

Signed-off-by: Zihao Gao <gaozihao@xiaomi.com>
2025-03-28 16:10:05 +01:00
Zihao Gao
a4790aeab8 Bluetooth: AVRCP: use spec defined structures on APIs.
This patch replaced the structures defined by zephyr APIs
by those defined by AVRCP Spec.

Signed-off-by: Zihao Gao <gaozihao@xiaomi.com>
2025-03-28 16:10:05 +01:00
Zihao Gao
6fe6326bea Bluetooth: AVRCP: implementation of Get Capabilities command.
This patch allows the upper layer to acquire the remote AVRCP
capabilities. These capabilities can be further used in register
notifications.

Signed-off-by: Zihao Gao <gaozihao@xiaomi.com>
2025-03-28 16:10:05 +01:00
Declan Snyder
c69fe0ef55 drivers: spi: improve API documentation
Enhance SPI API documentation.

The improvements include:
- Reorganize the doxygen into logical sections
- Add clear explanations of the CS behavior
- Improved descriptions of buffers and transfers
- Better descriptions of operational modes (master/slave)
- More clear explanation of clock polarity and phase configurations
- More clear explanation of SPI data word concepts and configurations

These changes make the API easier to understand for developers
implementing drivers or applications using the SPI interface.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-03-28 12:21:48 +01:00
Anisetti Avinash Krishna
139211772c include: zephyr: sys: time_units: Make z_clock_hw_cycles_per_sec unsigned
Convert z_clock_hw_cycles_per_sec to unsigned int to increase
supported frequency range.

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2025-03-28 12:21:07 +01:00
Anisetti Avinash Krishna
98dba7da7c include: zephyr: sys: time_units: Type cast SYS_CLOCK_HW_CYCLES_PER_SEC
Type case CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC to uint32_t
while defining sys_clock_hw_cycles_per_sec_runtime_get()
to extend the range of frequency to 0xffffffff.

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2025-03-28 12:21:07 +01:00
Quang Le
7c27e576a0 drivers: pinctrl: Add support for RZ/V2L
This is the initial commit to support pinctrl driver for Renesas RZ/V2L

Signed-off-by: Quang Le <quang.le.eb@bp.renesas.com>
Signed-off-by: Hieu Nguyen <hieu.nguyen.ym@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
2025-03-28 08:35:13 +01:00
Andrzej Kuros
d15c9fe9a6 drivers: i2c_nrfx_twim: add exclusive access API
This commit provides an extension to the i2c_nrfx_twim driver.
It introduces possibility to acquire/release exclusive access to the
i2c bus. While the exclusive access to the i2c bus is acquired
you can access the underlying nrfx_twim driver directly.

Signed-off-by: Andrzej Kuros <andrzej.kuros@nordicsemi.no>
2025-03-27 17:17:32 +01:00
Björn Bergman
128698fd36 cmake: userspace: A stab at USERSPACE + CMAKE_LINKER_GENERATOR
All in all this makes cmake linker generator able to work for at least
most of the kernel tests and samples, on cortex m4.

Make the cmake linker generator have a file-structure more similar to
the ld-skeletons.

Add or edit groups, sections and logic to make the generator reflect
what the ld-skeletons do, esp. for kobjects and APP_SMEM, nonint and
some other details are also effected.

Use the new zephyr_linker_include_generated() and
zephyr_linker_include_var() functions to to handle
${DEVICE_API_LINKER_SECTIONS_CMAKE}, the kobject-prebuilt-*.h files and
APP_SMEM partition. Essentially the output from gen_app_partitions.py,
gen_kobject_placeholders.py.

Add ALIGN_WITH_INPUT on sections being put into DATA_REGION. This makes
the init layout work for ld.

This leverages the updates in gen_app_partitions.py to generate its
output as cmake linker generator sections too, and puts them into a
group defined in linker.cmake

Setup generator variables for alignment of APP_SMEM. Note that this does
not yet handle MPU_ALIGN which depends on the size of the section...

Fix broken k_object_assignment iterable section

Signed-off-by: Björn Bergman <bjorn.bergman@iar.com>
2025-03-27 17:17:03 +01:00
Jukka Rissanen
92da8cb69f wifi: shell: Return text description of connection error
If "wifi connect" fails, tell user why in textual format.
This helps debugging connectivity issues.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-26 16:22:01 +01:00
Tom Hughes
918ae79522 net: mdns_responder: Replace pragma with TOOLCHAIN_DISABLE macro
These macros were recently introduced and replaced everywhere (#84065),
but this was missed.

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-03-26 16:20:26 +01:00
Corey Wharton
a7f6cee9de drivers: sensors: lsm6dsv16x: add support for lsm6dsv32x variant
The LSM6DSV32X part is nearly identical to the LSM6DSV16X but has different
sensitivity scales for the accelerometer (4-32G versus 2-16G). This commit
adds support for this part via the "st,lsm6dsv32x" compatible string.

Signed-off-by: Corey Wharton <xodus7@cwharton.com>
2025-03-26 16:19:54 +01:00
Robert Lubos
f9b4e27856 net: mqtt: Make sure MQTT 5.0 is visible in API documentation
Make sure conditionally compiled parts of the public header related to
MQTT 5.0 support are rendered by doxygen.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-03-26 16:19:42 +01:00
Robert Lubos
8935579d0a net: mqtt: Improve disconnect error notification for MQTT 5.0
As MQTT 5.0 allows to specify the disconnect reason in the Disconnect
packet, use this new feature to improve error notification to the
broker, according to the error guidelines in the MQTT 5.0 spec.
For most cases, a generic arbitrary mapping between errno values and
reason codes is used, however the parser can specify the disconnect
reason code manually to better handle certain corner cases (like invalid
topic alias used).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-03-26 16:19:42 +01:00
Robert Lubos
e9da3b3e0c net: mqtt: Add support for MQTT 5.0 topic aliases
Add support for handling topic aliases received from the broker.
The MQTT client implementation will store received topic for further use
in case consecutive PUBLISH received from the broker contains no topic
but alias only.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-03-26 16:19:42 +01:00
Robert Lubos
1d743fa65a net: mqtt: Add support for MQTT 5.0 AUTH packet
Add support for a new AUTH message introduced in MQTT 5.0.
This is a new mechanism specified by MQTT 5.0, which allows clients and
brokers for enhanced authentication in between CONNECT and CONNACK
exchange. An additional MQTT event (MQTT_EVT_AUTH) was specified which
is triggered when the AUTH packet arrives from the broker.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-03-26 16:19:42 +01:00
Robert Lubos
55e1c10894 net: mqtt: Add MQTT 5.0 support for DISCONNECT
Add support for DICONNECT message specified in MQTT 5.0.
As with MQTT 5.0, the disconnect can now also be initiated by the
broker, it was needed to add decoder support for the message.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-03-26 16:19:42 +01:00
Robert Lubos
2459ffae41 net: mqtt: Add MQTT 5.0 support for SUBACK/UNSUBACK
Add support for SUBACK/UNSUBACK messaged specified in MQTT 5.0.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-03-26 16:19:42 +01:00
Robert Lubos
efd795b066 net: mqtt: Add MQTT 5.0 support for SUBSCRIBE/UNSUBSCRIBE
Add support for SUBSCRIBE/UNSUBSCRIBE messages specified in MQTT 5.0.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-03-26 16:19:42 +01:00
Robert Lubos
c21e64251b net: mqtt: Add MQTT 5.0 support for PUBLISH ACKs
Add support for PUBACK, PUBREC, PUBREL and PUBCOMP specified in MQTT
5.0. As all of these acknowledgment packets have similar format,
introduced a common encoder/decoder to handle ACK packets.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-03-26 16:19:42 +01:00
Robert Lubos
15ad90aceb net: mqtt: Add MQTT 5.0 support for PUBLISH
Add support for PUBLISH message specified in MQTT 5.0. The message
encoder and decoder were updated to support MQTT properties.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-03-26 16:19:42 +01:00
Robert Lubos
6038676b83 net: mqtt: Add MQTT 5.0 support for CONNACK
Add support for CONNACK message specified in MQTT 5.0, along with
property decoders required to decode MQTT properties. Decoded properties
are provided to the application within mqtt_connack_param structure,
accompanying the CONNACK event.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-03-26 16:19:42 +01:00
Robert Lubos
8fe2965500 net: mqtt: Add MQTT 5.0 support for CONNECT
Add support for CONNECT message specified in MQTT 5.0, along with
property encoders required to encode MQTT properties which is a new
concept in MQTT 5.0. Connect and will properties can be specified by the
application in the mqtt_client structure before connecting.

Introduce a helper function which allows to verify whether MQTT 5.0 is
used or not, so that it's still possible to use MQTT 3.1 even if MQTT
5.0 support is enabled in Kconfig.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-03-26 16:19:42 +01:00
Etienne Carriere
105d729aee drivers: clock_control: add TIMG prescaler on STM32N6
Add support for TIMG clock domain as clock source on STM32N6 SoCs.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2025-03-26 16:19:09 +01:00
Etienne Carriere
adc36f8cda drivers: clock_control: add HSI_DIV on STM32N6
Enable support for HSI_DIV and its use as a clock source on STM32N6 SoCs.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2025-03-26 16:19:09 +01:00