Commit graph zephyr/drivers
Author SHA1 Message Date
Jordan Yates
f3d416427c modem: cellular: vendor specific configuration pointer
Add the option for modems to register an arbitrary configuration
structure as part of the core config. This provides a location to
store per-instance, vendor-specific information.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-09-08 16:04:26 +02:00
Jamie McCrae
1b3a1dd4da drivers: serial: kconfig: Add missing deprecation text
Adds a missing [DEPRECATED] tag to the Kconfig prompt

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-09-08 16:04:16 +02:00
Zee Yudenko
d2fe824aaa drivers: crc: stm32: enable hardware handling of more CRC formats
The SRM32 CRC driver is overly pessimistic about the CRC formats the
driver supports, presumably because polynomials were previously
incorrrectly sometime passed in reflected form to the driver which
caused incorrect results in certain functions. Allow all 8-, 16, and
32-bit formats.

Signed-off-by: Zee Yudenko <zyudenko@internships.antmicro.com>
2026-09-08 13:39:29 +02:00
Zee Yudenko
65bbb660ac drivers: crc: consistently pass normal-form polynomials to the driver
CRC polynomials can be passed in either normal or reflected form.
Reflected form is only relevant to the software CRC implementation doing
reflected calculation. We pass polynomials given to `crc*` functions
as-is to the drivers, which is incorrect if the polynomial is reflected
(which is the case when the `reflected` argument is `true`, or always in
`crc16_reflect`). Fix this by reflecting the polynomial back before
passing it to the driver. Also, remove hacks in driver code for handling
reflected polynomials. This fix makes the previously-failing
`subsys.crc` test pass on STM platforms. Also, fix uninitialised usage
of `flag_reversed` in `crc4`.

Signed-off-by: Zee Yudenko <zyudenko@internships.antmicro.com>
2026-09-08 13:39:29 +02:00
Tien Nguyen
6b46bb3466 drivers: mbox: renesas: rz: rework MHU driver and binding
Rework the Renesas RZ MHU MBOX driver to align Renesas RA IPC
Mbox driver so that a single MHU unit serves both TX and RX
on one MBOX channel, and so that one driver instance can own
several channels.

Binding: rename "channel" to "unit", since it indexes the MHU
hardware unit and not the MBOX channel; replace "tx-mask" and
"rx-mask" with a single "channel-mask"; make "shared-memory"
optional.

Rename the Kconfig timeout option to
MBOX_RENESAS_RZ_MHU_BUSY_WAIT_TIMEOUT_US

Signed-off-by: Phuc Pham <phuc.pham.xr@bp.renesas.com>
Signed-off-by: Tien Nguyen <tien.nguyen.zg@renesas.com>
2026-09-08 13:38:26 +02:00
Fin Maaß
13fe85e797 drivers: ethernet: deprecate numaker ethernet driver
The numaker ethernet driver does not use
the separate  ethernet controller, mdio bus, phy structure.
It does mdio inside the ethernet driver.

Until this is fixed this driver is going to be deprecated and
if not fixed in 2 releases removed.
The better way would it be to replace it with the
existing vendor independent dwc_mac driver.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-09-08 13:38:15 +02:00
Janez Ugovsek
2570dc8615 drivers: retained_mem: add RV3028 RAM support
Add support for accessing the 2-byte RAM of the Micro Crystal RV-3028
through the Zephyr retained memory API.

Signed-off-by: Janez Ugovsek <janez@ugovsek.info>
2026-09-08 13:37:49 +02:00
Patrik Nemeth
2ab9b5e807 drivers: entropy: rework ele session initialization
We don't want to be using the CONN port if possible. Reworked to use
the SSSAPI only. Initialization call now also initializes the TRNG.

Signed-off-by: Patrik Nemeth <patrik.nemeth@nxp.com>
2026-09-08 13:37:29 +02:00
João Felipe
c5469546d6 drivers: serial: mcux_lpuart: bound the TC wait in configure
mcux_lpuart_configure() begins by spinning unbounded on the
Transmission Complete flag before reconfiguring the peripheral. TC
only sets when the transmitter is enabled and idle, so a
uart_configure() call issued while traffic is flowing parks the
calling thread for the full duration of that traffic. Observed on an
MCXA153 driving a USB CDC-ACM to UART bridge: the host's line-coding
change (9600 -> 115200 at port open) triggered uart_configure()
against a live transfer and the configuring thread spun for 15.36 s,
the time the entire transfer took to drain at the old baud rate
(BAUD register sampled over SWD while stalled). When the loop finally
exited, the driver disabled TE/RE and reinitialized mid-frame,
deterministically corrupting the byte being received.

Bound the wait with WAIT_FOR (300 ms total, 100 us poll). On timeout,
return -EBUSY and leave the peripheral untouched so the caller can
quiesce its traffic and retry; proceeding to tear down the
transmitter and receiver at that point can only destroy in-flight
data. 300 ms covers this driver's worst-case 12-bit frame (start +
8 data + parity + 2 stop, 240 ms) at 50 baud, the slowest standard
rate, so a transmitter finishing its last frame completes within the
window; for the arbitrarily slower rates the hardware can still be
configured to, the bound is an intentional policy limit and the
resulting -EBUSY is side-effect-free and retryable.

Callers that configure an idle UART see no change: TC is already set
and WAIT_FOR returns on its first evaluation.

Signed-off-by: João Felipe <joao@binho.io>
Signed-off-by: Leonardo José Consoni <leonardo@binho.io>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-08 13:36:09 +02:00
Mario Paja
c6a5523c76 drivers: i2s: stm32_sai: improve SAI synchronous mode handling
In synchronous mode, the slave SAI sub-block relies on the master
sub-block to provide the bit and frame clocks. Disabling the SAI
peripheral from the stream callback can disable the shared clock
source and prevent the synchronous slave from operating correctly.

Avoid disabling the SAI peripheral when bit clock gating is disabled,
allowing the master sub-block to continue providing clocks for the
synchronous slave.

Add a warning for synchronous slave configurations to highlight the
requirement for a matching synchronous master configuration and disabled
bit clock gating.

Signed-off-by: Mario Paja <mariopaja@hotmail.com>
2026-09-08 13:35:57 +02:00
Felix Wang
ea6bf0dc69 drivers: clock_control: mcux_syscon: add FREQME gate clock
Add the MCUX_FREQME_CLK clock identifier and enable the FREQME
peripheral gate (kCLOCK_Freqme) from clock_control_on() for the
IMXRT6XX, IMXRT5XX and RW6XX series, so the nxp,fmeas clock_monitor
back-end can ungate the block through the clock_control API.

The reference timebase reuses the existing MCUX_SYSTEM_CLK identifier,
which already returns the core/system clock rate on these series, so no
new rate case is required.

Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
2026-09-08 13:35:41 +02:00
Felix Wang
8a9f5c947f drivers: clock_monitor: add NXP fmeas backend
Add a clock_monitor back-end for the NXP BASIC Frequency Measurement
(fmeas) block, wrapping the MCUX SDK fsl_fmeas HAL. The block has no
interrupt line and no MIN/MAX threshold registers, so only MEASURE
(one-shot) mode is supported and WINDOW mode returns -ENOTSUP:
completion is polled from a workqueue and reported as MEASURE_DONE, or
as CLOCK_LOST when no target edges are counted. The HAL fixes the
window at 2^20 reference cycles, so window_ns is ignored.

Reference and target clocks are routed through INPUTMUX and selected at
runtime from devicetree source lists, each pairing a mux route with a
fixed rate or a clock_control provider.

Serialization is a single k_spinlock that is never held across a call
into another subsystem: configure() resolves the reference rate into
locals first and commits them in one short region, and set_source()
parks the state machine at CONFIGURING for the duration of the
re-route. start() arms the block and queues the poll inside its region
and stop() cancels inside its own, so the two cannot interleave and
both stay ISR-safe as the API requires.

Adds the nxp,fmeas binding, its NXP_FMEAS_* INPUTMUX cookie macros and
the fsl_fmeas / inputmux HAL component selection.

Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
Assisted-by: Claude:claude-opus-5
2026-09-08 13:35:41 +02:00
Adrien Ricciardi
1769064396 drivers: can: Add R-Car RSCANFD driver
The RSCANFD is capable of CAN and CAN FD communications.
It features 8 channels per controller.

Signed-off-by: Adrien Ricciardi <aricciardi@baylibre.com>
2026-09-08 13:34:41 +02:00
Fabrice DJIATSA
d4dc2672a4 drivers: flash: enable STM32WB0 driver for STM32WL3x
Build the STM32WB0 flash driver for STM32WL3x, whose flash
controller IP is compatible with STM32WB0.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2026-09-07 21:08:22 -04:00
Benjamin Cabé
752876658c drivers: pinctrl: rp1: move register defs into the driver source
The RP1 register field macros were only used by the pinctrl driver, so
move them into pinctrl_rp1.c and drop the public header (the RP1 GPIO
driver already defines the few fields it needs itself).

Assisted-by: Claude:opus-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-09-07 21:08:18 -04:00
Riadh Ghaddab
4c9308f4d1 drivers: flash: nrf_rram: fix throttling delay for last block
When dividing the writes into multiple block the driver doesn't sleep
after the last block write which causes a wrong throttling delay.
Fix this by removing an unnecessary check of len in the nrf_write
function.

FIXES: #118218

Signed-off-by: Riadh Ghaddab <riadh.ghaddab@nordicsemi.no>
2026-09-07 21:08:14 -04:00
Johann Fischer
2de1cdd3e9 drivers: udc_kinetis: replace slabs/fifo based events with k_events
Using k_events eliminates the drawback of the queue potentially dropping
messages and provides a reliable event notification mechanism.

With the commit c3109b9ebe
("usb: device_next: cdc_acm: rx throughput improvements"),
the CDC implementation queues as many buffers as are available.
The default UDC_KINETIS_EVENT_COUNT was set to 4, and it could already
be observed that the events are dropped. Though the number of
UDC_KINETIS_EVENT_COUNT could be increased, using k_events is the right
fix.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2026-09-07 21:07:57 -04:00
Johann Fischer
9212ed5bcb drivers: udc_kinetis: use driver's own thread
Align the driver design with most of the drivers in the tree and move
driver event handling from the UDC workqueue to the driver's own thread.

Driver thread handles the events under UDC internal lock and makes it
mutually exclusive with API calls. Add k_sched_lock() UDC internal lock
to avoid unnecessary context switch to the driver thread triggered by
e.g. interrupt event, while the internal lock is still held.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2026-09-07 21:07:57 -04:00
Felix Wang
df6fa43eb7 drivers: mux: fix missing syscall check in disconnect
z_vrfy_mux_control_disconnect() was missing the
K_SYSCALL_DRIVER_MUX_CONTROL(dev, disconnect) permission check that
every other handler in this file has. Without it, a userspace caller
could invoke mux_control_disconnect() on a device object that isn't
actually a mux controller, skipping the type/op validation the macro
provides.

Add the missing check, matching the pattern used by
z_vrfy_mux_control_set(), z_vrfy_mux_state_apply(), and
z_vrfy_mux_state_get().

Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
2026-09-07 21:07:53 -04:00
Priyanshu Singh
bba6b59860 drivers: serial: stm32: add GPIO-driven RTS flow control
Add support for software-managed RTS flow control to work around
    hardware RTS silicon limitations on affected STM32 SoC revisions:

    - Add st,sw-rts-gpios property to st,stm32-uart-base binding.
    - Add UART_STM32_ABNORMAL_RTS_ERRATUM_WORKAROUND Kconfig option with
      automatic GPIO selection.
    - Configure USART hardware for CTS-only flow control.
    - Assert RTS (active low) on rx_enable and deassert on rx_disable
      or buffer exhaustion.

    Fixes #36849

Signed-off-by: Priyanshu Singh <singhpriyanshu9838@gmail.com>
2026-09-07 21:07:31 -04:00
Tomasz Moń
21b3ac806d drivers: usb: dwc2: nrf: Set PHY.CONFIG value
Generate PHY.CONFIG based on devicetree and assign it before PHY
power-on reset is released.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2026-09-07 21:07:27 -04:00
Nikodem Kastelik
a39277d401 drivers: i2s: nrf_tdm: fix missing clock request and release
Add missing conditionals in clock request and release
so the clock is properly acted on in all cases.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2026-09-07 21:07:09 -04:00
Benjamin Cabé
cef1e50c75 drivers: sensor: icm566xx: propagate attribute configuration errors
icm566xx_attr_set() ignored the return value of the accel/gyro config
helpers and always returned 0, and those helpers discarded the status of
every HAL setter, so unsupported attributes and bus failures were
reported as success. Also fix icm566xx_init() to check the accel LPF
call instead of re-testing the previous gyro LPF result.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-09-07 21:07:04 -04:00
Benjamin Cabé
9fc4710a49 drivers: sensor: icm566xx: fix one-shot die temp decode on ICM56686
On ICM56686 builds the one-shot decoder routed SENSOR_CHAN_DIE_TEMP
through get_raw_reading_by_position(), which only handles the six
accel/gyro positions and returned -EINVAL as if it were a sample.
Read the 16-bit temperature straight from the payload instead.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-09-07 21:07:04 -04:00
Benjamin Cabé
f67d34f58c drivers: sensor: icm566xx: track full-scale changes made at runtime
Setting SENSOR_ATTR_FULL_SCALE only reprogrammed the accel/gyro FSR
register while the cached full-scale values used to convert raw samples
kept the devicetree settings, silently scaling every reading by the
wrong factor. Update the cached values on a successful FSR change, and
stamp encoded frames from the driver data instead of the fixed config.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-09-07 21:07:04 -04:00
Benjamin Cabé
37ae749c70 drivers: sensor: icm566xx: fix inverted LN/LP mode auto-selection
The ODR register enums decrease as frequency increases, so comparing
the requested ODR with >= ODR_12_5_HZ picked low-noise mode for the
slowest rates and low-power mode for the fastest ones. Invert both the
accel and gyro comparisons so LN is selected for rates of 12.5 Hz and
above, and LP for the slower LP-only rates.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-09-07 21:07:04 -04:00
Benjamin Cabé
6841c49535 dt-bindings: sensor: icm566xx: fix gyro 12.5 Hz ODR value
ICM566XX_DT_GYRO_ODR_12_5 was defined as 1 instead of 12, which is
neither a valid hardware ODR encoding nor an accepted value of the
gyro-odr binding enum, and it made the low-noise branch of
ICM566XX_VALID_GYRO_ODR unsatisfiable so every LN devicetree failed
its BUILD_ASSERT. Also relax the ODR range checks to inclusive
comparisons so the documented 400 Hz LP and 12.5 Hz LN rates are
accepted, matching icm45686.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-09-07 21:07:04 -04:00
Benjamin Cabé
fdf45aa670 drivers: sensor: icm566xx: fix 10x error in gyro rad/s conversion
The gyroscope sensitivity values are encoded as LSB per dps scaled by
1000, but the rad/s conversion multiplied the raw value by 10000,
making every gyro reading ten times too large for all full-scale
settings. Use a multiplier of 1000 to match the sensitivity scaling.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-09-07 21:07:04 -04:00
Benjamin Cabé
5e057c6d8c drivers: spi: add VIRTIO SPI driver
Add a driver for the VIRTIO SPI controller device (virtio spec 1.4,
section 5.21), letting a Zephyr guest drive a SPI bus exposed by a
hypervisor or a vhost-user backend.

The device carries a single transfer per request, so a transceive call
is split into one request per contiguous chunk of the buffer sets, with
cs_change holding the chip select asserted in between. The controller
capabilities are read from the device configuration space at init and
checked against the SPI configuration. Every request is a round trip to
the device, so the SPI API can only be used from a thread.

Assisted-by: Claude Code:opus-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-09-07 21:06:52 -04:00
Konstantinos Papadopoulos
7fa5627bfa drivers: gnss: u-blox: add start/stop for F9P and M10
Implement the GNSS start/stop API for the F9P and M10 drivers using
UBX-CFG-RST. Hot start restarts the engine in place, preserving RAM
config and nav data. Warm/cold start issue a receiver reset and then
re-run the init config, since a SW reset drops RAM configuration.

Signed-off-by: Konstantinos Papadopoulos <kostas.papadopulos@gmail.com>
2026-09-07 21:06:48 -04:00
Konstantinos Papadopoulos
3272a45673 drivers: gnss: u-blox: factor out init config application
Extract the fix-rate and init-sequence send out of the F9P and M10
driver init paths into standalone helpers. Init-time behavior is
unchanged; this only prepares the config application to be reused
outside of driver init.

Signed-off-by: Konstantinos Papadopoulos <kostas.papadopulos@gmail.com>
2026-09-07 21:06:48 -04:00
Konstantinos Papadopoulos
a99933e538 driver: gnss: add start/stop for GNSS emulator
Track whether the emulator has been started so periodic fix updates
and callbacks only fire while running, and stop clears any pending
fix data. Adds a test exercising start/stop behavior and verifying
that callbacks stop and resume accordingly.

Signed-off-by: Konstantinos Papadopoulos <kostas.papadopulos@gmail.com>
2026-09-07 21:06:48 -04:00
Fabio Baltieri
e17d4c6c86 device: Add DEVICE_DT_INST_GET_COMMA macro
Add DEVICE_DT_INST_GET_COMMA helper macro to include/zephyr/device.h to
easily get a device pointer followed by a comma when expanding
devicetree foreach iterators like DT_INST_FOREACH_STATUS_OKAY.

Update drivers, soc, subsys, and tests to use the common definition.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Assisted-by: Antigravity:gemini-1.5-pro
2026-09-07 17:07:48 +01:00
Alain Volmat
be3af05d4a soc: st: stm32: move GPU2D driver from drivers/misc into soc
Move the STM32 NeoChrom GPU2D driver out of drivers/misc and
store it instead into soc/st/stm32/common since it is specific
to STM32 SoCs.
While moving it, rename the config from NEOCHROM_GPU2D into
STM32_NEOCHROM_GPU2D to match with other STM32 configs.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2026-09-07 18:07:45 +02:00
Felix Wang
931b816c99 drivers: pwm: mcux_sctimer: arm capture overflow IRQ only while measuring
match_event is the PWM period event, so the counter overflow
interrupt fires at whatever period the application picked. It was
armed from enable_capture() onwards, and the only place that disables
it is reached after a capture completes. With no signal on the capture
input the capture never completes, so a short PWM period becomes an
unbounded interrupt storm that starves the CPU.

The wrap count is only consumed as a difference between the two
capture edges, so wraps seen before the first edge cancel out. Arm the
interrupt when a first edge is captured and release it once the
measurement is done, tracking the users of the shared event in a
bitmask.

Reproduced on lpcxpresso55s36/lpc55s36 with the loopback jumper
removed: the suite hung at test_capture_busy with the core stuck in
the SCT0 ISR, and completes with this change.

Fixes: #117696

Assisted-by: Claude:claude-opus-5
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
2026-09-07 18:07:14 +02:00
Felix Wang
16e5b1e165 drivers: pwm: mcux_sctimer: fix 0% duty cycle emitting a glitch
A 0% duty cycle leaves the pulse match at 0 while the period match
still sets the output. As that match is also the counter limit it fires
every period, producing a one tick pulse instead of the constant
inactive level the PWM API requires of a zero length pulse.

The existing static level path was guarded by configured_chan == 1, which
missed a channel being configured for the first time and any case with
several channels active. Detach the output from its events and drive it
directly instead, after the normal channel setup has run.

Measured on lpcxpresso55s36/lpc55s36: an 889 ns pulse every 88.9 us before,
no transitions over 1 s after.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
2026-09-07 18:07:14 +02:00
Krzysztof Chruściński
e2a959373f drivers: serial: nrfx_uarte: Use pm_device_runtime_put if possible
All UART devices supports ISR_SAFE PM device when asynchronous
API is used so pm_device_runtime_put can be used from an interrupt
context. It allows to disable CONFIG_PM_DEVICE_RUNTIME_ASYNC if
needed to safe space.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2026-09-07 18:06:32 +02:00
Peter Ujfalusi
c6fe30bc34 drivers: uaol: Support dynamic service interval from host IPC
Accept service_interval from the UAOL stream configuration (passed by
host from TLV type 6 in the gateway config blob) and use it for budget
calculations instead of the hardcoded 1000 us assumption.

This enables automatic scaling for high-bandwidth USB devices:
- Standard isochronous (1000 us): normal budget
- High-bandwidth isochronous (125/250/500 us): 8/4/2× budget improvement

The payload size (aps) calculation automatically scales:
  aps = (sample_rate * service_interval_us * frame_size) / 1_000_000

Falls back to 1000 us if service_interval is 0 for backward
compatibility.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2026-09-07 18:05:16 +02:00
Benjamin Cabé
84de7293e5 drivers: regulator: reset the fake driver state between test cases
Every other FFF-based fake driver installs a ztest rule resetting its
fakes before each test case, and has done so since it was added. The
fake regulator driver never did, leaving its test suite to reset each
fake by hand and making it the sole exception to the pattern.

Install the same rule, re-installing the default get_voltage() delegate
after each reset as the other drivers do, and drop the 35 manual resets
it makes redundant. Each of those was the first statement of its test,
so the rule now does the same work one step earlier.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:claude-opus-5
2026-09-07 17:57:16 +02:00
Khoa Nguyen
e448622c17 drivers: flash: Update Renesas Flash-LP for mapped-partition migration
Update Renesas Flash-LP for mapped-partition migration

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2026-09-07 17:57:01 +02:00
Khoa Nguyen
31001c6ec6 drivers: flash: Update Renesas Flash-HP for mapped-partition migration
Update Renesas Flash-HP for mapped-partition migration
Remove extend operation for Flash-HP since the block protect belong to
OFS setting

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2026-09-07 17:57:01 +02:00
Mathieu Choplain
bb30156819 drivers: sensor: icm4268x_emul: don't use __ASSERT_UNREACHABLE
The `__ASSERT_UNREACHABLE` macro is a PRIVATE helper macro used in the
implementation of the actual `__ASSERT` macros. It should not be used
except by the `__assert.h` header itself; in fact, the macro is never
defined if assertions are not enabled.

Replace this private macro's usage in the aforementioned driver with
`__ASSERT_NO_MSG(0)` which will trigger a proper assertion panic if
reached, which seemed to be the intent here.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2026-09-07 17:55:47 +02:00
Guillaume Gautier
994e372dee drivers: spi: stm32: add error message for unsupported cases
DMA is only supported for full-duplex controller mode. Add an error
message and return an error if DMA is asked while in peripheral mode
or in half-duplex.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-09-07 17:55:12 +02:00
Guillaume Gautier
56d87e0529 drivers: spi: stm32: avoid ISR spin waits in non-H7 controller path
In non-H7 full-duplex controller mode, using independent TXE/RXNE
handling in interrupt context can trigger RX overruns.

Switch this path to an RXNE-driven pipeline: seed one initial TX frame
at transfer start, then in each RXNE ISR read one frame and queue the
next TX frame. After the last TX frame, re-enable TXE once so transfer
completion is still detected when BSY clears.

Keep H7 behavior unchanged, and keep the existing non-full-duplex logic
unchanged.

This avoids ISR busy-wait loops while maintaining TX/RX synchronization
on non-H7 full-duplex transfers.

Assisted-by: GitHub Copilot:GPT-5.3-Codex
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-09-07 17:55:12 +02:00
Guillaume Gautier
b46060195f drivers: spi: stm32: add half-duplex support for st,stm32-spi-fifo
For the SPI devices with st,stm32-spi-fifo compatible, when configured
as master in half duplex RX mode, the clock is output non-stop on the
SCK line (the clock can't be started explicitly by filling the TX FIFO
since we're in half duplex RX), and the device has no way to know when to
stop (there is no TSIZE-like register like on st,stm32h7-spi compatible).

So, to prevent reception of unwanted extra data, the SPI must be disabled
as soon as all data have been received.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-09-07 17:55:12 +02:00
Guillaume Gautier
bb2a5fd274 drivers: spi: stm32: add half duplex peripheral support
Add support of half duplex transfers on peripheral side.
This adds the support for all STM32.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-09-07 17:55:12 +02:00
Guillaume Gautier
15958bd586 drivers: spi: stm32: add spi peripheral support for rtio
Add peripheral mode support for RTIO transfers for STM32 SPI.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2026-09-07 17:55:12 +02:00
Xixin Liu
d22d1c39c0 drivers: disk: nvme: fix request timeout unit mismatch
CONFIG_NVME_REQUEST_TIMEOUT is documented and ranged in seconds, but
the request timeout path compared k_uptime_get_32 values in
milliseconds without converting. Default 5 therefore expired after
about 5 ms instead of 5 seconds.

Convert the Kconfig value with MSEC_PER_SEC before scheduling and
expiry checks, and reschedule with K_MSEC using the remaining time.
Clarify the Kconfig help text that the unit is seconds.

The FreeBSD NVMe host driver this path follows converts a seconds
timeout with SBT_1S before comparing against the request start time.
Apply the same seconds-to-milliseconds conversion here.

Signed-off-by: Xixin Liu <liuxixin@kylinos.cn>
2026-09-07 10:30:44 +02:00
Benjamin Cabé
0b20c505fa drivers: sensor: mpu6050: fix die temperature offset constant
The MPU6050 die-temperature conversion used a 36.00 degC offset, but
the InvenSense register map specifies TEMP_OUT/340 + 36.53 degC, making
every reading 0.53 degC too low. Use 36530000 microdegrees instead.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-09-07 10:26:54 +02:00
Benjamin Cabé
55f3c3fe0e drivers: sensor: bmi160: fix PMU status mask in emulator
The PMU command emulation kept only the field being written and
cleared every other sensor's PMU state instead of the opposite.
Invert the mask so the read-modify-write preserves unrelated fields.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-09-07 10:26:23 +02:00