Commit graph

17,121 commits

Author SHA1 Message Date
Jukka Rissanen
2fd14905ff lib: posix: net: Add support for namespaced network symbols
Use namespaced network symbols in order to avoid circular dependency
between Posix and network subsystems.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-11-17 14:01:32 -05:00
Jukka Rissanen
354e117192 net: socket: Network should not include any Posix header
Removing Posix header inclusion as networking APIs and code should
be self contained now.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-11-17 14:01:32 -05:00
Jukka Rissanen
d45cd6716b net: Convert network codebase to use renamed network APIs
Rename network symbols in network stack to use the renamed network APIs.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-11-17 14:01:32 -05:00
Jukka Rissanen
a63dbfb6cc net: Namespace network symbols to avoid conflicts with Posix/libc
Rename network symbols i.e., add net_, NET_ or ZSOCK_ prefixes
to those network symbols that can be found in Posix or libc.
This way we can avoid circular dependency issues.

Add also a compatibility header file that allows user to continue
use various network APIs without adding either net_, NET_ or ZSOCK_
prefixes.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-11-17 14:01:32 -05:00
Sean Kyer
05634c3d6c bluetooth: ANS: Add Alert Notification Service
Add alert notification service (ANS) to Bluetooth
subsystem and accompanying sample.

Signed-off-by: Sean Kyer <sean.actor@gmail.com>
2025-11-17 13:49:22 -05:00
Richard Skriwanek
ffa8d6cacf drivers: clock_control: stm32: fix configuration for stm32u3
A change was introduced in how stm32 timers clocks are defined
to have multiple clock definitions.
This change was not handled in the stm32u3 series driver
(which had no timers defined in the dts at all).
This fix ports the required code to the stm32u3 mcu.

Signed-off-by: Richard Skriwanek <richy@fnc.at>
2025-11-17 13:48:31 -05:00
Zhijie Zhong
c222dcff8c bluetooth: host: Add bt_gatt_cb_unregister() to unregister GATT callbacks
New API bt_gatt_cb_unregister, use _SAFE iteration for callback list.

Signed-off-by: Zhijie Zhong <zhongzhijie1@xiaomi.com>
2025-11-17 13:46:47 -05:00
Lyle Zhu
477b3ddd0c Bluetooth: Classic: HFP_HF: Compatible old version AG
In current implementation, the AG with old version cannot be
supported properly.
Such as, if the AG is version 0.96, the AT command `AT+BRSF` should
not be sent.
And if the AG is no newer than version 1.5, the `Codec Negotiation`
should be unsupported.

Compatible old version with the following changes,

Discover the AG SDP record to get the profile version and AG
features. If the SDP discovery is failed, break the RFCOMM DLC
connection.

If the AG version is v0.96, do not send AT command `AT+BRSF`.

Create SCO connection directly if the codec negotiation feature is
unsupported on both side in the function `bt_hfp_hf_audio_connect()`.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-11-17 10:59:10 -05:00
Lyle Zhu
8e144a89f3 Bluetooth: Classic: AVRCP: Enable cover art feature
Add Kconfig `BT_AVRCP_TG_COVER_ART` to enable the target cover art
feature.

Add Kconfig `BT_AVRCP_CT_COVER_ART_GET_IMAGE_PROPERTIES` to enable
the controller cover art get image properties feature.

Add Kconfig `BT_AVRCP_CT_COVER_ART_GET_IMAGE` to enable the
controller cover art get image feature.

Add Kconfig `BT_AVRCP_CT_COVER_ART_GET_LINKED_THUMBNAIL` to enable
the controller cover art get linked thumbnail feature.

Add functions `bt_avrcp_cover_art_ct_cb_register()` and
`bt_avrcp_cover_art_tg_cb_register()` to register the callback.

Add function `bt_avrcp_cover_art_ct_l2cap_connect()` to create the
L2CAP connection for OBEX transport.

Add functions `bt_avrcp_cover_art_ct_l2cap_disconnect()` and
`bt_avrcp_cover_art_tg_l2cap_disconnect()` to disconnect the L2CAP
connection.

Add functions to send OBEX request/response, including connect,
disconnect, abort, get_image_properties, get_image, and
get_linked_thumbnail.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-11-17 10:58:06 -05:00
Firas Sammoura
f6cec1c30f riscv: Add CONFIG_PMP_KERNEL_MODE_DYNAMIC
Introduce `CONFIG_PMP_KERNEL_MODE_DYNAMIC` to enable dynamic
configuration and activation of Machine mode PMP entries. This allows
PMP settings to be managed efficiently during transitions between
kernel and thread contexts.

Signed-off-by: Firas Sammoura <fsammoura@google.com>
2025-11-17 09:25:01 -05:00
Afonso Oliveira
b9a15bf5c8 arch/riscv: Enable NMI delivery for SMRNMI hardware
Add option to enable NMI delivery on boot for SMRNMI hardware.

Changes:
- Add CONFIG_RISCV_SMRNMI_ENABLE_NMI_DELIVERY Kconfig option
- Define SMRNMI CSRs in arch/riscv/include/csr.h
- Set NMIE bit during boot to enable NMI delivery

SMRNMI hardware generates but doesn't deliver NMIs when NMIE=0 (default).
This causes twister test failures and prevents handling of critical
hardware events like watchdog NMIs and ECC errors.

Setting NMIE=1 enables NMI delivery, but note that this implementation
only sets the enable bit - it does not provide full SMRNMI support
(no mnret instruction handling, no RNMI handlers). Users must implement
proper RNMI handlers in SoC-specific code to avoid undefined behavior.

Signed-off-by: Afonso Oliveira <afonsoo@synopsys.com>
2025-11-17 09:23:11 -05:00
Seppo Takalo
aee2604d37 drivers: modem: Implement support for DTR signal
DTR signal on UART extends the power saving by allowing host
to indicate the remote end that the UART is not in active state.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2025-11-17 09:21:45 -05:00
Alberto Escolar Piedras
9ce1bb356e drivers console: Remove deprecated native_posix_console.h
This header was deprecated in d881e794ba
for the 4.2 release
in favour of posix_arch_console.h
Let's remove it now.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-11-17 09:20:34 -05:00
Lyle Zhu
3cc5c1be45 Bluetooth: Classic: HFP_AG: Get default indicator value
In current implementation, the default indicator value cannot be set
when building the SLC. And it causes the incorrect indicator value is
notified by AG.

Add a callback `get_indicator_value` to get the default indicator
value from the application.

Add shell command `indicator_value` to set the default indicator
value. The set indicator value will be passed to HFP AG when callback
`get_indicator_value` is notified.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-11-17 09:16:45 -05:00
Paul Jones
df2fc692b9 Drivers: Uart: Fix missing extern "C" in uart_bridge.h
uart_bridge.h is missing extern "C", causing link errors for C++ files

Signed-off-by: Paul Jones <paul@pauljones.id.au>
2025-11-17 09:27:33 +02:00
Dmytro Firsov
3cf7b20278 include: xen: events.h: fix Doxygen annotations for Xen events API
Header for Xen event channel API (events.h) previously contain
incorrect Doxygen-style annotations. Also, some functions had not
it at all.

Add proper description for all functions and fix style to make
documentation consistent.

Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
2025-11-15 12:00:01 +01:00
Dmytro Firsov
659b3d6894 drivers: xen: export missing evtchn API function
Previously clear_event_channel() function, that is a part of Xen event
channel API was missing in events.h header.

Add function declaration and documentation description for to let users
add it to external drivers.

Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
2025-11-15 12:00:01 +01:00
Dmytro Firsov
27e0445a80 drivers: xen: return hypercall results from notify_evtchn
Xen event channel notification may fail during hypervisor handling,
so it will be good for user to have a possibility to check results.

Previous implementation ignored hypervisor return code, now it will be
passed to caller.

Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
2025-11-15 12:00:01 +01:00
Etienne Carriere
c73c306a6c include: drivers: clock_control: stm32: fix STM32_CLOCK_INFO_BY_NAME()
Fix STM32_CLOCK_INFO_BY_NAME() macro that messed-up clock information.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2025-11-15 11:44:24 +01:00
Tom Burdick
e37b3ca50e rtio: Add an sqe_acquire_n helper
Makes it safer/easier to obtain n many submissions for use in one go.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2025-11-15 11:38:37 +01:00
Yangbo Lu
ef4cc7c9b3 include: net_if: fix clarification of timestamp callback
The functions of timestamp callback were implemented under
CONFIG_NET_PKT_TIMESTAMP_THREAD, but were clarified under
CONFIG_NET_PKT_TIMESTAMP.

The clarification in header file may misunderstand users,
because enabling CONFIG_NET_PKT_TIMESTAMP is not enough
to use these functions.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-11-15 11:32:42 +01:00
Etienne Carriere
c478e7343f include: drivers: clock_control: stm32: add DT clock helper macros
Add helper macros to get clock information from the devicetree:
STM32_DT_INST_CLOCK_INFO_BY_INDEX(), STM32_DT_INST_CLOCK_INFO(),
STM32_CLOCK_INFO_BY_NAME() and STM32_DT_INST_CLOCK_INFO_BY_NAME().

Using these macros or the existing STM32_CLOCK_INFO(), STM32_DT_CLOCKS()
and STM32_DT_INST_CLOCKS() macros ensure clock consumer gets all the
required STM32 clock information that are abstracted by the
STM32 clock drivers resources.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2025-11-14 15:26:17 +02:00
Etienne Carriere
47717db3be include: drivers: clock_control: stm32: document clock macros
Add a bit of documentation for the existing STM32_CLOCK_INFO()
STM32_DT_CLOCKS().

While at it, fix indentation of STM32_CLOCK_INFO() macro.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2025-11-14 15:26:17 +02:00
Etienne Carriere
a2ea4f310d include: drivers: clock_control: stm32: remove deprecated macro
Remove STM32_DT_DEV_DOMAIN_CLOCK_SUPPORT macro that is unused and
not planned to be.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2025-11-14 15:26:17 +02:00
Jiafei Pan
e2d6af1f55 tracing: rtio: fix building error in rtio header file
This patch is to fix the following building issue:
include/zephyr/rtio/rtio.h:1773:51: error: 'rtio' undeclared
(first use in this function)

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2025-11-14 11:17:41 +00:00
Qingsong Gou
6b4ced890b drivers: clock_control: sf32lb: add more helper APIs
Add sf32lb_clock_get_status_dt and sf32lb_clock_get_rate_dt

Signed-off-by: Qingsong Gou <gouqs@hotmail.com>
2025-11-14 12:19:20 +02:00
Emil Dahl Juhl
e732c973c5 dsp: utils: slim down includes
The dsp/utils.h header itself only uses dsp/types.h and doesn't need the
entire dsp/dsp.h.

This also facilitates using the dsp/utils.h in builds that don't enable a
dsp backend at all which can be convenient for sensor drivers where the
q31_t dsp type is used.

Signed-off-by: Emil Dahl Juhl <emil@s16s.ai>
2025-11-14 12:19:10 +02:00
Lyle Zhu
46c51cbefe Bluetooth: Classic: BIP: Ensure uncompleted request func consistent
For the uncompleted BIP request, the following BIP request function
should be same with the previous.

Keep the first request function type, and check it with the following
request function type.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-11-14 10:31:16 +02:00
Lyle Zhu
b8db23a892 Bluetooth: Classic: SDP: Support BIP profile
Add define `BT_SDP_SUPPORTED_CAPABILITIES` to define supported
capabilities attribute.

Add define `BT_SDP_SUPPORTED_FUNCTIONS` to define supported functions
attribute.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-11-14 10:31:16 +02:00
Lyle Zhu
631bd89dd8 Bluetooth: Classic: BIP: Check features and functions of initiator
Add function `bt_bip_set_supported_capabilities()` to set the
supported caps of responder.

Add function `bt_bip_set_supported_features()` to set the supported
features of responder.

Add function `bt_bip_set_supported_functions()` to set the supported
functions of responder.

Check the supported features of responder when sending OBEX connect
request on initiator side.

Check the supported functions of responder when sending OBEX get/put
request on initiator side.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-11-14 10:31:16 +02:00
Lyle Zhu
89fda049bc Bluetooth: classic: Enable BIP features
Add functions to manage BIP transport connect and disconnect both for
l2cap and rfcomm.

Add functions to register and unregister primary and secondary OBEX
servers.

Add functions to send OBEX connect/disconnect request and response.

Add functions to send OBEX get/put request and response with different
type defined by BT_BIP_HDR_TYPE_*.

Add functions to send abort request and response.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-11-14 10:31:16 +02:00
Lyle Zhu
860fb0a96b Bluetooth: classic: OBEX: Fix action id type issue
The OBEX packet cannot be parsed properly if the action ID header is
included in the packet.

It is caused by the value type issue of the action ID. The action ID
type should be `uint8_t` instead of `uint32_t`.

Fix the issue by change action ID value type from `uint32_t` to
`uint8_t`.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-11-14 10:31:16 +02:00
Lyle Zhu
44ef5a8857 Bluetooth: classic: OBEX: Expose function bt_obex_has_header()
The function `bt_obex_has_header()` is used to check whether the
specific header is in the buffer.

It is required by upper layer to check the header from the receiving
buffer.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-11-14 10:31:16 +02:00
Lyle Zhu
99176e86f8 Bluetooth: Classic: OBEX: Expose function bt_obex_string_is_valid()
The `bt_obex_string_is_valid()` is used to check whether the sending
or receiving UTF-16 string is valid or not.

Expose function "bt_obex_string_is_valid()" to support external
checking of UTF-16 strings.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-11-14 10:31:16 +02:00
Lyle Zhu
cf11f71848 Bluetooth: OBEX: Add function bt_obex_add_header_body_or_end_body()
A new function bt_obex_add_header_body_or_end_body() is added to help
to add the body/end body header. When the tail room of the buffer is
more than the passed body room, and the total length of buffer is not
more than the mopl if the body has been added, the header end body
will be added. Or, the header body will be added.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-11-14 10:31:16 +02:00
Jani Hirsimäki
9800ff5c47 net: possibility to set custom link layer address length
This commit adds a new Kconfig option NET_LINK_ADDR_CUSTOM_LENGTH
that allows to set custom link layer address length if your link layer
technology is not supported directly. If this option is set to a value
greater than 0, that value is used as link layer address length.

Signed-off-by: Jani Hirsimäki <jani.hirsimaki@nordicsemi.no>
2025-11-14 10:30:35 +02:00
Andrew Featherstone
380226b4a9 api: codec: Add support for custom channel identifiers
Follow the convention used elsewhere, e.g. in the sensor API, to allow
users to define their own channel identifiers. This is useful when a
driver's channels don't fit into the predefined set.

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2025-11-14 10:30:19 +02:00
Lyle Zhu
3a2ee4a0e9 Bluetooth: Classic: SCO: Set connect param with default value
In current implementation, the values are fixed for the field
`Max_Latency` and `Retransmission_Effort` of HCI command
`HCI_Setup_Synchronous_Connection` and
`HCI_Accept_Synchronous_Connection_Request`

It cannot work properly with these fixed value. It is better to
set it with default value. And it is determined by the controller.

Set the field `Max_Latency` and `Retransmission_Effort` of HCI
command `HCI_Setup_Synchronous_Connection` and
`HCI_Accept_Synchronous_Connection_Request` with default value.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-11-14 10:28:43 +02:00
Lyle Zhu
1be50fa46f Include: Bluetooth: Add HCI voice_setting definitions
Add macro `BT_HCI_VOICE_SETTINGS` to assemble the voice_setting

Add macro `BT_HCI_VOICE_SETTING_*_PREP` to set the fields for
voice_setting.

Add macro `BT_HCI_VOICE_SETTING_*_GET` to get the value of the
field from the voice_setting.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-11-14 10:28:43 +02:00
Pedro André
3138b54f2c drivers: gnss: introduce node based callback macros
The current GNSS_DATA_CALLBACK_DEFINE, GNSS_SATELLITES_CALLBACK_DEFINE and
GNSS_RTK_DATA_CALLBACK_DEFINE macros only utilize `_callback` when naming
the respective callback. This means that if the same callback function is
used more than once, there will be naming conflicts.

In order to allow the same callback function to be used several times for
specific gnss devices, introduce GNSS_DT_DATA_CALLBACK_DEFINE,
GNSS_DT_SATELLITES_CALLBACK_DEFINE and GNSS_DT_RTK_DATA_CALLBACK_DEFINE
macros that take a device tree node identifier instead of a device
reference. This makes it possible to name the callback using both
`_node_id` and `_callback`. Such will uniquely identify any combination of
gnss device and callback.

Signed-off-by: Pedro André <pedro@sentrytechnologies.ai>
2025-11-14 10:27:46 +02:00
Lyle Zhu
1df6111c93 include: Bluetooth: Change return value of BT_FEAT_TEST() to boolean
In current implementation, the return value of `BT_FEAT_TEST()` is not
a boolean type. However, the macro `BT_FEAT_TEST()` is used as a type
with a return type value of boolean.

Change the return type of `BT_FEAT_TEST()` to boolean type to make it
easy to use.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-11-14 09:26:21 +01:00
Lyle Zhu
93cc24a678 Bluetooth: Classic: HFP_HF: Force ATD cmd to end with semicolon
Only voice calls are supported by HFP specification. And the
semicolon character shall be added when the voice call is originated.

Add the semicolon character to force the ATD command to end with
semicolon character.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-11-14 10:25:55 +02:00
Jordan Yates
a9626ff3ae zbus: helper to query channel data age
Add a helper function to query how old the data in a channel is. Output
is converted to milliseconds as `k_ticks` objects cannot be compared
directly.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-11-14 10:25:20 +02:00
Yongxu Wang
dfe2c262c8 drivers: firmware: scmi: add cpu info get interface
Add scmi_cpu_info_get API to query CPU information via
NXP SCMI CPU domain protocol.

Retrieves run mode, sleep mode, and reset vector addresses
for the specified CPU ID using CPU_INFO_GET command.

Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
2025-11-14 09:25:10 +01:00
Yongxu Wang
28b98c9ae8 drivers: firmware: scmi: add reset vector interface
Add scmi_cpu_reset_vector API for NXP SCMI CPU domain protocol.

This API allows setting CPU reset vector addresses using the
CPU_RESET_VECTOR_SET command. The vector address must point to
the initial address of the vector table

Supports 64-bit addresses and boot/start/resume vector flags.

Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
2025-11-14 09:25:10 +01:00
Neil Chen
201393a2b3 drivers: syscon: update syscon driver to support mcxa trng clock
Add mcxa trng clock support

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2025-11-14 09:22:29 +01:00
Daniel Leung
e45808b9cd xtensa: mmu: add page table usage statistics
Adds function for app to obtain page table usage statistics,
allowing fine tuning of numbers of L1 and L2 page table
array.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-11-14 09:21:44 +01:00
Julien Vermillard
4e54e9a806 net: lwm2m: get cache free slots
Add function to query LwM2M cache free slots on a given path.

Signed-off-by: Julien Vermillard <julien@clunkymachines.com>
2025-11-14 09:20:59 +01:00
Lyle Zhu
97b4373d9b Bluetooth: Classic: HFP_AG: Add callback redial to get number
If a phone was made during the previous SLC, AG cannot properly
process the redial request sent by HF after reconnecting.

Add a callback `redial` to get the last dial number from the upper
layer when `AT+BLDN` command is received.

If the callback is not provided or the error is returned after the
callback returned, send error response to the HF.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-11-13 20:45:50 -05:00
Dev Joshi
080734ce0f tracing: rtio: Add tracing hooks for rtio
This commit adds tracing support/hooks for rtio subsystem. It was
requested in #76972.

Signed-off-by: Dev Joshi <devbhave@qti.qualcomm.com>
2025-11-13 20:45:24 -05:00