Commit graph

15409 commits

Author SHA1 Message Date
Tom Hughes
6c79dab929 toolchain: Add indirection for compiler warnings
In order to support new toolchains that are not compatible with
gcc/clang (e.g., IAR), we need to add a level of indirection for
the name of warnings.

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-03-07 19:47:30 +01:00
Lyle Zhu
c0f7aefe55 Bluetooth: BR: Support limited discoverable mode
Add a Kconfig BT_LIMITED_DISCOVERABLE_DURATION to set the timeout for
limited discoverable mode.

Add a argument `limited` to function `bt_br_set_discoverable()` to
support the limited discoverable mode.
When enabling discoverable mode with `limited` is true, both write
LIAC and GIAC to controller and set the bit 13 of COD in function
`bt_br_set_discoverable()`. And start a delay worker with the timeout
CONFIG_BT_LIMITED_DISCOVERABLE_DURATION to disable the discoverable
mode.
When disabling discoverable mode, only set GIAC to controller and
clear bit 13 of COD.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-03-07 19:46:53 +01:00
Lyle Zhu
51bfb50b66 Bluetooth: BR: Add definition for OP READ_COD
Add opcode BT_HCI_OP_READ_CLASS_OF_DEVICE for reading COD.

Add structure `bt_hci_rp_read_class_of_device` for parsing COD from
response buffer.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-03-07 19:46:53 +01:00
Lyle Zhu
00adfe1c59 include: bluetooth: Add definition for HCI_Write_Current_IAC_LAP
Add definition and structure for write current IAC LAP command

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-03-07 19:46:53 +01:00
Sudan Landge
b4fb5d38eb Revert "arch: arm: cortex_m: pm_s2ram: Rework S2RAM mark functions"
What is the change?
 - This reverts commit 474d4c3249

Why do we need this change?
 - This commit was added because Cortex-M didn't have a valid
   stack to make required functionality work however,
   the previous commit fixes this and makes interrupt stack
   available for use. This removes Arm specific limitation from
   these generic APIs so revert the commit to reflect the same.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2025-03-07 19:46:01 +01:00
Mark Wang
e531295515 bluetooth: a2dp: optimize bt_a2dp_ep_info
bt_a2dp_ep_info is used in bt_a2dp_discover, and the max
discovered endpoints' info are already given in seps_info
of bt_a2dp_discover_param, so use pointer to point to the
seps_info of bt_a2dp_discover_param.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2025-03-07 19:45:20 +01:00
Eric Ackermann
3466dab804 llext: Add parameters to arch_elf_relocate
The RISC-V port of llext requires additional parameters for
handling non-adjacent HI20/LO12 relocations in arch_elf_relocate():
the current extension (struct llext), the current extension loader
(struct llext_loader), the current section header (elf_shdr_t) and
the current symbol (elf_sym_t).
This changes the signature of arch_elf_relocate accordingly.

Signed-off-by: Eric Ackermann <eric.ackermann@cispa.de>
2025-03-07 19:44:54 +01:00
Florian Weber
4e9bd00dfb drivers: i2c: rtio
extend i2c library to create rtio sqes for reading and writing bytes

Signed-off-by: Florian Weber <Florian.Weber@live.de>
2025-03-07 19:43:22 +01:00
Kiara Navarro
6b2a476c66 lorawan: add callback for descriptor changes
allow the application to decide whether to keep going with the fuota
process by setting a callback that exposes the descriptor field
whenever `FragSessionSetupReq` is sent to the device.

Signed-off-by: Kiara Navarro <sophiekovalevsky@fedoraproject.org>
2025-03-07 19:42:56 +01:00
Andrzej Głąbek
2e8c79f2ef drivers: pinctrl_nrf: Add support for EXMIF pins
This is a follow-up to commit 45d827a51a.

Although routing for those pins is configured via UICR, pinctrl still
needs to be involved so that it is possible to set desired drive mode
for them etc.
Add also the missing RWDS pin.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2025-03-07 19:42:46 +01:00
Sylvio Alves
f22de9733b soc: esp32: riscv: fix interrupt allocator
Current interrupt allocator is not taking into account
reserved areas. In case of esp32c6, Wi-Fi isn't properly
configured, causing instability or even non-functional feature.
This adds the reserved area ranges for all risc-v based SoC and
unify the slot finding based on interrupt source.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-03-06 08:35:29 +00:00
Jukka Rissanen
1a5e13a79b net: if: Release the interface lock early when starting IPv4 ACD
In order to avoid any mutex deadlocks between iface->lock and
TX lock, release the interface lock before calling a function
that will acquire TX lock. See previous commit for similar issue
in RS timer handling. So here we create a separate list of ACD
addresses that are to be started when network interface comes up
without iface->lock held.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-05 16:40:29 +00:00
Jukka Rissanen
196782ed91 net: if: Release the interface lock early when rejoining mcast groups
In order to avoid any mutex deadlocks between iface->lock and
TX lock, release the interface lock before calling a function
that will acquire TX lock. See previous commit for similar issue
in RS timer handling. So here we create a separate list of multicast
addresses that are to be rejoined when network interface comes up
and then rejoin the groups without iface->lock held.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-05 16:40:29 +00:00
Jukka Rissanen
1e88c62b4e net: if: Release the interface lock early when starting IPv6 DAD
In order to avoid any mutex deadlocks between iface->lock and
TX lock, release the interface lock before calling a function
that will acquire TX lock. See previous commit for similar issue
in RS timer handling.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-05 16:40:29 +00:00
Jukka Rissanen
ffd82b7dc0 net: if: Documentation missing for IPv4 ACD timeout variable
Add documentation for ACD timeout variable as it was missing.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-05 16:40:29 +00:00
Jukka Rissanen
718eb4f32f net: if: Documentation missing for IPv6 DAD start time variable
Add documentation for DAD start time variable as it was missing.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-05 16:40:29 +00:00
Kyra Lengfeld
b136f6da55 Bluetooth: Host: improve more² GATT documentation
This commit adds improvements for the
GATT client API part.

Signed-off-by: Kyra Lengfeld <kyra.lengfeld@nordicsemi.no>
2025-03-05 09:59:46 +00:00
Jilay Pandya
92a86b36ca docs: stepper: version api as experimental
version stepper api to 0.1.0

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-03-04 18:26:20 +00:00
Riadh Ghaddab
f020720a80 fs: zms: fix Copyright notice
Add missing Copyright from derived files and fix the Copyright year for
some files to keep the original Copyright notice

Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
2025-03-04 12:17:02 +00:00
Håvard Reierstad
c7a19da8ca Bluetooth: Host: Improve more GATT documentation
Adds improvement to the GATT API documentation by providing examples of
where (and how) certain structs are used, and adds specification
references to the fields of bt_gatt_cpf to clarify their purpose.

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2025-03-03 14:44:14 +01:00
Johann Fischer
9cb0fbf80d usb: device_next: fix Get Status request response
We need to track the self-powered status of the device independently of
the D6 bit in the bmAttributes value of the configuration descriptor
because the Get Status request about the self-powered status is valid in
address state and we support multiple configurations.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-02-28 14:51:53 +01:00
Kyra Lengfeld
775cc35236 Bluetooth: Host: improve GATT documentation
The gatt docs are very sparce, this commit adds imrpovements for the
GATT server API part. Others will follow.

Signed-off-by: Kyra Lengfeld <kyra.lengfeld@nordicsemi.no>
2025-02-28 08:00:42 +01:00
Peter Korsgaard
f6017c5e09 sys_clock: header: fix typo in NSEC_PER_USEC comment
Commit c910dc81a614("sys_clock: header: minor cleanup and doxygenization")
introduced a typo in the documentation comment above NSEC_PER_USEC.  Fix
that.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2025-02-27 23:22:20 +00:00
Emil Gydesen
9e84fc39d5 Bluetooth: TBS: Add missing documentation for bt_tbs_register_param
The struct was missing doxygen documentation.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-02-27 08:01:18 +01:00
Emil Gydesen
570a88c29f Bluetooth: CAP: Add missing documentation for some structs
bt_cap_commander_broadcast_reception_stop_param and
bt_cap_commander_distribute_broadcast_code_param
were missing doxygen documentation.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-02-27 08:01:18 +01:00
Emil Gydesen
029e06610e Bluetooth: Audio: Fix bad uses of @internal in header files
Replaced the use of @internal with @cond INTERNAL_HIDDEN
which is the correct way to hide fields from doxygen.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-02-27 08:01:18 +01:00
Emil Gydesen
6f882f3401 Bluetooth: BAP: Fix bad documentation in bap.h
Add missing of documentation of BT_BAP_BASS_MAX_SUBGROUPS
and simplify the definition.

Removed incorrect use of @internal and replaced with
@cond INTERNAL_HIDDEN.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-02-27 08:01:18 +01:00
Jilay Pandya
ebcc1b71af drivers: stepper: fix doxygen documentation
reorganize stepper api function sequence

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-02-26 01:36:53 +01:00
Jamie McCrae
82ec3265ad include: zephyr: mgmt: mcumgr: callbacks: Remove deprecated macro
Removes a macro that was deprecated with Zephyr 3.4

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-02-25 15:13:42 +00:00
Vinayak Kariappa Chettimada
d382fca6ff Bluetooth: Controller: Fix HCI command buffer allocation failure
Fix HCI command buffer allocation failure, that can cause
loss of Host Number of Completed Packets command.

Fail by rejecting the HCI Host Buffer Size command if the
required number of HCI command buffers are not allocated in
the Controller implementation.

When Controller to Host data flow control is supported in
the Controller only build, ensure that BT_BUF_CMD_TX_COUNT
is greater than or equal to (BT_BUF_RX_COUNT + Ncmd),
where Ncmd is supported maximum Num_HCI_Command_Packets in
the Controller implementation.

Relates to commit 81614307e9 ("Bluetooth: Add workaround
for no command buffer available")'.

Relates to commit 297f4f481f ("Bluetooth: Split HCI
command & event buffers to two pools").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-02-21 11:30:38 +00:00
Riadh Ghaddab
5f7cda5e06 fs: zms: multiple style fixes from previous PR review
This resolves some addressed comments in this PR zephyrproject-rtos#77930
as well as this PR zephyrproject-rtos#80407

Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
2025-02-21 11:29:50 +00:00
Johann Fischer
1fd9222a45 include: usb: remove deprecated macro
Remove macro USBD_CFG_DATA_DEFINE, deprecated in v3.0.0.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-02-20 14:55:05 +00:00
Tom Hughes
a9b76dcb1b include: Re-enable warning
This warning no longer seems to be triggering, so we shouldn't disable
it.

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-02-19 18:51:34 +01:00
Benjamin Cabé
110c49fc47 Bluetooth: Host: drop deprecated BT_LE_SCAN_OPT_FILTER_WHITELIST macro
Macro has been deprecated since 2.7 LTS(!) and is using non-inclusive
terminology. Drop it.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-02-19 18:48:15 +01:00
Yong Cong Sin
b2b2963e6a irq: multilevel: compile 3rd level IRQ APIs only when enabled
This revert the idea of 3fa7d78 from #78845.

The 3rd level IRQ APIs won't compile when
CONFIG_3RD_LEVEL_INTERRUPT_BITS=0.

Updated testcases accordingly.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2025-02-19 14:49:27 +00:00
Adam Kondraciuk
86dca04458 drivers: pinctrl: nrf: Add support for clock outputs
Add support for GRTC clock output pins.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2025-02-18 18:37:35 +01:00
Robert Lubos
7ccf870670 net: coap_client: Stop all socket activities when cancelling requests
Calling coap_client_cancel_requests() clears the internal request
context only for active requests (i. e. not replied yet). However,
if there are any pending request context monitoring ACK duplicates,
those would still make the corresponding client socket being monitored
by poll(). In result, when application closes the socket, the polling
thread will throw POLLNVAL error for the socket.

Fix this, by resetting all request contexts unconditionally. The request
callback will only be called for the active requests.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-02-18 13:31:15 +01:00
Robin Kastberg
318019e0b3 drivers: gpio: unnamed parameters not allowed
This violates Zephyr Rule 44 and causes error Pe141 on IAR.

Signed-off-by: Robin Kastberg <robin.kastberg@iar.com>
2025-02-17 21:15:35 +01:00
Corey Wharton
f6d0e7d97c tests: drivers: regulator: add api test for count/list current_limit APIs
Adds missing fake methods to regulator_fake and corresponding API tests.

Signed-off-by: Corey Wharton <xodus7@cwharton.com>
2025-02-17 08:09:48 +01:00
Rex Chen
a296b4968b net: wifi: L2 shell cmd 11v BTM query support embedded supplicant
Remove the CONFIG_WIFI_NM_WPA_SUPPLICANT_WNM macro in L2 shell level
to make 11v BTM query support embedded supplicant.

Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
2025-02-14 19:40:09 +00:00
Emil Gydesen
317cc9d52e Bluetooth: CCP: Add missing documentation for CCP discover
Added missing documentation for
bt_ccp_call_control_client_discover.

Added missing handling of -ENOTCONN in the function as well.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-02-14 19:15:31 +00:00
Robin Kastberg
9ab06ec667 toolchain: iar: Add experimental IAR support
This adds experimental support for the IAR toolchain.

Signed-off-by: Robin Kastberg <robin.kastberg@iar.com>
2025-02-14 19:12:44 +00:00
Zihao Gao
53bba45281 Bluetooth: AVRCP: implementation for passthrough commands
This patch alllows to send passthough command from CT to TG.

Signed-off-by: Zihao Gao <gaozihao@xiaomi.com>
2025-02-14 17:13:23 +01:00
Thomas Deppe
dcbcbe824d Bluetooth: Host: Add host support for Advertising Coding Selection
Extends the API for Advertising Coding Selection.

The API is extended to set the Advertising Coding Selection
(Host Support) bit. With this feature, the primary and
secondary PHY can now explicitly report S=2 or S=8 coding
in the extended advertising report. Previously, the report
only indicated LE Coded regardless of whether S=2 or S=8
data coding was used. The API now sets the host support bit
and ensures that the advertising PHY coding scheme is
conveyed to the application via the scan callback.

The support is enabled by CONFIG_BT_EXT_ADV_CODING_SELECTION,
and requires a controller that selects
CONFIG_BT_CTLR_ADV_EXT_CODING_SELECTION_SUPPORT.

Signed-off-by: Thomas Deppe <thomas.deppe@nordicsemi.no>
2025-02-14 17:08:23 +01:00
Yasin Ustuner
8383234c67 drivers: clock control: Update IBRO Clock for MAX32
This commit updates ADI_MAX32_CLK_IBRO_FREQ
macro because MAX32660 does not support
IBRO clock.

Signed-off-by: Yasin Ustuner <Yasin.Ustuner@analog.com>
2025-02-14 17:04:57 +01:00
Yasin Ustuner
c62606daa7 include: zephyr: dt-bindings: Add MAX32660 DMA binding
This commit adds binding file for DMA slots

Signed-off-by: Yasin Ustuner <Yasin.Ustuner@analog.com>
2025-02-14 17:04:57 +01:00
Etienne Carriere
10e12ba20d include: zephyr: dt-bindings: clock remove unused STM32 macros
Remove now unused macros STM32_DOMAIN_CLOCK(), STM32_CLOCK_*_SHIFT,
STM32_CLOCK_*_MASK, STM32_MCO_CFGR(), STM32_MCO_CFGR_*_SHIFT and
STM32_MCO_CFGR_REG_MASK macros, replaced with STM32_DT_CLOCK_SELECT(),
STM32_DT_CLKSEL_*_SHIFT and STM32_DT_CLKSEL_*_MASK macros.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2025-02-14 13:40:52 +01:00
Etienne Carriere
c7c001405c drivers: clock: stm32: factorize clock selection macros
Factorize STM32_CLOCK_*_GET() and STM32_MCO_CFGR_*_GET() macros
into a single series of STM32_DT_CLKSEL_*_GET() macros based on
recently introduced new common macros STM32_DT_CLKSEL_*_SHIFT and
STM32_DT_CLKSEL_*_MASK.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2025-02-14 13:40:52 +01:00
Etienne Carriere
7113c06acf include: zephyr: dt-bindings: clock: use STM32 common clock source macros
Replace STM32_DOMAIN_CLOCK() and STM32_MCO_CFGR() macros in
stm32 DT clock bindings header file with the common macro
STM32_DT_CLOCK_SELECT().

By the way, add parentheses on argument where it mas missing.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2025-02-14 13:40:52 +01:00
Etienne Carriere
3b8b266821 include: zephyr: dt-bindings: clock: factorize STM32_* clock source macros
Factorize definitions of the macros used to describe in the STM32
boards device tree the RCC register dedicated to clock source selection
configuration, instead of replicating the macros per SoC header file.
For that purpose, use DT cell bit fields that matches all SoCs.

This change also factorizes STM32_MCO_CFGR_* macros that use the same
packing layout for defining selection of the MCO clocks and for MCO
pre-scaling factor on SoCs that support the feature.

By the way, reorder argument description in macro inline description
comment in a standard way (first argument first).

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2025-02-14 13:40:52 +01:00