Commit graph

24538 commits

Author SHA1 Message Date
Mathieu Choplain
fcd30046cb drivers: pinctrl: stm32: add support for STM32N6 pinctrl
Modify the STM32 pinctrl driver and SoC-specific pinctrl macros
to introduce support of the st,stm32n6-pinctrl variant.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2025-06-20 13:21:55 -04:00
Colin Evrard
97f9411f32 drivers: adc: esp32: check reference at compile time
Check that the channels are configured with the reference
ADC_REF_INTERNAL when compiling the driver.

Signed-off-by: Colin Evrard <colin.evrard@mind.be>
2025-06-20 16:24:09 +02:00
Hoang Nguyen
87177d1ac4 drivers: gpio: rz: improve gpio driver for Renesas RZ/A2M
- Adding support for GPIO_DISCONNECTED mode.
- Removing redundant interrupt configuration logic from the
.pin_configure API (already handled in pin_interrupt_configure).

Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Tien Nguyen <tien.nguyen.zg@renesas.com>
2025-06-20 16:24:01 +02:00
Maochen Wang
7e3f5814e4 drivers: wifi: nxp: only enable NXP_WIFI_TC_RELOCATE for RW612
Only by default enable NXP_WIFI_TC_RELOCATE for RW612, which will
relocate traffic API into RAM. But for other platform, for example
the RT series, the ITCM/DTCM is a more suitable place for critical
code.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2025-06-20 16:23:52 +02:00
Nick Ward
3b05fd12a5 drivers: gnss: tidy satellite count kconfig symbols
CONFIG_GNSS_LUATOS_AIR530Z_SATELLITES_COUNT
and CONFIG_GNSS_U_BLOX_M8_SATELLITES_COUNT
would unnecessarily be in .config file.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2025-06-20 16:23:43 +02:00
Benjamin Cabé
d5af2f7dde drivers: sensors: fxls8974: fix compilation error in fxls8974_transceive
SPI code wasn't tested in CI so this compilation error was missed.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-20 16:23:25 +02:00
Andrzej Głąbek
8415f7f7a7 drivers: flash_mspi_nor: Omit quad_enable_set() when QER is set to NONE
When the quad-enable-requirements property is set to "NONE" or is not
present, no Quad Enable operation should be performed.
This fixes an issue with the mx25uw6345g flash chip that is present
on the nRF54h20 DK and supports the Single I/O mode, but cannot be
used in that mode.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2025-06-20 16:22:58 +02:00
sudarsan N
48bbbfe976 drivers: video: fix NULL dereference in mipid02_get_fmt
Category: Null pointer dereference (CWE-476)

Corrects the logic that validates the result of mipid04_get_format_desc().
Previously, the check was inverted, which could lead to a NULL pointer
dereference when accessing desc->pixelformat.

Fixes Coverity CID: 525183

Signed-off-by: sudarsan N <sudarsansamy2002@gmail.com>
2025-06-20 11:50:49 +01:00
Qingling Wu
2016f05860 drivers: nxp: wifi: Enable 11AX density config by default for IW610
Enable NXP_WIFI_MMSF by default for IW610

Signed-off-by: Qingling Wu <qingling.wu@nxp.com>
2025-06-20 08:52:53 +02:00
Phi Bang Nguyen
10deca2ef6 drivers: video: Fix skipped CIDs when enumerating controls
When enumerating controls with VIDEO_CTRL_FLAG_NEXT_CTRL, if child devices
have controls with IDs lower or equal to the ones in the parent devices,
those controls will be accidentally skipped.

Fix this by resetting the query's ID and tracking of the queried device in
the query when moving to the next device in the pipeline.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-06-19 22:37:54 -07:00
Jilay Pandya
d25b1d1959 drivers: stepper: add check for inval resolution in set_microstep_res
Add check for invalid microstep resolution directly in api to avoid the
check in each and every driver
Set microstep resolution is made a mandatory function now as all
stepper drivers support it and hence should implement it

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-06-19 22:35:51 -07:00
Erwan Gouriou
41664ebda0 drivers: memc: stm32 psram: Fix XSPI configuration for performance
Correct XSPI configuration in order to improve PSRAM access on the
STM32N6 discovery board.
Ideally, this should be defined by device tree, but I'm fixing
the only user for now.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2025-06-19 22:33:37 -07:00
Hao Luo
f1348d3954 drivers: i2c: ambiq: buffer overflow issue fixed
Bugfix for possible out-of-bounds operation when buffer address
is not 4 bytes aligned

Signed-off-by: Hao Luo <hluo@ambiq.com>
2025-06-19 22:31:06 -07:00
Khaoula Bidani
f568b0d68a drivers: adc: update adc driver to integrate stm32u3
add u3 config_soc conditions in adc driver to handle
news peripherals.

Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
2025-06-19 22:27:35 -07:00
Kate Wang
e2d97c7ca6 drivers: video: ov7670: update the camera init sequence
The previous initialization sequence fails to configure the module
properly. Update the sequence using the code provided by vendor.
The update is verified using the FRDM-MCXN947 SmartDMA camera case
under samples/drivers/video/capture.

Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
2025-06-19 14:04:45 +02:00
Joakim Andersson
e5093f41b2 drivers: flash: Fix timeout handling in STM32 flash driver
Fix timeout error that can occur in rare case.
When the thread writing to flash is pre-emptive it can be scheduled
out after reading the status register, but before checking if timeout
has expired. In this case it will report timeout without re-checking
the status register.

When writing a lot to flash, for example a firmware update process
then this situation is very likely to occur.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2025-06-19 14:02:32 +02:00
Benjamin Cabé
45920741dc drivers: adc: max1125x: fix typo in GPIO config
Corrected the property assignment for gpo0_enable.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-19 14:01:31 +02:00
Benjamin Cabé
6c4ed097ff drivers: pwm: Fix priority handling for Renesas RA
Fixed a typo causing interrupt priority from DT to be ignored.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-19 14:00:21 +02:00
Alain Volmat
b1e55bd342 display: stm32: ltdc: add SMH buffer alignment config option
Add the CONFIG_STM32_LTDC_FB_SMH_ALIGN option in order to
indicate the alignment required for the buffer allocated via
SMH.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-06-19 13:57:51 +02:00
Alain Volmat
b7f73710b2 memc: stm32_xspi_psram: init shared_multi_heap area
Initialize the whole psram as a shared_multi_heap_area
if SHARED_MULTI_HEAP is enabled.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-06-19 13:57:51 +02:00
Declan Snyder
84d2f7f4de spi_nxp_lpspi: Fix extra byte sent on v1 lpspi
This stupid errata will not leave me alone, here is another bandaid to
deal with an issue where an extra byte was being sent on version 1
LPSPIs due to the algorithm of filling NOPs when only RX is left was not
expecting the situation where the LPSPI actually consumed everything
from the fifo but is not sending it due to this ridiculous stalling errata.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-06-18 17:51:19 -04:00
Declan Snyder
f6a9a1f3bc spi_nxp_lpspi: Fix unit of buf_len in fill_tx_fifo
The buf_len parameter of lpspi_fill_tx_fifo is supposed to be bytes, so
we do not need to convert it. This could cause an issue if the end of
the buffer is less bytes than the word size.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-06-18 17:51:19 -04:00
Declan Snyder
e9d964f628 spi_nxp_lpspi: Fix fifo fill logic
Fixing some issues with the TX fifo fill logic in two places:

First in the normal fill function, it didn't take into account a
situation where the TX fifo is already partially filled. This currently
doesn't cause a problem because the driver is written in a way that the
watermark is always 0 for TDF, but in case the watermark were anything
else it would cause a problem.

Second, when filling the TX fifo with NOPS in order to clock the rest of
the RX in from the bus, the calculation regarding the current TX fifo
length was just wrong and was leading to a bug in some cases where there
was a subtraction underflow and billions of NOPs were being filled.
Also, there could be a problem where a few extra NOPs are put in the TX
fifo if we don't count what we already have in the TX fifo, so fixing
that as well.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-06-18 17:51:19 -04:00
Declan Snyder
7aa0778901 spi_nxp_lpspi: Simplify tx ctx update
There is no need to update the tx context in interrupt instead of
directly after the fill, this just makes the code more complex. Also,
the spi context header already handled iterating over buffers so we can
remove that code too.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-06-18 17:51:19 -04:00
Declan Snyder
877fa975cc spi_nxp_lpspi: Remove MCUX branding
Since the LPSPI drivers no long use MCUX at all, remove the MCUX
branding, to avoid confusion. In the future if an implementation uses
the MCUX SDK driver, it should specifically be called by MCUX in the
name.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-06-18 17:51:19 -04:00
Declan Snyder
2aad9ebb78 spi_nxp_lpspi: Remove call to MasterInit
For optimization purpose, remove calls to SDK. Since we know exactly
what we want, this results in smaller code size.

Also, this code calculates the SCK parameters more efficiently than the
SDK driver did it by using a binary (instead of linear) search.

Lastly, remove call to LPSPI_Reset in the init call and replace with
native driver code, and remove inclusion of SDK header.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-06-18 17:51:19 -04:00
Declan Snyder
c0e3ec7f08 spi_nxp_lpspi: Add maximum wait time of fifo empty
Instead of waiting forever and potentially allowing infinite loop on
ISR, wait some arbitrary amount of cycles to error out if it isn't
happening. Still make this configurable for debugging purposes.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-06-18 17:51:19 -04:00
Declan Snyder
691e7598ff spi_nxp_lpspi: Add version ID to data struct
Since I expect that the drivers will need to read this version ID maybe
multiple times, instead of repeatedly doing so over the peripheral bus,
it is probably worth it to store a byte in RAM representing this
version. The behavior of the LPSPI is fairly significantly different
between versions. Not enough to warrant separate drivers but enough to
need a few workarounds or different code branches depending on this.

Also, the interrupt based driver is currently using a wrong macro to
read this, and that is a bug.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-06-18 17:51:19 -04:00
Declan Snyder
aeedf86da6 spi_nxp_lpspi: Clarify configuration function
Clarify at the top of the common lpspi file what is the purpose of the
file to be clear to future developers that this file is not supposed to
make any assumption about a particular implementation of the zephyr API
using the LPSPI, because I imagine it could be very likely that more
lpspi implementation will be done in the future to make different
tradeoffs than the current two. Also the current two are different
enough that we should avoid making assumptions even if they currently
hold for both because they might not always, as things change.

We should disable interrupt events while configuring the LPSPI
regardless of implementation. The specific implementation should enable
the interrupts it needs on its own transceive implementation.

Also clarify and simplify some code in the configure function. Namely,
we no longer need to check if we are already configured to write to
registers because a recent commit made it so that we clock the
peripheral from the zephyr driver init instead of upon the MasterInit
call on the SDK. There is also a redundant CR write which I have removed.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-06-18 17:51:19 -04:00
Declan Snyder
2aa9ec43dc spi_nxp_lpspi: Remove dev pointer from data struct
The dev pointer in the data struct is not being used, so remove it.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-06-18 17:51:19 -04:00
Mahesh Mahadevan
bfd5fab28a drivers: pinctrl: Do not confgure sleep pins in NXP MCI IOMUX driver
The sleep-output property is no longer used. This results in the sleep
bit to be always cleared. Delete this code so we can retain any sleep
mode configuration done.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2025-06-18 17:50:48 -04:00
Pieter De Gendt
a540ee6143 drivers: hdlc_rcp_if: Add HDLC SPI adapter driver
Implement the HDLC over SPI adapter driver to support the Openthread RCP
with SPI communication.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-18 17:50:31 -04:00
Pieter De Gendt
b24085ddda drivers: hdlc_rcp_if: Select EVENTS
The HDLC platform implementation uses the k_event API.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-18 17:50:31 -04:00
Van Petrosyan
04057e15ec sensor: lps22hh: clang-format cleanup
Style-only reformatting, no functional change.

Signed-off-by: Van Petrosyan <van.petrosyan@sensirion.com>
2025-06-18 17:50:22 -04:00
Van Petrosyan
1aa07db0ae sensor: lps22hh: add device power management support
Registers driver with pm_device_driver_init(); implements TURN_ON,
SUSPEND and RESUME.  Sets ODR = 0 on suspend per datasheet

Signed-off-by: Van Petrosyan <van.petrosyan@sensirion.com>
2025-06-18 17:50:22 -04:00
Declan Snyder
3d8196f41b drivers: nxp_enet: Use hwinfo API for unique mac
Use the HWINFO API for getting the unique mac address, and use the
pre-existing hardcoded macros as fallbacks if hwinfo is not implemented
properly.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-06-18 17:49:41 -04:00
John Shelton
3b2103f5f7 sensor: dht: Fix multi-instance type handling
The DHT driver incorrectly assumes all sensor instances are the same
type as the first instance (dht@0). The data parsing logic uses a
hardcoded check of the devicetree property for instance 0, which
causes incorrect readings when different sensor models (e.g., DHT11
and DHT22) are used together.

This change stores the model type in each per-instance config struct
during initialization. The data parsing logic is updated to use this
per-instance flag, ensuring each sensor is handled correctly
according to its specific model.

Signed-off-by: John Shelton <moosery@gmail.com>
2025-06-18 17:48:58 -04:00
Anas Nashif
41922b35e4 drivers: uart: make ISR function static to match existing declaration
Declaration of the same function should match and be static.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-06-18 17:48:03 -04:00
Benjamin Cabé
0f6b3f066a drivers: sensors: add missing const qualifiers
Ensure conversion tables and the like are marked as const to save on
RAM usage.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-18 17:47:18 -04:00
Benjamin Cabé
e3a7a32334 drivers: video: mt9m114: add missing const qualifiers
Ensure that the various configuration tables are marked as const to save
on RAM usage.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-18 17:46:35 -04:00
Marek Matej
720db7bf5e drivers: wifi: esp32: Fix buffer config
Prevent to allocate buffers cache if Wi-Fi heap is not used.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2025-06-18 17:46:03 -04:00
Jori Rintahaka
0d5ed7c306 drivers: bluetooth: hci: silabs: fix radio IRQ priorities
Fix radio IRQ priorities. With the Controller update from SiSDK,
its behavior changed so that it overwrites the IRQ priorities.

Reconfigure the priorities after the Controller is initialized.
Source interrupt numbers and priorities from devicetree.

Also set the SYNTH IRQ priority on all HW, and set either the
RDMAILBOX or HOSTMAILBOX IRQ depending on which one exists.

Signed-off-by: Jori Rintahaka <jori.rintahaka@silabs.com>
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-06-18 17:45:51 -04:00
Jori Rintahaka
133f5bc3c2 drivers: bluetooth: hci: refactor silabs controller init
Refactor the controller init to use the new init routines the
controller now provides. Instead of using a hardcoded set of
features, the features are now initialized based on Kconfig
values that the application selects.

Add config files under modules/hal_silabs, used by the controller
init routines in the external module hal_silabs to determine which
features to enable based on Kconfig options. This brings the
controller feature configurability to roughly parity with the
Simplicity SDK.

Signed-off-by: Jori Rintahaka <jori.rintahaka@silabs.com>
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-06-18 17:45:51 -04:00
Benjamin Cabé
af6209dbcb drivers: sensors: tdk: icp201xx: fix typo in icp201xx_channel_get
s/pressure/temperature/

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-18 17:44:07 -04:00
Benjamin Cabé
e6bd3b4f3e drivers: sensors: icp101xx: add missing error check
add missing variable assignment causing error code to be ignored

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-18 17:44:07 -04:00
Benjamin Cabé
013abd89ff drivers: memc: smartbond: add missing break statement in pm_action
Add a missing break statement in the pm_action function to ensure that
PM_DEVICE_ACTION_RESUME is not treated as an error.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-18 09:31:30 -04:00
Benjamin Cabé
380dcddac8 drivers: espi: npcx: fix compilation errors
Fix code that couldn't compile due to typos

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-18 09:31:08 -04:00
Benjamin Cabé
e936d7759c drivers: dma: dma_iproc_pax_v1: fix variable name in logging macro
Corrected the variable name from 'xfer_size' to 'xfer_sz' in
iproc-pax-dma-v1 driver.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-18 09:30:55 -04:00
Fin Maaß
cf8049a9ed drivers: ethernet: phy: tja11xx: Wrap driver instances in device API macro
Use the device API macro to place the driver API instance into an iterable
section.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-06-18 09:30:43 -04:00
Hui Bai
4868c8acae drivers: wifi: nxp: Host sleep handshake enhancement
To reduce low power current value, added host sleep handshake
enhancement. If CPU3 is wokenup by WLAN, do host sleep handshake with
CPU1 as before. For other wakeup sources, skip host sleep handshake.

Signed-off-by: Hui Bai <hui.bai@nxp.com>
2025-06-18 09:30:28 -04:00