Commit graph

126,787 commits

Author SHA1 Message Date
Vit Stanicek
30e053ca2c soc: mimxrt798s/hifi4: Disable GPIO support
Remove INPUTMUX interrupt assignments for PINT and GPIO peripherals.
Remove gpio0 DT node.

As the GPIO peripherals can be secured on the mimxrt798s, accesses from
the cm33_cpu0 and hifi4 are mutually exclusive, so the GPIO0 will stay
enabled in the cm33_cpu0 domain.

Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
2025-08-13 11:09:32 +01:00
Vit Stanicek
846d967921 dt: mimxrt700_evk/hifi4: Remove GPIO0 nodes
Remove overlay of gpio0 node. Remove dependent nodes (LEDs, keys).
Remove alias bindings of those.

Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
2025-08-13 11:09:32 +01:00
Vit Stanicek
7181d692b9 samples: rtxxx-amp: amp_blinky: Disable for mimxrt700_evk/hifi4
Add a build error conditional for mimxrt700_evk/mimxrt798s/cm33_cpu0,
thus disabling build for the hifi4 domain. Remove that target from
platform_allow in sample.yaml.

Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
2025-08-13 11:09:32 +01:00
Ilya Tagunov
c8c894b83e lib: libc: arcmwdt: add a declaration for the strnlen function
ARC MWDT C library does not have an implementation of the strnlen
function, so we have a wrapper over standard-compliant strnlen_s.
However, there is no declaration of the wrapper, so add one.

Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
2025-08-13 11:09:01 +01:00
Dmitrii Sharshakov
6e2001ba90 Bluetooth: isoal: fix building with verbose logging
Fixes d414cab87a (likely a missed rename)

Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
2025-08-13 11:08:48 +01:00
Jiafei Pan
b9ee247352 samples: net: zperf: add imx95 evk a55 suppport
Add i.MX 95 EVK A55 support for zperf sample.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2025-08-13 11:08:39 +01:00
Jiafei Pan
0c2bb624d3 boards: imx95_evk: a55: enlarge networking stack size
The issue is caused by default stack size 1500 bytes of NET_RX_STACK_SIZE
is to small for ARM64 platform, then the stack of net_rx thread is
overflow and break the net_mgmt thread's stack, as a result net_mgmt thread
is crashed.

So this patch will enlarge all the stack size of net stack threads.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2025-08-13 11:08:39 +01:00
Jiafei Pan
5a56cb6fc0 boards: imx95_evk: a55: add NETC support
Added NETC PSI0 support on the i.MX 95 EVK board for A55 platform.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2025-08-13 11:08:39 +01:00
Jiafei Pan
7d747f5a2e soc: imx95: a55: add netc power and clock init in soc.c
Power up NETCMIX and configure netc clock in soc_init().

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2025-08-13 11:08:39 +01:00
Jiafei Pan
cb3b08b046 dts: arm64: imx95_a55: add SCMI power device node
Added SCMI power dts node.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2025-08-13 11:08:39 +01:00
Jiafei Pan
0965d794a6 dts: arm64: imx95_evk: add netc dts nodes
Added NETC dts nodes in imx95_evk A55 platform.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2025-08-13 11:08:39 +01:00
Jiafei Pan
f11cdece2f west.yml: depend on hal_nxp PR
Tmp patch to depend on hal_nxp PR 571.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2025-08-13 11:08:39 +01:00
Mike J. Chen
737aa7d9f3 drivers: dma: dma_mcux_lpc: fix multiple bugs with continuous mode
There are multiple bugs related to continuous/circular mode.
Continuous/circular mode is where the DMA runs continuously
until the stop API is called, instead of auto-stopping on
completion on a single transfer. After a stop, the DMA
can then be reconfigured/restarted.

1. Fix bug where stop didn't actually stop. This can cause memory
   corruption if the user thought the DMA stopped and repurposed
   the dest memory, but in fact the DMA is still writing to it.
   The bug was due the incorrect usage of the DMA controller busy
   state. The DMA controller is busy only when a transfer is
   actively in progress, but the driver needed to stop even if
   the transfer is not active but is only enabled (and may become
   active on a subsequent trigger event). Change so that data->busy
   doesn't use the DMA controller busy state but tracks the enable
   state. Also, to make it doubly safe, make stop function always stop
   regardless of data->busy state because it is alway safe/correct
   to do so.

2. Fix race condition where a stop request from another ISR might race
   with a DMA completion interrupt, and the DMA completion callback
   gets invoked after the DMA has already been stopped. The fix
   is to unregister the callback with the sdk DMA driver, so the
   ISR still runs and clear the interrupt without invoking the
   callback. There is potentially still a race if the interrupt
   is restarted before the ISR fires, so the callback might be
   called too early. However, the Zephyr DMA driver doesn't
   have the channel level details that the SDK driver does and
   it cannot clear just the channel interrupt.

Also a couple of general fixes/improvements:

a. Use interrupt B for end of transfer (single transfer or end
   of block list). Use interrupt A for interrupts of a block
   in the middle of a transfer or for continuous/circular transfers.
   This fixes the dma callback so it can properly report
   DMA_STATUS_BLOCK vs DMA_STATUS_COMPLETE.

b. Reorder some fields in struct channel_data to pack a little
   better in memory

Signed-off-by: Mike J. Chen <mjchen@google.com>
2025-08-13 11:08:21 +01:00
Mike J. Chen
4e0e3c990d drivers: dma: dma_mcux_lpc: fix src_inc/dst_inc for block chain
The dma driver was determining src_inc and dst_inc from the
config of the first block buffer and ignoring the config
flags for any additional buffers in the chain, which could
lead to incorrect transfers (e.g. in a multiple rx buffer
case, if the first buffer was to receive to NULL,
but the subsequent buffers were not NULL, the bug
would manifest as all transfers being made with
dst_inc of 0). Change the driver to setup
each dma descriptor according to the addr_adj flag
of each block_buffer.

Add check that peripheral transfers have addr_adj set to
NO_CHANGE instead of assuming it, to help catch errors.

Also now check for invalid addr_adj request of
decrement, which this controller doesn't support.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2025-08-13 11:08:21 +01:00
Mike J. Chen
1c4351a208 drivers: mcux: spi and dma: add explicit dma channel type for SPI_TX
The spi_mcux_flexcomm driver uses a special last DMA blk_cfg
to trigger a release of the SPI chip select. This transfer
is always a 4-byte transfer, regardless of the width specified
during dma_configure().

The way the spi_mcux_flexcomm driver communicated this special
transfer was kind of a hack, where the dma_mcux_lpc driver would
assume that when a blk_cfg with source_addr_adj and dest_addr_adj
both set to NO_CHANGE was for this SPI_TX special case.

However, this is an unsafe hack since it is perfectly valid
to have dma use cases for both src/dest_addr_adj to be NO_CHANGE
that is not for SPI_TX. One example is when transmitting a
fixed/repeating value to a periperhal address (e.g. send 100
bytes of the same value from a single memory address over SPI).

This CL introduces a dma_mcux_lpc specific dma channel_direction
which the two drivers now use to cleary request this special
transfer case.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2025-08-13 11:08:21 +01:00
Mike J. Chen
df46b30b8b drivers: spi: mcux_flexcomm: add error handling code
In spi_mcux_transfer_next_packet(), if the next
transfer start fails, add calls to
spi_context_cs_control() to release cs and
spi_context_complete() with error code -EIO.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2025-08-13 11:08:21 +01:00
Mike J. Chen
03684e8572 drivers: spi: mcux_flexcomm: make async mode with dma work
The current driver implementation would block even when the async
API was invoked, so it wasn't really async.

This CL also fully chains the DMA transfer using multiple dma blocks
and makes the number of dma blocks available a config value. The
increase in number of dma blocks is needed so that a spi_buf_set
that has many entries can be converted into chained dma transfers
with the last transfer in a separate block that will set the EOT flag.

Also make some improvements:
1) When doing single cnt transfer, don't use the SDK driver but
   use a new fucntion spi_mcux_transfer_single_word().
   It's much more efficient and does not use an ISR
   like the SDK function does just to send one word.

2) Fix calls to spi_context_update_tx/rx() so that the
   correct word size is passed in, instead of previously
   being hardcoded to 1. This only matters when word size
   is two. Evaluate the word_size_bytes and word_size_bits
   once and store the values in data instead of computing
   it multiple times in various parts of the driver

3) When CONFIG_SPI_MCUX_FLEXCOMM_DMA is defined, we
   do not use the IRQ handler, so add #ifdefs to compile
   that code out. This reduces code size.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2025-08-13 11:08:21 +01:00
Mike J. Chen
0c1e9c3e7a Revert "drivers: spi: mcux_flexcomm: use rxignore bit instead of dummy read."
This reverts commit a3530d6a43.

This change incorrect if chip-select is via a GPIO pin,
released by spi_context_cs_control(), and not the controller
default chip-select pin that can be released using a final
FIFOWR.

When GPIO is used for chip-select control, the chip-select could
be released too soon because the transfer callback is invoked
when the last byte is put into the TX FIFO but that byte might
not yet have clocked out yet on the SPI pins. The rx part of
the transfer is really what completes the transfer so ignoring
it is incorrect.

We could try to special case and use ignore only when
spi_context_cs_control() does nothing, but since it is a very
small optimization, it doesn't seem worth the extra
complexity.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2025-08-13 11:08:21 +01:00
Tomasz Bursztyka
60e5a5622b shell: Improve device list command with an optional filter
It might come in handy to filter the output of a device list
command, by adding a filter (auto-completion enabled as well).

Such as:
$ device list uart
devices:
- uart@2f8 (READY)
  DT node labels: uart1
- uart@3f8 (READY)
  DT node labels: uart0

Signed-off-by: Tomasz Bursztyka <tobu@bang-olufsen.dk>
Co-authored-by: Dimitris Karnikis <dika@bang-olufsen.dk>
Co-authored-by: Hans Binderup <habi@bang-olufsen.dk>
2025-08-13 11:08:07 +01:00
Tomasz Bursztyka
1cb1a2777e shell: Add an init command to device module
Optional, this command can be helpful to debug device initialization
process.

Signed-off-by: Tomasz Bursztyka <tobu@bang-olufsen.dk>
2025-08-13 11:08:07 +01:00
Tomasz Bursztyka
c30cbe39b4 shell: utils: Add non-ready device handling functions
It might come in handy to access non-initialized devices throuhg the
shell. I.e. devices which 'zephyr,deferred-init' DTS attribute was set.

Signed-off-by: Tomasz Bursztyka <tobu@bang-olufsen.dk>
2025-08-13 11:08:07 +01:00
Tomasz Bursztyka
eb85374e2a shell: Fix device name lookup buffer size
It is actually easy to have device name going beyond 20 characters.
There is a maximum defined internally, better using it.

Signed-off-by: Tomasz Bursztyka <tobu@bang-olufsen.dk>
2025-08-13 11:08:07 +01:00
Yongxu Wang
e7d59641e2 pm: power_mgmt_soc: add imx95_evk m7 into test case yml
enable imx95_evk m7 for this power_mgmt_soc test case

Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
2025-08-13 11:08:00 +01:00
Yongxu Wang
e0e40165ee soc: nxp: imx95: setup m7mix and wakeupmix power on in suspend mode
wakeupmix keep power on state is essential for system
suspend mode, because of console uart locate in it.

temporarily set the M7 mix to power on,
further optimization will be carried out later

Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
2025-08-13 11:08:00 +01:00
Yongxu Wang
ae974a2263 soc: nxp: imx9: add basic pm process for i.MX95 M7
add basic pm_state_set and pm_state_exit_post_ops

Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
2025-08-13 11:08:00 +01:00
Yongxu Wang
19d118d98d dts: arm: nxp_imx95_m7: add pm node
added wait/stop/suspend pm node for imx95 m7

Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
2025-08-13 11:08:00 +01:00
Yongxu Wang
3b2518382c drivers: firmware: scmi: add cpu lpm interface api
Added scmi_cpu_pd_lpm_set api for nxp imx scmi interface

This api set the lpm setting for some peripherals applied
when cpu enter a low power mode, such as keep iMX95 wakeup mix
power on when M7 core enter suspend mode, scmi agent record and
deal with this request

Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
2025-08-13 11:08:00 +01:00
Yongxu Wang
480f01ece8 drivers: firmware: scmi: disable interrupt communication in polling mode
SCMI processor interrupts from agent are enabled by default during the
`setup_chan` initialization phase. This is suitable for interrupt-driven
communication, where the agent triggers an interrupt to notify the platform
after completing a message transaction.

However, when using the polling model, interrupts are not required and may
cause unintended behavior or performance issues in PM.
To ensure correct operation under polling mode, the interrupt should
be explicitly disabled after channel setup.

Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
2025-08-13 11:08:00 +01:00
Yongxu Wang
d24b50e952 drivers: scmi: add use_polling parameter in scmi_send_message
SCMI supports both polling and interrupt modes for message completion.
Previously, the scmi_send_message() API used a 'pre_kernel' flag to
determine which mode to use_polling during the pre-kernel phase and
interrupts post-kernel.

This approach tightly coupled the decision logic with kernel state,
limiting flexibility. In particular, certain power management (PM)
related SCMI APIs require polling mode even in post-kernel context
to avoid unintended CPU wakeups caused by interrupts.

This patch replaces the 'pre_kernel' with a more generic
'use_polling' parameter, allowing callers to explicitly specify
the desired behavior. Typical usage can still rely on k_is_pre_kernel()
to determine polling mode in higher level api, while PM related
calls can directly enforce polling regardless of kernel state.

Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
2025-08-13 11:08:00 +01:00
Jonas Berg
8843fd9fe1 Samples: Fix ID for VCNL4040 sensor sample
The ID of the sample is wrong, so it is not possible to link
to the sample documentation. I found this issue when working
on a shield for the VCNL4040 proximity sensor.

To my knowledge, there are no references to the invalid ID yet.

Signed-off-by: Jonas Berg <jonas.s.t.berg@gmail.com>
2025-08-12 20:39:48 -04:00
Lukasz Fundakowski
fc8164036c twister: Fix pytest warnings while discovers tests
Added `__test__ = False` to classes that have
`Test` in the name.

Signed-off-by: Lukasz Fundakowski <lukasz.fundakowski@nordicsemi.no>
2025-08-12 20:39:29 -04:00
Jordan Yates
9d0d3ef076 net_buf: buf: return on double free
If assertions are disabled, return on double free instead of wrapping
around the reference count.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-08-12 20:39:06 -04:00
Jordan Yates
5184e3f86a net_buf: buf: assert on double free
Unreferencing a buffer that has already been freed should trigger an
assertion as it indicates a critical logic error and potential security
concern.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-08-12 20:39:06 -04:00
Jordan Yates
97b9a0c1c5 net_buf: buf: remove custom assertion logic
There is no need for a custom assert macro that is only used once, or
conditional compilation of the assert macro based on `__ASSERT_ON`. If
assertions are disabled the compiler should simply discard the code.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-08-12 20:39:06 -04:00
Jordan Yates
4e13c1168e tests: udc: fix double free
When the UDC device is enabled, the dequeue operation automatically
frees the enqueued buffer.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-08-12 20:39:06 -04:00
Jordan Yates
008ce8cf2d tests: net_buf: buf: remove double free
`net_buf_frag_del` already unreferences the deleted fragment.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-08-12 20:39:06 -04:00
Henrik Brix Andersen
1d45e17037 Revert "serial: uart_native_pty: IRQ support"
This reverts commit df1e6f5290.

Fixes: #94425

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2025-08-12 20:33:02 -04:00
Hake Huang
6364bafba3 tests: mimxrt1060_evk: adjust i2s testing for NXP mimxrt1060 board
1. enable the codec + i2s sample
2. skip i2s loopback as this conflicts with lcd

Signed-off-by: Hake Huang <hake.huang@nxp.com>
2025-08-12 18:40:31 -04:00
Johan Hedberg
381ec33879 Bluetooth: Controlller: Remove deprecated BT_CTLR Kconfig option
This option was deprecated in Zephyr 4.1.0, so it can be removed for Zephyr
4.3.0.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-08-12 18:40:20 -04:00
Jamie McCrae
ffddc76bf0 west.yml: MCUboot synchronization from upstream
Update Zephyr fork of MCUboot to revision:
  bf5321bb6906e9e75b4c85b7c98b71c06ae52e90

Brings following Zephyr relevant fixes:

  - bf5321bb boot: zephyr: Remove reference to deprecated BT_CTLR
    option
  - 800868a9 bootutil: swap_scratch: Fix scratch scrambling
  - 16cfdaf3 boot: zephyr: Fix including asn1 when ed25519 is used

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-08-12 18:40:20 -04:00
Johan Hedberg
811cd87734 tests: Don't use deprecated BT_CTLR Kconfig option
The new option is HAS_BT_CTLR, however since it's a promptless option,
disable the native link layer instead, which most likely was the intended
effect.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-08-12 18:40:20 -04:00
Johan Hedberg
eb69b43e71 samples: Remove usage of deprecated BT_CTLR Kconfig option
Use HAS_BT_CTLR which has replaced the deprecated BT_CTLR option.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-08-12 18:40:20 -04:00
Johan Hedberg
d27df89ce4 boards: Remove usage of deprecated BT_CTLR Kconfig option
Use HAS_BT_CTLR instead of the deprecated BT_CTLR.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-08-12 18:40:20 -04:00
Fin Maaß
9eb8e0c88f drivers: spi: litex: litespi: support interrupts
support interrupts for rx_ready, so we can use the
time we are waiting for other stuff.

implement async spi transfers.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-08-12 21:34:03 +02:00
Fin Maaß
bd7a5790ab drivers: spi: litex: increase SPI_MAX_CS_SIZE to 32
LiteSPI now has support for multiple CS.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-08-12 21:34:03 +02:00
Fin Maaß
1be193bf63 drivers: i2c: litex: remove warnings from CI
remove warnings from CI.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-08-12 21:34:03 +02:00
Fin Maaß
771b6ac07f drivers: i2c: litex: litei2c: support interrupts
support interrupts for rx_ready, so we can use the
time we are waiting for other stuff.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-08-12 21:34:03 +02:00
Michal Smola
c0b439e5ec samples: sensor: accel_trig: Fix harness configuration
Error message HARNESS:Console:no regex patterns configured
is shown when sample.sensor.accel_trig sample is run.
The error occurs because harness configuration is changed
(a fixture is added) in the test case. When the configuration
is changed in a test case, common configuration is not
inherited and required properties need to be redefined.
Add console harness configuration for the test case.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2025-08-12 21:33:52 +02:00
Mahesh Mahadevan
fd3adad019 soc: nxp: rw: Move the code for pin configuration in sleep mode to SoC file
All pins are configured by default to be output low during sleep.
A device-tree property called "sleep-output" is provided for cases where
pins need to be configured differently.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2025-08-12 21:33:34 +02:00
Mahesh Mahadevan
5541f3f18b boards: frdm_rw612: Certain pins need be configured differently in sleep
By default, all pins will be set to output low in sleep. The LED pins
should output high in sleep so that its stays inactive.
The RESET pin of the LCD display should be left high as well in sleep.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2025-08-12 21:33:34 +02:00