Commit graph zephyr/drivers
Author SHA1 Message Date
cyliang tw
fe5660138c drivers: ethernet: dwc_mac: let pps pin one pulse per second
In digital rollover of DWC ether_1000 v3.70, to avoid the reset
value of 0 never toggle bit 30.
So, select bit 29 to give one pulse per second.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2026-10-14 13:45:26 +02:00
Massimiliano Cialdi
670af5d17d drivers: ethernet: nxp_enet: Rate limit the RX error logs
Under an RX overload every errored or dropped frame logged an error. At
1 Gb/s that is tens of thousands of messages per second: the log buffer
overflows, and formatting them costs CPU time in the RX path exactly
when it is short.

Use the rate limited variant for the per-frame RX errors.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Massimiliano Cialdi <massimiliano.cialdi@powersoft.com>
2026-10-14 13:44:54 +02:00
Massimiliano Cialdi
a10b8b7417 drivers: ethernet: nxp_enet: Drain the RX ring past dropped frames
eth_nxp_enet_rx() returns -EIO after it dropped a frame (receive error,
oversized frame or no packet buffer available). The RX work handler
stopped there and left the remaining frames in the ring. The ISR has
already cleared the RX flags, so those frames stay unserviced until a
later frame raises the interrupt. If no later frame comes, RX stops.

Keep reading past a frame dropped for a receive error or for its size.
When no packet buffer is available, return -ENOMEM instead: stop, keep
the RX interrupt masked and resume one tick later from a delayed work
item. The RX work queue is cooperative, so the network stack, which
frees the buffers, only runs when the work queue thread blocks; a work
item that submits itself again at once would not let it run. Meanwhile
the MAC drops the frames that do not fit in the ring, at no CPU cost.

On an i.MX RT1170 EVK (ENET_1G, 6 RX descriptors) with the zperf UDP
server and iperf2 for 30 s, received data:
- 1470 byte datagrams at 1000 Mbit/s: main 0.07 to 11.2 Mbit/s,
  this change 183 Mbit/s
- 1470 byte datagrams at 300 Mbit/s: main 0.45 to 192 Mbit/s,
  this change 177 to 198 Mbit/s
- 1470 byte datagrams at 100 Mbit/s: 104.9 Mbit/s with both, same loss
- 64 byte datagrams at 500 kpps: main stops after 46 packets in 3 of 6
  runs, this change 0.39 to 1.32 million packets and never stops

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Massimiliano Cialdi <massimiliano.cialdi@powersoft.com>
2026-10-14 13:44:54 +02:00
Bas van Loon
8422c6110c drivers: spi: lpspi: Adhere to maximum allowable SCK frequency.
The current implementation does not follow the LPSPI SCK frequency
restriction. Update the driver to cap the max. frequency which is
allowed for the LPSPI peripheral.

Signed-off-by: Bas van Loon <bas@arch-embedded.com>
2026-10-14 13:44:30 +02:00
Bas van Loon
bcccfcae95 drivers: spi: lpspi: Work around errata ERR051472.
ERR051472:
 The SR[REF] would assert if software disables
 the LPSPI module after receiving some data and
 then enabled the LPSPI again without performing
 a software reset.

Clear SR[REF] flag after LPSPI module enabled.

Signed-off-by: Bas van Loon <bas@arch-embedded.com>
2026-10-14 13:44:30 +02:00
Bas van Loon
0f58cf764b drivers: spi: lpspi: Work around errata ERR050606.
The RT1170 has a bug that causes it to not always read back
the current real value of the TCR register. To work around
the issue, we read another register in between as mentioned
in the errata sheet and check if the value has been updated.

Signed-off-by: Bas van Loon <bas@arch-embedded.com>
2026-10-14 13:44:30 +02:00
Marcel Ruff
3c410f0dfe drivers: sensor: lm75: preserve 12-bit resolution
Convert sensor values directly to the LM75 register format to preserve
the native 0.0625 degree Celsius resolution.

This also fixes the conversion of negative temperatures.

Signed-off-by: Marcel Ruff <ruff@netwake.com>
2026-10-14 08:45:43 +02:00
Dimitrios Kafetzis
e2f1cf623f drivers: flash: flash_hp_ra: restore the data flash blank check default
FLASH_RENESAS_RA_HP_CHECK_BEFORE_READING took its default from
erase-value-undefined on the flash1 node. The mapped-partition DTS
rework removed the flash1 label and moved the property to
data_flash_ctrl, so the option silently became n. Erased data flash then
reads back as undefined values instead of 0xff, and NVS fails to mount
with -EDEADLK. Read the property from data_flash_ctrl instead.

Tested by building on 11 RA boards; not run on RA hardware.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Dimitrios Kafetzis <dimitrioskafetzis@gmail.com>
2026-10-14 08:44:37 +02:00
Aliaksandr Trafimchuk
f05e369c68 drivers: mipi_dbi: spi: only wait for TE once it is configured
With a te-gpios property on the controller, every write_display()
waited for a tearing effect signal, even when no display configured it
with mipi_dbi_configure_te(). The TE interrupt is not set up then, so
the first frame write blocks forever.

Only wait for TE once mipi_dbi_configure_te() enabled it, and let
MIPI_DBI_TE_NO_EDGE disable it again, releasing a write waiting for a
TE signal. A display that only outputs TE while it is on can then stop
the waiting while it is blanked.

Tested on a LilyGO T-Display S3 AMOLED Plus, RM67162 on 4-wire SPI with
TE on GPIO9.

Signed-off-by: Aliaksandr Trafimchuk <a13x4nd3r.t@gmail.com>
2026-10-14 08:44:14 +02:00
Benjamin Cabé
ff00e022f7 drivers: serial: uart_emul: initialize config from devicetree
The emulated UART never initialized its struct uart_config, so
uart_config_get() returned an all-zero configuration until
uart_configure() was called: a baudrate of 0, no parity,
UART_CFG_STOP_BITS_0_5, UART_CFG_DATA_BITS_5 and no flow control. The
current-speed, parity, stop-bits, data-bits and hw-flow-control
properties that the binding inherits from uart-controller.yaml were
ignored.

Users doing a get/modify/set of the configuration then write that bogus
framing back. For instance, modem_cellular_baudrate_update() in the
modem_cellular driver only changes the baudrate, so with the emulator it
configures 5 data bits and 0.5 stop bits, and the original baudrate it
saves for later restoration is 0.

Initialize the configuration from devicetree, as other UART drivers do,
and fall back to 115200 baud, 8 data bits, no parity, 1 stop bit and no
flow control for absent properties. Nodes setting current-speed = <0>
still report a baudrate of 0.

Assisted-by: Claude:opus-5.5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-10-14 08:43:52 +02:00
Tomas Barak
6038faef17 drivers: dai: nxp: sai: fix DMA handshake for nxp,mcux-edma controllers
SAI_TX_RX_DMA_HANDSHAKE() read the DMA specifier cells by name using
"channel" and "mux". Those cell names are declared by the DMA controller
binding and are not the same for every controller:

  - nxp,edma:      [channel, mux]
  - nxp,sdma:      [channel, mux]
  - nxp,mcux-edma: [mux, source]

The SAI nodes on i.MX95 M7 and i.MX952 M7 reference an nxp,mcux-edma
controller, which does not declare a "channel" cell, so any build with an
enabled nxp,dai-sai node failed to compile with an undeclared-identifier
error for the "channel" cell.

Select the correct cell names at the resolved dmas index: use
(channel, mux) when the "channel" cell exists (nxp,edma / nxp,sdma) and
fall back to (mux, source) otherwise (nxp,mcux-edma). In both cases the
first cell encodes the low byte and the second cell the high byte, so the
computed handshake value is unchanged for controllers that already worked.

Fixes #121536

Signed-off-by: Tomas Barak <tomas.barak@nxp.com>
2026-10-14 08:43:07 +02:00
Baptiste Coffin
cf3e79b6d7 drivers: ieee802154: mcxw: do not overwrite factory EUI-64
mcxw_set_extended_address() was overwriting mcxw_radio->mac with the
new operational extended address.  Since net_if_set_link_addr() at
boot points the net_if link address directly at this buffer,
otPlatRadioGetIeeeEui64() — which reads from net_if_get_link_addr() —
would return the operational address instead of the factory EUI-64.

This broke Thread commissioning: the Joiner derived its Joiner ID
from the wrong address, causing a commissioner lookup mismatch.

Fix by removing the memcpy into mcxw_radio->mac so the factory
EUI-64 read at boot is preserved.  The PHY is already updated via
MAC_PLME_SapHandler which is sufficient for TX/RX filtering.

Signed-off-by: Baptiste Coffin <baptiste.coffin_1@nxp.com>
2026-10-14 08:42:40 +02:00
Mohammad Odeh
081244be52 drivers: mspi: stm32: gate peripheral count check
Validate the peripheral count only for software-managed multiple
peripherals so disabled placeholders do not block initialization.

Signed-off-by: Mohammad Odeh <zephyr@exalt.ps>
2026-10-14 08:41:46 +02:00
Emilio Bottoni
a25d6b159a drivers: memc: flexspi: relocate rodata along with text for XIP
memc_flexspi_transfer() reads the controller base from the device
config, which stays in the XIP flash because only the driver's text is
relocated. When that read reaches the NOR while it is busy programming
or erasing, it returns 0 and FLEXSPI_TransferBlocking() hangs with
interrupts locked. Relocate the rodata too, as memc_mcux_xspi.c does.

Signed-off-by: Emilio Bottoni <emilio.bottoni@edge.ufal.br>
2026-10-14 08:40:44 +02:00
Matthias Alleman
002424d7a4 drivers: charger: pf1550: re-run interrupt work while INTB is asserted
Only the CHG_INT bits read at the start of the interrupt routine are
acknowledged. An event raised after that read keeps INTB asserted
without generating a new edge, so the event would never be handled.

Check the INTB level at the end of the interrupt routine and submit
the work again if it is still asserted.

Signed-off-by: Matthias Alleman <matthias.alleman@basalte.be>
2026-10-14 08:40:18 +02:00
Matthias Alleman
a9c3e2fe28 drivers: charger: pf1550: fix interrupt unmasking and acknowledge
Charger interrupts were never delivered:

- CHG_INT_MASK was written with 0xFF, which masks all charger
  interrupt sources instead of enabling them. Write 0x00 to unmask
  them.
- The CHG_INT status bits are write-1-to-clear but were only read.
  INTB therefore stayed asserted after the first event and no further
  edge was generated. Write back the read value to acknowledge the
  pending interrupts.

Signed-off-by: Matthias Alleman <matthias.alleman@basalte.be>
2026-10-14 08:40:18 +02:00
Matthias Alleman
a5f09b154a drivers: charger: pf1550: keep interrupt pin enabled
The GPIO interrupt was disabled in the callback and only re-enabled
500 ms after the interrupt routine completed. An event raised in the
meantime asserts INTB without an edge being seen once the interrupt
is re-enabled, so the event is missed. Reconfiguring the interrupt
from the GPIO callback is also not supported by every GPIO driver,
as the callback typically runs in ISR context.

Masking an edge-triggered interrupt while it is being handled is not
needed: an edge raised while the work item is queued is handled by
the pending run, and one raised while it is running resubmits it.
Enable the edge interrupt once at init and remove the delayed
re-enable work.

Signed-off-by: Matthias Alleman <matthias.alleman@basalte.be>
2026-10-14 08:40:18 +02:00
Arkadiusz Grzelka
912e94ae9a drivers: serial: uart_bt: don't stall writer while unsubscribed
Output written while no peer is subscribed, boot output included, is
buffered for the first peer that subscribes. Once the buffer is full,
an interrupt-driven writer such as the shell stalls: only tx_work frees
buffer space, and it does not run until a peer subscribes.

Keep the buffering, with RTT semantics: while nobody is subscribed, a
full buffer drops new output and the writer never waits.
uart_bt_fifo_fill() reports all of it written and uart_bt_irq_tx_ready()
stays ready.

Also check the return value of every work submit and schedule call.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Arkadiusz Grzelka <devitwise@gmail.com>
2026-10-14 08:40:04 +02:00
Zayne Stites
1b86707b79 drivers: sensor: bmm350: restore I3C mode after the soft reset
bmm350_init_chip performs a soft reset, which sets the chip back to
the default i2c state.  It will swap to i3c mode upon SETDASA.

Due to INIT_PRIORITY differences between I3C and sensors, this
SETDASA will come before the sensor is initialized, so the init's
soft reset will set it back to i2c mode.

Adding a self-SETDASA when the sensor is declared on an i3c bus to
put itself back into i3c mode, and thus work out of the box with
a Zephyr I3C controller.

Signed-off-by: Zayne Stites <Zayne.Stites@infineon.com>
Assisted-by: Claude:claude-opus-5
2026-10-14 08:39:50 +02:00
Brandon Edmonds
53e41501ea drivers: sensor: shell: fix decimal parsing of attribute values
parse_sensor_value() read the fractional part of a value with a single
strtoul() and then multiplied it by 10 until it reached 100000. That
discards the leading zeros, so '50.000001' and '50.1' both produced a
val2 of 100000, and '50.005' produced 500000 instead of 5000.

That loop also never terminates when the fraction is all zeros, since
multiplying 0 by 10 never reaches 100000, so 'attr_set <dev> <chan>
sampling_frequency 50.0' hung the shell thread.

Parsing the fraction with base 0 was wrong as well: '50.08' was
rejected as an invalid octal literal, '50.0x10' was silently accepted
as hex, and strtoul() accepts a sign, so '50.-5' wrapped around to a
large unsigned value.

Accumulate the fraction one digit at a time and scale it to
micro-units based on the number of digits that were actually given,
and reject anything that is not a decimal digit. Trailing zeros beyond
six digits are accepted, while a fraction that genuinely needs finer
than micro-unit resolution is still rejected.

Fixes: #116846

Signed-off-by: Brandon Edmonds <bedmonds91@gmail.com>
2026-10-14 08:39:35 +02:00
Benjamin Cabé
b9ffeda25f drivers: sensor: tmag5273: express full-scale attribute in gauss
SENSOR_ATTR_FULL_SCALE was compared against, and reported back as, the
measurement range in millitesla, while the SENSOR_CHAN_MAGN_* channels
are in gauss, making the attribute off by a factor of 10. Convert at the
API boundary so the attribute uses the same unit as the channels.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-10-14 08:39:19 +02:00
Benjamin Cabé
d4bb815eed drivers: sensor: tmag5273: write MAG_GAIN_CONFIG on TMAG3001 too
The MAG_GAIN_CONFIG (0x09) write sat below the early return taken for
the TMAG3001 variants, which only exists because those parts have
REG_CONFIG_3 instead of REG_T_CONFIG. As a result the mag-gain-correction
devicetree property was silently ignored on the TMAG3001. Move the write
above the early return so it applies to both parts.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-10-14 08:39:19 +02:00
Benjamin Cabé
accc932f26 drivers: sensor: tmag5273: fix Y axis enabled in XZX mode
The axis-bit macros applied a plain bitwise test to every value of the
`axis` devicetree property, including the pseudo-simultaneous encodings
0x8..0xB which are not bitfields. TMAG5273_DT_AXIS_XZX (0xB) has bit 1
set, so the Y channel was wrongly marked as enabled; restrict the
bitwise test to the bitfield range so those values are matched only by
the explicit comparisons.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-10-14 08:39:19 +02:00
Benjamin Cabé
77f57bfff8 drivers: sensor: tmag5273: fix angle fractional part scaling
The low 4 bits of ANGLE_RESULT hold the angle fraction in 1/16 degree
steps, but they were scaled by 1/2, making the fractional part 8x too
large and val2 exceed 1000000. Scale by 62500 per LSB instead.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-10-14 08:39:19 +02:00
Benjamin Cabé
f844ff8394 drivers: sensor: tmag5273: fix axis order of SENSOR_CHAN_MAGN_XYZ
channel_get densely packed only the axes enabled via the devicetree
"axis" property, so with a partial axis set val[0..2] no longer held
X, Y and Z as required by the sensor API, and unwritten entries were
left indeterminate. Aggregate reads now use fixed slots per axis and
report deactivated axes as zero.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:fable-5
2026-10-14 08:39:19 +02:00
Benjamin Cabé
ab56dfd748 drivers: input: crsf: fix async RX double buffering
UART_RX_BUF_REQUEST carries no buffer, so the driver always handed back
rx_buf_a, the buffer being filled, and never used rx_buf_b. Track the
idle buffer in the driver data instead.

Assisted-by: Claude:opus-5.5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-10-13 14:10:57 -05:00
Benjamin Cabé
ae9ee1d777 drivers: input: crsf: leave DMA cache coherency to the UART driver
The driver invalidated its 4-byte aligned RX buffers with
arch_dcache_invd_range(), which does not build with an external cache
driver (e.g. ESP32-S3), and refused to build with a data cache unless
CONFIG_CACHE_MANAGEMENT, DTCM or non-cacheable memory was enabled. Cache
coherency of DMA buffers is the UART driver's job, so drop both and keep
placing the buffers in DTCM or non-cacheable memory when available.

Assisted-by: Claude:opus-5.5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-10-13 14:10:57 -05:00
Camille BAUD
290ef69b49 drivers: memc: flexspi: don't apply port address offset twice
The HAL's FLEXSPI_TransferBlocking() now adds the sizes of all
preceding ports (from FLSHCR0) to the transfer's device address.
memc_flexspi_transfer() also adds the sizes of preceding ports, so the
offset was applied twice for any device not on port A1.

On FRDM-RW612 this makes the APS6404L PSRAM on port B1 fail to
initialize: the IP command is issued at 0x08000000 (64 MB + 64 MB)
instead of 0x04000000, which is outside the 72 MB FlexSPI address
space, the controller rejects it, and the driver returns -EIO
("Device aps6404l@2 is not ready"). Devices on port A1 are unaffected
since their offset is zero.

Only adjust the LUT sequence index here and let the HAL handle the
port address offset.

The HAL commit introducing the change is
757668aae79c80bf6ab92e744afaeb97f4c51700.
The manifest commit for the HAL is
b8c0ad5951.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Camille BAUD <mail@massdriver.space>
2026-10-13 14:06:25 -05:00
Antonio Galea
5d5b55af70 drivers: mspi: small fixes for Ambiq Apollo3 Blue MCU
Ambiq Apollo 3 Blue lacked MSPI_AMBIQ_PORT(n) definition, which is needed
by MSPI drivers.

Signed-off-by: Antonio Galea <antonio.galea@gmail.com>
2026-10-13 14:00:04 -05:00
Flavio Ceolin
37a6803ed8 drivers: modem: quectel-bg9x: fix ICCID prefix strip length
on_cmd_atcmdinfo_iccid() strips the "+QCCID: " prefix by moving the
remaining characters to the start of mdm_iccid. It computed the length
of the remainder into out_len but passed the length of the whole
response line to memmove(). The copy read past the end of mdm_iccid on
every prefixed response, and a response line of 32 characters or more
also wrote past it into the following members of struct modem_data.

Copy out_len + 1 bytes instead. out_len is bounded by the NUL-terminated
contents of mdm_iccid, so the copy stays within the buffer.

Signed-off-by: Flavio Ceolin <flavio@hubble.com>
2026-10-13 13:59:16 -05:00
Flavio Ceolin
6c88f59aee drivers: i3c: reject NULL CCC buffers with nonzero length
Reject a NULL ccc.data with a nonzero data_len and a NULL target array
with a nonzero num_targets. Apply the same check to each target entry,
where a NULL data pointer with a nonzero data_len was skipped and left
unvalidated. In-kernel callers never pair a NULL buffer with a nonzero
length, so valid requests are not affected.

Signed-off-by: Flavio Ceolin <flavio@hubble.com>
2026-10-13 17:13:51 +02:00
Flavio Ceolin
f556d3ba7d syscall: i2c: validate target in target register syscalls
Check the device with K_SYSCALL_DRIVER_I2C_TARGET() for the op being
called. This verifies the object type, access permission, that the
device is initialized and that the op is not NULL.

Signed-off-by: Flavio Ceolin <flavio@hubble.com>
2026-10-13 17:13:40 +02:00
Trung Hieu Le
1cf9df7a8b drivers: display: mcux_dcnano_lcdif: check stride before zero-copy
A full-screen write hands the caller's buffer directly to the
controller, but the controller scans it with pitch_bytes, which is
rounded up to MCUX_DCNANO_LCDIF_FB_PITCH_ALIGN.

When the caller's line stride is not already aligned, every line is
fetched at the wrong offset: the image shears diagonally and the last
lines are read past the end of the buffer.

For example a 720x1280 RGB565 frame on the rk055hdmipi4ma0 panel has
1440-byte lines while the controller uses a 1472-byte stride, shifting
each line by 16 pixels.

Only scan the buffer in place when its stride matches pitch_bytes, and
fall back to the line-by-line copy into the driver framebuffer
otherwise.

Signed-off-by: Trung Hieu Le <trunghieu.le@nxp.com>
2026-10-13 17:10:03 +02:00
The.Thanh Nguyen
2db58d5c86 drivers: uart: fix UART RA SCI B issue when enable ASYNC mode
Fix an issue that when global configs: CONFIG_UART_INTERRUPT_DRIVEN
and CONFIG_UART_ASYNC_API are enabled simultaneously, the channel
which running interrupt driven mode hit the issue that the hardware
interrupt flags will be never cleared.

Signed-off-by: The.Thanh Nguyen <the.nguyen.yf@renesas.com>
2026-10-13 17:07:45 +02:00
Pisit Sawangvonganan
8eaf92f312 drivers: {sensor, serial, spi, tee, usb, usb_c}: fix typo
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within:
- `drivers/sensor`
- `drivers/serial`
- `drivers/spi`
- `drivers/tee`
- `drivers/usb`
- `drivers/usb_c`

Assisted-by: Claude:claude-sonnet-5-5 codespell
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2026-10-13 17:06:54 +02:00
Pisit Sawangvonganan
073d05cddf drivers: {clock_control, counter, dma, espi, firmware}: fix typo
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within:
- `drivers/clock_control`
- `drivers/counter`
- `drivers/dma`
- `drivers/espi`
- `drivers/firmware`

Assisted-by: Claude:claude-sonnet-5-5 codespell
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2026-10-13 09:38:56 +02:00
Benjamin Cabé
5e1dee02db drivers: fuel_gauge: sbs_gauge: log emulator accesses at debug level
The SBS gauge emulator logged every register read and write at the info
level, so tests and applications that read an emulated gauge
periodically filled their log with them. Log them at the debug level.

Tested with the sbs_gauge tests on native_sim and qemu_x86.

Assisted-by: Claude:opus-5.5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-10-13 09:37:26 +02:00
Pisit Sawangvonganan
5031f957cd soc: nuvoton: fix typo in npcx pinctrl offset field
Rename the misspelled `offest` bit-field in `pinctrl_soc.h` together with
its user in the NPCX pinctrl driver, and fix the other spelling errors in
the same files. Both files change in one commit so the tree builds at
every commit.

Assisted-by: Claude:claude-sonnet-5-5 codespell
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2026-10-13 09:37:15 +02:00
Aric Radzin
c4ccaa5216 drivers: console: uart_mcumgr: Fix async RX timeout Kconfig
CONFIG_MCUMGR_TRANSPORT_UART_ASYNC=y fails to build unless the
unrelated CONFIG_UART_CONSOLE_MCUMGR=y is also set. The RX timeout added
by commit 3b9cd7b9cb ("drivers: console: uart_mcumgr: Add async
timeout") is defined under UART_CONSOLE_MCUMGR, the UART console's
MCUmgr passthrough, so CONFIG_UART_CONSOLE_MCUMGR_ASYNC_RX_TIMEOUT_US
is undefined in any other configuration.

Move the option next to the other MCUmgr UART async options as
MCUMGR_TRANSPORT_UART_ASYNC_RX_TIMEOUT_US, under
MCUMGR_TRANSPORT_UART_ASYNC, which guards the driver code that uses
it. The prompt, default and help text are unchanged. The option has
not been in a release, so it is renamed without a deprecation period.

Tested by building samples/subsys/mgmt/mcumgr/smp_svr for
nrf52840dk/nrf52840 with serial.conf and the asynchronous UART API,
which fails without this change.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Aric Radzin <aric.radzin@gmail.com>
2026-10-12 23:33:59 +02:00
Benjamin Cabé
c2ebaa8636 drivers: serial: mcux_lpuart: keep async DMA buffers cache coherent
The async API hands caller buffers to the eDMA without any cache
maintenance, so on a core with a data cache TX sends stale data and RX
reports stale bytes unless the buffers sit in DTCM or non-cacheable
memory. Boards placing zephyr,sram in OCRAM, such as vmu_rt1170, are
affected.

Flush TX buffers before starting the DMA, clean and invalidate RX
buffers when they are handed to the DMA, and again for each range
reported in UART_RX_RDY. Select CACHE_MANAGEMENT so the cache API is
backed whenever a data cache is present.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:opus-5.5
2026-10-12 23:28:49 +02:00
Benjamin Cabé
6124e0b798 drivers: usb: uhc_dwc2: do not inherit channel state on claim
error_count and hcint_cplt_pending track one transfer but live in the
channel, so the next transfer to claim it could start one error away
from failing or with a stale completion bit. Reset both on claim.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:opus-5.5
2026-10-12 23:27:09 +02:00
Dharun krithik k
920074c07c drivers: flash: infineon_pdl: always stage writes through SRAM buffer
The CAT1 PDL requires program data to be in SRAM, but the write path
passed aligned sources straight to the PDL and only staged misaligned
ones. An aligned buffer that lives in flash/rodata could therefore bypass
the copy and violate that requirement.

Always memcpy each row into the SRAM row_buf before programming, so the
PDL always gets a buffer that is in SRAM and aligned.

Signed-off-by: Dharun krithik k <dharunkrithik@aerlync.com>
2026-10-10 22:47:09 +02:00
Benjamin Cabé
b6bf3aefa0 drivers: adc: ads1220: move register defs into the driver source
The ADS1220 register macros were only used by the ADC driver and are
not part of any API, so move them into adc_ads1220.c next to the
register addresses it already defines there, and drop the public header.

Assisted-by: Claude:opus-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-10-10 20:06:25 +02:00
Flavio Ceolin
b98e1c75d2 drivers: hwinfo: Avoid kernel memory leak to user
z_vrfy_hwinfo_get_reset_cause() and
z_vrfy_hwinfo_get_supported_reset_cause() pass an uninitialized stack
variable to the implementation and then copy it to the user buffer
whatever the implementation returned. In those cases memory from
kernel stack are copied to user memory.

Signed-off-by: Flavio Ceolin <flavio@hubble.com>
2026-10-10 06:53:01 +02:00
Chunlei Zhou
fa3f8ba40b drivers: sensor: mpu6050: log the unexpected chip ID
Include the chip ID in the MPU6500-family detection log and in the
error for an unrecognized ID. This exposes the value read from
WHO_AM_I without requiring a separate register read.

Assisted-by: Codex:gpt-6.1-sol
Signed-off-by: Chunlei Zhou <619247683@qq.com>
2026-10-09 17:02:37 +02:00
Chunlei Zhou
31f123356b drivers: sensor: mpu6050: add support for MPU6515
The MPU6515 reports 0x74 in WHO_AM_I, which the driver currently
rejects. Accept this ID and select DEVICE_TYPE_MPU6500 to reuse the
MPU6500 register handling and die temperature conversion.

Assisted-by: Codex:gpt-6.1-sol
Signed-off-by: Chunlei Zhou <619247683@qq.com>
2026-10-09 17:02:37 +02:00
Jakub Topic
aa7fdd065d drivers: adc: stm32: balance the PM policy state lock
adc_stm32_read() took the suspend-to-idle (and suspend-to-RAM) policy
lock once per read, but the interrupt and DMA handlers released it once
per completed sampling. A sequence with extra_samplings, an interval or
ADC_ACTION_REPEAT released it more often than it was taken and hit the
"Unbalanced state lock get/put" assert. The lock also leaked when
start_read() or start_inj_read() rejected a sequence before sampling
started, or when a DMA error ended the read, keeping the system out of
low power for good.

Take the lock right before the read starts and release it in
adc_context_on_complete(), which runs once for every started read on
both success and error, so it is held across all samplings of a read.

Signed-off-by: Jakub Topic <jakub.topic@anitra.cz>
2026-10-09 17:00:52 +02:00
Tomasz Moń
59673a9594 drivers: uhc_dwc2: fix kconfig for nRF7120
nRF7120 shares the same host quirks as nRF54LM20. Extend the series
check to include nRF71 series so the driver builds correctly on
nRF7120-DK.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2026-10-09 16:58:39 +02:00
Tomasz Moń
16f824b307 drivers: regulator: nrf_vregusb: Enable 3V3 auto mode
Put 3V3 regulator in auto mode to make the USB applications work on
targets that have control over 3V3 regulator enable.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2026-10-09 16:58:39 +02:00
The.Thanh Nguyen
46b5a3d38f drivers: usb: uhc: renesas_ra: support multi-level hub topology
R_USBH_PortOpen() takes hub_addr/hub_port to program the controller's
split-transaction (UPPHUB/HUBPORT) fields for FS/LS devices behind a
high-speed hub, but both call sites hardcoded 0, 0 (root port),
leaving any device behind a hub addressed incorrectly except by
accident when the hub sits directly on the root port.

struct usb_device already carries the hub topology (hub, hub_port,
level, tt) populated by the generic USB host hub class driver, so add
get_hs_hub_addr_port() to walk a device's hub chain up to the nearest
high-speed ancestor and use its address and port, matching the
pattern used by uhc_mcux_common.c. This is not necessarily the
device's immediate parent, since one or more full-speed hubs can sit
between it and the high-speed hub performing the split.

Assisted-by: Claude:claude-sonnet-5
Signed-off-by: The.Thanh Nguyen <the.nguyen.yf@renesas.com>
2026-10-09 16:53:58 +02:00