Commit graph

113142 commits

Author SHA1 Message Date
Alvis Sun
dd578065bc soc: nuvoton: npcx: refactor npcx soc hierarchy for future chip support
This commit refactors the NPCX SoC hierarchy to improve maintainability and
enable future support for upcoming chips.

Key changes include:
1. Introduced a new `npcxn` subdirectory under `common/` to consolidate
shared components across the npcxn series.
2. Renamed and reorganized register access files for improved consistency.
3. Updated relevant Kconfig files, header files, and CMakeLists
for the new structure.

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
2025-04-07 07:27:38 +02:00
Marek Matej
f10e7b8395 soc: espressif: esp32: Allow DRAM1 to use for .noinit
Add config to relocate the .noinit section to DRAM1 region.
Remove unused config.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2025-04-07 07:27:23 +02:00
Thao Luong
1f9f4c8cee MAINTAINERS: Update collaborator for Renesas RA Platform
Add @thenguyenyf as collaborator for Renesas RA Platform

Signed-off-by: Thao Luong <thao.luong.uw@renesas.com>
2025-04-06 12:18:14 +02:00
Nhut Nguyen
6ca84e3c9a soc: renesas: rz: Fix loader program
Due to a change in linker script cortex_a_r/scripts/linker.ld
, the _image_ram_start has been changed so the Zephyr image
cannot be copied from flash to ram as expected
and cannot run properly.
It is replaced by CONFIG_SRAM_BASE_ADDRESS, the _image_ram_size is also
replaced by _flash_used as a preventive measure.

Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
2025-04-06 12:18:07 +02:00
Marcio Ribeiro
c2235a727d samples: i2s: add esp32 board overlay files
Adds esp32 board overlay files to i2s samples

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2025-04-06 12:17:58 +02:00
Marcio Ribeiro
a4a2bb273a boards: esp32: add i2s for non-gdma SoC boards
Adds i2s support for boards based on:
- esp32
- esp32s2

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2025-04-06 12:17:58 +02:00
Marcio Ribeiro
c01489dadc drivers: i2s: esp32: add support for non-gdma SoCs
Adds support for:
- esp32
- esp32s2

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2025-04-06 12:17:58 +02:00
Marcio Ribeiro
0cedd4d3d9 drivers: i2s: esp32: code and data refactoring
Code and data refactoring to prepare for adding support for non-gdma SoCs

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2025-04-06 12:17:58 +02:00
Anas Nashif
130f2ce641 ci: twister: set number of jobs to use
We want to control the number of jobs we run in parallel. Detection on
some runners can be wrong.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-04-05 22:30:26 +09:00
Benjamin Cabé
207a048811 doc: requirements: switch to uv compile
Use uv compile to generate requirements.txt from requirements.in
This works better to capture dependencies that work for multiple python
versions, not just the one that was used to generate the
requirements.txt file.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-04-05 11:02:21 +02:00
Sylvio Alves
ac0705d59b soc: espressif: update restart procedure
Use esp_restart call to guarantee and registered
shutdown handlers will be triggered before rebooting.
This guarantees that subsystems like Wi-Fi and BLE
will deinit correctly.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-04-05 11:02:13 +02:00
Pieter De Gendt
739066743f gitlint: Add ignored rules for dependabot
Dependabot will have an auto-generated body and is likely to fail the max
line length check.
The bot also does not use a full name for the signed-of-by line.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-04-05 11:01:58 +02:00
Eric Holmberg
487830c380 data: json: remove extra braces causing designated-initializer errors
When compiling in C++, the designated-initializer error:
	Either all initializer clauses should be designated
	or none of them should be

Will occur due to an extra pair of braces in the Z_JSON_DESCR_OBJ() macro.

Remove the extra pare of braces which allows the code to compile and
function in both C and C++.

Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
2025-04-05 11:01:50 +02:00
Paul Timke Contreras
9c5abb35b5 tests: drivers: build_all: sensor: i2c.dtsi fix address typo
The address of the last i2c device in the build all test has a wrong
address. This fixes that typo.

Signed-off-by: Paul Timke Contreras <ptimkec@live.com>
2025-04-04 21:17:09 +02:00
Yuval Peress
ba9b4f3734 ztest: Fix confusing SKIP log
When CONFIG_ZTEST_FAIL_ON_ASSUME is set, a failed assumption will
cause the suite to fail, but the individual test will be marked as
SKIPPED. We should fail the test so it's clear what's going on.

Fixes #86611

Signed-off-by: Yuval Peress <peress@google.com>
2025-04-04 21:16:34 +02:00
Ivan Wagner
b5adb4457c drivers: sensor: meas: ms5837 supporting 02 and 30 variants via dt
This patch adds support via dt compatible property.

Signed-off-by: Ivan Wagner <ivan.wagner@tecinvent.ch>
2025-04-04 21:16:20 +02:00
IBEN EL HADJ MESSAOUD Marwa
8db85916f2 drivers: ethernet: Integrate GRMII and RMII interfaces
- Added macros `STM32_ETH_PHY_MODE`
  to determine the PHY mode (RGMII, GMII, RMII, and MII)
  from the `phy_connection_type` property in the device tree.
- Removed previous definitions for ETH_MEDIA_INTERFACE_MII
  and ETH_MEDIA_INTERFACE_RMII.
- Updated STM32_ETH_PHY_MODE macro to use ETH_MII_MODE
  and ETH_RMII_MODE.

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2025-04-04 21:16:02 +02:00
IBEN EL HADJ MESSAOUD Marwa
11a1b89948 boards: st: stm32n6570_dk: Add ethernet node
Add the Ethernet MAC and MDIO nodes in the device tree.
Add Kconfig for Ethernet Support.

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2025-04-04 21:16:02 +02:00
Pisit Sawangvonganan
cc0684351a kernel: system_work_q: make k_work_queue_config cfg as static const
Make `k_work_queue_config cfg` as `static const` to enable
compile-time instantiation instead of runtime allocation.
This modification saves substantial flash memory but has system-wide
effects that should be considered.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2025-04-04 21:15:40 +02:00
Mathieu Choplain
25fe4745e6 doc: kernel: fatal: update "Build Assertions" section intro paragraph
A long time ago, Zephyr had two macros that could be used for build-time
assertions: BUILD_ASSERT() and BUILD_ASSERT_MSG(). The latter has been
dropped in v2.7 and removed from the documentation; however, the intro
paragraph of the "Build Assertions" section has never been updated to
reflect this, and still confusingly claims that "Zephyr provides two
macros for performing build-time assertions" when only BUILD_ASSERT()
remains.

Update the introductory paragraph of "Build Assertions" section such that
it makes sense now that only one build-time assertion macro exists.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2025-04-04 21:15:29 +02:00
Peter Mitsis
5c36567c56 tests: Add benchmark for IPI performance
Adds tests to better gauge IPI performance on SMP. In each case, one
CPU is used as the source of IPIs while the remaining CPUs are busy
doing "work". Every 30 seconds the benchmark reports on the amount
of "work" done by the busy CPUs and the amount of work done by the
CPU generating the IPIs.

This can be used to ...
 1. Show how enabling IPI optimization affects system performance
 2. Show the cost of spinlock contention as the number of CPUs increase
 3. Measure the relative performance of scheduler changes on SMP.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2025-04-04 21:15:14 +02:00
Alberto Escolar Piedras
59b62243fa Bluetooth: HFP_AG: Initialize variable to avoid warning
gcc 11.4.0, seems to believe this variable may be used uninitialized,
and warns about it (causing a test build failure due to warnings
being treated as errors).
Let's just initialize the variable to 0 to avoid the issue, as the
cost is trivial.

subsys/bluetooth/host/classic/hfp_ag.c: In function
  ‘bt_hfp_ag_vts_handler’:
1095
subsys/bluetooth/host/classic/hfp_ag.c:3091:17: error: ‘code’ may be
  used uninitialized in this function [-Werror=maybe-uninitialized]
1096
 3091 |                 bt_ag->transmit_dtmf_code(ag, code);
1097
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1098

The issue can be reproduced for ex. with:
$ mkdir build ; cd build
$ cmake -GNinja -DBOARD=native_sim/native/64 ../tests/bluetooth/shell \
 -DCONF_FILE="prj_br.conf"
$ ninja

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-04-04 18:18:16 +02:00
Mahesh Mahadevan
83efaa7a69 west.yml: Update NXP HAL to fix HIFI DSP build
Get update to the SDK code to fix build on HIFI
DSP.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2025-04-04 18:17:57 +02:00
Andrej Butok
d4682ff5c9 tests: littlefs: fix test_lfs_basic for medium and large partitions
Fixes failed test_lfs_basic for medium partition > 960KB
and for large partition > 3MB.
Flashes with large erase size require larger test partition sizes
(e.g. s26ks512s0 has 256KB erase size).

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2025-04-04 18:17:48 +02:00
Valerio Setti
d75c2113a9 drivers: sensors: bma4xx: add I2C_RTIO Kconfig for I2C
Since #83575 bma4xx driver relies on RTIO to work. This means that
CONFIG_I2C_RTIO should be defined together with CONFIG_I2C in the
Kconfig, otherwise I2C_DT_IODEV_DEFINE() won't be available at
build time.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2025-04-04 18:17:41 +02:00
Robert Lubos
cf0b6068d2 net: coap_client: Fix CoAP client thread priority
The default thread priority for the CoAP client thread is set to
NUM_PREEMPT_PRIORITIES which is not a valid thread priority, as the
lowest application thread priority is actually
NUM_PREEMPT_PRIORITIES - 1. Because of this, CoAP client library gave an
assert on boot if assertions were enabled.

Kconfig does not allow for arithmetics when setting integer defaults,
therefore handle this at the preprocessor stage by limiting the actual
priority assigned to the CoAP client thread to a valid range.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-04-04 18:17:30 +02:00
Declan Snyder
0875499664 spi_nxp_lpspi: Remove mcux branding from tokens
Since these drivers mainly do not use MCUX except for the configure
function (which will soon also be changed), change namespace prefix to
lpspi_ instead of spi_mcux_ to avoid confusion.

Also improve descriptions of kconfigs to clarify what they are for.
Not changing the kconfig names for now since they are user-facing.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-04-04 18:17:19 +02:00
Declan Snyder
fa3a51bc29 spi_nxp_lpspi: Remove SDK items from header file
Remove SDK types and defines from header file.

And since now the common file is the only consumer of SDK header, move
that include there.

Also rename the tristate boolean to be more clean about what it does
rather than trying to be similar to the SDK config name.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-04-04 18:17:19 +02:00
Declan Snyder
ef60f88162 spi_nxp_lpspi: Refactor validation args to func
Minor refactor to make a separate function to validate configuration
arguments.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-04-04 18:17:19 +02:00
Declan Snyder
6a283c0a1f spi_nxp_lpspi: Convert CPU version to native code
Convert the CPU-based lpspi driver to native code.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-04-04 18:17:19 +02:00
Declan Snyder
1c00f368d9 spi_nxp_lpspi: Convert DMA version to native code
Convert the DMA-based LPSPI driver to native code.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-04-04 18:17:19 +02:00
Declan Snyder
29213b5e7c spi_nxp_lpspi: Fix DMA driver async return
We should not release context until transfer ends. The code previously
would return from wait_for_completion and then release the context. This
is only supposed to be done in the dma callback except for the case of
error in the transceive call. For async transfer this was most likely
always happening wrong and probably broken for multi threads trying to
access the bus due to this premature release of the context.

Also we should not enable CS and leave enabled in case of error, move CS
enable to after the error check.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-04-04 18:17:19 +02:00
Declan Snyder
5acee4ad9d spi_nxp_lpspi: Prevent edge case causing DMA error
Stop the transfer with error if at any point there is some
execution reached where transfer is being set up for 0 length, this can
cause problems where for example eDMA set up with this nonsense 0 length
channels can get an infinite error interrupt.

And this is probably an erroneously crafted transfer request anyways.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-04-04 18:17:19 +02:00
Declan Snyder
2f678bd56c spi_nxp_lpspi: Reset/clock peripheral
If there are HAL definitions available, do these two things:

Ungate the clock for the device from the zephyr driver. Eventually it
would be better to have a clocks property in the LPSPI DT node and get
the resources from there rather than the HAL.

Some platforms require the peripheral to be reset at system level, add
code to do this. Eventually it would be more ideal to have Zephyr
reset drivers for all of the NXP platforms and use DT to describe the
reset resources, but for now we can just do this to get the LPSPI
supported.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-04-04 18:17:19 +02:00
Hank Wang
e11634e733 drivers: i2c: tca954x: add support for idle disconnect
Add support for an optional "idle disconnect" feature in the TCA954x
I2C multiplexer. When enabled via the `i2c-mux-idle-disconnect` device
tree property, the driver will disconnect all channels after each
transfer. This helps avoid address conflicts when multiple multiplexers
are present on the same I2C bus.

Even if the I2C transfer fails, the driver will still attempt to
disconnect the channels to ensure the bus is left in a consistent state.
If the disconnect operation itself fails, its error code will be returned
unless the transfer already failed with a different error.

This implementation is inspired by the Linux kernel driver for PCA954x
I2C multiplexers. Special thanks to Ofir Shemesh for valuable suggestion.

Signed-off-by: Hank Wang <wanghanchi2000@gmail.com>
2025-04-04 18:17:07 +02:00
Emil Gydesen
2dbc10ab6b Bluetooth: BAP: Fix bad cast to void * instead of void for memcpy
The result of memcpy should be cast to (void) and not (void *).

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-04-04 18:16:54 +02:00
Jordan Yates
e661a55044 sensor: bme280: clamp humidity to non-negative
Clamp the returned humidity to a non-negative value. This ensure that
the return value is always within the expected range, even if the
calibration parameters are read out incorrectly or corrupted.

This check is applied in the example Bosch driver for the float
conversion case, so there are situations that warrant it.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-04-04 14:57:43 +02:00
Aksel Skauge Mellbye
295975019a dts: arm: silabs: Fix clock and interrupt definitions for xg22
The WDOG and IADC clock node definitions were missing for xg22,
and interrupt numbers were wrong for WDOG on xg27.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-04-04 14:57:15 +02:00
Markus Lassila
392fda02b3 net: Add CONFIG_NET_CONN_PACKET_CLONE_TIMEOUT
Add CONFIG_NET_CONN_PACKET_CLONE_TIMEOUT to allow for longer
timeouts. This can be used to prevent dropping packets when
transmitting large amounts of data (with PPP).

Signed-off-by: Markus Lassila <markus.lassila@nordicsemi.no>
2025-04-04 14:57:06 +02:00
Eric Holmberg
84d3cafbce net: websocket: fix masked data when server sends close
When sending the close command as a server, the data is incorrectly
masked which violates RFC6455 section 5.1.

Use the is_client flag to avoid masking if the close is for a websocket
server.

Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
2025-04-04 14:56:58 +02:00
Lyle Zhu
00ffb5ba97 Tests: Bluetooth: Classic: Bumble power_on() will fail on Linux
On Linux, the function `power_on()` of Bumble will fail when executing
even-numbered test cases.

From the `btmon` log, the controller will not reply the `HCI Command:
Reset` when the issue occurs.

Add a try-except to catch the exception of the function `power_on()`,
and retry to call the function `power_on()` until issue no longer
occurs. Or, the test will fail due to the timeout.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-04-04 14:56:48 +02:00
Torsten Rasmussen
483c76759d scripts: support quoted sysbuild Kconfig settings in twister
Kconfig settings of string type is passed to CMake with quotes to ensure
they are properly handled, for example when specified in testcase.yml as
>   extra_args:
>    - CONFIG_FOO="bar"

Support sysbuild Kconfig settings `SB_CONFIG` by performing the same
quoting for settings starting with `SB_CONFIG_`.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2025-04-04 14:56:39 +02:00
Camille BAUD
da45a76fce MAINTAINERS: Introduce WCH platforms
Introduce WCH platforms, assign myself and hal_wch maintainers

Signed-off-by: Camille BAUD <mail@massdriver.space>
2025-04-04 14:56:30 +02:00
Aurelie Fontaine
e5d39819c9 MAINTAINERS: add tdk team as TDK Sensors maintainers and collaborators
We would like to take maintainership of TDK drivers as discussed:
 https://github.com/zephyrproject-rtos/zephyr/pull/85963
teburd and MaureenHelm moves to collaborators

Signed-off-by: Aurelie Fontaine <aurelie.fontaine@tdk.com>
2025-04-04 14:56:20 +02:00
Lars-Ove Karlsson
bf29b2a8d7 bluetooth: host: Fixed missing guard for BT_SETTINGS_DEFINE
While linking with the IAR linker using generated linker scripts,
and with errors if unhandled sections are encountered, many of the
bluetooth tests failed because CONFIG_SETTINGS was not set.

The section that was not handled was
'._settings_handler_static.static.settings_handler_bt_ccc_'

Now it's only set if CONFIG_SETTINGS is set.

Signed-off-by: Lars-Ove Karlsson <lars-ove.karlsson@iar.com>
2025-04-04 14:56:10 +02:00
Jimmy Zheng
dbd0ac40ce drivers: interrupt_controller: intc_clic: add indirect access clic reg
Add indirect CSR access to access CLIC register to satisfy the current
CLIC spec (Version v0.9, 2024-06-28: Draf).

Add CONFIG_LEGACY_CLIC_MEMORYMAP_ACCESS for legacy CLIC implementation
with memory-mapped CLIC register.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2025-04-04 14:55:50 +02:00
Jimmy Zheng
46a828e787 drivers: interrupt_controller: intc_clic: add CLIC parameters
Add support for CLIC hardware parameters based on the hardware
implementation.

  1. CLIC_PARAMETER_INTCTLBITS
    Specifies the number of modifiable bit in interrupt control register.

  2. CLIC_PARAMETER_MNLBITS
    Specifies the number of bits are assigned to interrupt level in the
    interrupt control bits.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2025-04-04 14:55:50 +02:00
Jimmy Zheng
ed97af9309 drivers: interrupt_controller: intc_clic: add CLIC SMCLICCONFIG extension
Add support for CLIC SMCLICCONFIG extension, allowing user to configure
the number of available interrupt level bits at runtime.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2025-04-04 14:55:50 +02:00
Jimmy Zheng
8dca182b14 driver: interrupt_controller: intc_clic: fixed access CLIC w/o privileged
Temporarily disabled PMP stack guard to allow access to CLIC M-mode
register, because U-mode load/store (mstatus.MPRV=0x1,MPP=0x0) is
restricted.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2025-04-04 14:55:50 +02:00
Jimmy Zheng
9349d54074 driver: interrupt_controller: intc_clic: rework to standard CLIC driver
Rework intc_clic to standard CLIC driver with Nuclei ECLIC extention.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2025-04-04 14:55:50 +02:00