Commit graph

25,525 commits

Author SHA1 Message Date
William Tang
7549d5155b drivers: can: mcux: flexcan: fix loop back error when CAN FD enabled
Fix mcux flexcan driver failed to transfer when both loop back mode
and CAN FD mode are enabled.

Transceiver Delay Compensation feature must be disabled in loopback
mode. For some platforms, both FDCTRL[TDCEN] and ETDC[ETDCEN] can
enable such feature. In this case, SDK API only configure ETDC register
and current driver do not clear ETDC[ETDCEN].

Fix this issue by add ETDC[ETDCEN] configuration according to SDK
macro `FSL_FEATURE_FLEXCAN_HAS_ENHANCED_BIT_TIMING_REG` vaule.

Test this commit on mimxrt1180_evk/mimxrt1189/cm33 and set both CAN FD
mode and loop back mode.

Signed-off-by: William Tang <william.tang@nxp.com>
2025-10-21 11:41:21 +03:00
Benjamin Cabé
ef2141987d drivers: sensor: ti_hdc302x: Fix double-promotion warnings
Change HDC_302X_TEMP_OFFSET_SCALE and HDC_302X_HUMIDITY_OFFSET_SCALE
from float literals to double literals to avoid implicit conversion
warnings when compiling with clang and -Wdouble-promotion flag.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-10-21 11:40:29 +03:00
Tony Han
802fdc4dd3 drivers: pwm: pwm_sam: update to support Soc SAMA7G5
Redefine some macros due to different naming scheme in the header file.
Get the clock rate from the device tree when 'SOC_ATMEL_SAM_MCK_FREQ_HZ'
is not defined.

Signed-off-by: Tony Han <tony.han@microchip.com>
2025-10-20 19:19:20 -04:00
COUSSEMENT Stijn
523eed2d08 drivers: sensor: ti: Add TI temp sensor HDC302x
The HDC302X sensor driver is added,
you can use this driver to read temperature and humidity.
Also set an offset, upper and lower limits to get warned
when temperature or humidity get out of band.
The sensor is build for ultra low power applications.

Signed-off-by: COUSSEMENT Stijn <stijn.coussement@psicontrol.com>
2025-10-20 19:19:09 -04:00
Zhaoxiang Jin
c6033d58e5 drivers: sensor: pmc_tmpsns: Reduce floating-point operations
Reduce floating-point operations in the nxp_pmc_tmpsns.
Provide new calculation method without floating-point operations.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2025-10-20 19:18:36 -04:00
Zhaoxiang Jin
44bc475309 drivers: sensor: Enable NXP pmc tmpsns driver
This commit introduced NXP pmc temperature sensor
(pmc-tmpsns) driver.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2025-10-20 19:18:36 -04:00
Jeremy Dick
6a8fb9f5f2 drivers: display: st7567: Obey the column offset property
Shift the output to the display by the configured column offset

Signed-off-by: Jeremy Dick <jdick@pivotint.com>
2025-10-20 19:18:27 -04:00
Sunil Abraham
ecc9f6ce71 drivers: uart: microchip/g1: add more functionality
Add more functionality in uart driver.
Implement interrupt API.

Signed-off-by: Sunil Abraham <sunil.abraham@microchip.com>
2025-10-20 19:18:03 -04:00
Logan Saint-Germain
089ea66914 drivers: sensor: max30101: Enhanced sample_fetch to match datasheet
The max30101 allows to configure time slots in samples acquisition.
It is now supported by adding matrix mapping for the slot/fifo
indexing. When a channel is present multiple times, the resulting
sample from the `sensor_channel_get` is averaging each entry.
Added Die temperature sample acquisition with
`CONFIG_MAX30101_DIS_TEMPERATURE` Kconfig.

Signed-off-by: Logan Saint-Germain <l.saintgermain@catie.fr>
2025-10-20 19:17:51 -04:00
Logan Saint-Germain
52d0ad2c67 drivers: sensor: max30101: Enhanced driver to support triggers
The max30101 sensor driver doesn't support triggers.
Add `.trigger_set` API and corresponding Kconfig and
device tree parameters. Add `SENSOR_CHAN_AMBIENT_LIGHT`
and `SENSOR_TRIG_OVERFLOW`.

Signed-off-by: Logan Saint-Germain <l.saintgermain@catie.fr>
2025-10-20 19:17:51 -04:00
Logan Saint-Germain
8a1371c5d6 drivers: sensor: max30101: Enable support for multiple instance
The max30101 sensor driver doesn't support multiple instance.
Update Kconfig and maxim,max30101.yaml for instance based
configuration. Propagate changes over existing files.

Signed-off-by: Logan Saint-Germain <l.saintgermain@catie.fr>
2025-10-20 19:17:51 -04:00
Andre Heinemans
35396b1a0e drivers: memc_mcux_flexspi: force applying OVRDVAL
Enable this kconfig setting to force using a specific raw value for the
OVRDVAL field in the DLLCR registers.

This option gives more granularity than the 'data-valid-time' field in
the dts. The unit of 'data-valid-time' is nanoseconds while the unit of
OVRDVAL are raw delay cells.

Normally the 'data-valid-time' on any 'nxp,imx-flexspi-device' device
will set the OVRDVAL and OVRDEN fields in the DLLCR register
but works only when the 'rx-clock-source' is configured to '#0 External
input from DQS pad' and the frequency <= 100MHz.

Signed-off-by: Andre Heinemans <andre.heinemans@nxp.com>
2025-10-20 19:17:39 -04:00
Tahsin Mutlugun
36a3a4c1e0 drivers: pwm: max32: Simplify prescaler calculation
Replace the look-up table used to obtain the prescaler enumeration with
a simple multiplication.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2025-10-20 19:16:00 -04:00
Furkan Akkiz
914e6a1948 drivers: counter: max32: Fix prescaler configuration
The existing formula assumed prescaler enumerations were consecutive,
which led to incorrect values being passed to HAL functions. Update
the code to calculate correct prescaler enumerations.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
2025-10-20 19:16:00 -04:00
Alain Volmat
bc8eb83c36 drivers: dma: stm32: avoid clear flags if hal_override on unexpected irq
In case of using HAL_OVERRIDE, avoid clearing the FIFO ERROR flag
before calling the HAL DMA IrqHandler so that the HAL DMA code
handling can be used.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-10-20 19:15:44 -04:00
Alain Volmat
110c61bfea drivers: dma: stm32: avoid clear TE in case of hal_override
If hal_override is set, avoid reporting an error and clear the
transfer error (TE) bit so that HAL code can properly handle it.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-10-20 19:15:44 -04:00
Anthony Williams
3158211391 sensor: icm45686: Use explicit VLA for fifo encoded data
The size of icm45686_encoded_data fifo_payload is guaranteed
to span the full number of frames read as it was allocated during
icm45686_event_handler() buf_len_required size.

This update suppresses the static analysis warning of
out of bounds memory access at index 1 by explicitly declaring
fifo_payload to be a VLA at the end of icm45686_encoded_data.

Signed-off-by: Anthony Williams <anthony289478@gmail.com>
2025-10-20 19:15:30 -04:00
Anthony Williams
d0d29aa5e2 sensor: icm45686: Swap ASSERT to CHECKIF in fifo decode
Change the __ASSERT on unsupported fifo packet header to
CHECKIF so the user can choose how to handle the invalid
packet.

Signed-off-by: Anthony Williams <anthony289478@gmail.com>
2025-10-20 19:15:30 -04:00
Anthony Williams
2df6c368ba sensor: icm45686: Implement AN-000364 fix for fifo corruption
When operating in streaming mode, a FIFO empty event, which
is caused by host reading the last byte of the last FIFO frame,
can cause FIFO data corruption.

During subsequent reads to the FIFO, the first  frame that arrives
after the empty condition will be corrupted. Once the issue occurs,
the internal state cannot recover and the FIFO must be flushed in
bypass mode to clear the corrupted state.

The current workaround from TDK is to read M-1 frames when M frames
are reported by fifo_count. Since M is fixed by the fifo_watermark
DT parameter, and in cases where fifo_watermark == 1, the watermark
trigger threshold is set to M + 1 frames and M frames are read out
during a watermark threshold event.

Signed-off-by: Anthony Williams <anthony289478@gmail.com>
2025-10-20 19:15:30 -04:00
Anthony Williams
ee63650541 sensor: icm45686: Print unsupported fifo packet on assert
When an unsupported fifo packet triggers an assert, it is
helpful to see the packet as a hex value to help when debugging.

Signed-off-by: Anthony Williams <anthony289478@gmail.com>
2025-10-20 19:15:30 -04:00
WenBin Zhang
9094e026f7 drivers: ethernet: eth_stm32 add tx async mode
Enable TX transmission asynchronous mode to enhance performance

Tested on the nucleo_h743zi board using samples/net/zperf

west build -b nucleo_h743zi/stm32h743xx samples/net/zperf/ --pristine
-- -DCONFIG_NET_CONFIG_MY_IPV4_ADDR=\"192.168.1.199\"

upload cmd:
```
//linux
iperf -s -l 1K -p 5001
iperf -s -l 1K -p 5002 -u

//shell
zperf tcp upload 192.168.1.109 5001 10 1K
zperf udp upload 192.168.1.109 5002 10 1K 300M
```

download cmd:
```
//shell
zperf tcp download 5001 192.168.1.199
zperf ucp download 5002 192.168.1.199

//linux
iperf -l 1K -c 192.168.1.199 -p 5001
iperf -l 1K -c 192.168.1.199 -p 5002 -u
```

before:
udp upload:   73.5Mbps/s
tcp upload:   71.3Mbps/s
udp download: 93.9Mbps/s
tcp download: 70.5Mbps/s

after:
udp upload:   92.2Mbps/s
tcp upload:   78.1Mbps/s
udp download: 93.7Mbps/s
tcp download: 75.2Mbps/s

Signed-off-by: WenBin Zhang <freey7955@gmail.com>
2025-10-20 14:23:56 -04:00
WenBin Zhang
ab093c29c9 drivers: ethernet: eth_stm32 tx_in_sem limit set to 1
tx_int_sem serves solely as a signal indicator and does not require signal
counting. Within eth_stm32_tx, the semaphore is reset each time a packet
is transmitted. Upon receiving the transmission completion signal, the
function exits. Signal counting is unnecessary. Change to a binary
semaphore.

Signed-off-by: WenBin Zhang <freey7955@gmail.com>
2025-10-20 14:23:56 -04:00
Gerard Marull-Paretas
f9cca217c3 drivers: flash: sf32lb_mpi_qspi_nor: add initial driver
Initial driver for the SF32LB MPI accessing QSPI NOR flash devices.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2025-10-20 14:23:43 -04:00
Gerard Marull-Paretas
ddc5810888 drivers: flash: spi_nor: add SPI_NOR_CMD_BE_32K_4B
Command was missing.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2025-10-20 14:23:43 -04:00
Mathieu Choplain
dca6b87668 drivers: usb: udc: stm32: handle multi-packet-Data OUT Control transfers
During a Host-to-Device Control transfer, an arbitrary amount of data is
sent from Host to the Device using OUT Data packets. If the total amount of
data to transfer, communicated via the wLength field of the SETUP packet,
exceeds the EP0 MaxPacketSize, several Data packets until all data has been
transfered.

Combined with HAL behavior, the STM32 driver did not handle this situation
properly and always ended reception after a single Data packet was received
regardless of whether or not all data had actually been received from Host.

Modify driver to handle this situation properly by keeping track of how
much data has been received and restarting transfers until we have received
everything the Host promised it would send.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2025-10-20 14:22:28 -04:00
Mathieu Choplain
2a0a6f5cca drivers: usb: udc: stm32: empty transfer queue when SETUP packet arrives
Drop all existing transfers in control endpoints' queue when a new SETUP
packet is received. Also use the appropriate net_buf API in a nearby place.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2025-10-20 14:22:28 -04:00
Stoyan Bogdanov
31abf236b4 drivers: gpio: cc23x0: Add power management to GPIO
Add PM support to cc23x0 GPIO driver.

Signed-off-by: Stoyan Bogdanov <sbogdanov@baylibre.com>
2025-10-20 11:35:41 -04:00
Tim Lin
0ea524e0ae drivers: flash: ite: Add ex_op support for flash target and address mode
Extend the IT51XXX M1K flash controller driver to implement the flash
extended operation (ex_op) API. This allows runtime selection of both
the flash device and the addressing mode:

Flash target selection:
- FLASH_IT51XXX_INTERNAL: on-chip SPI eFlash
- FLASH_IT51XXX_EXTERNAL_FSPI_CS0: external SPI flash on FSCE0#
- FLASH_IT51XXX_EXTERNAL_FSPI_CS1: external SPI flash on FSCE1#

Addressing mode selection:
- FLASH_IT51XXX_ADDR_3B: 3-byte (24-bit) addressing mode, supports
  flash devices up to 16MB capacity
- FLASH_IT51XXX_ADDR_4B: 4-byte (32-bit) addressing mode, required
  for devices larger than 16MB

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-10-20 11:23:25 -04:00
Khoa Tran
ab8b5764b2 drivers: rtc: Initial driver support for RTC on Renesas RA
Add driver support for RTC on Renesas RA

Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
2025-10-20 11:19:13 -04:00
Khoa Tran
95eafaef9a drivers: clock_control: Add clock control driver for sub-clock on Renesas
RA family

Add clock control driver support for sub-clock Renesas RA family

Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
2025-10-20 11:19:13 -04:00
Quy Tran
336abc6a78 drivers: serial: add contition for tx_buf_len check in async api
Add condition checking for uart async api of Renesas RX

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2025-10-20 11:57:03 +02:00
Fabio Baltieri
245881ad73 drivers: leds_strip: rename modulino smartleds to pixels
Rename the modulino pixels driver to use the official marketing name,
the "smartleds" one was picked incorrectly from the source code of the
on board mcu of the module itself, but that was clearly out of date.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-10-20 11:56:08 +02:00
Seppo Takalo
72701683be drivers: modem: cellular: Close down CMUX before shut down
Properly close down the CMUX channel before shutting down
the modem.

The CMUX Close-Down command should indicate the remote end
to clean up, even if we don't have shutdown script or power-key GPIO.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2025-10-20 11:55:43 +02:00
Marcio Ribeiro
cde048094e drivers: i2s: esp32: fix driver state management and I2S_DIR_BOTH behavior
Rework to fix state management and I2S_DIR_BOTH behavior across the driver

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2025-10-20 11:52:31 +02:00
Marcio Ribeiro
8397c408a9 drivers: i2s: esp32: optimize stream structs and add sanity check
Optimizes i2s_esp32_stream_data and i2s_esp32_stream_conf structs and adds
property sanity check according to soc series based on SOC_GDMA_SUPPORTED
feature

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2025-10-20 11:52:31 +02:00
Marcio Ribeiro
ee4da4260a drivers: i2s: esp32: log messages rework
Reworks log messages to avoid timing issues

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2025-10-20 11:52:31 +02:00
Marcio Ribeiro
2ef4438fe6 drivers: i2s: esp32: allow deferred processing of an empty tx queue
Allows to defer processing of an empty tx queue when tx_callback is
executed. This prevents error conditions if the tx dma interrupt is
generated too early, as occurs with esp32 and esp32s2.

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2025-10-20 11:52:31 +02:00
Marcio Ribeiro
1745582838 drivers: i2s: consistent use of stream state
Reworks i2s_esp32_read() and i2s_esp32_write() to allow consistent use of
stream->data->state

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2025-10-20 11:52:31 +02:00
Marcio Ribeiro
2232acf3b0 drivers: i2s: esp32: add missing checks
Adds missing checks regarding mem_slab and data_format during each stream
configuration

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2025-10-20 11:52:31 +02:00
Marcio Ribeiro
075cbe67a7 drivers: i2s: esp32: fix redundant pin configuration
Moves the pinctrl_apply_state() call to avoid calling it twice

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2025-10-20 11:52:31 +02:00
Marcio Ribeiro
2d19d96b9e drivers: i2s: esp32: fix last block loss
Avoids erroneous memory block freeing when stopping transfers

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2025-10-20 11:52:31 +02:00
David Boullie
a040028412 modules: hal_silabs: Add config for SiSDK Protocol Crypto
A Kconfig options for the SiSDK Protocol Crypto library, which provides
accelerated cryptographic primitives using the RADIOAES peripherals for
Series-2 devices.

Signed-off-by: David Boullie <David.Boullie@silabs.com>
2025-10-19 20:51:44 -04:00
Minh Tang
70a67385d0 drivers: comparator: Add comparator LVD driver support for RA
Add comparator support for RA with LVD module

Signed-off-by: Minh Tang <minh.tang.ue@bp.renesas.com>
2025-10-19 20:51:30 -04:00
Kurt Eckhardt
eb7e332b1b video: stm32_dcmi: DMA Error recovery
On several boards, such as the Arduino Giga and
Portenta H7, they are often times setup with their
camera buffers and potentially video buffers in
SDRam.  This can lead to a significant number of
DMA errors, which currently stops the camera from
returning any additional frames.

Signed-off-by: Kurt Eckhardt <kurte@rockisland.com>
2025-10-19 20:51:20 -04:00
Kurt Eckhardt
3d11ffd849 video: stm32_dcmi: forward selection
Forward the get_selection and set_selection APIs
to the camera objects, to allow some of the
selections to be supported at the camera level.

Signed-off-by: Kurt Eckhardt <kurte@rockisland.com>
2025-10-19 20:51:20 -04:00
Kurt Eckhardt
0cbfe585df video: gc2145: support for CROP
Implements the set_selection and get_selection APIs,
if forwarded to it by a camera controller.
It uses the new messages
to allow you to set a crop window on top of the
current format window.  It also then allows you
to move this crop window around in the frame
window.

With this driver I also updated it to allow any resolution
from the displays min to max limits.
static const struct video_format_cap fmts[] = {
  GC2145_VIDEO_FORMAT_CAP_HL(128, 1600, 128, 1200,
                              VIDEO_PIX_FMT_RGB565),
GC2145_VIDEO_FORMAT_CAP_HL(128, 1600, 128, 1200,
                              VIDEO_PIX_FMT_YUYV),

When the resolution is set, it computes the scale factor.

Using the set_selection(VIDEO_SEL_TGT_CROP) allows you
define a crop window within the format window.

It clamps the ratio to a max of 3 as some other
drivers limit it saying it helps with frame rates.

Signed-off-by: Kurt Eckhardt <kurte@rockisland.com>
2025-10-19 20:51:20 -04:00
Declan Snyder
3f66f0ba08 drivers: ksz8081: Fix fault on boot in handler thread
Issue was that the gpio interrupt was happening before the work item was
initialized, and then trying to schedule it, resulting null pointer
dereference and fault occurring.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-10-17 21:05:44 -04:00
Declan Snyder
57312acd18 drivers: ksz8081: Remove 100ms busy waits
These busy waits were only introduced during a debugging exercise and
not supposed to have made their way into mainline.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-10-17 21:05:44 -04:00
Stephan Linz
14cdbb9740 spi: stm32: move SPI context init to PM resume
In case of hardware controlled CS pins the SPI context must be
initialized after the clock and pin control have been initialized.
Otherwise, corresponding STM32 LL operations would access a SoC
functional unit that is not yet supplied with a clock and fail
silently without error handling.

Signed-off-by: Stephan Linz <linz@li-pro.net>
2025-10-17 21:05:36 -04:00
Adam BERLINGER
f6cd77a7aa dts: arm: st: u0: Add CK48 multiplexer
Adds CK48 mutliplexer for STM32U0 families.

Signed-off-by: Adam BERLINGER <adam.berlinger@st.com>
2025-10-17 21:04:42 -04:00