Commit graph

15409 commits

Author SHA1 Message Date
Bjarki Arge Andreasen
9a514ae2dd rtio: introduce await operation
Introduce await operation which simply blocks execution until the
SQE is signaled using the new API rtio_sqe_signal(). This is useful
for locking the bus for synchronous operations, especially those
requiring precise timing. For example, performing a transaction
within a tiny and exact time window.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-04-29 16:47:26 +02:00
Jukka Rissanen
259d41f1e0 net: mgmt: Use layer codes defined in net_mgmt.h
Instead of hard coding some random value to layer code, use the
code that is registered in net_mgmt.h
This way it is easier to keep track of used layer codes in the
future, and we also allow out-of-tree components a way to avoid
allocating same layer code to in-tree-source code.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-04-29 13:01:01 +02:00
Jukka Rissanen
702776bd1f net: mgmt: Remove the _ from symbols
The _ is a reserved character in front of the symbols so remove
it from network management event macros. The remaining string
without the _ will identify the network API anyway so having
underscore there is not needed.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-04-29 13:01:01 +02:00
Jukka Rissanen
26afcb602f net: mgmt: Central place for allocating layer specific codes
Instead of littering the source tree with hard to track
layer code definitions, have a central place where to register
the layer codes.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-04-29 13:01:01 +02:00
Johan Hedberg
5d6d876567 Bluetooth: hci_raw: Fix misleading documentation for bt_send()
The documentation for the HCI raw interface was incorrectly talking about
the need to define buffer pools, when in fact the hci_raw module provides
the necessary API to perform buffer allocation.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-04-29 13:00:33 +02:00
Johan Hedberg
26d97164be Bluetooth: HCI: Use H:4 encoding for buffers
Encode the packet type as a H:4 payload prefix for buffers passing to &
from HCI drivers. The existing bt_buf_set/get_type functions are
deprecated, but kept compatible with the change, except that they can only
be called once, since they modify the buffer payload.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-04-29 13:00:33 +02:00
Emil Gydesen
54df371740 Bluetooth: TBS: Add support for long read with dirty bit
The TBS spec states that if a value is changed during a
long read procedure, then the server shall reject
read requests with offset != 0 with a specific TBS GATT
error until the value has been read from the beginning again
(i.e. with offset = 0).

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-04-29 13:00:07 +02:00
Jiawei Yang
8b3eb368c6 Bluetooth: RFCOMM: Add RPN command sending support
Add support for Remote Port Negotiation (RPN) commands in the RFCOMM.
This allows applications to configure the serial port parameters
over RFCOMM connections, such as baud rate, data bits, stop bits, parity
and flow control.

Changes include:
- Add enumerations for RPN parameters (baud rate, data bits, stop bits,
  parity)
- Add a public API function bt_rfcomm_send_rpn_cmd() to send RPN
  commands
- Add shell command to test RPN with default parameters

This functionality is required by certain Bluetooth profiles that use
RFCOMM and need to configure serial port parameters.

Signed-off-by: Jiawei Yang <jiawei.yang_1@nxp.com>
2025-04-29 08:17:49 +01:00
Daniel Leung
92ebb2eb69 kernel: remove kernel/internal/smp.h
There is no need for kernel/internal/smp.h as SOF does not call
z_sched_ipi(). Actually... git log over there has no mention of
z_sched_ipi() anywhere, just arch_sched_ipi().

And include <ksched.h> for source using z_sched_ipi() since
they are using scheduling functions, and would be the correct
file to include.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-04-29 02:42:09 +02:00
Vladislav Pejic
e72e1c1c44 drivers: sensor: adxl372: FIFO mode from DT
Adds support for setting FIFO mode and water-mark from DT.

Signed-off-by: Vladislav Pejic <vladislav.pejic@orioninc.com>
2025-04-28 12:55:18 -05:00
Emil Gydesen
68652a6682 Bluetooth: CAP: Broadcast: Add check for memory allocation for create
When creating a broadcast source with
bt_cap_initiator_broadcast_audio_create there was no check if
all broadcast sources were already allocated, which could cause
a NULL pointer dereference.

Add a check, a test and documentation about possibly
error codes of the function.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-04-28 16:41:06 +02:00
Håvard Reierstad
1e5f8bacfe Bluetooth: Doc: Improve docs in bluetooth.h
Adds improvements to the API docs in bluetooth.h, with the aim of
making the API less ambiguous and more informative.

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2025-04-28 13:41:00 +01:00
TOKITA Hiroshi
95db3a66fd include: zephyr: dt-bindings: gpio: Add arduino-mkr-header defines
To make the pin names of the Arduino MKR header easier to understand,
we will introduce a macro definition for the pin names.

And also update the definition of `arduino_mkrzero` with the definitions.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2025-04-28 09:24:02 +01:00
TOKITA Hiroshi
e43a396674 include: zephyr: dt-bindings: gpio: Add arduino-nano-header defines
To make the pin names of the Arduino Nano header easier to understand,
we will introduce a macro definition for the pin names.

And also update the definition of `nano_33_ble`, `nano_33_iot`,
`nucleo_g031k8`, and `nucleo_l031k6` with the definitions.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2025-04-28 09:22:57 +01:00
Fin Maaß
3a195a08da drivers: net: ethernet: change ETHERNET_LINK_*BASE_T
change ETHERNET_LINK_*BASE_T to ETHERNET_LINK_*BASE.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-04-28 09:22:09 +01:00
Fin Maaß
43919f1369 drivers: ethernet: phy: add PHY_LINK_IS_SPEED_10M macro
add PHY_LINK_IS_SPEED_10M macro to check if the link speed is 10M.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-04-28 09:22:09 +01:00
Fin Maaß
203ca6fcde drivers: ethernet: phy: rename LINK_*_*BASE_T
rename  LINK_*_*BASE_T to  LINK_*_*BASE

speed options for ethernet drivers shouldn't end with a _T, implying
that ethernet is only supported via a twisted pair cable.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-04-28 09:22:09 +01:00
Vladislav Pejic
4a9029771f drivers: sensor: adxl367: FIFO mode from DT
Add support for setting FIFO mode using DT property.

Signed-off-by: Vladislav Pejic <vladislav.pejic@orioninc.com>
2025-04-28 08:34:35 +02:00
Alain Volmat
29197ac963 drivers: video: add more RGB 24/32 bits and YUV 16 bit variants formats
Add several more RGB formats: (RGB24/BGR24,ARGB32,ABGR32,RGBA32,BGRA32)
as well as more YUV formats: YVYU, VYVU, UYVY

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-04-27 08:35:16 +02:00
Alain Volmat
d8ad66cfb3 drivers: video: add 10 to 16 bit unpacked bayer formats
Add all 4 variants of 10 / 12 / 14 and 16 bits unpacked bayer formats

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-04-27 08:35:16 +02:00
Andrej Butok
0b3e9abbff sys: ring_buffer: fix possible ring_buf_put_claim/get_claim wrong size
- The issue is caused by the MIN() macro, which expands to
  (a)<(b)?(a):(b), where ring_buf_space_get()/ring_buf_size_get()
  is used as 'b' and is evaluated twice. The issue occurs when
  the (a)<(b) condition evaluates such that (b) is selected,
  but the value of (b) changes between evaluations, resulting
  in a possibly larger value than (a).
- Fixes the potential incorrect behavior by storing the result
  of ring_buf_space_get()/ring_buf_size_get() in a variable
  before using it in the MIN macro.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2025-04-26 11:14:44 -04:00
02f85b253a drivers: clock_control: fix the CH32V00x clock definitions
Some time during the initial review, the CH32V003 clock definitions
were exended to include clocks from the CH32V20x and CH32V30x series.
As the CH32V20x series now has a separate clocks include, remove the
non-existent clocks.

While there, drop the 'A' prefix to match the register names in the
CH32V00X reference manual.

Also add the USART2 clock that's present in the CH32V00x series.

Signed-off-by: Michael Hope <michaelh@juju.nz>
2025-04-26 10:55:45 +02:00
Vladislav Pejic
5fc5259964 drivers: sensor: adxl362: FIFO mode from DT
Adds support for setting FIFO mode from DT.

Signed-off-by: Vladislav Pejic <vladislav.pejic@orioninc.com>
2025-04-26 10:55:34 +02:00
Declan Snyder
e358713ea4 drivers: Move flexram to misc driver
Flexram is really not a memory controller, and does not belong in memc
namespace or directory. Move it to it's own misc directory and remove
memc_ from the namespace.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-04-26 10:55:09 +02:00
Jacob Wienecke
db63e563a9 drivers: memc: memc_nxp_flexram.h: Move to the public includes directory
Moved to: include/zephyr/drivers/misc/flexram/memc_nxp_flexram.h

This change makes it so that the .h file does not need to be pulled in
using the CMakeLists.txt file, and can be included like other public
includes.

Removes drivers/memc/memc_nxp_flexram.h

Add memc_nxp_flexram.h to include/zephyr/drivers/misc/flexram

Modify drivers/memc/memc_nxp_flexram.c to use the new include path.

Modifies the mimxrt1170 magic_addr sample to include the driver using
the new include path.

Modify the soc file: soc/nxp/imxrt/imxrt11xx/soc.c to use the new path.

Add relevant information to migration-guide-4.2.rst.

Signed-off-by: Jacob Wienecke <jacob.wienecke@nxp.com>
Co-authored-by: Declan Snyder <declan.snyder@nxp.com>
2025-04-26 10:55:09 +02:00
Emil Lindqvist
500c67fa18 wifi: fix -Wignored-qualifiers warning
Including wifi.h with -Wignored-qualifiers warning enabled gives
a warning. Fix this warning

Signed-off-by: Emil Lindqvist <emil@lindq.gr>
2025-04-25 18:58:25 +02:00
Hoang Nguyen
02eda248e1 drivers: gpio: Add support for RZ/A2M
Add gpio support for RZ/A2M

Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Binh Nguyen <binh.nguyen.xw@renesas.com>
2025-04-25 14:05:01 +02:00
Hieu Nguyen
f1b5511a23 drivers: pinctrl: Add initial support for RZ/A2M
Add pinctrl support for RZ/A2M

Signed-off-by: Hieu Nguyen <hieu.nguyen.ym@bp.renesas.com>
Signed-off-by: Binh Nguyen <binh.nguyen.xw@renesas.com>
Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
2025-04-25 14:05:01 +02:00
Hoang Nguyen
1b8c77e4de drivers: clock control: Initial support for RZ/A2M
Add clock control support for RZ/A2M

Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Binh Nguyen <binh.nguyen.xw@renesas.com>
2025-04-25 14:05:01 +02:00
Jukka Rissanen
3e09a40de5 net: zperf: Add -w option to delay upload jobs
Use -w option to delay the startup of the upload job.
Then when ready, do "zperf jobs start" to launch all upload
sessions at the same time.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-04-25 10:22:33 +01:00
Jukka Rissanen
563f05eb8b net: zperf: Add concurrency when doing upload tests
If user has enabled CONFIG_ZPERF_SESSION_PER_THREAD, then if
user gives -a (async) option to upload command, then multiple
uploads can be run simultaneously. Each upload will be run
in a dedicated work queue. The work queue thread priority can
be set by -t option.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-04-25 10:22:33 +01:00
Martin Hoff
136fe24453 arch: arm: cortex_m: generalizing SRAM vector table relocation
Allow to place the vector table section in SRAM with
CONFIG_SRAM_VECTOR_TABLE option for all cortex-m architecture that
have VTOR register.

Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
2025-04-25 11:03:54 +02:00
Chris Friedt
89c1f15a6e posix: move timespec functions to posix_clock.h
Move somewhat useful (but private and internal functions) that deal
with struct timespec to posix_clock.h until there is a better API
available for dealing with operations on struct timespec.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-04-24 22:58:43 +02:00
Nicolas Goualard
27bfeea162 mcumgr: fs_mgmt: Add a hook on download/upload complete.
Added a hook on the FS group that notify applications when a
 file download/upload has completed.

Signed-off-by: Nicolas Goualard <nicolas.goualard@sfr.fr>
2025-04-24 16:53:35 +02:00
Ruibin Chang
eb99158a80 drivers/sensor/ite/tach/it51xxx: implement tachometer driver
Implement tachometer driver for ITE it51xxx series chip.

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2025-04-24 11:56:44 +02:00
Lyle Zhu
71f81660d4 Bluetooth: tester: Enable GAP discover feature for BR
Call `bt_br_discovery_cb_register` to register discovery callbacks.

Define a buffer br_adv_buf to report br discovery result.

Report device found event if discovery received callback triggered.

Start BR device discovery procedure if command `start_discovery` is
received.

Stop BR device discovery procedure if command `stop_discovery` is
received.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-04-24 10:38:45 +02:00
Yangbo Lu
f0b1cb578f net: dsa: introduce new DSA framework
The new DSA framework purpose and changes are as below.

- Aligned to Linux DSA framework which has been already mature framework
  for many years, For now in zephyr, the DSA components were splited
  as: switch, port, master(not need driver file for now), slave, and tag.
  Seperated drivers were used for maintaining and developing new
  features.

- The unified dts bindings (aligned to linux) were supported. The port
  driver would parse DTS to decide the port type (master port, slave
  port, or cpu port) to set up the switch. All the ports registered as
  standard ethernet devices. (dsa port and dsa switch tree was not
  supported.)

- How to add DSA device driver based on the framework? All the device
  driver needing to do is providing dsa_spi implementation and private
  data, and calling below initialization.

    DSA_INIT_INSTANCE(n, _dapi, data)

- For switch tag case, recv/xmit helpers in dsa_api could be used for
  taging/untagging. No modified ethernet drivers.
  For no-tag type case, ethernet driver of master port should support
  packet injection/extraction for slave ports leaving NULL recv/xmit.

The dsa_nxp_imx_netc.c driver will be the first example of the new DSA
framework.

The future work for DSA will be supporting bridge for ports. We may align
Linux to give users two options to use DSA device:

- Standalone mode: the switch ports work as regular ethernet ports.

- Bridge mode: switch mode with virtual bridge device which could be
  assigned IP address.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-04-24 01:26:46 +02:00
Yangbo Lu
b22db75cec include: ethernet: rename dsa master/slave to conduit/user
Renamed dsa master/slave to conduit/user for capabilities.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-04-24 01:26:46 +02:00
Yangbo Lu
018a718e12 net: dsa: make current DSA core driver obsolete
Current DSA TX/RX way was hard-coded in ethernet devices driver
with ETH_DSA_SUPPORT and NET_DSA.
This patch is to make such way obsolete, as we actually will support
a better DSA framework to handle this in NET/DSA core driver.
To make legacy devices not affected, below options are used instead.

- ETH_DSA_SUPPORT_DEPRECATED
- NET_DSA_DEPRECATED

Once the legacy devices are converted to new DSA framework, this code
could be removed.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-04-24 01:26:46 +02:00
Gerson Fernando Budke
6520633a90 drivers: pinctrl: bouffalolab: Add bflb pinctrl driver
Add Bouffalo Lab pinctrl driver.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2025-04-24 01:26:37 +02:00
Omkar Kulkarni
4680590fda Bluetooth: GATT: Clarify start and end handles
Clarifies what does start_handle and end_handle means in the GATT API.

Signed-off-by: Omkar Kulkarni <omkar.kulkarni@nordicsemi.no>
2025-04-23 15:07:27 +02:00
Fin Maaß
44f9f9fb28 drivers: ethernet: phy: clarify phy_link_callback_set()
clarify phy_link_callback_set() duties.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-04-23 10:03:55 +02:00
Kate Wang
b442b0b985 drivers: mipi_dbi: Add defines for color coding
Add defines for color coding of DBI Type A(Motorola 6800)
and B(Intel 8080) bus. This is to comply with the MIPI
Alliance Standard for Display Bus Interface v2.0.

Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
2025-04-23 10:03:42 +02:00
Christoph Winklhofer
8c7aded4c1 logging: Assign module data to memory partition 'k_log_partition'
The logging module data is assigned to the memory partition
'k_log_partition' so that a user mode thread can access this data (see
k_mem_domain_add_thread()). The 'k_log_partition' is created when:
- CONFIG_USERSPACE=y
- CONFIG_LOG_ALWAYS_RUNTIME=y

The option CONFIG_NO_OPTIMIZATIONS=y forces the logging module to use
the runtime message creation CONFIG_LOG_ALWAYS_RUNTIME=y. This raises a
MPU violation when logging is used in a user mode thread since this
thread is not allowed to access the module data (e.g. __log_level,
__log_current_const_data).

Note that the user mode thread may also require access to the partition
'z_libc_partition'.

Signed-off-by: Christoph Winklhofer <cj.winklhofer@gmail.com>
2025-04-23 02:15:25 +02:00
Anders Nielsen
242e6ea12a drivers: stepper: adi_tmc: Prepare for tmc51xx support
Add Kconfig option. Find common regs. Update ramp generator data.

Signed-off-by: Anders Nielsen <anders.nielsen@prevas.dk>
2025-04-22 12:09:18 +02:00
Hugues Fruchet
e15312bdb5 drivers: memc: stm32 xspi: add psram linker section
Add stm32_psram PSRAM linker section.

Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
2025-04-22 09:59:34 +02:00
Jordan Yates
9286b0b9d0 sensor: additional conversion functions
Add additional conversion helpers for `deci` and `centi` output units.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-04-22 04:33:14 +02:00
Paul Timke Contreras
503f6388e4 drivers: sensor: paj7620: added driver
Added driver for the PAJ7620 gesture sensor. For now,
just added basic gesture mode, although sensor also
has other modes (proximity and cursor modes).

Signed-off-by: Paul Timke Contreras <ptimkec@live.com>
2025-04-22 04:32:54 +02:00
Qiang Zhao
c412ee4597 drivers: firmware: scmi: add cpu domain protocol
Added helpers for NXP SCMI cpu dmomain protocol.

Signed-off-by: Qiang Zhao <qiang.zhao@nxp.com>
2025-04-21 22:03:27 +02:00
Hao Luo
6618a673e5 drivers: gpio: Add support for Apollo510 GPIO
This commit adds support for Apollo510 SoC in ambiq gpio driver

Signed-off-by: Hao Luo <hluo@ambiq.com>
2025-04-21 20:04:31 +02:00