Commit graph zephyr/drivers
Author SHA1 Message Date
John Batch
9fe2e4f596 drivers: infineon: adds clock assignment to serial device init.
Adds making a peripheral clock connection to the initialiazation for SCB
based drivers.  These drivers are the UART/Serial driver, I2C driver, and
SPI driver.

Signed-off-by: John Batch <john.batch@infineon.com>
2026-01-27 08:06:28 +01:00
Pisit Sawangvonganan
24615a4d79 drivers: serial: place API into iterable section
Add the `DEVICE_API` wrapper to the remaining `uart_driver_api` instances,
ensuring that each driver API is placed in its respective linker section.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2026-01-26 14:02:16 -06:00
Fin Maaß
8a862f4ee8 drivers: console: uart: use uart_irq_rx_ready directly
as we are only handeling rx interupts, we don't need
to call uart_irq_is_pending to check, we can just directly
use uart_irq_rx_ready.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-01-26 13:59:12 -06:00
Fin Maaß
92484cbc06 drivers: console: don't use irq functions outside
don't use uart irq api functions outside a
interrupt.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-01-26 13:59:12 -06:00
Tim Pambor
d7bf47843a drivers: disk: nvme: Provide correct erase block size
Erase block size should be provided in sectors, not in bytes.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2026-01-26 13:58:54 -06:00
Laurentiu Mihalcea
32e75415dc firmware: scmi: core: don't allow mutex usage in PRE_KERNEL stage
While in PRE_KERNEL stage, scmi_send_message_polling() attempts to acquire
the transmit channel mutex, which should not be allowed as the kernel is
not fully initialized at this point.

Since there's no multithreading at this point, there's no need to use a
mutex anyways. Therefore, perform mutex acquire()/release() only if not
in PRE_KERNEL phase.

Note that the return value of k_mutex_lock() is already suppressed via
an -EBUSY return value so no behavioral change here.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2026-01-26 13:58:30 -06:00
Lyle Zhu
ab4569ea97 bluetooth: hci: nxp: Reduce the fw sending buffer size
In current implementation, the sending buffer size is 0x10000. This
will result in a very small amount of RAM available for the
application. Actually, the maximum required sending buffer size is
4KB.

Reduce the maximum sending buffer size by changing
`SEND_BUFFER_MAX_LENGTH` from 64KB to 4KB.
And add runtime assertions to prevent buffer overflows during firmware
upload.

- Change SEND_BUFFER_MAX_LENGTH from 0xFFFF to 4096 (4 KB)
  * Reflects the actual maximum FW chunk size supported by hardware
  * Reduces memory footprint from 64 KB to 4 KB
- Remove unnecessary +1 from send_buffer array size
- Add __ASSERT checks in fw_upload_v1_send_data() to validate
  memcpy does not exceed buffer size
- Add __ASSERT checks in fw_upload_v3_send_data() to validate
  memcpy does not exceed buffer size

This prevents potential buffer overflows when copying firmware data
and ensures the buffer size matches hardware capabilities.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2026-01-26 13:57:50 -06:00
Eric Ackermann
65d6752963 drivers: ethernet: Add Xilinx Axi Ethernet Lite
This commit adds support for the Xilinx AXI Ethernet Lite device,
also known as the emaclite.
The emaclite is a light-weight 10/100 MII Ethernet device.
It foregoes a DMA to reduce chip area.
Instead, it uses memory-mapped transmit/receive buffers.
A selection of features can optionally be enabled:
- a second ("pong") RX/TX Buffer
- MDIO support
- Interrupt support
This driver handles the MAC functionality of the core;
a driver for the MDIO part is introduced separately
as an MDIO driver.

Signed-off-by: Eric Ackermann <eric.ackermann@cispa.de>
2026-01-26 13:54:32 -06:00
Eric Ackermann
bb8d46e9b7 drivers: mdio: Add Xilinx Axi Ethernet Lite driver
This commit adds support for the Xilinx AXI Ethernet Lite device,
also known as the emaclite.
The emaclite is a light-weight 10/100 MII Ethernet device.
It can optionally be configured to include an MDIO.
The MMIO interface is controlled via MMIO registers and requires
the software to busy-wait until completion.

Signed-off-by: Eric Ackermann <eric.ackermann@cispa.de>
2026-01-26 13:54:32 -06:00
Amneesh Singh
03ba08615a drivers: sdhc: split caps into standard and extra
Make sure the capability bitfields fit the standard SD Association
specification and move the extra capabilities to props.

Affected Drivers:
- sdhc_infineon
- imx_usdhc
- intel_emmc_host
- rcar_mmc
- sam_sdmmc
- sdhc_ambiq
- sdhc_esp32
- sdhc_max32
- sdhc_renesas_ra
- sdhc_stm32
- xlnx_sdhc

Affected Subsys
- sd

Reference: 2.2.26, SD Specifications, Part A2, SD Host Controller
           Simplified Specification, Version 4.20
           URL: https://www.sdcard.org/downloads/pls/pdf/?p=PartA2_SD%20Host_Controller_Simplified_Specification_Ver4.20.jpg

Signed-off-by: Amneesh Singh <amneesh@ti.com>
2026-01-26 13:53:51 -06:00
Gaetan Perrot
5dfb097ba4 drivers: dai: intel: ssp: make set_clock_control_ver_1 void
dai_ssp_set_clock_control_ver_1() 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-26 10:12:56 -06:00
Qingsong Gou
bab6ba62c8 drivers: mipi_dbi: sf32lb: fix data writing stuck
Fix data writing stuck without data len check

Signed-off-by: Qingsong Gou <gouqs@hotmail.com>
2026-01-26 10:12:08 -06:00
Qingsong Gou
c2e1daf134 drivers: mipi_dbi: sf32lb: fix build warnings
remove unused varibles

Signed-off-by: Qingsong Gou <gouqs@hotmail.com>
2026-01-26 10:12:08 -06:00
Qingsong Gou
348405f7bf drivers: mipi_dib: sf32lb: add command_read interface
Add command_read interface for sf32lb dbi

Signed-off-by: Qingsong Gou <gouqs@hotmail.com>
2026-01-26 10:12:08 -06:00
Hubert Miś
0f6bcc6491 drivers: led: sct2024 controller
Initial implementation of SCT2024 LED controller driver

Signed-off-by: Hubert Miś <hubert.mis@gmail.com>
2026-01-26 10:09:43 -06:00
Jérôme Pouiller
1de7b1ced7 drivers: clock_control: siwx91x: Clean up siwx91x_clock_set_rate()
Simplify siwx91x_clock_set_rate() a bit.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2026-01-26 14:16:31 +01:00
Jérôme Pouiller
e6302b1b74 drivers: rng: siwx91x: Avoid direct access to the clock
Currently, silabs,siwx91x-rng directly write clock hardware block. Change
that to properly rely on clock driver.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2026-01-26 14:16:31 +01:00
Jérôme Pouiller
d908778a21 drivers: rng: siwx91x: Fix naming
Align naming rules with the other drivers.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2026-01-26 14:16:31 +01:00
Jérôme Pouiller
a2ca0280ed drivers: adc: siwx91x: Fix SIWX91X_CLK_ADC
RSI_ADC_PowerControl() enables the clock AND power on the ADC hardware
block.

The clock control should only access to the clock hardware block.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2026-01-26 14:16:31 +01:00
Jérôme Pouiller
a78cd3464e drivers: adc: siwx91x: Fix use of RSI_ADC_ClkDivfactor()
RSI_ADC_ClkDivfactor() is called from system clock_control. But in fact, it
controls the internal division factor of the ADC hardware block.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2026-01-26 14:16:31 +01:00
Jérôme Pouiller
e2f4fc15af drivers: adc: siwx91x: Fix use of ADC_CONTEXT_USES_KERNEL_TIMER
ADC_CONTEXT_USES_KERNEL_TIMER is required for ADC_CONTEXT_INIT_TIMER().
However, it should be defined in the Zephry driver, not in the Wiseconnect
integration.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2026-01-26 14:16:31 +01:00
Afonso Oliveira
ca062130c9 arch: riscv: call IMSIC secondary init on SMP boot
Invoke IMSIC secondary initialization during RISC-V SMP bring-up.

Signed-off-by: Afonso Oliveira <afonsoo@synopsys.com>
2026-01-26 14:16:22 +01:00
Afonso Oliveira
c11baf0942 drivers: interrupt_controller: riscv: imsic: add SMP init helper
Add per-hart IMSIC initialization helper for secondary CPUs in SMP builds.

Signed-off-by: Afonso Oliveira <afonsoo@synopsys.com>
2026-01-26 14:16:22 +01:00
Afonso Oliveira
833edaf7c8 drivers: interrupt_controller: riscv: add IMSIC driver
Add IMSIC driver implementation with atomic mtopei claim using csr_swap
and EIE configuration for interrupt enable/disable.

Signed-off-by: Afonso Oliveira <afonsoo@synopsys.com>
2026-01-26 14:16:22 +01:00
Pisit Sawangvonganan
5f2d9f5e7b drivers: gpio: place API into iterable section
Add the `DEVICE_API` wrapper to the remaining `gpio_driver_api` instances,
ensuring that each driver API is placed in its respective linker section.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2026-01-26 12:09:59 +01:00
Pisit Sawangvonganan
5a5c23bbea drivers: flash: place API into iterable section
Add the `DEVICE_API` wrapper to the remaining `flash_driver_api`
instances, ensuring that each driver API is placed in its respective
linker section.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2026-01-26 12:09:53 +01:00
Biwen Li
f07d399de5 drivers: power_domain: arm_scmi: update kernel level and priority
Update kernel level and priority(same with scmi clock control)

On i.MX95, there is an irqsteer instance in display mix.
when the irqsteer is enabled, must power on display mix before
accessing registers of the irqsteer(call irqsteer_hw_init).
the irqsteer drivers's kernel level is PRE_KERNEL_1 and it's
priority is 40. So update kernel level to PRE_KERNEL_1 and update
priority to 30 to ensure that the arm scmi power domain driver
is initialized before initializing irqsteer driver.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
2026-01-26 12:06:36 +01:00
Robert Lubos
7fe8d52901 drivers: wifi: eswifi: Validate data length on send
Verify that requested data can fit into the transmit buffer on send to
avoid out-of-bound memory writes.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2026-01-26 11:59:45 +01:00
William Tang
e4268b98fa drivers: can: mcux: flexcan: fix unnecessary error handling in MB IRQ
Move the kStatus_FLEXCAN_UnHandled case from before the
kStatus_FLEXCAN_ErrorStatus case to just before the default case.

This prevents unnecessary execution of the CAN bus error handler
during message buffer interrupt processing. The issue occurred
because when CAN bus errors occur without any mailbox generating
an interrupt, FLEXCAN_MbHandleIRQ returns kStatus_FLEXCAN_UnHandled.
With the previous code structure, the fallthrough from
kStatus_FLEXCAN_UnHandled would cause the kStatus_FLEXCAN_ErrorStatus
handler to execute unnecessarily.

By separating these two cases, kStatus_FLEXCAN_UnHandled (which
represents unhandled status during Message Buffer processing)
now falls through only to the default case for logging, while
kStatus_FLEXCAN_ErrorStatus is handled independently only when
actual CAN bus error status needs processing.

Signed-off-by: William Tang <william.tang@nxp.com>
2026-01-26 11:59:37 +01:00
William Tang
407fbac378 drivers: can: mcux_flexcan: split IRQ handling to avoid unused registers
Replace FLEXCAN_TransferHandleIRQ() with separate calls to
FLEXCAN_BusoffErrorHandleIRQ() and FLEXCAN_MbHandleIRQ() to handle
FlexCAN interrupts.

The original FLEXCAN_TransferHandleIRQ() API accesses registers for
features that may not be used, including Enhanced RX FIFO. This can
cause issues when different FlexCAN instances have different hardware
features, as it may attempt to access non-existent registers.

By using the more targeted FLEXCAN_BusoffErrorHandleIRQ() and
FLEXCAN_MbHandleIRQ() functions, we only access the registers that
are actually needed for the enabled features. This approach:
- Prevents accessing non-existent registers on instances lacking
  certain features
- Provides a more lightweight interrupt handling path
- Slightly improves code efficiency by avoiding unnecessary register
  operations

The config structure is now used in the ISR to pass the number of
message buffers to FLEXCAN_MbHandleIRQ().

Signed-off-by: William Tang <william.tang@nxp.com>
2026-01-26 11:59:37 +01:00
Hubert Miś
68dbbb14d7 drv: ft8xx: new coprocessor commands
Implement more co-processor commands in the FT8xx display driver.
The list of the new implemented commands consists of:

* CMD_FGCOLOR
* CMD_BGCOLOR
* CMD_SLIDER
* CMD_TOGGLE
* CMD_TRACK

Signed-off-by: Hubert Miś <hubert.mis@gmail.com>
2026-01-26 11:59:00 +01:00
Pisit Sawangvonganan
d8110bf398 drivers: i2c: place API into iterable section
Add the `DEVICE_API` wrapper to the remaining `i2c_driver_api` instances,
ensuring that each driver API is placed in its respective linker section.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2026-01-25 14:40:03 +01:00
Merin George
019b31f3eb drivers: bluetooth: hci: enable controller low power mode
Enable low power mode support in the bluetooth HCI driver for
cyw20829 so that the controller can enter sleep states when idle

Signed-off-by: Merin George <merin.george@infineon.com>
2026-01-25 14:39:08 +01:00
Daniel DeGrasse
b4cbd206ec drivers: serial: ns16550: support odd parity
Add odd parity support into ns16550 driver.

Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
2026-01-25 14:38:43 +01:00
Daniel DeGrasse
a436c1cc12 drivers: serial: ns16550: support interrupt API correctly for DW IP
For the base ns16550 spec, supporting the UART interrupt API correctly
is not strictly possible- the IIR register will clear after one read and
not update, so multiple calls to uart_irq_[tx/rx]_ready after
uart_irq_update will return stale data.

The Synopsis DW variant of this IP includes a USR register, which can be
used to correctly identify when the TX FIFO has space for more data and
when the RX FIFO is empty. Use this register when
CONFIG_UART_NS16550_DW8250_DW_APB is set.

Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
2026-01-25 14:38:43 +01:00
Daniel DeGrasse
f620006c84 drivers: serial: ns16550: support loopback mode
Add support for loopback mode in ns16550 uart driver, by setting LOOP
bit in MDC register.

Signed-off-by: Daniel DeGrasse <ddegrasse@tenstorrent.com>
2026-01-25 14:38:43 +01:00
Benjamin Cabé
49a89de750 drivers: stepper: adopt SHELL_HELP in stepper shell module
Use SHELL_HELP macro for help strings to ensure consistency across
various shell modules and to save on code size.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-01-24 08:52:47 -06:00
Benjamin Cabé
2cee3420b8 drivers: ptp: adopt SHELL_HELP in ptp shell module
Use SHELL_HELP macro for help strings to ensure consistency across
various shell modules and to save on code size.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-01-24 08:52:24 -06:00
Benjamin Cabé
ce8e3c0a7e drivers: spi: adopt SHELL_HELP in spi shell module
Use SHELL_HELP macro for help strings to ensure consistency across
various shell modules and to save on code size.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-01-24 08:52:07 -06:00
Gaetan Perrot
cb5b83b9bc drivers: comparator: mcux_acmp: remove dead error handling
The MCUX ACMP configuration helpers always return 0, making their
error checks in mcux_acmp_init() unreachable.

Remove the redundant return value checks to simplify the
initialization flow.

No functional change.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2026-01-24 08:49:14 -06:00
Andreas Schmidt
6d2471af41 drivers: spi: spi_shell: enumerate only direct SPI controller children
RUN_FN_ON_SPI_DEVICE to run a given fn only if the node_id is a direct
child of the SPI controller (i.e. DT_PARENT(node_id) == DT_BUS(node_id)),
and the node itself has status okay. This prevents enumerating sub-nodes
of SPI devices (for example GPIO sub-devices) which are not direct
children of the SPI controller.

Fixes #99785

Signed-off-by: Andreas Schmidt <andreas.schmidt@dormakaba.com>
2026-01-24 08:47:59 -06:00
Marcelo Roberto Jimenez
1ab8978e66 drivers: flash: flash_shell.c: Fix flash read help text
Actually, the parameter is the number of bytes to read, not the number
of double words.

Signed-off-by: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
2026-01-23 09:17:05 -06:00
Marcelo Roberto Jimenez
391ca7c7de drivers: flash: flash_shell.c: Fix parsing of "flash read"
The parsing of the number of bytes to read in the read command was being
done in hexadecimal, causing unexpected behavior.

Now the number can be interpreted in decimal or hexadecimal if prefixed
with 0x.

Signed-off-by: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
2026-01-23 09:17:05 -06:00
Marcelo Roberto Jimenez
9535aebafe drivers: flash: flash_shell.c: Run clang-format before patch
This patch runs clang-format on the flash_shell.c file before the
real patch gets applied, otherwise the changes would be hard to
read.

Signed-off-by: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
2026-01-23 09:17:05 -06:00
Johan Hedberg
f64a999147 drivers: bluetooth: silabs_efr32: Fix default for max PAwR advertisers
This option already depends on BT_PER_ADV_RSP being enabled, so we should
have a more reasonable default for it. This way e.g. the existing PAwR
sample app should work without additional changes.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2026-01-23 13:55:25 +01:00
Pieter De Gendt
8402a4f8e5 drivers: gpio: mcux: Fix updating ICR registers without IRQ lock
During configuration the base->ICR1 or base->ICR2 register is written
without an IRQ lock. This can result in unwanted side-effects if the status
bit isn't cleared, or the edge select still needs to be updated.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-01-23 13:54:42 +01:00
Gaetan Perrot
7af0a2fcdf sensor: adi: adxl372: stream: check return value of adxl372_set_op_mode
Check the return value of adxl372_set_op_mode() in
adxl372_submit_stream() and abort on error.

Fix CID: 516239

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2026-01-23 13:54:21 +01:00
Gaetan Perrot
ed545d2302 drivers: ethernet: lan9250: Make interrupt mask constant unsigned
Add a 'U' suffix to the interrupt status mask passed to
lan9250_write_sys_reg() to make the constant explicitly unsigned.

This avoids signed/unsigned ambiguity and addresses a SonarQube
static analysis warning.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2026-01-23 13:53:59 +01:00
Gaetan Perrot
f18da88e3f drivers: ethernet: lan9250: fix uninitialized variable warning
The lan9250_thread() function declares a local variable that may be
used without being initialized, triggering a -Wmaybe-uninitialized
warning when building with -Werror.

Initialize the variable at declaration to ensure deterministic
behavior and avoid build failures.

No functional change intended.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2026-01-23 13:53:59 +01:00
Gaetan Perrot
2719679c26 drivers: ethernet: lan9250: fix error handling
Several LAN9250 helper functions ignored return values from register
access and wait routines, potentially hiding SPI or timeout
failures.

Propagate error codes from read/write/wait helpers throughout the
driver so failures are detected and handled by callers.

This improves robustness and makes error conditions visible during
initialization, PHY access, RX/TX paths, and MAC configuration.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2026-01-23 13:53:59 +01:00