Commit graph zephyr/drivers
Author SHA1 Message Date
Etienne Carriere
72e96e35dd drivers: clock_control: stm32h7: fix PLL rate with fractional PLL
Take PLL fractional part into account when computing PLL output rate
for stm32h7xx and stm32h7rs based targets.

Co-authored-by: Tim Pambor <tim.pambor@codewrights.de>
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-01-07 19:38:37 +01:00
Lucien Zhao
d5872f227d drivers: clock_control_nxp_mc_cgm.c: initialize flexcan clock source
-  initialize corresponding flexcan clock source when corresponding
   flexcan instance enabled

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2026-01-07 17:31:24 +01:00
Fabio Baltieri
5ddde71d2c regulator: shell: fix device completion for adget/adset
Add the dsub_device_name reference to adset/adget so it completes the
device name.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2026-01-07 17:30:51 +01:00
Fin Maaß
27068ed58e drivers: sensor: i2c: replace use of i2c_burst_write
i2c_burst_write is not portable,
as it is not supported by some drivers,
replace its use with i2c_write.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-01-07 17:30:32 +01:00
Fin Maaß
97a7b8f1cf drivers: rtc: i2c: replace use of i2c_burst_write
i2c_burst_write is not portable,
as it is not supported by some drivers,
replace its use with i2c_write.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-01-07 17:30:32 +01:00
Fin Maaß
d49a55265e drivers: led: i2c: replace use of i2c_burst_write
i2c_burst_write is not portable,
as it is not supported by some drivers,
replace its use with i2c_write.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-01-07 17:30:32 +01:00
Fin Maaß
3d6000e070 drivers: gpio: i2c: replace use of i2c_burst_write
i2c_burst_write is not portable,
as it is not supported by some drivers,
replace its use with i2c_write.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-01-07 17:30:32 +01:00
Fin Maaß
0957115fc9 drivers: fuel_gauge: i2c: replace use of i2c_burst_write
i2c_burst_write is not portable,
as it is not supported by some drivers,
replace its use with i2c_write.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-01-07 17:30:32 +01:00
Fin Maaß
1a88ea527f drivers: display: i2c: replace use of i2c_burst_write
i2c_burst_write is not portable,
as it is not supported by some drivers,
replace its use with i2c_write.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-01-07 17:30:32 +01:00
Fin Maaß
e182730f7a drivers: charger: i2c: replace use of i2c_burst_write
i2c_burst_write is not portable,
as it is not supported by some drivers,
replace its use with i2c_write.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-01-07 17:30:32 +01:00
Fin Maaß
f6558d5cdf drivers: audio: i2c: replace use of i2c_burst_write
i2c_burst_write is not portable,
as it is not supported by some drivers,
replace its use with i2c_write.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-01-07 17:30:32 +01:00
Qingsong Gou
47a525423a drivers: spi: sf32lb: fix parentheses error
Fix parentheses error

Signed-off-by: Qingsong Gou <gouqs@hotmail.com>
2026-01-07 12:31:36 +01:00
Qingsong Gou
f0099a0d49 drivers: adc: sf32lb: fix adc sequence
Fix adc sequence for for sf32lb

Signed-off-by: Qingsong Gou <gouqs@hotmail.com>
2026-01-07 12:31:36 +01:00
Qingsong Gou
5acd482724 drivers: adc: sf32lb: fix adc_async build warnings
Fix adc_async build warnings

Signed-off-by: Qingsong Gou <gouqs@hotmail.com>
2026-01-07 12:31:36 +01:00
Qingsong Gou
dac3f66622 drivers: adc: sf32lb: fix coding style
Fix coding style for sf32lb

Signed-off-by: Qingsong Gou <gouqs@hotmail.com>
2026-01-07 12:31:36 +01:00
Qingsong Gou
2da9089ae4 drivers: adc: sf32lb: fix adc value not correct
Fix adc value not correct

Signed-off-by: Qingsong Gou <gouqs@hotmail.com>
2026-01-07 12:31:36 +01:00
Henrik Brix Andersen
cc25a8ada4 drivers: can: mcan: fix race condition when adding CAN RX filters
Move the assignment of the callback function and user data within the mutex
lock when adding CAN RX filters to prevent race conditions.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2026-01-07 12:31:20 +01:00
Henrik Brix Andersen
0665c70d70 drivers: can: mcan: add missing mutex unlocks in error paths
Add missing calls to k_mutex_unlock() in error paths when failing to add
CAN RX filters.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2026-01-07 12:31:20 +01:00
Henrik Brix Andersen
8dc4dea112 drivers: can: mcan: remove useless asserts
Remove useless asserts. These indexes are determined via a for loop which
already uses the asserted value as its maximum.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2026-01-07 12:31:20 +01:00
Zhaoxiang Jin
f4d4d8210c drivers: timer: cortex_m_systick: add devicetree clock-source property
Add support for configuring the SysTick clock source via devicetree
using a new `clock-source` property. This allows selecting between
the external reference clock (0) and the processor clock (1).

Previously, the driver always set the CLKSOURCE bit, forcing the use
of the processor clock. This change introduces a helper function
`systick_ctrl_clksource_flag_from_dt()` that reads the devicetree
property and returns the appropriate CTRL register flag.

The CTRL register is now programmed deterministically using direct
assignment instead of `|=` to ensure the CLKSOURCE bit is properly
cleared when switching to external clock, preventing potential
interrupt storms when CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC reflects
the external clock rate.

If the property is absent, the driver defaults to legacy behavior
(processor clock).

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-01-07 10:23:47 +01:00
Dat Nguyen Duy
212f8671b9 drivers: counter_nxp_pit: fix problem when multiple instances enabled
The current pit driver fails to build if multiple instances
enabled with per channel interrupt

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2026-01-07 10:22:49 +01:00
Fabio Baltieri
dadcad5495 regulator: tps55287: implement current limit support
Implement current limit get/set support, this requires setting the shunt
resitor value.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2026-01-07 10:21:41 +01:00
Fabio Baltieri
40efe8af92 regulator: tps55287: add cdc setting support
Add a property for setting the CDC register.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2026-01-07 10:21:41 +01:00
Fabio Baltieri
5d72677eb6 regulator: tps55287: add output-discharge support
Implement the output discharge control regulator API.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2026-01-07 10:21:41 +01:00
Fabio Baltieri
070ff7b9ac regulator: tps55287: add enable pin handling
Add support for handling a gpio connectd to the device enable pin, this
has to be driven high to enable the device, and can be pulsed low to
reset the registers to the default configuration.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2026-01-07 10:21:41 +01:00
Fabio Baltieri
99b5ac1c58 regulator: tps55287: drop redundant initializers
Drop a couple of redundant initializers, these arrays are fully set/get
in the code.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2026-01-07 10:21:41 +01:00
Camille BAUD
1936dc6cc4 drivers: input: Introduce bflb IR RX driver
Introduces a driver for the IR receiver on BFLB socs

Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-01-07 10:21:20 +01:00
Camille BAUD
53c7c4b959 drivers: clock_control: Add IRX clock elements
Enable the gates for IRX

Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-01-07 10:21:20 +01:00
Chen Xingyu
cc3f7f2f45 drivers: mipi_dbi: Add ESP32 LCD_CAM backend
The LCD_CAM peripheral is a parallel I/O controller integrated in the ESP32
series. It consists of an LCD output module and a DVP camera input module.
The camera side is already supported in Zephyr as a video driver.

This commit adds support for the LCD module by implementing it as a
MIPI-DBI backend. The LCD_CAM supports multiple output formats, and the
initial implementation provides I8080 mode.

Signed-off-by: Chen Xingyu <hi@xingrz.me>
2026-01-07 10:20:54 +01:00
Chen Xingyu
bd9d8ba000 soc: espressif: Introduce common LCD_CAM support
Move the shared pinctrl and clock initialization for the LCD_CAM peripheral
from the ESP32 DVP driver into a new SoC-level implementation.

Update the ESP32-S3 DTS to reflect the new structure by introducing an
`lcd_cam_dvp` child node under the common `lcd_cam` parent node.

Signed-off-by: Chen Xingyu <hi@xingrz.me>
2026-01-07 10:20:54 +01:00
Chen Xingyu
21eac8f32b drivers: video: esp32: Rename to lcd-cam-dvp
Rename the ESP32 LCD_CAM DVP driver and its DT binding from
`espressif,esp32-lcd-cam` to `espressif,esp32-lcd-cam-dvp` to clearly
identify it as the DVP (camera) input block of the LCD_CAM peripheral.

Signed-off-by: Chen Xingyu <hi@xingrz.me>
2026-01-07 10:20:54 +01:00
Scott Worley
99ce899c22 drivers: pinctrl: microchip: mec: One PINCTRL driver for all MEC parts
GPIO hardware in Microchip MEC parts is the same except for the MUX
field (number of alternate functions). We modify the old XEC PINCTRL
driver to work on all MEC parts and also be independent of HAL and
CMSIS register structures. During development we found a DT issue
with DT_ENUM_IDX_OR always inserting the default value. Worked around
by converting slew rate and drive strength to YAML integer type and
created defines for the values in the dt-bindings header.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2026-01-07 07:50:18 +01:00
Zhaoxiang Jin
8e92b5b851 drivers: adc: nxp_sar_adc: implement async read function
Enabled async read function for NXP SAR ADC driver by implementing
nxp_sar_adc_read_async() and modifying nxp_sar_adc_read() to call it
with a NULL signal for synchronous operation.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-01-07 07:49:49 +01:00
Zhaoxiang Jin
096dbbf8d2 drivers: adc: Adding DMA transfer capability to LPADC
Adding DMA transfer capability to LPADC

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-01-07 07:49:16 +01:00
Holt Sun
639f9bbab2 drivers: counter: mcux_lptmr: fire alarm immediately when ticks=0
Allow alarm_cfg->ticks to be 0 for immediate callback execution.
When ticks equals 0, set the interrupt pending instead of returning
-EINVAL, causing the ISR to fire immediately.

Implementation:
- Add irq_set_pending()/irq_is_pending() helpers for NVIC and GIC
- Store IRQ number in device config for pending operations
- Refactor timer state handling to eliminate duplication
- Update get_pending_int() to check both HW flags and NVIC/GIC state

This supports idle timer use cases where sleep duration may be zero
and eliminates the need for special-case handling in application code.

Signed-off-by: Holt Sun <holt.sun@nxp.com>
2026-01-07 07:47:56 +01:00
Holt Sun
385f343e5d drivers: counter: mcux_lptmr: add device tree support for freerunning mode
Add device tree property to configure LPTMR free-running mode instead
of hardcoding it to disabled.

The freerunning property controls counter reset behavior:
- If false (default): Counter resets after compare match
- If true: Counter resets only on overflow, continues after compare

This allows per-instance configuration of the LPTMR timer mode based
on application requirements without code changes.

Signed-off-by: Holt Sun <holt.sun@nxp.com>
2026-01-07 07:47:56 +01:00
Gaetan Perrot
4bec0387c8 drivers: adc: adc_stm32: make set_sequencer void
set_sequencer() never reports errors and always returns 0.
The error check at the call site is therefore dead code.

Make the function void and drop the unused error handling.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2026-01-07 07:45:01 +01:00
Gaetan Perrot
4da063bad0 drivers: cache: fix typos in comments
Fix typos in comments in cache_andes and cache_aspeed.

No functional change.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2026-01-06 16:08:40 -06:00
Gaetan Perrot
d7ff9afbfd drivers: display: co5300: fix missing GPIO error check
gpio_pin_set_dt() return value was not assigned when pulling the
reset GPIO high, making the subsequent error check always false.

Store the return value to properly detect and report failures.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2026-01-06 16:07:56 -06:00
Sara Touqan
304625e040 drivers: mspi: Support MSPI driver for STM32
This commit introduces support for the mspi and ospi drivers on STM32,
enabling functionality APIs for MSPI/OSPI/QSPI host controllers..

Signed-off-by: Sara Touqan <zephyr@exalt.ps>
Signed-off-by: Sarah Younis <zephyr@exalt.ps>
Signed-off-by: Mohammad Odeh <zephyr@exalt.ps>
2026-01-06 16:05:03 -06:00
Gaetan Perrot
61dcab72a5 drivers: sensor: bosh: bmp581: fix redundant NULL check
set_iir_config() dereferences the device pointer before checking it
against NULL, making the defensive check ineffective.

Remove the redundant check.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2026-01-06 19:16:27 +00:00
Tanguy Raufflet
23596814d0 drivers: i3c: stm32: include math.h to fix build warnings
This driver uses math functions that require the math.h header. If not
included a lot of implicit declaration warnings are generated during
build.

Signed-off-by: Tanguy Raufflet <tanguy.raufflet@savoirfairelinux.com>
2026-01-06 19:14:41 +00:00
Tanguy Raufflet
96a6b8ca72 drivers: clock_control: stm32: add MP2xx clocks for I3C peripherals
Add I3C clocks rate reading to the STM32MP2 clock driver.

Co-authored-by: Charles Wenger <charles.wenger@savoirfairelinux.com>
Signed-off-by: Tanguy Raufflet <tanguy.raufflet@savoirfairelinux.com>
2026-01-06 19:14:41 +00:00
Tanguy Raufflet
b54cef898a drivers: i3c: stm32: add support for combined interrupt
Since the STM32MP2 I3C controller uses a combined interrupt line for I3C
events and errors, add the support for handling this type of interrupt
in the I3C driver.

Signed-off-by: Tanguy Raufflet <tanguy.raufflet@savoirfairelinux.com>
2026-01-06 19:14:41 +00:00
Peter Korsgaard
54eda2761a i2c: target: target_eeprom: make legacy functions wrappers
Implement eeprom_target_program() using eeprom_target_write_data() and
eeprom_target_read() using eeprom_target_read_data() to limit redundant
code.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2026-01-06 19:14:03 +00:00
Peter Korsgaard
7362cd6f45 i2c: target: eeprom_target: add {read,write}_data()
The current functions to access the EEPROM data are not ideal, E.G.:

- eeprom_target_program() is hard coded to write to the beginning of the
  EEPROM data

- eeprom_target_read() reads a single byte, so large overhead to read all
  data

So as an alternative, add an interface similar to what is provided by
zephyr/drivers/eeprom.h, E.G.  functions taking an offset and and length.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2026-01-06 19:14:03 +00:00
Peter Korsgaard
71f25d88a9 i2c: target: eeprom_target: add _get_size()
For some use cases it can be interesting to know how big the EEPROM is, so
add a getter for it.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2026-01-06 19:14:03 +00:00
Peter Korsgaard
0e24da356a i2c: target: eeprom_target: add changed callback
For some use cases it can be interesting to know when the eeprom has been
written to by the I2C host (E.G.  once a stop has been received after a
write transaction), so add a "changed" callback.

Multiple EEPROM instances are supported, so pass the device and user data
as arguments to the callback.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2026-01-06 19:14:03 +00:00
Robyn Milas
ebfd777b2c drivers: spi: stm32 fix bug on empty tx
When transceive is called on a chip without CONFIG_SPI_STM32_INTERRUPT,
spi_stm32_shift_frames was called even if there was no transfer ongoing.
This lead to an unwanted SPI transfer shifting the whole connection,
causing drivers to malfunction.
Fix it by replacing the do-while loop with a while loop.

Signed-off-by: Robyn Milas <robyn.milas@valotec.com>
2026-01-06 16:06:41 +00:00
Daniel Fladerer
a4f75ba4bd drivers: serial: uart_mcux_iuart: Adjust FIFO fill behavior for TX
Until now transmission FIFO was not used.
With this chamge the FIFO will be filled up, until it is full.

Signed-off-by: Daniel Fladerer <d.fladerer@gmx.de>
2026-01-06 13:37:54 +00:00