Commit graph

15372 commits

Author SHA1 Message Date
Robert Hancock
54eeb7bee8 arch: arm: arm_mpu_v7m: Fix unsupported Cortex-R access permission mode
This file previously defined an MPU access permission mode of 0x7 which
corresponded to privileged read-only, unprivileged read-only, similar to
mode 0x6. However, it appears that at least Cortex-R5 does not support
this mode, defining 0x7 as UNP (Unpredictable) or a value which should
not be used.

This value was in turn referenced by the REGION_FLASH_ATTR macro, which
caused the offending value to be used when a memory region was declared
as DT_MEM_ARM(ATTR_MPU_FLASH) in the device tree, causing such regions
to not work properly on Cortex-R5.

Since 0x6 is supported by both Cortex-M and Cortex-R and does the same
thing, there is no reason to use 0x7. Remove the RO_Msk definition which
referenced it, and change REGION_FLASH_ATTR to use P_RO_U_RO_Msk instead.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2025-05-13 17:44:40 +02:00
Srishtik Bhandarkar
09ab462e10 drivers: sensor: pzem004t: add pzem004t AC parameter sensor driver
Adds driver for Peacefair pzem004t multifunction AC parameter sensor.

Signed-off-by: Srishtik Bhandarkar <srishtik.bhandarkar2000@gmail.com>
2025-05-12 21:09:27 +02:00
Pavel Vasilyev
14b4e30cdf bluetooth: host: Deprecated BT_CONN_TX_MAX
After https://github.com/zephyrproject-rtos/zephyr/pull/72090,
`conn_tx_alloc` no longer blocks, and each buffer always has a
corresponding `bt_conn_tx` object. This eliminates the need to configure
the number of `bt_conn_tx` objects via `CONFIG_BT_CONN_TX_MAX`, since
every buffer now carries its own context even when no callback is used.

This commit deprecates `CONFIG_BT_CONN_TX_MAX` as it is no longer
necessary. Instead, `CONFIG_BT_BUF_ACL_TX_COUNT` is used to allocate
`bt_conn_tx` objects for outgoing ACL data. ZLL already uses
`CONFIG_BT_BUF_ACL_TX_COUNT` to configure the number of outgoing ACL
packets. With this change, modifying the packet count will automatically
adjust the number of corresponding contexts, preventing both context
starvatoin and underutilization.

This approach also aligns with ISO, where the number of `bt_conn_tx`
objects for outgoing ISOdata matches `CONFIG_BT_ISO_TX_BUF_COUNT`.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2025-05-12 14:54:26 +02:00
Fin Maaß
ff5e031c20 net: conn_mgr: set to unstable
Set connection manager to unstable. It is now used
by multiple parts in zephyr and numerous samples.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-05-10 13:02:21 +02:00
Fin Maaß
a7ee49667d mgmt: hawkbit: add event for confirmed current image during init
add event for confirmed current image during initialization

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-05-09 14:01:08 +02:00
Björn Bergman
465f6ba73e userspace: weak defintions for generated k-object lookup functions
Instead of obscure linker-file hacks providing dummy definitions before
we have the proper generated k-object lookup functions, provide weak
definitions  that will be taken out by the real generated implementations
when they are available.

Signed-off-by: Björn Bergman <bjorn.bergman@iar.com>
2025-05-09 12:51:30 +02:00
Alain Volmat
2d46727f52 drivers: video: rename 8 bit bayer format in Sxxxx
In order to be consistant with other formats bayer formats
recently introduced, rename all 4 8 bit bayer formats with a
S prefix (SBGGR / SRGGB / SGBRG / SGRBG).

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-05-09 10:42:37 +02:00
Vytautas Virvičius
9a409d6b00 net: l2: ppp: Explicitly negotiate ACCM
Many cellular modems attempt to negotiate an ACCM value of 0x00000000.
While the PPP driver rejects this by default, it does not propose an
alternative. As a result, some modems default to using 0x00000000 after
LCP negotiation. Because the PPP driver expects all control characters
to be escaped, this causes issues during decoding. This change
negotiates an ACCM value of 0xffffffff to ensure compatibility with such
modems.

Signed-off-by: Vytautas Virvičius <vytautas@virvicius.dev>
2025-05-09 08:23:16 +02:00
f4b1544bec drivers: pinctrl: add a driver for the CH32V00x series
The CH32V006 and others in the CH32V00x series are an evolution of the
CH32V003 and use different remap offsets for the various peripherals.

In the same way as the CH32V20x, fork the CH32V003 driver and add
CH32V00x support.

Signed-off-by: Michael Hope <michaelh@juju.nz>
2025-05-09 01:40:22 +02:00
Torsten Rasmussen
c79c4ef9a8 linker: move last section id constant to c-code
Move creation of last section id from ld linker script LONG() usage to
C code with last section attribute.

The use of `LONG()` works correctly with ld but lld emits a warning
because .last_section section is not allocated as there are no matching
input sections and discards the `LONG()` call, meaning the last section
identifier will not be present in the flash.
> ld.lld: warning: ignoring memory region assignment for
>                             non-allocatable section '.last_section'

Placing the last section id in `.last_section` in C code makes lld
allocate the memory for the id and thereby create the output section
with the correct output.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2025-05-08 15:55:40 +02:00
Torsten Rasmussen
8f2560cf3e linker: discard eh_frame when C++ exceptions are disabled
Discard the eh_frame section when C++ exceptions are disabled.

In principle the eh_frame may be used for other purposes such as
backtracing when linking C programs, then Zephyr compiles each source
file with '-fno-asynchronous-unwind-tables', thus keeping the eh_frame
in the elf output just takes up space.

When using gcc/ld, then the eh_frame is generally generally discarded
per default, however for clang/lld it will be included but give a
warning that the section is auto-placed.

Some platforms already discards the eh_frame, so unify this for all
targets.

As eh_frame is now discarded in linker scripts then post processing step
of removing the section during hex or bin conversion can also be
removed.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2025-05-08 15:55:40 +02:00
Abderrahmane JARMOUNI
cf30cfa59b devicetree: macros: add display specific macros
Add macros to get display controllers phandles and count from
"zephyr,displays" compatible node

Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
2025-05-08 12:24:21 +02:00
Emil Gydesen
425f3f4b0a Bluetooth: Audio: Rename ctx type prohibited to none
The context type PROHIBITED has been removed from
the Bluetooth assigned numbers document. It is, however,
still used in some profiles to indicate either "No context
type supported" or "None available", and thus a rename
to "NONE" makes sense.

It is still treating similar to prohibited in some cases,
as it is not a valid context type in all cases.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-05-08 01:58:01 +02:00
Daniel Leung
66955c8a2d toolchain: xt-clang: skip printf format checks
For some reasons, xt-clang does not like "%hhd" or "%hd"
(for example) being fed int data (same goes for unsigned ones)
and will always complain about mismatched types. GCC and newer
LLVM/Clang do not complain. This could be due to xt-clang
being based on older LLVM/Clang. So skip the check.

Fixes: #89008

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-05-07 17:45:33 +02:00
Josuah Demangeon
23ed4d2057 dts: bindings: gpio: add arducam 20-pin camera connector
Add the 20-pin camera connector used by at least Arducam, Waveshare,
Olimex, Arduino, NXP, ST, Adafruit that connects image sensor module
boards and devkits.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-05-07 15:13:42 +01:00
James Roy
758e169039 style: Inconsistent macro names changed
Fix incorrect header file pre-macro names in
'include/zephyr/dt-bindings'.

Signed-off-by: James Roy <rruuaanng@outlook.com>
2025-05-07 15:09:56 +02:00
Dipak Shetty
6b02a6148d drivers: stepper: adi_tmc: position handling support
Add definition for handling position signedness.

Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
2025-05-07 13:34:02 +02:00
Adrian Gielniewski
39e051f372 net: fix configuration of NET_LINK_ADDR_MAX_LENGTH
Replace `CONFIG_NET_L2_IEEE802154` with `CONFIG_NET_L2_PHY_IEEE802154`
as `NET_LINK_ADDR_MAX_LENGTH` should be set to `8` for all IEEE 802.15.4
based L2, e.g. OpenThread.

Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no>
2025-05-07 13:33:46 +02:00
Swift Tian
726eb0a25d drivers: mspi: add apollo5x MSPI controller
Add the MSPI controller support for apollo5x.
Add the MSPI controller to mspi API test.
Updated west.yml for hal updates.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2025-05-07 10:33:38 +02:00
Swift Tian
cbd475b9ed drivers: mspi: standarlized transfer priority
Standarlized transfer priority and add a medium level.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2025-05-07 10:33:38 +02:00
Ruibin Chang
265a0b991a drivers/pwm/it51xxx: implement pwm driver
Implement pwm driver for ITE it51xxx series chip.

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2025-05-07 08:17:12 +01:00
Maximilian Deubel
fb1161a6a9 mcumgr: img_mgmt_client: Add missing include
This header uses enum mcumgr_err_t but does not include the
header where it is defined. Fixed in this commit.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
2025-05-06 15:32:54 +02:00
Daniel Nicoletti
9bbccf39cb include: zephyr: sys: Fix uuid.h usage in C++ code
In uuid.h the function uuid_generate_v5 had a 'namespace'
parameter which is a reserved C++ keywork.
Renamed to 'ns'.

Signed-off-by: Daniel Nicoletti <dantti12@gmail.com>
2025-05-06 02:36:15 +02:00
Krzysztof Chruściński
8ad44471b9 pm: Include disabled states in search inside pm_state_get
pm_state_get() is used to get a PM state that can be forced.
Disabled states (not included in automatic state selection) can
also be forced thus they should be included in search inside
pm_state_get().

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-05-05 21:56:55 +02:00
Arkadiusz Balys
596844a2cb openthread: Move OpenThread implementation from net to modules
Move OpenThread-related code from
zephyr/subsys/net/l2/openthread/openthread.c to
zephyr/modules/openthread/platform/openthread.c.

The primary goal of this refactor is to enable the use
of OpenThread as an independent module, without the necessity
of Zephyr's networking layer.

This change is particularly beneficial for simple applications
that have their own implementation of the IEEE802.15.4 driver
and do not require a networking layer. These applications can
now disable Zephyr's L2 and IEEE802.15.4 shim layers and
directly use the OpenThread module, saving valuable kilobytes
of memory.

In this approach if the CONFIG_NET_L2_OPENTHREAD
Kconfig option is set, Zephyr's L2 and IEEE802.15.4 layers
will be used, and everything will function as before.
The main difference is the Zephyr's L2 layer now uses
the OpenThread module, no longer implementing it.

While most of the functions in include/net/openthread.h
have been deprecated, they are still available for use to
maintain backwards compatibility.

Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
2025-05-05 14:25:13 +02:00
Markus Lassila
10bd2de235 modem: backend: uart: Add hw-flow-control for UART
Add Asynchronous UART implementation, which does not drop data
when automatic hardware-flow-control is set in the device tree.

With automatic hardware flow control, the CTS pin will be
automatically deactivated when there are no more asynchronous
UART RX buffers available. After buffer space becomes available,
and UART RX is restarted, the CTS pin will be activated.

Signed-off-by: Markus Lassila <markus.lassila@nordicsemi.no>
2025-05-05 14:24:49 +02:00
Robert Lubos
4a85e47061 net: http: client: Notify application about unprocessed data
The HTTP client would read data from a socket up to the size of the
receiving buffer, however it may not process them all. This is usually
only the case if protocol switching takes place, where the data read may
belong to another protocol. Therefore we need a way to notify the caller
about any potential data that is already present in the buffer and needs
to be processed.

Introduce an new data_len member in struct http_request to provide the
information about the data already available in the receive buffer. If,
after HTTP response processing, the value is non-zero, the data will be
available in the beginning of the user provided receive buffer.

To make this possible however, we need to track how many bytes were
actually processed by the http_parser, therefore the code will no longer
ignore the http_parser_execute() return value. To simplify processing,
it's also been changed how the receive buffer is used. Instead of using
it in a ring-buffer-like way, the offset variable will track how many
bytes are available in the buffer, and in the rare occasions when not
all data from the buffer was processed by the HTTP parser, we'll
memmomve the remaining data to the beginning of the buffer.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-05-05 10:57:43 +02:00
Dominik Ermel
f070786dd6 storage/stream_flash: Fix description of erased_up_to
The description incorrectly stated that it points to last erased
offset, while it actually points to first offset that has not
yet been erased.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2025-05-02 16:10:17 +01:00
Pete Johanson
f4b52a43d9 drivers: memc: Add MAX32 HyperBus driver
Add memc driver for the MAX32 HyperBus peripheral, supporting HyperRAM
and Xccela PSRAM memory devices.

Signed-off-by: Pete Johanson <pete.johanson@analog.com>
2025-05-02 15:20:55 +02:00
Raffael Rostagno
8167fe381d drivers: can: esp32c6: Add support
Add TWAI support to ESP32-C6.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-05-02 10:38:39 +02:00
Duy Nguyen
2aa071c7ad drivers: pinctrl: Support pinctrl driver for Renesas RX
Intial support of pinctrl driver for Renesas RX MCU
family.
This support base on using Renesas RX driver package in
hal_renesas layer

Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
Signed-off-by: Phi Tran <phi.tran.jg@bp.renesas.com>
2025-05-02 09:18:16 +02:00
Duy Nguyen
2f0715262d drivers: clock: Support clock control driver RX MCU
Initial support of clock control driver for RX MCU

Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
Signed-off-by: Tran Van Quy <quy.tran.pz@renesas.com>
2025-05-02 09:18:16 +02:00
Duy Nguyen
fb7bdf0df4 arch: Initial support for RX architecture support
This commit add require code for supporting RX architecture
to Zephyr, it include:
- Add require config and CMakelists for RX arch
- Intialization startup code for RX
- Interrupt and exception handling
- Thread creation adn thread context switch
- irq offload using SW interrupt

Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
2025-05-02 09:18:16 +02:00
Duy Nguyen
f00608ef56 include: Create linker for RX architecture
Add intial support for RX linker script
The RX GCC toolchain automatically adding an "_" as prefix
on every C symbol to comply to the arch ABI, for the C file
to understand the symbol define in linker script the
PLACE_SYMBOL_HERE() macro help to add "_" to linker script
define symbol if build with CONFIG_RX enable
This commit adding minimal support in common linker script
for RX arch

Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
2025-05-02 09:18:16 +02:00
Duy Nguyen
702bed6af5 include: Update toolchain header to support RX architecture
This add common gcc define for new RX architecture support

Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
2025-05-02 09:18:16 +02:00
Yangbo Lu
383d4f499e drivers: eth_nxp_enet: fix data share with ptp driver
The enet handle in mac driver was not shared with ptp driver
properly. This was causing wrong TX timestamp.
This patch is to fix it.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-05-02 09:17:12 +02:00
IBEN EL HADJ MESSAOUD Marwa
2e59e8207a include: zephyr: dt-bindings: Add STM32C0 USB clock selection support
- Defined CCIPR2_REG offset.
- Added USB_SEL(val) macro to support USB clock selection using CCIPR2_REG.

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2025-05-02 09:15:41 +02:00
Alvis Sun
7e23f8b408 soc: add npck soc driver
For npck3m8k:
1. Update code ram from 320KB to 416KB (0x1005_8000~0x100B_FFFF).
2. Update data ram from 32KB to 64KB.
3. Move fiudiv from hfcbcd1 to hfcbcd2 register

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2025-05-02 07:19:55 +02:00
Khoa Nguyen
9088261efd drivers: flash: Correct naming of Flash HP Renesas RA Kconfig
Correct naming of Flash HP Renesas RA Kconfig

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2025-05-02 07:19:46 +02:00
Khoa Nguyen
f305a339b3 drivers: flash: Update naming for flash driver of Renesas RA
Update naming for flash driver of Renesas RA

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2025-05-02 07:19:46 +02:00
Chris Friedt
0cac1849ca doc: kernel: mark k_event apis as being ISR safe
Most of the k_event APIs are ISR-safe, with the exception of

* k_event_init() - object should be initialized before ISR context
* k_event_wait(), k_event_wait_all() - only ISR safe with K_NO_WAIT

The last two functions already check for K_NO_WAIT when in ISR context
so this is very much just updating documentation to reflect the
current state.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-05-02 01:16:46 +02:00
Armando Visconti
4c34b5d725 drivers/sensor: lis2dux12: add high performance mode
Add driver capability to properly set high performance mode
while setting data rate (thru lis2duxxx_mode_set() API)
based on how power-mode is set into DTS: if it is set to
LIS2DUX12_OPER_MODE_HIGH_PERFORMANCE then configure HP mode,
LP/ULP mode otherwise.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2025-05-01 18:17:05 +02:00
Olivier Lesage
36aa80337b bluetooth: host: Clarify docs about reading remote FAE table
There was some confusion about why this function doesn't work with
nordic devices. The explanation is that the controller is required
to return an error code if the remote device doesn't need an FAE table.

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
2025-05-01 18:16:48 +02:00
Emil Gydesen
6abdc389d4 Bluetooth: CSIP: Remove bt_csip_set_member_get_sirk
The bt_csip_set_member_get_sirk function is superseded by
bt_csip_set_member_get_info and uses of it has been replaced.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-05-01 18:15:56 +02:00
Dat Nguyen Duy
eb7ac1c0ff arm: cortex_a_r linker: move data section between rodata and bss
By moving data section between rodata and bss, and disabling
Kconfig LINKER_LAST_SECTION_ID by default if non-XIP (it is
seems only needed for XIP), the size of zephyr.bin can be
reduced significantly on non-XIP system.

As a result, moving __kernel_ram_start to another place
to ensure it still include bss + data as before.

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2025-05-01 18:15:33 +02:00
Johan Hedberg
3a07c25c65 Bluetooth: HCI: Rename BT_BUF_TYPE_INVALID to BT_BUF_TYPE_NONE
The new name is slightly clearer, since strictly speaking any value not
part of the enum is invalid.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-05-01 14:59:12 +02:00
Johan Hedberg
dcc1d384b6 Bluetooth: HCI: Add documentation for BT_BUF_IN/OUT
Document the enum values for the recently added bt_buf_dir enum.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-05-01 14:59:12 +02:00
Pieter De Gendt
1a64977b1f sys: dlist: Add const qualifier to immutable API functions
Allow passing structs with sys_dlist_t members as const without
discarding qualifiers if the API is used without modifying it.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-05-01 08:54:04 -04:00
Pieter De Gendt
dde8067d4a sys: slist/sflist: Add const qualifier to immutable API functions
Allow passing structs with sys_slist_t/sys_sflist_t members as const
without discarding qualifiers if the API is used without modifying it.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-05-01 08:54:04 -04:00
Pieter De Gendt
470b582e04 net: lib: coap: Add CoAP secure support
Add optional TLS secure tag lists for CoAP services to enable DTLS
sockets.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-05-01 08:53:32 -04:00