Commit graph zephyr/drivers
Author SHA1 Message Date
Mario Paja
ccdf98acd8 drivers: remove on-stack copying of dma cfg on stm32 drivers
This change removes the on-stack copying and instead
uses a pointer to the configuration to  avoid unnecessary
stack usage

Signed-off-by: Mario Paja <mariopaja@hotmail.com>
2025-12-10 10:33:50 +00:00
Kai Vehmanen
3b7b2aef96 drivers: dai: intel: ssp: add get_properties_copy support
Add support for new get_properties_copy() method. This allows to
use ssp driver from user-space threads.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2025-12-10 10:32:14 +00:00
Kai Vehmanen
05069845d4 drivers: dai: make user-space support build-time selectable
The DAI interface is not used from user-space in all configurations
where Zephyr user-space is enabled, so it is beneficial to have
a build option to contorl whether the DAI syscalls are included or
not.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2025-12-10 10:32:14 +00:00
Kai Vehmanen
fa2c904266 drivers: dai: add get_properties_copy() method
Add a variant of get_properties() method that writes the properties
to a caller provided pointer. Unlike the old variant, this copy
variant can be exported to user-space in a safe way.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2025-12-10 10:32:14 +00:00
Kai Vehmanen
81e37ad4e8 drivers: dai: add ability to use dai.h from user threads
Add user-space support to the dai.h interface. No functional
impact to builds when CONFIG_USERSPACE is not set.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2025-12-10 10:32:14 +00:00
Pieter De Gendt
e3882162cf drivers: ethernet: litex: Support MAC address config
Update the litex,liteeth ethernet driver to use a MAC address configuration
struct.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-12-09 22:39:53 -05:00
Yongxu Wang
90f2a22882 drivers: firmware: scmi: force polling mode for message attributes query
During reboot operations, interrupts are disabled but k_is_pre_kernel()
returns false, causing SCMI communication to fail when using interrupt
mode. Force polling mode to ensure reliable operation in all contexts.

Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
2025-12-09 22:39:35 -05:00
Yongxu Wang
2d3c40d1b3 drivers: firmware: scmi: add initial reboot interface
Implement sys_arch_reboot() using SCMI system power protocol
for warm and cold reset operations on SCMI-enabled platforms.

Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
2025-12-09 22:39:35 -05:00
Yongxu Wang
cc069c0201 drivers: firmware: scmi: Introduce basic system power protocol
Add SCMI System Power Domain Protocol support with:

- System power state set operations
- Standard SCMI power states (shutdown, cold/warm reset, suspend)
- Graceful and forceful power transitions
- Optional NXP vendor-specific power states
- Device tree binding for "arm,scmi-system"

This enables system-wide power management through standardized
SCMI interfaces for reboot and power control operations.

Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
2025-12-09 22:39:35 -05:00
Yongxu Wang
ada584012b drivers: firmware: scmi: add protocol version negotiate
Add SCMI protocol version negotiation to handle compatibility between
different agent and platform versions. The negotiation automatically
downgrades to supported version when needed and maintains backward
compatibility with legacy systems.

Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
2025-12-09 22:39:35 -05:00
Yongxu Wang
9d163c73fb drivers: firmware: scmi: add protocol version support
Add version field to struct scmi_protocol and update protocol macros
to accept version parameter.

Protocol versions added:
  - Clock Control: v3.0.0 (SCMI v3.2 DEN0056E)
  - Pin Control: v1.0.0 (SCMI v3.2 DEN0056E)
  - Power Domain: v3.0.1 (SCMI v3.2 DEN0056E)
  - NXP CPU: v1.0.0 (vendor extension)

Updated macros:
  - DT_SCMI_PROTOCOL_DATA_DEFINE
  - DT_SCMI_PROTOCOL_DEFINE
  - DT_SCMI_PROTOCOL_DEFINE_NODEV
  - DT_INST_SCMI_PROTOCOL_DEFINE

Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
2025-12-09 22:39:35 -05:00
Yongxu Wang
d0e9d950fb drivers: firmware: scmi: add common protocol interface functions
Add standardized SCMI protocol common interface functions that can be
reused across different SCMI protocol implementations:

- scmi_protocol_get_version(): Query protocol version
- scmi_protocol_attributes_get(): Get protocol-specific attributes
- scmi_protocol_message_attributes_get(): Query message capabilities
- scmi_protocol_version_negotiate(): Negotiate protocol version support

Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
2025-12-09 22:39:35 -05:00
Mathieu Choplain
5c65e3797f drivers: usb: udc: skeleton: share thread creation code across instances
Instead of having one "make_thread" function per instance, called through
a function pointer in the instance configuration, save the thread stack
information instead and consume it from shared code in the driver pre-init
function. This makes the driver more readable (less code in the instance
creation macro) and should reduce its footprint impact (since the thread
creation code is no longer duplicated).

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2025-12-09 22:39:24 -05:00
Tim Pambor
816dfb8f11 drivers: timer: stm32_lptim: add reset support
Add support for resetting the LPTIM peripheral to its default state
on initialization. This ensures that any previous configurations
do not interfere with the new settings.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2025-12-09 22:38:35 -05:00
Pieter De Gendt
f75ba50de6 drivers: ethernet: sensry: Support MAC address config
Update the sensry,sy1xx-mac driver to use a MAC address configuration
struct.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-12-09 22:38:23 -05:00
Pieter De Gendt
00b051dd76 drivers: ethernet: sensry: Fix phy handle instance
Fix ethernet PHY handle in case of multiple instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-12-09 22:38:23 -05:00
Marek Matej
5f3f4e7285 drivers: flash: Fix flash host type for CI builds
This fixes the APPCPU synthetic builds.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2025-12-09 22:38:02 -05:00
Tobias Kässer
ef85dbe085 drivers: sensor: adxl345: add device PM support
Add support for the Zephyr device power management framework to
enable runtime power control of the ADXL345 accelerometer.

This implementation adds a pm_device_action callback that handles
SUSPEND and RESUME actions. When suspended, the sensor enters
standby mode for low power operation. On resume, it returns to
measurement mode.

The implementation follows the standard pattern used by other
sensor drivers (lis2dh, bme280, vcnl4040) and integrates with
the PM_DEVICE_DT_INST_DEFINE macro for automatic PM setup.

Tested on nRF52832 with CONFIG_PM_DEVICE enabled.

Signed-off-by: Tobias Kässer <t.kaesser@gmail.com>
2025-12-09 22:37:39 -05:00
Zhaoxiang Jin
a62bf4b978 drivers: comparator: Add high-speed comparator support
Add high-speed comparator support

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2025-12-09 22:37:32 -05:00
Zhaoxiang Jin
bc93570584 drivers: clock_control_mcux_syscon: add HSCMP clock support
add HSCMP clock support.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2025-12-09 22:37:32 -05:00
Jacky Lee
3b38d6cc71 drivers: serial: ns16550: Fix TX IRQ not triggered when FIFO is empty
When uart_ns16550_irq_tx_enable() is called and the TX FIFO is already
empty, no new interrupt is generated, causing data transmission to stall
in some cases. This patch introduces a workaround to simulate an ISR
callback if the FIFO is empty when enabling the TX IRQ.

Signed-off-by: Jacky Lee <jacky.lee@egistec.com>
2025-12-09 14:55:35 -05:00
Henrik Brix Andersen
65eee6d3d9 drivers: can: increase default setting for software-limited RX filters
Increase the default number of software-limited CAN RX filters across the
drivers. Some of these were chosen quite conservative, requiring custom
configuration for even simple in-tree samples.

Users can reduce the number of available RX filters to reduce RAM footprint
as needed.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2025-12-09 14:54:02 -05:00
Henrik Brix Andersen
479666f26f drivers: can: rcar: rename CONFIG_CAN_RCAR_MAX_FILTER Kconfig option
Rename Kconfig option CONFIG_CAN_RCAR_MAX_FILTER to
CONFIG_CAN_RCAR_MAX_FILTERS to match remaining CAN driver Kconfig option
naming.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2025-12-09 14:54:02 -05:00
Henrik Brix Andersen
d3104b9f6d drivers: can: xmc4xxx: use proper namespace for Kconfig symbols
Use proper namespace for the CAN xmc4xxx Kconfig symbols, renaming
CONFIG_CAN_MAX_FILTER to CONFIG_CAN_XMC4XXX_MAX_FILTERS.

This prevents Kconfig symbol clashes between different CAN controller
drivers.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2025-12-09 14:54:02 -05:00
Henrik Brix Andersen
38c3297421 drivers: can: stm32: fdcan: use proper namespace for Kconfig symbols
Use proper namespace for the STM32 FDCAN Kconfig symbols, renaming
CONFIG_CAN_MAX_STD_ID_FILTER to CONFIG_CAN_STM32_FDCAN_MAX_STD_ID_FILTERS
and CONFIG_CAN_MAX_EXT_ID_FILTER to
CONFIG_CAN_STM32_FDCAN_MAX_EXT_ID_FILTERS.

This prevents Kconfig symbol clashes between different CAN controller
drivers.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2025-12-09 14:54:02 -05:00
Henrik Brix Andersen
f2a6a191cf drivers: can: stm32: bxcan: use proper namespace for Kconfig symbols
Use proper namespace for the STM32 bxCAN Kconfig symbols, renaming
CONFIG_CAN_MAX_STD_ID_FILTER to CONFIG_CAN_STM32_BXCAN_MAX_STD_ID_FILTERS
and CONFIG_CAN_MAX_EXT_ID_FILTER to
CONFIG_CAN_STM32_BXCAN_MAX_EXT_ID_FILTERS.

This prevents Kconfig symbol clashes between different CAN controller
drivers.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2025-12-09 14:54:02 -05:00
Henrik Brix Andersen
89a238d74c drivers: can: mcux: flexcan: use proper namespace for Kconfig symbols
Use proper namespace for the MCUX FlexCAN Kconfig symbols, renaming
CONFIG_CAN_MAX_FILTER to CONFIG_CAN_MCUX_FLEXCAN_MAX_FILTERS and
CONFIG_CAN_MAX_MB to CONFIG_CAN_MCUX_FLEXCAN_MAX_MB.

This prevents Kconfig symbol clashes between different CAN controller
drivers.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2025-12-09 14:54:02 -05:00
Henrik Brix Andersen
f2e49c8d55 drivers: can: mcp251xfd: use proper namespace for Kconfig symbols
Use proper namespace for the CAN mcp251xfd Kconfig symbols, renaming
CONFIG_CAN_MAX_FILTER to CONFIG_CAN_MCP251XFD_MAX_FILTERS.

This prevents Kconfig symbol clashes between different CAN controller
drivers.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2025-12-09 14:54:02 -05:00
Henrik Brix Andersen
4ec070570b drivers: can: max32: use proper namespace for Kconfig symbols
Use proper namespace for the CAN max32 Kconfig symbols, renaming
CONFIG_CAN_MAX_FILTER to CONFIG_CAN_MAX32_MAX_FILTERS.

This prevents Kconfig symbol clashes between different CAN controller
drivers.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2025-12-09 14:54:02 -05:00
Henrik Brix Andersen
6234480a57 drivers: can: mcp2515: use proper namespace for Kconfig symbols
Use proper namespace for the CAN mcp2515 Kconfig symbols, renaming
CONFIG_CAN_MAX_FILTER to CONFIG_CAN_MCP2515_MAX_FILTERS.

This prevents Kconfig symbol clashes between different CAN controller
drivers.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2025-12-09 14:54:02 -05:00
Henrik Brix Andersen
8b52241c06 drivers: can: sja1000: use proper namespace for Kconfig symbols
Use proper namespace for the CAN sja1000 Kconfig symbols, renaming
CONFIG_CAN_MAX_FILTER to CONFIG_CAN_SJA1000_MAX_FILTERS.

This prevents Kconfig symbol clashes between different CAN controller
drivers.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2025-12-09 14:54:02 -05:00
Henrik Brix Andersen
62f7dfa4be drivers: can: native_linux: use proper namespace for Kconfig symbols
Use proper namespace for the CAN native_linux driver Kconfig symbols,
renaming CONFIG_CAN_MAX_FILTER to CONFIG_CAN_NATIVE_LINUX_MAX_FILTERS.

This prevents Kconfig symbol clashes between different CAN controller
drivers.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2025-12-09 14:54:02 -05:00
Henrik Brix Andersen
4333f98b2c drivers: can: loopback: use proper namespace for Kconfig symbols
Use proper namespace for the CAN loopback driver Kconfig symbols, renaming
CONFIG_CAN_MAX_FILTER to CONFIG_CAN_LOOPBACK_MAX_FILTERS.

This prevents Kconfig symbol clashes between different CAN controller
drivers.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2025-12-09 14:54:02 -05:00
Qingsong Gou
7c39469e17 drivers: pwm: sf32lb: add atim based pwm driver
add atim based pwm driver for sf32lb platform

Signed-off-by: Qingsong Gou <gouqs@hotmail.com>
2025-12-09 09:54:16 -05:00
Joakim Andersson
79b9025315 drivers: modem: Include empty string arguments in argument parsing
When parsing AT command responses, empty string arguments were being
ignored if they occur it the end of the response.
This is not only iconsistent behavior, but also causes issues when
parsing responses where we need to know the number of arguments.
For example, the +CEREG response and unsolicited command response which
we need to know if it is response or unsolicited command response to
correctly parse the it, as the first argument will be different.
Example:
Response:     +CEREG: 5,4,\"0A0B\",\"FFFFFFFF\",9,0,0,,
Notification: +CEREG: 4,\"0A0B\",\"FFFFFFFF\",9,0,0,,
Here we want to know that response has 8 arguments, not 7, or we will
confuse it with the notification.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2025-12-09 09:53:20 -05:00
Yassine El Aissaoui
15a347b405 drivers: mcux_os_timer: Add Kconfig option for MIN_DELAY configuration
Introduce CONFIG_MCUX_OS_TIMER_MIN_DELAY to allow the configuration
of the minimum delay cycles.

Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
2025-12-09 09:53:05 -05:00
Julien Racki
dc7f445dbd drivers: ethernet: stm32: Add generic helper functions
This commit introduces helper functions to avoid having large
#if DT_HAS_COMPAT_STATUS_OKAY ... #else blocks,
improving readability.

Signed-off-by: Julien Racki <julien.racki-ext@st.com>
2025-12-09 09:52:43 -05:00
Mathieu Choplain
65f710f6f4 drivers: gpio: stm32: return error on invalid WKUP configuration for WBA
When an invalid GPIO configuration is provided for a wake-up pin on
STM32WBA series, display a series-specific message and return an error.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2025-12-09 09:52:22 -05:00
Mathieu Choplain
19666bb12e drivers: gpio: stm32: bubble-up wake-up pin configuration error
When an error occurs while attempting to configure a GPIO pin as wake-up
pin, return the error to the caller instead of merely printing a log
message which may not even be displayed.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2025-12-09 09:52:22 -05:00
Alain Volmat
d0c45d981a drivers: mipi_dsi: configure DSI host using pixelformat from panel
Use the pixelformat information provided by the DSI panel in order
to control the color coding of the DSI host.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-12-09 09:50:07 -05:00
Alain Volmat
73ca8c9f76 display: stm32-ltdc: clarify pixel-format property of lcd_controller
So far the LTDC driver has not be using the pixel-format property
defined in the lcd_controller bindings. This property describes the
format of the panel connected to the LTDC output. It is not to be
confused with the format of the LTDC layers (aka format of data stored
into the framebuffer). The LTDC accepts various input formats while in
most cases only RGB888 is supported for output. RGB666 is also supported
by enabling Dithering however it is not supported currently by the
driver.
Enforce verification of the pixel-format given to the LTDC device-tree
by checking that it matches with the platform supported formats.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-12-09 09:50:07 -05:00
Mathieu Choplain
923ece1eea drivers: sensor: qdec_stm32: don't enable LL full driver module
The QDEC driver does not use any of the functions implemented in the TIM
LL full driver module (`stm32XXxx_ll_tim.c`), only those provided by the
LL header (`stm32XXxx_ll_tim.h`).

Disable compilation of the unnecessary full driver module.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2025-12-09 11:14:14 +01:00
Mathieu Choplain
aaf69f5cef drivers: rtc: stm32: don't enable LL full driver module
The RTC driver does not use any of the functions implemented in the LL full
driver module (`stm32XXxx_ll_rtc.c`), only those provided by the LL header
(`stm32XXxx_ll_rtc.h`).

Disable compilation of the unnecessary full driver module.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2025-12-09 11:13:45 +01:00
Mathieu Choplain
3546e73cda drivers: flash: stm32_ospi: cleanup STM32H5-related quirks
STM32H5 series now uses the dedicated `flash_stm32_xspi` driver instead.
Remove all quirks related to H5 in the STM32 OSPI driver.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2025-12-09 11:13:27 +01:00
Haoran Jiang
2a2d5b7be4 drivers: crc: sf32lb: Fix crc calculation error
When the number of input bits changes, the value in the `CR_DATASIZE`
register should be modified accordingly.
The CRC32_C algorithm does not require the result to be XOR

Signed-off-by: Haoran Jiang <halfsweet@halfsweet.cn>
2025-12-09 11:12:52 +01:00
Qingsong Gou
9bdafbf23b drivers: clock_control: sf32lb: fix GPTIM2 clock rate
Fix GPTIM2 clock rate

Signed-off-by: Qingsong Gou <gouqs@hotmail.com>
2025-12-09 11:12:30 +01:00
Peter Wang
336a25c1eb drivers: hwinfo: add mcxa577 support into mcux_mcx_cmc
1. add mcxa577 support into hwinfo_mcux_mcx_cmc

Signed-off-by: Peter Wang <chaoyi.wang@nxp.com>
2025-12-09 11:12:03 +01:00
Markus Becker
80d09acfca drivers: Typo in Interrupt
Trivial typo fix.

Signed-off-by: Markus Becker <Markus.Becker@tridonic.com>
2025-12-09 11:11:03 +01:00
Jordan Yates
a1970ebd2f bluetooth: hci: spi: fix length check
The buffer length check was not updated with the change to the H4 header
push location (changed in 6113230c). As the complete buffer is now
provided, a buffer of length `SPI_MAX_MSG_LEN` is now valid.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-12-09 09:27:32 +01:00
Charles Hardin
b38a46bade drivers: ethernet: lan9250: add in the reset gpio configurate
The reset gpio field was in the config structure but was not coded
into the initialization path. So, add the appropriate code to handle
the gpio setup when it is defined in the device tree.

Signed-off-by: Charles Hardin <ckhardin@gmail.com>
2025-12-09 09:25:15 +01:00