Commit graph

24538 commits

Author SHA1 Message Date
Chaitanya Tata
4bd1d39c67 wifi: nrf70: Fix system work queue stack size override
Defaults cannot be overidden (even with configdefault extension), they
only work if the original symbol is defined after the override e.g.,
"drivers and then subsys/net" but for kernel symbols,the default value
overrides don't work due "kernel and drivers" order, the kernel defines
the original symbol with the default and then it cannot be overridden.

Move the kernel symbol override to the original definition to make it
affect. Else any sample that uses nRF70 but doesn't enable WPA
supplicant ends up with 1024 and crashes.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-07-01 19:04:00 -05:00
Gaetan Perrot
7d5902dd1b drivers: akm09918c: fix null dereference in submit function
Fix a null pointer dereference in akm09918c_submit(), where writeByte_sqe
was dereferenced before checking if it was NULL.

Coverity reported this as CID 516247: the pointer returned by
i2c_rtio_copy_reg_write_byte() may be NULL, and accessing its `flags`
field before checking leads to undefined behavior.

Move the access to writeByte_sqe->flags after confirming both
writeByte_sqe and cb_sqe are valid.

Fixes: CID 516247

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-01 19:03:19 -05:00
Mike J. Chen
9eaed805c1 drivers: audio: dmic_mcux: init active_buf_idx when setting up dma
In case the dmic had previous been run and stopped,
make sure active_buf_idx is initialized to 0 when
setting up dma on start, otherwise the dma callback
can return the wrong buffer.

Also purge the rx_queue before freeing the slab buffers,
to minimize risk of any async read request getting
back a slab buffer that is freed.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2025-07-01 19:03:07 -05:00
Declan Snyder
2e0357c4c4 drivers: spi_nxp_lpspi: Fix extra byte issue on v1
The interrupt handling was not deterministic before because it relied
on "guessing" if the lpspi was a v1 type that was stalling due to design
errata. This obviously ended up being wrong in some cases. So we really
need to fix this so that it is deterministic, and my idea to do that is
to explicitly count how many words we have written to the TX fifo
throughout the whole transfer.

As a side effect of making the IRQ more deterministic, we can't support
the SPI_HOLD_ON_CS flag for v1 LPSPI anymore. It is fundamentally
impossible due to the fact that the transfer can only complete in
hardware as a result of CS deasserting. If this is absolutely a
requirement to support this flag in the future, my recommendation is to
update the driver so that it muxes the pin to a gpio before ending the
transfer, but that would kind of defeat the point of having a native CS,
at least at the end of the xfer.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-07-01 11:00:43 -10:00
Ofir Shemesh
b2d7094f15 drivers: ethernet: nxp_enet: Fix PHY configure for fixed-link config
Update the driver to handle -ENOSYS from phy_configure_link(), which is
now returned when the cfg_link callback is missing (e.g., in fixed-link
PHYs).

Signed-off-by: Ofir Shemesh <ofirshemesh777@gmail.com>
2025-07-01 10:59:32 -10:00
Pisit Sawangvonganan
b8a8173c1f drivers: kconfig: fix typo
Utilize a code spell-checking tool to scan for and correct spelling errors
in `Kconfig` files within the `drivers` directory.
Additionally, incorporates a fix recommended by the reviewer.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2025-07-01 10:58:54 -10:00
Cong Nguyen Huu
c52ba71f94 drivers: introduce support Peripheral Sensor Interface (PSI5) driver
This driver allows to communication (send, receive) with PSI5 device

Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
2025-07-01 10:53:59 -10:00
Alberto Escolar Piedras
3197e7a89d drivers/fuel_gauge/lc709203f: Avoid declaring var right after label
Avoid the following clang error
`error: label followed by a declaration is a C23 extension`
by writing this switch case as a codeblock.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-07-01 05:56:25 -10:00
Łukasz Stępnicki
24322c609f drivers: nrf_ironside: dvfs abb analog status workaround
Until register ABB->STATUSANA is visible it must be checked using
defined offset to base ABB register.

Signed-off-by: Łukasz Stępnicki <lukasz.stepnicki@nordicsemi.no>
2025-07-01 10:14:58 -05:00
Fabio Baltieri
b15404f998 uart_bridge: log the device name on bitrate changes
Add a log for the device name on bitrate changes, without this it's very
hard to understand what's going on in a system with multiple bridges.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-06-30 17:39:09 -05:00
Adam Kondraciuk
e77f942cff drivers: timer: nrf_grtc_timer: add last_count initialization
The GRTC counter is not cleared at startup, therefore the
`last_count` variable needs to be initialized accordingly.
This change:
- Prevents overflow of the `sys_clock_announce()` int32_t parameter
- Ensures the correct uptime value, which should be reset during
  initialization

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2025-06-30 15:23:44 -05:00
Tim Lin
0c627e94c8 drivers/pinctrl: ite: Don't clear FUNC3 setting unless alt_func is FUNC3
Previously, FUNC_3 related setting were cleared unconditionally,
regardless of the selected alternate function. This could
unintentionally disable FUNC_3 settings when configuring other
alternate functions.

This change ensures that FUNC_3 gcr/ext bits are only cleared
when alt_func is IT8XXX2_ALT_FUNC_3.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-06-30 15:19:49 -05:00
Imran Sajjad
63ebb75083 soc: imxrt: mimxrt1011 i2s clock fix
Fix for compiling i2s drivers on the NXP mimxrt1010_evk board.
For mimxrt1011, the defines kCLOCK_Sai2... are not defined as the sai2
peripheral does not exist. Trying to compile gives error. Fixed by adding
check for device tree node around code that uses the defines. Also added
same for sai1 and sai3. Thanks @lucien-nxp, @ZhaoxiangJin from NXP.

Signed-off-by: Imran Sajjad <imran.sajjad@iconfitness.com>
2025-06-30 15:19:24 -05:00
Shan Pen
bd2f4ef946 drivers: modem_cellular: fix eg25g dial cmd response
eg25g modem should respond "CONNECT <text> " when run dial cmd "ATD"

Signed-off-by: Shan Pen <bricle031@gmail.com>
2025-06-30 15:16:48 -05:00
Daniel DeGrasse
c8c1bf4131 drivers: modem: modem_cellular: fix variable declaration for clang
Fix variable declaration so that this driver will compile with clang,
which does not support variable declarations within switch statements

Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
2025-06-27 18:28:22 -05:00
Sylvio Alves
1df3403393 soc: esp32c6: add BLE support
Add BLE support to ESP32-C6 series.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-06-27 18:27:15 -05:00
Sylvio Alves
60cd83e6f2 clock: esp32c6: enable and calibrate digital regulators
Enable the RTC-domain and main digital regulators early in clock init,
then load and program the factory/runtime calibrated bias values for
high-power and low-power regulators into the PMU. This ensures the
correct voltage/current settings for stable, low-noise clock operation
in active, modem and sleep modes.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-06-27 18:27:15 -05:00
Yuval Peress
d8d6637a1f i2c_shell: Only include target commands if I2C_TARGET
The extra shell commands are useless unless you also enable
I2C_TARGET. Conditionally include them based on the I2C_TARGET
kconfig.

Signed-off-by: Yuval Peress <peress@google.com>
2025-06-27 18:26:33 -05:00
Mahesh Mahadevan
14b1ba15ac drivers: timer: Fix the logic to compensate the clock when turned off
The original logic relied on the tick passed in. This method
is inaccurate as the tick value passed in was the exit latency.
Update the code to calculate the remaining time left and set
a counter using this value.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2025-06-27 18:21:25 -05:00
Luis Casas
d0f9ccc010 NXP drivers: spi_mcux_flexcomm: Adds PM low-power recovery support
Enables Sleep mode (PM3) in RW61x for SPI.

Signed-off-by: Luis Casas <luis.casas@nxp.com>
2025-06-27 18:20:52 -05:00
Eason Huang
f1b59c2cd2 drivers: i2c_dw: fix request_bytes overflow when receiving > 256 bytes
The original definition of request_bytes as uint8_t caused incorrect
behavior when attempting to receive more than 256 bytes, as the variable
would overflow. This patch changes its type to uint32_t to allow
correct tracking of large I2C transfers.

Signed-off-by: Eason Huang <eason.huang@tronfuture.com>
2025-06-27 09:08:18 -10:00
Raymond Lei
dd90248a3a test: spi_loopback: nxp: Add Flexio spi test support
Add overlay file for RT1170 EVK and simply existing flexio spi overlay
file for RT1060 EVKC and RT1064 EVK. One flexio-spi interface for both slow
and fast tests. Fast baud rate set to 16Mbps now.

Signed-off-by: Raymond Lei <raymond.lei@nxp.com>
2025-06-27 09:05:47 -10:00
Raymond Lei
581e7ff2aa drivers: spi: nxp: flexiospi spi_loopback test failed on flexio spi
Several reason cause loopback test failed:
a) FlexIO input frequency is not correct, on RT11xx, input freq is 24M,
while max baud rate can reach 1/4 of input freq, so it can only support
6Mbps.
b) Flexio shift register depend on correct timer output to triggger TX
and RX, if timer comparison value is not accurate, RX error happens on
high baud rate. This is the reason why test fails on RT1060.

also fix a error on FlexIO clock ID calculation.

Signed-off-by: Raymond Lei <raymond.lei@nxp.com>
2025-06-27 09:05:47 -10:00
Gaetan Perrot
6d0f1aaef8 drivers: sensors: apds9253: remove unnecessary check
gain is an unsigned int so it can't be negative.

Fixes CID 516230

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-06-27 09:04:58 -10:00
Gaetan Perrot
e13f64ac47 drivers: sensor: bmm350: fix redundant return logic in init_chip
Add an explicit log message if setting suspend mode fails during error
handling in bmm350_init_chip(), to improve debuggability.

This addresses Coverity issue CID 520279 (Incorrect expression - CWE-398),
which flagged a conditional block where both branches effectively led to
the same outcome (return -EIO), making it appear redundant.

By adding a log before returning, we clarify the purpose of the condition
and avoid the issue of "identical code for different branches", while
keeping the functional behavior unchanged.

Coverity-CID: 520279

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-06-27 09:04:32 -10:00
Erwan Gouriou
48dc588636 clock_controller: stm32n6: Remove AXISRAM3/4/5/6 clocks handling
Now that they are handled through their dedicated driver, remove
clock activation for AXISRAM3/4/5/6 (which was useless anyway as
RAMCFG part was missing).

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2025-06-27 09:01:52 -10:00
Erwan Gouriou
84619fe8f7 drivers: misc: stm32n6: ramcfg driver
Add a driver to handle AXISRAM3/4/5/6 configurations.
Provide the required changes to add RAM sections into the build system.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2025-06-27 09:01:52 -10:00
sudarsan N
c9be1972b2 gpio: pca_series: fix shift overflow and use 3ULL instead of 0b11
Replaces binary literal with 3ULL to avoid shift overflow and align
with Zephyr coding style.

Fixes: #81963
Fixes: CID 434591

Signed-off-by: sudarsan N <sudarsansamy2002@gmail.com>
2025-06-27 09:00:35 -10:00
Miguel Gazquez
e42cfcf032 drivers: sensor: lsm9ds1: propagate errors in sample_fetch
`lsm9ds1_sample_fetch` did not propagate error codes.
Propagate them.

Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
2025-06-27 08:54:42 -10:00
Peter Wang
f8b14155f0 boards: frdm_mcxa166, frdm_mcxa276: add ostimer support
1. add the ostimer
2. by default, the systick is used.
3. The ostimer could be tested with below configure in xxx.overlay:
&systick {
    status = "disabled";
};

&ostimer0 {
    status = "okay";
};
And below configure in xxx.conf:
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=1000000

Signed-off-by: Peter Wang <chaoyi.wang@nxp.com>
2025-06-27 08:54:06 -10:00
Johann Fischer
5ba44ffd3e usb: host: allow status stage to be omitted
For testing purposes, allow the status stage to be omitted.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-27 08:52:22 -10:00
Johann Fischer
49e2630531 drivers: udc_virtual: drop queued control transfer on new setup packet
Drop the queued control transfer when a new setup packet arrives.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-27 08:52:22 -10:00
Johann Fischer
cd7a6e5e54 drivers: udc: fix buffer leak when the host omits control data stage
The previous setup packet reference will simply be overwritten when the
host omits data (OUT) stage. If a new setup packet arrives before the
previous data stage is complete, free the last setup packet buffer.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-27 08:52:22 -10:00
Kate Wang
826b1187f7 drivers: mipi_dsi: dsi_mcux_2l: support non-contiguous frame buffer
The mipi_dbi_nxp_dcnano_lcdif driver support non-contiguous frame
buffer, so when mipi_dbi_nxp_dcnano_lcdif cannot be used to send
the frame buffer data, the driver needs to check whether the data
is non-contiguous first. If it is then extra methods need to be
applied. First the data of each write must not exceed the line
width, second if each line's data exceeds the max payload, it also
needs to be sent seperately.

Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
2025-06-27 08:49:44 -10:00
Kate Wang
5b06b1871b drivers: display: display_rm67162: update method to transfer frame data
display_rm67162 uses mipi_dsi API(s) to update transfer frame data, some
low level IP can while some cannot handle non-contiguous buffer(the frame
pitch is larger than frame width). In this case, pass the frame descriptor
as the user data in the message to the low level driver and let it
handle how many data to send. The display_rm67162 driver only need to
set the address correctly for each transfer according to the pitch/width.

Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
2025-06-27 08:49:44 -10:00
Pieter De Gendt
f38527035a drivers: watchdog: Place device APIs in linker sections
Use DEVICE_API macro to place driver API instances into a linker section.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-27 10:09:32 -05:00
Pieter De Gendt
bd4d65107d drivers: virtio: Place device APIs in linker sections
Use DEVICE_API macro to place driver API instances into a linker section.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-27 10:09:32 -05:00
Pieter De Gendt
696442fab0 drivers: video: Place device APIs in linker sections
Use DEVICE_API macro to place driver API instances into a linker section.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-27 10:09:32 -05:00
Pieter De Gendt
1a7eb61f02 drivers: serial: Place device APIs in linker sections
Use DEVICE_API macro to place driver API instances into a linker section.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-27 10:09:32 -05:00
Pieter De Gendt
6c6d3523ca drivers: sdhc: Place device APIs in linker sections
Use DEVICE_API macro to place driver API instances into a linker section.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-27 10:09:32 -05:00
Pieter De Gendt
d4139d3d8d drivers: pwm: Place device APIs in linker sections
Use DEVICE_API macro to place driver API instances into a linker section.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-27 10:09:32 -05:00
Pieter De Gendt
70ee055caf drivers: gpio: Place device APIs in linker sections
Use DEVICE_API macro to place driver API instances into a linker section.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-27 10:09:32 -05:00
Pieter De Gendt
ee78942c67 drivers: dac: Place device APIs in linker sections
Use DEVICE_API macro to place driver API instances into a linker section.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-27 10:09:32 -05:00
Pieter De Gendt
c57d76e1e5 drivers: counter: Place device APIs in linker sections
Use DEVICE_API macro to place driver API instances into a linker section.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-27 10:09:32 -05:00
Pieter De Gendt
8e2405207e drivers: clock_control: Place device APIs in linker sections
Use DEVICE_API macro to place driver API instances into a linker section.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-27 10:09:32 -05:00
Pieter De Gendt
5a051b4db3 drivers: can: Place device APIs in linker sections
Use DEVICE_API macro to place driver API instances into a linker section.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-27 10:09:32 -05:00
Pieter De Gendt
efecfe2678 drivers: adc: Place device APIs in linker sections
Use DEVICE_API macro to place driver API instances into a linker section.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-27 10:09:32 -05:00
Guillaume Gautier
dff6673808 drivers: spi: stm32: fix h7 issue with spi_hold_on_cs
STM32H7 spi_loopback test fails since the introduction of a test enabling
SPI_HOLD_ON_CS.
This uncovered an issue where the SPI ISR is constantly called if the SPI
is not disabled, even if the interrupt enable register is completely
cleared.
A workaround is to disable the SPI IRQ at the NVIC level when
SPI_HOLD_ON_CS is used.


Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-06-27 10:05:23 -05:00
Mert Ekren
b6085ef997 drivers: spi: MAX32657 fix related to register name change
MAX32657 introduces changes for registers named (master, slave) to
(controller, target) this causes build issues

Signed-off-by: Mert Ekren <mert.ekren@analog.com>
2025-06-27 10:01:27 -05:00
Josuah Demangeon
a1ef239249 drivers: video: dcmi: fix DMA channel configuration
Commit 64149e4df6 added an "#if defined()"
for configuring DMA channels differently depending on SOC family of the
STM32 HAL, but did not include the STM32H7 family in the same group as
STM32F7. Fix it by adding the STM32H7 in the same #ifdef filter.

Fixes #92015

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-06-27 10:00:35 -05:00