Commit graph

24538 commits

Author SHA1 Message Date
Alain Volmat
7d447a1dda drivers: clock: stm32: add PLLSAI2 support (common + L4)
Add stm32 common clock handling for the SAI2 PLL.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-08-20 09:28:02 +02:00
Alain Volmat
0abbc2f0f3 drivers: clock: stm32: add PLLSAI1 support (common + L4)
Add stm32 common clock handling for the SAI1 PLL.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-08-20 09:28:02 +02:00
Mike J. Chen
d47353928c drivers: dma_mcux_lpc: fix missing peripheral case
Change 4e0e3c990d caused
a regression in that SPI_MCUX_FLEXCOMM_TX DMA
transfers weren't properly set to be a peripheral
transfer.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2025-08-20 07:40:13 +02:00
Declan Snyder
0f66420cb2 drivers: mcux_edma: Fix dtcm desc kconfig dep
The syntax was wrong for the chosen dtcm node. Also fixing build error
on 1180 by re-allowing the symbol on some tests.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-08-20 07:39:54 +02:00
Dmitrii Sharshakov
3835d9ae0f sensor: adltc2990: correct emulator implementation
Fix an out of bounds access found by ASan.

Also remove mock_i2c_reg_error which seems to never be read.

Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
2025-08-20 02:17:53 +02:00
Dmitrii Sharshakov
81455310b3 fuel_gauge: sy24561: improve emulation
Fix issues found by ASan, log register writes for inspection using
console harness.

Fixes: 5f84be617e

Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
2025-08-20 02:17:37 +02:00
Jonas Berg
41a0060338 Drivers: GPIO: Allow AW9523 to be used without interrupts
There will be an compilation error if there is no interrupt GPIO defined
in the device tree file, as parts of the config and data structs
have #if that depends on the presence of interrupt GPIO.

Use the same #if constructs also on the functions that use those
structs.

Signed-off-by: Jonas Berg <jonas.s.t.berg@gmail.com>
2025-08-20 02:16:57 +02:00
Mahesh Mahadevan
95e274b866 drivers: pinctrl_mci_io_mux: Fix sleep output configuration
The sleep output configuration should be skipped for pins
22 to 28.
This was causing incorrect GPIO wakeups when entering
standby mode on RW612.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2025-08-19 23:36:38 +02:00
Jilay Pandya
1e34d479eb drivers: step_dir: refactor stepper_handle_timing_signal
1. Reduce the spinlock scope in stepper_handle_timing_signal
2. perform a step each time the timing signal is called
3. Increment/Decrement actual_position and steps using atomics

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-08-19 23:36:20 +02:00
Jilay Pandya
3314473589 drivers: stepper: move_by(dev,0) shall return steps_completed
move_by(dev,0) shall stop the timing source and trigger
STEPPER_EVENT_STEPS_COMPLETED event

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2025-08-19 23:36:20 +02:00
Mahesh Mahadevan
4da30d01b8 drivers: mcux_os_timer: Handle counter overflow in Power Mode 3
The counter that is used in Power Mode 3 to track System time could
overflow for large timeouts.
Add an API that the power system could use to ignore wakeup events
from the timer.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2025-08-19 23:35:32 +02:00
Pieter De Gendt
300016c801 drivers: ethernet: stm32: Set LAA bit on MAC address based on device ID
The MAC addressed derived from the device ID is not assigned by the
manufacturer and therefor the Locally Administered Address (LAA) bit should
be set.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-08-19 19:14:45 +02:00
Tim Pambor
120f5a073c serial: uart_native_pty: IRQ support
Add support for the interrupt-driven API. Interrupts are
emulated using a polling thread.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-08-19 19:14:21 +02:00
Jackson Farley
bfdfa2086f serial: Add error checking and interrupt support on mspm0 driver
It is now possible to enable CONFIG_UART_INTERRUPT_DRIVEN for mspm0
uart driver.

Signed-off-by: Jackson Farley <j-farley@ti.com>
Co-authored-by: Hans Binderup <habi@bang-olufsen.dk>
2025-08-19 19:13:34 +02:00
Joel Guittet
3e3ceeae49 drivers: serial: add uart-bitbang support
Initial support for uart bitbang driver.

Signed-off-by: Joel Guittet <joelguittet@gmail.com>
2025-08-19 19:13:19 +02:00
Lucien Zhao
5aa600d117 drivers: hwinfo: add hwinfo_mcux_rstctl.c drivers
Implementation is specific to RSTCTL module.
Code mostly copied from hwinfo_mcux_rcm driver.

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2025-08-19 18:00:53 +02:00
Sri Surya
acdf69be17 drivers: serial: pl011: Add support for Ambiq Apollo2 SoC UART
Added UART Support for Apollo2 SOC and cleanup.

Signed-off-by: Sri Surya <srisurya@linumiz.com>
2025-08-19 18:00:41 +02:00
Sri Surya
3d91929346 drivers: pinctrl: Add pinctrl driver for Apollo2 SoC
This commit adds pinctrl support for Apollo2 SoC.

Signed-off-by: Sri Surya <srisurya@linumiz.com>
2025-08-19 18:00:41 +02:00
Minh Tang
3f13f25752 drivers: adc: Initial support for ADC driver on RX130
Add driver code and devicetree for 12-bit ADC on
RX130 MCU

Signed-off-by: Minh Tang <minh.tang.ue@bp.renesas.com>
2025-08-19 14:15:41 +02:00
Krzysztof Chruściński
804e502484 drivers: clock_control: nrf: Add missing flags clearing
When BT dedicated API was turning off the HF clock it was not resetting
status flags. When onoff API was attempting to request HF clock after
that it was detecting unexpected state as status flag was indicating
as if HF clock was on.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-08-19 13:02:44 +02:00
Jakub Zymelka
138f977704 drivers: adc: nrfx: enable negative values for single-ended ADC readings
The ADC driver API already supports ADC readings which can return signed
values, these are differential readings. In Nordic's datasheet, we have
a mode called "single ended", but its just a name. "Single ended" is a
differential reading, with the negative channel tied to GND. This is not
compatible with zephyrs definition of a single ended reading.

To support Nordic's "single ended" mode, the user must configure
a differential reading, with the negative input tied to ground, which
the saadc driver can then use to configure the reading as Nordic SAADC
"single ended", and return negative values as expected.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2025-08-19 13:02:21 +02:00
Khaoula Bidani
985d49c18b drivers: clock_control: fix PLL input frequency
Updated the PLL input frequency calculation to include
division by the HSI clock divider.
Enable HSI divider using LL_RCC_HSI_EnableDivider().

Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
2025-08-19 12:27:17 +03:00
Aditya Ganesh
38b40ed16e drivers: dac - Added additional channel selection support for AD5686
Added support for selecting channels A, B, both together, and all channels
on the AD5686 DAC driver. This improves flexibility for multi-channel
DAC applications.

Signed-off-by: Aditya Ganesh <adga5133@colorado.edu>
2025-08-19 09:13:20 +02:00
Pete Dietl
c407fbcfc9 [drivers]: gpios: SN74HC595: Extend to allow for chained shift registers
The current driver has a few limitations:
1. The `ngpios` DT property is fixed at eight.
   Since the SN74HC595 and kin are designed to be
   easily daisychain-able, the upper bound on `ngpios`
   should be limited only by the maximum number of pins
   that Zephyr supports per GPIO port, which is 32.
2. In the case of having no control over the shift register's
   reset input, the device tree node should accept a default
   value to shift into the register(s) during init.
3. There seems to be an assumption that the serial clock
   and load clock are tied together. While this is often the
   case, the device tree node should be more flexible in
   allowing the specification of a separate load clock GPIO pin.
4. The device tree node should also be able to accept a GPIO pin
   to drive the enable input pin of the shift register(s).

This commit addresses all of these issues.

Signed-off-by: Pete Dietl <petedietl@gmail.com>
2025-08-19 09:13:12 +02:00
Pavel Vasilyev
8de6705ec3 drivers: bluetooth: Align bt_hci_send behavior on error
This change alignes HCI drivers behavior with Host expectation. That is:
if an HCI driver managed to send a packet to Controller, the HCI driver
also unreferences it. If the HCI driver didn't manage to send the
packet to Controller and returns an error code, it does not unreferences
buffer.

This change aligns the behavior of HCI drivers with the Host's
expectations. Specifically:
- If an HCI driver successfully sends a packet to the Controller, the
  HCI driver also unreferences it.
- If the HCI driver fails to send the packet to the Controller and
  returns an error code, it does not unreference the buffer.

Fixes #94445

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2025-08-18 22:01:15 +02:00
Keith Packard
469d54e227 drivers/adc/adc_stm32: Check both single-ended and differential defines
The stm32u3x header files defines LL_ADC_SINGLE_ENDED but not
LL_ADC_DIFFERENTIAL as the device doesn't support differential mode. The
driver only checked for LL_ADC_SINGLE_ENDED and assumed that when that was
defined, LL_ADC_DIFFERENTIAL would also be defined.

Check for both when figuring out which calibration type will be required.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-08-18 22:01:08 +02:00
sudarsan N
863186a4e2 spi: rtio: null pointer dereference in spi_rtio_transceive
Check if cqe is NULL before accessing cqe->result in
spi_rtio_transceive(). Prevents possible null pointer dereference
from rtio_cqe_consume() return value.

CID: 516229
Fixes: #90547

Signed-off-by: sudarsan N <sudarsansamy2002@gmail.com>
2025-08-18 22:00:54 +02:00
Zhaoxiang Jin
c6e5758d46 drivers: interrupt_controller: Update CMakeLists to fix build error
Now use the 5-parameter function "PINT_PinInterruptConfig"
deprecated in MCUX SDK, need to add compile definition
'PINT_USE_LEGACY_CALBACK' to make intc_nxp_pint compatible
with updated 'fsl_pint' driver.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2025-08-18 22:00:19 +02:00
Fin Maaß
bea75bb138 drivers: spi: remove spi_cs_is_gpio checks
remove spi_cs_is_gpio checks before
spi_context_cs_control, as it is also done
inside and we don't need to check two times.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-08-18 22:00:07 +02:00
Fin Maaß
3f4f8965f3 drivers: spi: spi_context: exclude gpio code if no gpio cs
exclude gpio code if no gpio cs are used
for that spi driver.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-08-18 22:00:07 +02:00
Eden Frosst
0598b2cc81 drivers: serial: stm32: propagate baud rate config failure
The uart_stm32 driver gives no way for a user to
tell if setting a new baud rate was successful.
Propagate error checks up to the API level.

Signed-off-by: Eden Frosst <edenfrosst@gmail.com>
2025-08-18 21:59:59 +02:00
Jakub Zymelka
376b34ca63 drivers: adc: nrfx_saadc: Add support for SAADC internal sampling timer
The SAMPLERATE register can be used as a local timer instead
of triggering individual SAMPLE tasks. When SAMPLERATE.MODE is set
to Timers, it is sufficient to trigger SAMPLE task only once in order
to start the SAADC and triggering the STOP task will stop sampling.
The SAMPLERATE.CC field controls the sample rate.

The SAMPLERATE timer should not be combined with SCAN mode and
only one channel should be enabled when using the internal timer.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2025-08-18 21:59:50 +02:00
Alain Volmat
6b1f864e76 drivers: smbus: stm32: add select PINCTRL
stm32 smbus driver is relying on the pinctrl framework
hence select CONFIG_PINCTRL to ensure proper build.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-08-18 17:49:28 +02:00
Alain Volmat
fd5dd5e04f drivers: sdhc: stm32: add select PINCTRL
stm32 sdhc driver is relying on the pinctrl framework
hence select CONFIG_PINCTRL to ensure proper build.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-08-18 17:49:28 +02:00
Alain Volmat
379fa75ca7 drivers: i3c: stm32: add select PINCTRL
stm32 i3c driver is relying on the pinctrl framework
hence select CONFIG_PINCTRL to ensure proper build.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-08-18 17:49:28 +02:00
Alain Volmat
5017279493 drivers: ethernet: dwmac_stm32h7x: add select PINCTRL
stm32 dwmac_stm32h7x driver is relying on the pinctrl framework
hence select CONFIG_PINCTRL to ensure proper build.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-08-18 17:49:28 +02:00
Alain Volmat
fd041a7573 drivers: clock: stm32-mco: add missing select PINCTRL
stm32 mco clock driver is relying on the pinctrl framework
for configuring the MCO pin hence select CONFIG_PINCTRL
to allow proper build.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-08-18 17:49:28 +02:00
Alain Volmat
14525b99d5 drivers: crypto: stm32: ensure RESET is selected
stm32 crypto driver requires a reset control hence ensure that
CONFIG_RESET is properly selected to allow proper build.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-08-18 17:49:28 +02:00
Alain Volmat
5c12e5526a drivers: display: stm32-ltdc: ensure RESET is selected
stm32 ltdc driver requires a reset control hence ensure that
CONFIG_RESET is properly selected to allow proper build.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-08-18 17:49:28 +02:00
Alain Volmat
c73140ebd9 drivers: mipi_dsi: stm32: ensure RESET is selected
stm32 mipi dsi driver requires a reset control hence ensure that
CONFIG_RESET is properly selected to allow proper build.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-08-18 17:49:28 +02:00
Alain Volmat
54c939a069 drivers: video: stm32: dcmi: ensure RESET is selected
stm32 dcmi driver requires a reset control hence ensure that
CONFIG_RESET is properly selected to allow proper build.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-08-18 17:49:28 +02:00
Alain Volmat
4542ab9677 drivers: video: stm32: dcmipp: ensure RESET/PINCTRL are selected
stm32 dcmipp driver requires a reset control and pinctrl
(depending on the configuration) hence ensure that
CONFIG_RESET and CONFIG_PINCTRL are properly selected to allow
proper build.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-08-18 17:49:28 +02:00
Georgij Černyšiov
f38a32617a drivers: memc: stm32: FMC NOR/PSRAM add bank validation
Ensure NSBank values are validated at build time.
That helps to identify and fix incorrect bank values.

Signed-off-by: Georgij Černyšiov <geo.cgv@gmail.com>
2025-08-18 17:49:20 +02:00
Georgij Černyšiov
6df089676d drivers: memc: stm32: FMC NOR/PSRAM refactor
Simplifies the driver code:
* Use existing FMC_NORSRAM_DEVICE and FMC_NORSRAM_EXTENDED_DEVICE
  defines. No need to keep references to them in the driver's config.
* Refine initialization loop.

Signed-off-by: Georgij Černyšiov <geo.cgv@gmail.com>
2025-08-18 17:49:20 +02:00
Jordan Yates
827da4a9e0 disk: sdmmc_stm32: support clock bypass
Add support for the SDMMC clock bypass feature for those SoCs that have
it. This provides a SDMMC bus speed double that of `clk-div = <0>`.

Updated the `clk-div` documentation at the same time to be clearer on
how the bus clock speed is determined.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-08-18 17:49:14 +02:00
Jordan Yates
deb24ef099 disk: sdmmc_stm32: explicit initialisation
Explicitly initialise the SDMMC initialisation struct to make it clear
the configuration being applied.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-08-18 17:49:14 +02:00
Khaoula Bidani
112fe454fb drivers: i2c: make DMA config field conditional on I2C
This commit updates I2C_DMA_DATA_INIT() macro to use
IF_ENABLED(DT_INST_DMAS_HAS_NAME(...), (...)),
so that the DMA configuration field is only generated if the
corresponding DMA property exists in the Device Tree.
This prevents macro expansion errors and allows a mix of I2C
peripherals with and without DMA support in the same build.

Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
2025-08-18 15:59:55 +02:00
Mario Paja
85b408edf1 drivers: i2s: add sai support for stm32h7xx
Define SAI1 node for STM32H7xx series.
Add STM32H7xx related DMA configs.
Enable samples/drivers/i2s/output for nucleo_h745zi_q/m7

Signed-off-by: Mario Paja <mariopaja@hotmail.com>
2025-08-18 15:58:58 +02:00
Quang Le
efe6812ec5 drivers: intc: Add external interrupt support for Renesas RZ/A3UL, V2L
Add external interrupt support for Renesas RZ/A3UL, V2L

Signed-off-by: Quang Le <quang.le.eb@bp.renesas.com>
Signed-off-by: Tien Nguyen <tien.nguyen.zg@renesas.com>
2025-08-18 15:58:44 +02:00
S Mohamed Fiaz
be0a0f1a1e drivers: gpio: silabs: gpio driver enhancements for EFR series 2 devices
Added changes to gpio driver and Kconfig
for EFR series 2 devices.

Signed-off-by: S Mohamed Fiaz <fiaz.mohamed@silabs.com>
2025-08-18 13:07:23 +02:00