Commit graph

23353 commits

Author SHA1 Message Date
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
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
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
Jimmy Zheng
21f0ee0383 driver: interrupt_controller: rename intc_nuclei_eclic to intc_clic
Rename intc_nuclei_eclic to intc_clic, and separate CLIC register
definitions into intc_clic.h.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2025-04-04 14:55:50 +02:00
Serhiy Katsyuba
7f818b5e72 Revert "drivers: dma: intel_adsp_hda: change L1_EXIT defaults"
This reverts commit c2f02533a6.

DMA_INTEL_ADSP_HDA_TIMING_L1_EXIT should be enabled for all ACE platforms.
Any new platform in the ACE series will likely need it as well.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2025-04-04 12:07:08 +02:00
Johann Fischer
1ac9b14804 drivers: udc: fix it82xx2 and numaker drivers compilation
The dev argument is missing.
Introduced in the commit 1cccf28d5e
("drivers: usb: udc: Reduce unnecessary ep config lookups").

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-04-04 12:06:50 +02:00
Julien Racki
c888760663 drivers: clock: Add stm32mp13 clock
Add STM32MP13 clock driver.
Supported clocks are HSE, HSI, PLL1 and peripheral clock.

Signed-off-by: Julien Racki <julien.racki@st.com>
Co-authored-by: Arif Balik <arifbalik@outlook.com>
2025-04-04 09:35:03 +02:00
Victor Brzeski
a1edfb41fd drivers: gpio: fix pcal6534 by updating register map
The PCAL6534 driver simply doesn't work. This is
due to an incorrect mapping of commands to pcal6534
registers.

Signed-off-by: Victor Brzeski <vbrzeski@meta.com>
2025-04-04 09:34:41 +02:00
Wenxi Xu
7dc2c15fd3 drivers: can: stm32_bxcan: fix filter config
Setting the filter registers in master CAN requires initializing master
CAN first. CONFIG_CAN_MAX_EXT_ID_FILTER banks are reserved for IDE
frames. Previously we set FS1R(CAN filter scale register) at init time,
but it is possible that the master CAN is not initialized at that time.
That is when the filter banks are not set correctly, causing that we get
wrong filter_id from slave CAN. This patch fixes the issue by setting
FS1R at the time of initializing master CAN.

Tested on:
STM32F407IGH6 with 2 std_id and 2 ext_id on each of CAN1 and CAN2.

Signed-off-by: Wenxi Xu <xuwenxi0517@gmail.com>
2025-04-04 09:34:30 +02:00
Andrew Featherstone
ed168d6e7b docs: raspberrypi: Correct capitalization of Pico
In the context of Raspberry Pi's product line, this is Pico, not PICO.

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2025-04-03 15:27:50 -07:00
Andrew Featherstone
a2aa0a3e2b docs: raspberrrypi: Correct names of products
Replace occurrences of "RaspberryPi" with "Raspberry Pi" in
documentation, comment blocks etc. Correct the name of "PicoW" to
"Pico W", matching Raspberry Pi's documentation at
https://www.raspberrypi.com/documentation/microcontrollers/pico-series.html .

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2025-04-03 15:27:50 -07:00
David Cerrone
bbaaac999f drivers: sensor: current_amp: add calibration option
Allow the option to enable or disable calibration of the ADC.

Signed-off-by: David Cerrone <davidcerrone@gmail.com>
2025-04-03 15:26:36 -07:00
Martin Hoff
13bdc3cebd drivers: serial: silabs: add __maybe_unused to eusart dma callback
The callback function for the DMA is not used in the case where no DMA
properties are given in the esuart node in the device tree. It causes
a warning in the CI build.

Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
2025-04-03 17:48:36 +02:00
Ravi Dondaputi
429bf84542 wifi: nrf_wifi: Adjust default heap size for driver init failures
Reconfigure DATA heap sizes to fix the driver init failures.

Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
2025-04-03 17:48:28 +02:00
Caio Barz Molinari
e57cf1e5ce drivers: video: ov5640: add support to QVGA and QQVGA in CSI mode
The ov5640 driver already supports QVGA and QQVGA in dvp mode but not
in CSI mode. This PR adds support for these resolutions in CSI mode.

Signed-off-by: Caio Barz Molinari <caioheitor.barzmolinari_1@nxp.com>
2025-04-03 13:16:20 +02:00
Arunmani Alagarsamy
d5b2507a13 drivers: wifi: siwx91x: Add Wi-Fi version command support
Add support for the Wi-Fi version command to retrieve
the Wi-Fi firmware and driver version information.

Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
2025-04-03 13:15:55 +02:00
Murali Thokala
03c5f5f083 drivers: wifi: Swctrl1 configuration for coex
Support to configure swctrl1 as input or output for coexistence.

Signed-off-by: Murali Thokala <Murali.Thokala@nordicsemi.no>
2025-04-03 11:08:15 +02:00
Kapil Bhatt
a934af8f89 drivers: nrf_wifi: Add Kconfig for ps poll and stbc
Add Kconfig in init command for maximum ps poll failures count
and stbc enable in HT.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2025-04-03 11:08:15 +02:00
Chaitanya Tata
0cf47478ee drivers: nrf_wifi: Add a new stats command that reads from memory
Instead of a command and event mechanism that relies on processors being
active (UMAC/LMAC) add a new command that reads from the RPU memory
directly for all stats, useful in debugging when processors are
crashed/non-functional.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-04-03 11:08:15 +02:00
Guillaume Gautier
f9a3c5424c drivers: disk: stm32 sdmmc: add stm32n6 support
Add STM32N6 to the list of series that support HWFC for SDMMC

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-04-03 11:07:33 +02:00
Sai Santhosh Malae
9594af85f0 drivers: dma: siwx91x: Enable scatter-gather transfer support
Implement support for scatter-gather DMA transfers in the siwx917 driver.
This enhancement allows the driver to handle multiple non-contiguous memory
buffers in a single DMA transaction

Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
2025-04-03 11:07:12 +02:00
Sai Santhosh Malae
6c9ec8d1c0 drivers: dma: siwx91x: Fix callback assignment for each DMA channel
Updated the driver to ensure that each DMA channel can properly
assign and handle individual callbacks.

Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
2025-04-03 11:07:12 +02:00
Sai Santhosh Malae
8d3bb53495 drivers: dma: siwx91x: Add chan_filter API for DMA channel assignment
This new API allows the assignment of desired DMA channels for
peripheral transfers, enhancing flexibility and control over DMA
operations.

Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
2025-04-03 11:07:12 +02:00
Sai Santhosh Malae
8930aed8d4 drivers: dma: siwx91x: Integrate dma_context features
Refactored the driver code to ensure compatibility with the
dma_context API, improving maintainability and consistency
with other DMA drivers in the Zephyr project.

Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
2025-04-03 11:07:12 +02:00
Sai Santhosh Malae
ab57d54bb0 drivers: dma: siwx91x: Fix burst length processing
1. Corrected the burst length processing to be handled in bytes
   for the siwx917 DMA drivers.
2. Removed overlay and configuration files associated with the
   chan_blen_transfer test application. The chan_blen_transfer
   test application attempted to use 8 and 16 byte bursts, which
   are not supported by the siwx91x UDMA.

Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
2025-04-03 11:07:12 +02:00
Kevin ORourke
dfe2848aeb style: Fix formatting
CI compliance checks demanded reformatting.

Signed-off-by: Kevin ORourke <kevin.orourke@ferroamp.se>
2025-04-03 11:06:53 +02:00
Kevin ORourke
9e2752d9d8 drivers: eth: phy_mii: Don't block system workqueue
Looping while waiting for auto-negotiation to complete can block the
system workqueue for several seconds.

Signed-off-by: Kevin ORourke <kevin.orourke@ferroamp.se>
2025-04-03 11:06:53 +02:00
Jordan Yates
8f53407fa6 serial: cmsdk_apb: fix irq_is_pending
Implement `irq_is_pending` in terms of the `irq_rx_ready` and
`irq_tx_ready` function calls.

Using `intstatus` directly results in an implementation that does not
conform to the interrupt driven UART API. Since `intstatus` bits are
only only set when a buffer transitions from full to empty, any calls to
`irq_is_pending` before any bytes have been sent will return 0. This is
problematic since the documented implementation for the API IRQ handler
is:
```
while (uart_irq_update(dev) && uart_irq_is_pending(dev)) {
    if (uart_irq_rx_ready(dev)) {
        ...
    }
    if (uart_irq_tx_ready(dev)) {
        uart_fifo_fill(dev, ...);
    }
}
```
If `uart_irq_is_pending` does not return 1 until the first byte is sent,
we never end up pushing data to be transmitted into the `uart_fifo_full`
function.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-04-03 08:43:37 +02:00
Khaoula Bidani
ba1ad38f99 drivers: usb: udc: simplify code of maximum-speed
Add defines to avoid magic values in the dtsi.
Replace usb_dc_stm32_get_maximum_speed() with device tree property.
- Use DT_INST_STRING_UPPER_TOKEN(0, maximum_speed) to set the USB speed.
- Remove PCD_SPEED_FULL initialization.

Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
2025-04-03 08:43:29 +02:00
Khaoula Bidani
01ddccdf62 drivers: usb: device: simplify code of maximum-speed
Add defines to avoid magic values in the dtsi.
Replace usb_dc_stm32_get_maximum_speed() with device tree property.
- Use DT_INST_STRING_UPPER_TOKEN(0, maximum_speed) to set the USB speed.
- Remove PCD_SPEED_FULL initialization.

Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
2025-04-03 08:43:29 +02:00
Peter Wang
5309c93944 drivers: flash: update flash_mcux to support all mcxa family device
update flash_mcux driver to support all mcxa family device

Signed-off-by: Peter Wang <chaoyi.wang@nxp.com>
2025-04-03 08:43:16 +02:00
Khanh Nguyen
7ae800a0c9 drivers: timer: Add ULPT timer for power management on Renesas RA MCUs
drivers:
- Added ULPT timer driver in `renesas_ra_ulpt_timer.c`.
- Updated `clock_control_renesas_ra_cgc.c` for ULPT clock settings.
- Updated `uart_renesas_ra8_sci_b.c` for power management support.
- Updated `CMakeLists.txt` and `Kconfig` to integrate ULPT timer.
- Added `Kconfig.renesas_ra_ulpt` for ULPT-specific configurations.

dts bindings:
- Added `renesas,ra-ulpt.yaml` for ULPT node bindings.
- Added `renesas,ra-ulpt-timer.yaml` for ULPT timer bindings.

modules:
- Updated `Kconfig.renesas_fsp` to support ULPT and LPM.

Signed-off-by: Khanh Nguyen <khanh.nguyen.wz@bp.renesas.com>
2025-04-03 08:41:08 +02:00
Nhut Nguyen
8f2879a156 drivers: gpio: rz: Fix a build error
Fix a build error of redefinition of a variable in gpio_renesas_rz.h

Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
2025-04-03 06:25:06 +02:00
S Mohamed Fiaz
701be0c331 driver: sleeptimer: siwx917: Add siwx91x Sleeptimer driver
This commit enables the Sleeptimer driver support for the siwx917 device.

Signed-off-by: S Mohamed Fiaz <fiaz.mohamed@silabs.com>
2025-04-03 06:24:54 +02:00
Tom Hughes
d5d12f43f8 drivers: dma_wch: Add __used instead of disabling unused function warning
#84065 replaced diagnostic pragmas with TOOLCHAIN_* macros, but we don't
need to use that here since __used is a cleaner way to indicate that the
function is used and will also prevent it from being optimized away at
link time if LTO is enabled.

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-04-03 06:24:44 +02:00
Ibe Van de Veire
d890630e02 drivers: eth: native_tap: Add MAC parameter input from cmd line
Add the ability to set the MAC address from the command line when
running a native sim build.

Signed-off-by: Ibe Van de Veire <ibe.vandeveire@basalte.be>
2025-04-03 00:05:47 +02:00
Jilay Pandya
6bfea730b1 doc: migration-guide: 4.2: add migration guide entry for enable
- Add migration guide entry for enable->enable/disable function
- Add stepper_disable to stepper.rst

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-04-03 00:03:29 +02:00
Jilay Pandya
d18f49132c drivers: stepper: refactor enable(dev,flag) to enable & disable
refactoring enable function into enable and disable increasing readability
and increasing coherence with other stepper apis in terms of
nomenclature

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-04-03 00:03:29 +02:00
Bjarki Arge Andreasen
bfd200bdb4 drivers: clock_control: add nrfs_audiopll clock driver
Add NRFS AudioPLL clock control device driver.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-04-03 00:03:14 +02:00
Hao Luo
8b60fa834c drivers: mfd: Add ambiq iom binding file
This commit adds ambiq iom binding file to consolidate
spi and i2c that share the same IO Master module on
Apollo MCUs

Signed-off-by: Hao Luo <hluo@ambiq.com>
2025-04-02 19:02:56 +02:00