Commit graph

28,390 commits

Author SHA1 Message Date
Thomas Decker
6efbec10fb drivers: serial: uart_stm32: make ptr to clock device const
The pointer to the clock device can be const, as it does never change at
runtime. This moves the const struct device *clock from data to config
struct and initializes it inside the init macro. The __uart_stm32_get_clock
function is no longer needed and removed.

Signed-off-by: Thomas Decker <decker@jb-lighting.de>
2026-01-09 07:57:04 -06:00
Jiafei Pan
db0a748a7a drivers: counter: gpt: remove unused variable
"clock_name_t clock_source" is not used by the driver, so remove it.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
2026-01-09 07:55:58 -06:00
Sandro Scherer
7c97becb3e drivers: ethernet: lan865x: fix seed for random backoff
To activate changes in mac address registers
the top register has to be written

Signed-off-by: Sandro Scherer <sandro.scherer@siemens.com>
2026-01-09 07:55:37 -06:00
Krzysztof Chruściński
3adbf25dff drivers: debug: nrf_etr: Add support for RTT backend
Add option to output STM logging on RTT.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2026-01-09 13:09:04 +01:00
Yunjie Ye
cfb6e15040 drivers: video: ov2640: Fixing the issue of the reset pin for OV2640.
The dt binding file requires the reset pin to be configured
as `GPIO_ACTIVE_LOW`, but the driver uses the
logic of `GPIO_ACTIVE_HIGH`.
Therefore, modify the logic in the driver and add a
migration guide.

Signed-off-by: Yunjie Ye <yun_small@163.com>
2026-01-09 13:08:48 +01:00
Yunjie Ye
7b93c32bd1 drivers: video: ov2640: Running clang-format on ov2640.c file
Using clangd to format ov2640.c file, which is not compatible with
existing .clang-format file.

Signed-off-by: Yunjie Ye <yun_small@163.com>
2026-01-09 13:08:48 +01:00
Yunjie Ye
9a5d96e4e0 drivers: video: ov2640: Add pwdn pin support on ov2640.
Add handling for the power-down (pwdn) pin of the OV2640 sensor.

Signed-off-by: Yunjie Ye <yun_small@163.com>
2026-01-09 13:08:48 +01:00
Fabin V Martin
67ddf8db30 drivers: uart: microchip: sercom g1: DMA selection for async mode
Allow user to select DMA in the application.

Signed-off-by: Fabin V Martin <Fabinv.Martin@microchip.com>
2026-01-09 10:41:23 +01:00
Gaetan Perrot
f80975d025 drivers: audio: dmic_nrfx_pdm: fix error propagation
The error code returned when nrfx_pdm_start() fails is supposed to
be propagated to the caller.

This was broken by commit 16b9f60, which overwrote the original
error with the result of release_clock(), potentially returning
success even though the PDM start failed.

Restore the correct error propagation.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2026-01-09 10:39:57 +01:00
Zafer SEN
9e2bdfb09c drivers: modem: hl78xx: add optional auto-baudrate detection and switching
This adds an optional auto-baudrate mechanism that improves robustness
when the modem boots with an unknown or changed UART speed.

Key additions:
* New Kconfig option MODEM_HL78XX_AUTO_BAUDRATE and related settings:
  - selectable target baud rate
  - detection baudrate list
  - detection timeout and retry count
  - option to persist AT+IPR updates
  - option to start diagnostics or boot directly with auto-baud logic
* UART status tracking added to hl78xx_data, including current and target
  baud rates
* New HL78XX_MODEM_INFO_CURRENT_BAUD_RATE info field
* New MODEM_HL78XX_STATE_SET_BAUDRATE state with detection and switching
  logic
* Chat, init, and diagnostic handlers updated to route failures into the
  auto-baudrate logic when enabled
* New helpers: hl78xx_get_uart_config(), hl78xx_try_baudrate(),
  hl78xx_detect_current_baudrate(), hl78xx_switch_baudrate()
* Startup delay increased when auto-baudrate-at-boot is enabled

These changes allow the driver to recover from unexpected modem UART rate
changes and keep the UART configuration synchronized with the modem.

Signed-off-by: Zafer SEN <zafersn93@gmail.com>
2026-01-09 10:38:39 +01:00
Zafer SEN
6a402b8659 drivers: modem: hl78xx: add AT command timeout event and handlers
Add MODEM_HL78XX_EVENT_AT_CMD_TIMEOUT event to distinguish chat scripts
timeouts from other script failures. The chat callback now maps
MODEM_CHAT_SCRIPT_RESULT_TIMEOUT to this new event.

Update state handlers so AT command timeouts trigger the init fail
diagnostic script during startup, and fall back to the power-on pulse in
the init-fail state, similar to existing timeout handling.

This improves error classification and enables more accurate recovery
logic for long-running or stalled AT command exchanges.

Signed-off-by: Zafer SEN <zafersn93@gmail.com>
2026-01-09 10:38:39 +01:00
Zafer SEN
53f3e0c5a0 drivers: modem: hl78xx: support per-command timeout in send API
Extend modem_dynamic_cmd_send() with a response_timeout parameter to allow
callers to specify the overall script timeout per command. The previously
hardcoded 1000 ms timeout is removed (set to 0 in params) and the script
timeout is now driven by the passed-in value.

Update all internal call sites to provide MDM_CMD_TIMEOUT (in seconds) and
increase the default command timeout from 10 s to 40 s. Several chat
scripts and configuration paths are updated accordingly.

This improves reliability for long-running HL78xx operations and ensures
consistent timeout handling across sockets, RAT/band configuration, APN
setup, PDP activation, AirVantage DM session control, and TLS/TCP/UDP
socket management.

Signed-off-by: Zafer SEN <zafersn93@gmail.com>
2026-01-09 10:38:39 +01:00
Zafer SEN
1179ed63d5 drivers: modem: hl78xx: add ERROR handling and unify OK match usage
Extend socket-related chat match tables to handle generic "ERROR" responses
for both CONNECT and +KUDP_IND URCs, improving detection of failed socket
creation and connection attempts.

While updating match handling, unify all modem commands to use the standard
OK match set by adding hl78xx_get_ok_match_size(). All remaining users of
the former sockets-specific OK match are switched to the unified helpers.

Additionally, all dynamic command send paths now provide an explicit match
count and use MDM_CMD_TIMEOUT instead of the previous hard-coded `1` for
script timeout, improving consistency and reliability across:
* RAT configuration
* band configuration
* APN setup
* GSM PDP activation
* AirVantage DM session control
* socket send and TLS configuration paths

This brings all command execution onto the same match/timeout model and
ensures ERROR responses are handled correctly during socket operations.

Signed-off-by: Zafer SEN <zafersn93@gmail.com>
2026-01-09 10:38:39 +01:00
Woobin Song
028abf54ba drivers: gpio: tca6424a: fix race condition in port_get_raw()
Avoid overwriting cached input state while ISR-deferred work is pending.
Previously, port_get_raw() updated pins_state.input via
update_input_regs(), which could corrupt previous_state used for
transition detection.
Fix by reading input registers directly without updating the global cache.

Signed-off-by: Woobin Song <woobin.song@assaabloy.com>
2026-01-09 10:37:29 +01:00
Benedek Kupper
cdb7debfb7 drivers: dma: stm32: fix data sizes in memory to peripheral direction
This problem didn't surface earlier, as different sizes weren't permitted.

Signed-off-by: Benedek Kupper <kupper.benedek@gmail.com>
2026-01-08 17:35:24 -06:00
Tim Pambor
0c3027718b drivers: mdio: gpio: add clause 45 support
Add support for clause 45 MDIO transactions to the GPIO MDIO driver.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2026-01-08 17:34:45 -06:00
Amneesh Singh
70ca335986 drivers: intc: vim: disable all interrupts at init
Disable all interrupts when the VIM interrupt controller is initialized so
that it doesn't encounter any stray interrupts that were not enabled on
Zephyr.

Signed-off-by: Amneesh Singh <amneesh@ti.com>
2026-01-08 21:18:38 +01:00
Khai Cao
2d5b720b62 drivers: can: Fix macro typo in CAN_RENESAS_RA_INIT
Fix macro parameter typo (##inst → ##index) in CAN_RENESAS_RA_INIT
to ensure unique IRQ configure function names per instance.

Signed-off-by: Khai Cao <khai.cao.xk@renesas.com>
2026-01-08 19:17:55 +01:00
Henrik Brix Andersen
0983eb3862 drivers: can: nxp: mcan: enable external timestamp counter support
Enable support for configuring and enabling the external timestamp counter
of the NXP LPC MCAN.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2026-01-08 19:15:29 +01:00
Henrik Brix Andersen
392e816ef0 drivers: can: mcan: add support for configuring internal timestamp counter
Add support for configuring and enabling the internal timestamp counter of
the Bosch M_CAN IP core.

Frontend drivers can overwrite this configuration for using a SoC-specific,
external timestamp counter.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2026-01-08 19:15:29 +01:00
Simon Maurer
50cfa1a5dd drivers: i2c: cdns: Clear hold flag on last data interrupt
Clear the hold flag during the final data interrupt; otherwise the
Transfer Complete interrupt is never asserted.

Signed-off-by: Simon Maurer <mail@maurer.systems>
2026-01-08 19:15:12 +01:00
Simon Maurer
39bfa1126a drivers: i2c: cdns: switch over to DEVICE_MMIO API
Switch the Cadence I2C device driver over to the use of the
DEVICE_MMIO_... macros instead of just using the physical base
address from the device tree.

Signed-off-by: Simon Maurer <mail@maurer.systems>
2026-01-08 19:15:12 +01:00
Simon Maurer
ed1520016b drivers: i2c: cdns: run clang-format
Run clang-format on drivers/i2c/i2c_cdns.c.

Signed-off-by: Simon Maurer <mail@maurer.systems>
2026-01-08 19:15:12 +01:00
Juliusz Sosinowicz
3f04069069 drivers: entropy: virtio: use bounce buffer for virtio entropy driver
The device is not able to place the entropy into stack or heap allocated
buffers. This uses a bounce buffer to be able to use any buffer with
virtio entropy.

Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
2026-01-08 08:33:05 -05:00
Fabrice DJIATSA
955f376078 drivers: flash: stm32 ospi: use OPI erase opcode in correct mode
The commit c42c8a4da4 (do not invalidate bet at end of loop")
correctly restored the best erase type (bet) selection logic
based on SFDP/JESD216 erase types.
However, this caused a regression
in Octal OPI mode: when bet != NULL, the driver started using bet->cmd
(a standard SPI 1-byte opcode) directly, which is not valid in OPI mode
where the controller expects OPI opcodes (2-byte OCMD).

When bet != NULL:
- In OPI mode, ignore bet->cmd and use the OPI sector erase
opcode SPI_NOR_OCMD_SE.
- In SPI/QPI modes, keep using bet->cmd as intended.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2026-01-08 11:59:49 +00:00
Gaetan Perrot
3c7d6ece5a drivers: wifi: eswifi: eswifi_offload: fix DHCP enable error handling
eswifi_off_enable_dhcp() ignored the return value of eswifi_at_cmd()
and always reported success, making the error check at the call site
always false.

Return the command result to properly propagate failures.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2026-01-08 11:56:32 +00:00
Guillaume Gautier
c81e2f70fe drivers: adc: stm32: clean up concat macros
Some internal _CONCAT* macros were used throughout the file. Replace them
with the simple CONCAT macro.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-01-08 11:55:35 +00:00
Guillaume Gautier
717d7e8ee0 drivers: adc: stm32: resolution rework
Rework the way to set the STM32 ADC resolution.
Instead of using special macros in device tree, supported resolutions are
now simply listed as an array.

From this array, the driver defines two tables. The first contains the same
values as the array, the second contains the LL macros for each resolution.
When setting the resolution, the driver checks the value with the first
table, then sets it with the second table.

The two tables are defined for each enabled ADC instance so there are no
conflicts if different ADC have different resolutions.

For STM32H7, this changes the internal values used for 14 and 12-bit
resolutions, from 0b101/110 to 0b001/010 respectively, i.e. it uses the
so-called "legacy" resolutions instead of the "power-optimized" ones.
Note that AN5354 indicates: "The optimized modes have better power
consumption figures. The standard modes have better parameters, but
power consumption is not optimized and is comparable to 16-bit mode."

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-01-08 11:55:35 +00:00
Gaetan Perrot
5768f30f0d drivers: wifi: esp_at: esp_offload: drop unused dev variable in esp_bind
The esp_data pointer is no longer used after removing the premature
_sock_connect() call. Drop the unused variable.

_sock_connect() call was removed by c368c33.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2026-01-08 11:55:25 +00:00
Ruibin Chang
0671dc7925 drivers/wdt/it8xxx2: support setting time interval of warning msg
Add the config to support that warning message time
interval can be set.

We also find that printing all the warning messages
takes about 50ms on Chromebook. Therefore, we increase
the default time to 100ms to leave some time for EC to run
non-print instructions.

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2026-01-08 09:49:28 +01:00
Gaetan Perrot
560ecb2949 drivers: wifi: eswifi: eswifi_socket: fix listen backlog error handling
__eswifi_listen() ignored errors from eswifi_at_cmd() and always
reported success, leaving the local error variable unused.

Return an error when setting the listen backlog fails and avoid
marking the socket as a server in that case.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2026-01-08 09:47:17 +01:00
Terry Geng
1840356341 drivers: led_strip: ws2812_rpi_pico_pio: Add DMA support
so that time-consuming I/O takes place in the background. This is
especially important when writing to multiple long LED strips.

This commit mostly mirrors what was done in the pl022 driver and the
rpi_pico_pio_spi driver, including the needed DT configuration. DMA will be
used if `CONFIG_DMA` is enabled and proper `tx` channel is defined in the
DT.

The DT overlay I used when testing:
```
&pio0 {
	status = "okay";

	pio-ws2812 {
		compatible = "worldsemi,ws2812-rpi_pico-pio";
		status = "okay";
		pinctrl-0 = <&ws2812_pio0_default>;
		pinctrl-names = "default";
		bit-waveform = <3>, <3>, <4>;

                /* This device has no tx channel configured so DMA will NOT
                 * be used. */
		ws2812_1: ws2812_1 {
			status = "okay";
			gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>;
			chain-length = <1>;
			color-mapping = <LED_COLOR_ID_GREEN
                                         LED_COLOR_ID_RED
                                         LED_COLOR_ID_BLUE>;
			reset-delay = <280>;
			frequency = <800000>;
		};

                /* This device has proper tx channel configured so DMA will
                 * be used. */
		ws2812_2: ws2812_2 {
			status = "okay";
			gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>;
			chain-length = <64>;
			color-mapping = <LED_COLOR_ID_RED
                                         LED_COLOR_ID_GREEN
                                         LED_COLOR_ID_BLUE>;
			reset-delay = <280>;
			frequency = <800000>;

			dmas = <&dma 1 0 0>;
                        /* DMA slot will be
                         * determined by the driver so what's in here
                         * doesn't matter. */
			dma-names = "tx";
		};
	};
};

&dma {
	status = "okay";
};
```

Signed-off-by: Terry Geng <terry@terriex.com>
2026-01-08 09:33:51 +01:00
Terry Geng
7081a5ff4b drivers: led_strip: ws2812_rpi_pico_pio: Use reset timer instead of sleep
to guarantee two updates to ws2812 happen not faster than the required
reset time of ws2812. Using `k_usleep` forces a context switching, which
might be unnecessary if two time between update calls are not as frequent
as the reset time (which should be the most of the case anyways).

Signed-off-by: Terry Geng <terry@terriex.com>
2026-01-08 09:33:51 +01:00
Tim Pambor
2e9ba24515 drivers: ethernet: dwmac: Fix Kconfig for stm32h7
DWMAC driver was no longer selectable for stm32h7
series because of CONFIG_ETH_DWMAC dependency on
DT_HAS_SNPS_DESIGNWARE_ETHERNET_MMU_ENABLED, which
is only used for MMU based platforms.

Restructure Kconfig to have user-selectable options
for the platform-specific DWMAC drivers and select
the common DWMAC driver accordingly. This way
platform-specific dependencies can be tracked on
these options, simplifying the logic.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2026-01-08 09:29:34 +01:00
Manojkumar Konisetty
547f1bbb11 drivers: gpio: Add Infineon PSoC4 GPIO driver
Introduces a GPIO driver that provides generic interfaces
for both interrupt-driven inputs and controllable outputs.

Signed-off-by: Manojkumar Konisetty <manoj@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
2026-01-08 09:27:24 +01:00
Dharun krithik k
e5e92f6c8f drivers: clock_control: update infineon clock drivers
Update the Infineon clock control drivers to support PSoC4 and
enhance error handling.

- Add support for ILO, WCO, and EXT clocks in fixed clock driver.
- Update fixed factor clock driver to handle PSoC4 specific HF
  clock source setting and add error checking.
- Update peripheral clock driver to support fractional dividers
- Improve error handling across all updated drivers.

Signed-off-by: Dharun krithik k <dharunkrithik@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
2026-01-08 09:27:24 +01:00
Henrik Brix Andersen
f931c5a44f drivers: can: mcan: reintroduce assert in can_mcan_send()
Reintroduce the assert on put_idx being within the limit in can_mcan_send()
but move it to just after the value was determined and add a comment on its
purpose.

With the current code, this will never get triggered due to the tx_sem
being acquired before (meaning a free TX slot was acquired).

Avoid assigning a signed initial literal to an unassigned type.

Fixes: 8dc4dea112

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2026-01-07 14:53:30 -06:00
Muhammad Waleed Badar
f31516d461 drivers: uart: pl011: fix poll_in function
RSR handling is already implemented in pl011_err_check(), which is the
appropriate place to detect, and report receive error conditions.

This also aligns poll_in() behavior with pl011_fifo_read(), which reads
and delivers characters without returning RSR status to the caller.

Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
2026-01-07 14:52:10 -06:00
Jayvik Desai
8c207308a4 drivers: gpio: emul: validate pins in single-pin APIs and mask in port APIs
Add input validation to single-pin GPIO APIs (e.g., gpio_pin_configure)
and emulator-specific helpers to return -EINVAL for invalid pins. This
ensures tests correctly fail when targeting non-existent pins.

For standard port-wide APIs (e.g., gpio_port_set_bits_raw), align behavior
with hardware drivers by masking out invalid pins instead of returning an
error. This mimics hardware behavior where writing to unimplemented bits
is ignored, and ensures compatibility with generic tests that use full
32-bit masks (e.g., 0xFFFFFFFF).

Signed-off-by: Jayvik Desai <jayvik@google.com>
2026-01-07 14:50:43 -06:00
Tahsin Mutlugun
87ce02b011 drivers: i3c: Move i3c_bus_mode() to common layer
i3c_bus_mode() is duplicated across several drivers. Move it into
i3c_common.c to eliminate that.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2026-01-07 19:40:18 +01:00
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