Commit graph

28,390 commits

Author SHA1 Message Date
Guillaume Gautier
4536b15bca drivers: clock: stm32f2_f4_f7: move get_ck48_frequency function
Move get_ck48_frequency function outside of the #if STM32_PLL_ENABLED
because it should be usable even if the main PLL is not used. The mux
can indeed be used with PLLI2S.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-01-19 16:20:44 -06:00
Guillaume Gautier
5960c2d5a1 drivers: clock: stm32: update stm32f2_f4_f7 driver with the new binding
This commit updates the STM32Fx clock driver to add complete support for
all PLLs for all SoCs.

Supports  all outputs and additional divisors:
- PLL-DIV-R
- PLLI2S-P
- PLLI2S-DIV-Q
- PLLI2S-DIV-R

Adds global checks to make sure that all:
- All PLLs share the same source clocks
- All PLLs share the same M-Divisor (on applicable SoCs)
- Both div-X and div-divX are defined (on applicable SoCs)

Functions get_plli2s_source and get_plli2ssrc_frequency are added to make
sure that PLLI2S can be used even if PLL is not defined.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-01-19 16:20:44 -06:00
Guillaume Gautier
8d677b2c29 drivers: clock: use concat instead of ##
Use CONCAT macro instead of ## to create the PLL division macro.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-01-19 16:20:44 -06:00
Ashirwad Paswan
68b86a15a1 dma: rpi_pico: fix transfer count calculation
The Pico SDK expects a transfer count (items), not a byte count. The
driver incorrectly passed the byte size, causing buffer overflows on
16-bit and 32-bit transfers.Fix this by storing the transfer width in
the channel configuration and dividing the block size by that width
to calculate the correct transfer count.

Fixes #99435

Signed-off-by: Ashirwad Paswan <ashi06712@gmail.com>
2026-01-19 16:19:56 -06:00
Alessandro Manganaro
b93fabaf25 drivers: timers: stm32: improving lptim configuration sequence
Moving the reset of ltpim hw ip at the beginning of
sys_clock_driver_init to improve the reliability of lptim hw
configuration sequence.

Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
2026-01-19 16:04:36 +00:00
Alain Volmat
5b5cdecb97 display: fix SDL display format handling
Switch SDL buffers from SDL_PIXELFORMAT_ARGB8888 to
SDL_PIXELFORMAT_BGRA32. BGRA32 is platform endianness independent
description, defined as below:

	Byte 0   Byte 1   Byte 2   Byte 3
	7......0 15.....8 23....16 31....24
	Bbbbbbbb Gggggggg Rrrrrrrr Aaaaaaaa

The driver is then updated in order to ensure that all buffers,
given via a PIXEL_FORMAT_ described format are properly converted
into the SDL_PIXELFORMAT_BGRA32. At the same time endianness
conversion code is also added in order to avoid taking assumption
that the running platform is little-endian and ensure that data
are properly read as expected.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2026-01-19 16:04:04 +00:00
Alain Volmat
b13d9a0510 display: rename current BGR_565 format into RGB_565X
The format currently expected by devices and sample display
application for BGR_565 is actually RGB_565 format with bytes
swapped (not B / R swapped). That is:

PIXEL_FORMAT_RGB_565:
         * @code{.unparsed}
         *   7......0 15.....8
         * | gggBbbbb RrrrrGgg | ...
         * @endcode

current PIXEL_FORMAT_BGR_565:
         * @code{.unparsed}
         *   7......0 15.....8
         * | RrrrrGgg gggBbbbb | ...
         * @endcode

This is explained in both st7796s display driver but also is
what is generated by the sample display application. As a video
format (ex: V4L2), such format is not mentioned as BGR (for
which R and B are swapped) but RGB_565X.

Within the whole Zephyr tree, rename the curremt BGR_565 format
into RGB_565X in order to emphasis that this is a byte swapped
format rather than a B/G component swapped format.

This also correct the description of the format in display.h
file, which wasn't correct based on what was being used by
display driver or sample display app.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2026-01-19 16:04:04 +00:00
Felix Wang
88d4709b45 drivers: pwm: mcux_ctimer: Fix multi-line assertion message formatting
Fix formatting of the __ASSERT message in
mcux_ctimer_pwm_get_cycles_per_sec to properly concatenate the
string across multiple lines.

Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
2026-01-19 15:18:20 +01:00
Neil Chen
58bdfd1f46 drivers: syscon: Fix mcxn547 CLOCK_GetFlexcanClkFreq issue
mcxn547 only have one flexcan, but When calling CLOCK_GetFlexcanClkFreq,
parameters are required.

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2026-01-19 15:16:39 +01:00
Flavio Ceolin
4690b7f966 entropy: gd32: Fix build error
entropy_gd32_recover() had not return type defined causing the
following issue when building:

drivers/entropy/entropy_gd32.c:61:8: error: return type defaults to
'int' [-Werror=implicit-int]

Fix it and change the function to void since it was returning a
constant 0 that is never checked or used.

Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
2026-01-19 15:15:52 +01:00
Pieter De Gendt
7fb1573311 drivers: flash: flexspi-nor: Support reset GPIO
Add optional reset pin to flash devices.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-01-19 15:12:25 +01:00
Fin Maaß
9ff85c87d5 drivers: ethernet: nxp: remove redunant tx mutex
remove redunant tx mutex, as the networking
subsystem already provides one since
f65ac5effb02bdc4cb70b205545971e70c53c282

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-01-19 15:11:50 +01:00
Fin Maaß
77cbd69a3e drivers: ethernet: stm32: remove redunant tx mutex
remove redunant tx mutex, as the networking
subsystem already provides one since
61c392c5b1

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-01-19 15:11:50 +01:00
Fin Maaß
d043dd3cdf drivers: ethernet: sensry: remove redunant tx mutex
remove redunant tx mutex, as the networking
subsystem already provides one since
61c392c5b1

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-01-19 15:11:50 +01:00
Fin Maaß
999223f36e drivers: ethernet: numaker: remove redunant tx mutex
remove redunant tx mutex, as the networking
subsystem already provides one since
61c392c5b1

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-01-19 15:11:50 +01:00
Fin Maaß
6fc50ff4f0 drivers: ethernet: litex: remove redunant tx mutex
remove redunant tx mutex, as the networking
subsystem already provides one since
61c392c5b1

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-01-19 15:11:50 +01:00
Holt Sun
2f3b4a4611 drivers: timer: cortex_m_systick: fix counter read order on LPM exit
Read the idle timer counter value after getting interrupt status and
top value to ensure more accurate timing measurements when exiting
low-power mode.

Signed-off-by: Holt Sun <holt.sun@nxp.com>
2026-01-19 15:10:27 +01:00
Holt Sun
f9444d2d80 drivers: timer: cortex_m_systick: fix LPM entry with RESET_BY_LPM
Clear pending SysTick interrupt before entering low-power mode when
CONFIG_CORTEX_M_SYSTICK_RESET_BY_LPM is enabled. A pending interrupt
can inhibit LPM entry or cause immediate wakeup. This is safe since
cycle_count was already updated.
Also improve RESET_BY_LPM Kconfig help text.

Signed-off-by: Holt Sun <holt.sun@nxp.com>
2026-01-19 15:10:27 +01:00
Krzysztof Chruściński
5cfcbf2e87 drivers: counter: nrfx_timer: Optimize interrupt handler
Check only events which have interrupt enabled.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2026-01-19 15:08:06 +01:00
Robert Hancock
8b287a6a74 drivers: dma: dma_xilinx_axi_dma: Make descriptors per-instance
Move the descriptor storage into the per-instance data structure rather
than being global, as they should not be shared between instances.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2026-01-19 15:07:05 +01:00
Robert Hancock
0345fc9d2a drivers: dma: dma_xilinx_axi_dma: Fix up IRQ locking
The way the driver was storing IRQ numbers for later use in the various
locking modes was not correct, causing the wrong IRQs to potentially be
disabled/enabled in some modes. Refactor the way this is done to be
cleaner, and also the way the different locking modes are implemented in
order to ensure that all modes receive compile test coverage.

Also, ensure that the IRQ for the RX or TX channel is always disabled
during the execution of the corresponding ISR, to prevent it from being
preempted by itself if the DMA core raises another interrupt during the
ISR execution.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2026-01-19 15:07:05 +01:00
Robert Hancock
c00f01fb97 drivers: dma: dma_xilinx_axi_dma: Use selective dcache flush/invalidate
This driver has a config option
DMA_XILINX_AXI_DMA_DISABLE_CACHE_WHEN_ACCESSING_SG_DESCRIPTORS to allow
it to be used on platforms where DMA memory access is not automatically
cache coherent. However, fully disabling the dcache when accessing DMA
buffers/descriptors is not necessary and is potentially problematic.
This can be handled more selectively by doing explicit cache invalidate
and/or flush operations on the buffers involved as required.

Note that this does introduce a requirement that RX DMA buffers provided
to the driver are cache line aligned, as otherwise the required cache
invalidate operation could potentially corrupt unrelated data. This is
explicitly checked when a DMA RX operation is started.

Tested on Cortex-R5 with data cache enabled.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2026-01-19 15:07:05 +01:00
Robert Hancock
01d089ae02 drivers: dma: dma_xilinx_axi_dma: Remove polling timer
The driver previously had a timer to periodically check for completed
TX/RX transfers in case an interrupt notification was missed. With
previous changes to the driver to avoid lost interrupt wakeups, this
workaround should no longer be required, so remove it.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2026-01-19 15:07:05 +01:00
Robert Hancock
dd352c1e5d drivers: dma: dma_xilinx_axi_dma: Fixes for DMA interrupt processing
Fix some issues in the driver's DMA interrupt handling:

-Ensure that interrupts are cleared prior to handling interrupt events,
so that events raised during interrupt processing will cause the
hardware to raise a new interrupt

-Ensure that we do not overwrite existing DMA descriptors which are
incomplete (such as by trying to execute more transfers than there are
slots in the descriptor ring)

-Ensure that error events reported by the DMA engine are reported

-Rename some of the variables to track pending and completed ring
locations for better clarity

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2026-01-19 15:07:05 +01:00
Robert Hancock
1874b172b0 drivers: dma: dma_xilinx_axi_dma: Move global reset to init function
Doing a reset of the DMA engine during the dma_configure operation is
problematic when using the DMA core in combination with the Xilinx AXI
Ethernet core, since the DMA core's reset signals are normally
propagated into the Ethernet core. This means that after the Ethernet
core initializes and starts a DMA operation for the first time, the DMA
core is reset, wiping out all of the register settings that the Ethernet
core has made.

To avoid this, move the DMA core reset and other initialization which
only needs to be done once into the init function, so this is done
during initial driver load and not deferred until later.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2026-01-19 15:07:05 +01:00
Robert Hancock
36909486e7 drivers: dma: dma_xilinx_axi_dma: Cleanup register access
Instead of using a packed structure to define the register map, just
create an enum for the registers and use that to refer to them. This
avoids the need for repeatedly disabling GCC warnings for taking the
address of packed structure members.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2026-01-19 15:07:05 +01:00
Robert Hancock
e0a268f501 drivers: dma: dma_xilinx_axi_dma: Add dependency for cache disable option
The DMA_XILINX_AXI_DMA_DISABLE_CACHE_WHEN_ACCESSING_SG_DESCRIPTORS
option is not meaningful to enable unless the platform/configuration
actually supports the corresponding cache maintenance operations. Add
dependencies accordingly.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2026-01-19 15:07:05 +01:00
Thomas Hebb
bf81b7ca07 bluetooth: cyw43xxx: Wire up vendor command to set MAC address
There's a standardized way to set a public Bluetooth address in the
core, and this hardware has a vendor specific command to do just that.
Tell the core we support the operation and implement the command. This
allows applications to set a MAC by calling bt_id_create() prior to
bt_enable().

Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
2026-01-19 12:21:32 +01:00
Thomas Hebb
0b75b100cc drivers: bluetooth: h4: Pass params to vendor setup function
If the vendor driver knows how to set a public MAC, it can select
CONFIG_BT_HCI_SET_PUBLIC_ADDR and set the address in this argument,
allowing applications to set a public address with bt_id_create().

Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
2026-01-19 12:21:32 +01:00
Abderrahmane JARMOUNI
ddaf21c02d Revert "drivers: display: st7796s: Add display_set_orientation API"
This reverts commit 132ab06a3f.

Signed-off-by: Abderrahmane JARMOUNI <git@jarmouni.me>
2026-01-19 12:18:36 +01:00
Hieu Nguyen
4890a26f1c drivers: pwm: Update driver for RZ devices
Implement interrupt settings to expand the driver to RZ/V2H, V2N SoCs

Signed-off-by: Hieu Nguyen <hieu.nguyen.ym@bp.renesas.com>
Signed-off-by: Tien Nguyen <tien.nguyen.zg@renesas.com>
2026-01-19 12:13:58 +01:00
Gaetan Perrot
46ad3814cc drivers: clock_control: bl60x: make set_root_clock_dividers void
clock_control_bl60x_set_root_clock_dividers() 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-19 10:06:51 +01:00
Gaetan Perrot
9927c16d1f drivers: clock_control: bl70x: make set_root_clock_dividers void
clock_control_bl70x_set_root_clock_dividers() 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-19 10:06:51 +01:00
Thomas Hebb
21cd98a5e1 drivers: sdhc: imx_usdhc: Extend all reset timeouts
commit bf61a47887 ("drivers: sdhc: imx_usdhc: extend reset timeout
duration") extended the timeout from 100 iterations to 1000 iterations
for the USDHC_Reset() call in imx_usdhc_reset() but not in the other
places it's called. I have observed a "usdhc: Failed to reset command
line" error from imx_usdhc_error_recovery() on an i.MX RT1061, which
goes away if I extend the timeout. Do so there and also at other call
sites for good measure.

Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
2026-01-19 10:03:39 +01:00
Etienne Carriere
82ef82dff1 drivers: ethernet: stm32: factorize clock handles
Factorize STM32 interface clocks configuration in a single array.
This change eases later integration of other SoCs with different
clocks names while the driver only has to enable (possibly disable)
the clocks on a single sequence.

Suggested-by: Fin Maaß <f.maass@vogl-electronic.com>
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-01-19 10:03:16 +01:00
Etienne Carriere
c623c4544d drivers: ethernet: stm32: finalize move of clocks to controller node
Remove helper macro used to transition from MAC clocks defined
by the MAC node to definition in the controller (parent) node.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-01-19 10:03:16 +01:00
Etienne Carriere
d965feeea4 drivers: ethernet: stm32: prepare move of MAC clocks to parent node
Prepare move of STM23 ethernet MAC clocks to the controller node (parent
node). For sake of simplicity, define a filed for all possible clocks in
struct eth_stm32_hal_dev_cfg, a later change will replace the whole
with a single STM32 clock instance (struct stm32_pclken) array pointer.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-01-19 10:03:16 +01:00
Etienne Carriere
6e095400c2 drivers: ethernet: stm32: use STM32_DT_INST_CLOCK_INFO_BY_NAME()
Update STM32 ethernet driver to use STM32_DT_INST_CLOCK_INFO_BY_NAME()
helper macro to always get all clock information, not only the bus ID
and bit position.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-01-19 10:03:16 +01:00
Peter Johanson
a17503cb17 drivers: input: Add sleep-mode-enable property for Pinnacle
Add a new sleep-mode-enable property for the Cirque Pinnacle input driver,
to enable the sleep-mode for those peripherals, which will go into a lower
power state after 5 seconds with no fingers detected.

Signed-off-by: Peter Johanson <peter@peterjohanson.com>
2026-01-18 09:40:21 -06:00
Peter Johanson
fa7037ca71 input: pinnacle: Perform software reset on init
Don't rely on power-on-reset for the connected device, issue a software
reset on init to be sure we're reset before continuing.

Signed-off-by: Peter Johanson <peter@peterjohanson.com>
2026-01-18 09:40:12 -06:00
Henrik Lindblom
79e9b72534 drivers: adc: ads1x4s0x: configure reference buffers
Configure the reference buffers when using external reference voltage for a
channel. For the internal reference the datasheet[1] recommends that the
buffers are disabled and for external references they should be disabled if
REFPx/REFNx is close to AVDD/AVSS. After reset the positive reference
buffer is enabled and the negative is disabled. The default values
correspond to the example circuit for a two-wire and four-wire PT100 RTD
measurement with low-side reference.[2][3]

The values configured by the driver are maybe a little opinionated, but the
current behaviour is kept to avoid surprises for people that are happy with
the drivers defaults.

The change applies to both ads11xs0x and ads124xs0x series.

Link: [1]: https://www.ti.com/lit/ds/symlink/ads124s08.pdf
Link: [2]: https://www.ti.com/lit/an/sbaa329b/sbaa329b.pdf
Link: [3]: https://www.ti.com/lit/an/sbaa336b/sbaa336b.pdf

Signed-off-by: Henrik Lindblom <henrik.lindblom@vaisala.com>
2026-01-18 10:30:42 +01:00
Felix Wang
e72d11e903 drivers: pwm: Add input capture support to nxp,sctimer-pwm
Implement PWM input capture functionality for the NXP SCTimer
driver with support for both pulse width and period measurement
in single-shot and continuous modes.

Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
2026-01-17 17:05:00 +01:00
Felix Wang
e7840a9d27 drivers: pwm: Fix polarity update on duty cycle change
1.Add mcux_sctimer_pwm_update_polarity() function to properly
reconfigure PWM output polarity when duty cycle is updated.
2.Update Match Reload Value register when Match register is
set.
3.Stop timer before update to prevent bus error

Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
2026-01-17 17:05:00 +01:00
Felix Wang
fa48bee6c4 drivers: pwm: fix prescaler calculation for pwm_mcux_ctimer
The prescaler divides the clock by (prescaler + 1), not by the prescaler
value directly. Update the calculation to correctly account for this.

Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
2026-01-17 17:04:44 +01:00
Felix Wang
8dcd7579eb drivers: pwm: Add PWM capture functionality for pwm_mcux
Add support for PWM input capture functionality to the NXP MCUX PWM
driver. This enables measurement of pulse width and period of external
PWM signals.

Key features added:
- PWM capture configuration and control APIs
- Interrupt-driven capture with overflow handling
- Support for both pulse width and period measurement
- Configurable input filtering
- Support for continuous and one-shot capture modes

The implementation uses FlexPWM channel X as the dedicated input
capture channel, while channels 0 and 1 remain available for PWM
output. Capture functionality is conditionally compiled based on
CONFIG_PWM_CAPTURE configuration option.

Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
2026-01-17 17:04:24 +01:00
Felix Wang
f46f921b7f drivers: pwm: Fix ASSERTION FAIL in pwm_mcux
In PWM_SetupPwm implementation, there is a check:
    temp = pwmClock / pwmFreq_Hz;
    assert(temp <= 0xFFFFU);
Currently pwmFreq_Hz is 1, makes assert failed with
high frequency pwmClock. Since VALx values is set
directly for edge aligned PWM, the pwmFreq_Hz here is
a dummy value, set pwmFreq_Hz equal to pwmClock
frequency to pass assert check.

Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
2026-01-17 17:04:24 +01:00
Isabelle OGER
bdf1e58a97 drivers: modem: introduce STMicroelectronics ST87M01 modem driver
The STMicroelectronics ST87M01 modem is an ultra-compact low-power
NB-IoT industrial module.
The ST87M01 is a high-performance, fully programmable, ultra-compact,
and low-power LTE Cat NB2 NB-IoT industrial module series,
offering comprehensive worldwide band coverage and advanced
security features.
Supporting a wide range of IoT protocols, the ST87M01 module includes
PDU SMS services and internet protocols such as TCP/IP, TLS/DTLS, CoAP,
LwM2M, MQTT, and HTTP/HTTPS, enabling versatile connectivity and
application scenarios.

This driver introduces support for AT commands to query modem
information and socket offloading for TCP/UDP transfers.

Signed-off-by: Isabelle OGER <isabelle.oger@st.com>
2026-01-17 14:25:46 +01:00
Fabio Baltieri
69c7befe26 drivers: eth_nxp_enet_qos: add promisc mode support
Add support for ETHERNET_CONFIG_TYPE_PROMISC_MODE.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2026-01-16 20:56:56 +00:00
Jason Yu
4808de2498 drivers: flash: soc_mcux: Fix ram function permission issue
Add workaround for MCUXSDK FTFX driver when FTFx_DRIVER_IS_FLASH_RESIDENT
is enabled.
The SDK places the run command function in data section which
is not executable when Zephyr configures memory permissions.
Implement a RAM function to replace the FTFX driver's run command function

Fixes: #98560

Signed-off-by: Jason Yu <zejiang.yu@nxp.com>
2026-01-16 20:56:50 +00:00
Mathieu Choplain
e0d6d425bd drivers: disk: sdmmc_stm32: error out when no domain clock is provided
If CONFIG_SDMMC_STM32_CLOCK_CHECK=y but the SDMMC node lacked domain clock,
the driver would perform an out-of-bounds access to priv->pclken[1] and
provide garbage as the "subsystem" in the call to clock_control_get_rate().

Detect this situation and error out with an explicit message instead to
prevent UB and help users.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-01-16 18:07:27 +01:00