Commit graph zephyr/drivers/serial
Author SHA1 Message Date
Johan Hedberg
4f85f461e5 drivers: serial: ns16550: prevent DW8250 TX FIFO overflow in fifo_fill
With CONFIG_UART_NS16550_DW8250_DW_APB, uart_ns16550_irq_tx_ready()
reports the transmitter ready whenever USR.TFNF is set, i.e. as soon as
the TX FIFO has room, while uart_ns16550_fifo_fill() writes up to
fifo_size bytes without checking how much room there actually is. When
the ISR runs with data left in the FIFO, the excess bytes are written to
a full FIFO and lost.

On the Silicon Labs SiWx917 (ulpuart, ns16550 with the DW8250 option)
this happens right after boot and about once per thousand fills under
load: the UART ISR is entered with no interrupt pending (IIR reads 0xC1)
while the FIFO still holds 15 of the 16 bytes of the previous fill, so
the fill loses up to 15 bytes. With the Bluetooth monitor in
interrupt-driven mode on that UART the stream had a truncated New Index
frame after every boot and lost 15-byte chunks every 1-2 seconds, while
the polled mode was unaffected.

Stop the DW8250 fill loop as soon as USR.TFNF clears, so that the driver
never writes more than the FIFO can take and returns the number of bytes
it actually accepted.

Fixes #117777

Assisted-by: Claude:claude-fable-5
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2026-09-01 21:05:40 -04:00
Krzysztof Chruściński
c452faf42d drivers: serial: nrfx_uarte: Fix case with mixed instance configuration
Compilation was failing when one instance is using interrupt driven
API and another one is using asynchronous API with TIMER byte counting.
Compilation was also failing if instance had timer property in DT but
Kconfig was indicating use of the interrupt driven API.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2026-09-01 15:19:01 +01:00
Zhaoxiang Jin
690e17370e drivers: serial: uart_mcux_lpuart: add PM device support
Add device pm support so the LPUART can be re-initialized
after a low-power state that collapses its power domain
(for example i.MX RT700 deep-sleep-retention), which loses
all peripheral state.

The suspend action saves and masks the enabled interrupts
so a pending interrupt cannot fire its ISR against the
powered-down register bank; the resume action re-initializes
the peripheral and restores those interrupts, and the ISR
bails out while suspended. pm_device_driver_init() establishes
the initial device state.

This relies on the LP_FLEXCOMM parent being resumed first
to re-select the peripheral in the wrapper, which device PM
guarantees via init-priority ordering.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-09-01 11:04:22 +01:00
Anas Nashif
cb3178d8ee drivers: serial: lpc11u6x: use portable IRQ pending API
Replace direct NVIC pending-state calls with k_irq_set_pending()/
k_irq_is_pending()/k_irq_clear_pending(), dropping the dependency on
cmsis_core.h where nothing else needed it.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-08-27 22:12:29 -04:00
Jérôme Pouiller
c3b8b33224 drivers: serial: silabs: drop orphans eusart_silabs_ll2cfg_*()
The functions eusart_silabs_ll2cfg_*() have never been used. Probably the
original author wrote them for the completeness since their
eusart_silabs_cfg2ll counterparts were required.

Orphan function generate warning that could in turn generate error with
-Werror.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2026-08-27 21:24:48 +01:00
Jérôme Pouiller
3ff1816c5f drivers: serial: silabs: drop orphans uart_silabs_ll2cfg_*()
The functions uart_silabs_ll2cfg_*() have never been used. Probably the
original author wrote them for the completeness since their
uart_silabs_cfg2ll counterparts were required.

Orphan function generate warning that could in turn generate error with
-Werror.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2026-08-27 21:24:48 +01:00
Sylvio Alves
dde217c098 drivers: espressif: enable esp32c61 in shared drivers
Add the C61 conditionals to the shared espressif drivers:
gpio, uart, usb-serial, spi, counter, entropy, hwinfo,
pinctrl, watchdog and the timer and clock Kconfig, mostly
mirroring the single-core C5 behavior.

Assisted-by: Claude:opus-4-8
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-08-27 21:23:34 +01:00
Måns Ansgariusson
690809ecfc drivers: serial: Update ring_buf usage to new zero-copy API
This commit updates the usage of ring_buf to utilize the new
put_ptr/commit/get_ptr/consume pattern instead of the traditional
claim/finish approach. This change is part of a larger refactor aimed at
streamlining the ring_buf API and improving its efficiency.

Signed-off-by: Måns Ansgariusson <mansgariusson@gmail.com>
2026-08-25 09:00:03 +02:00
Sri Surya
893be65c90 drivers: serial: Add serial driver for TI Tiva C Series SoC
Add serial driver for TI Tiva C Series SoC.

Signed-off-by: Sri Surya <srisurya@linumiz.com>
2026-08-24 14:03:15 -07:00
Krzysztof Chruściński
4e88698da1 drivers: serial: nrfx_uarte: Avoid 64 bit division
When converting timeout (in microseconds) to bauds use by the HW
frame timeout use less accurate conversion but one that does not
use 64 bit division. 64 bit division takes a lot of code and time
and shoud be avoided.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2026-08-24 10:35:20 +01:00
Yuzhuo Liu
bd38a7e708 drivers: serial: uart_bee: claim DMA channels via dma_request_channel
The async driver reserved its devicetree-assigned RX/TX DMA channels by
poking the DMA controller's dma_context atomic bitmap directly with
atomic_set_bit(). That bypassed the public DMA API, never detected a
channel that was already in use, and dereferenced dma_rx/dma_tx.dma_dev
unconditionally: when only one direction is wired to DMA the other
dma_dev is NULL, so the reservation crashed on a NULL pointer.

Reserve each channel through dma_request_channel() with a BIT(channel)
filter instead. This forces exactly the devicetree channel, registers it
in the same allocation bitmap that dma_request_channel(dev, NULL) callers
(such as memory-to-memory transfers) consult, and returns an error when
the channel is already taken. Each direction is now guarded by its own
NULL check, fixing the single-direction crash.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Yuzhuo Liu <yuzhuo_liu@realsil.com.cn>
2026-08-21 16:06:56 +02:00
Etienne Carriere
12313850af drivers: serial: Fix UARTE_NRFX_UARTE_COUNT_BYTES_WITH_TIMER dependency
Since frame-timeout-supported DT property if of boolean type, use of
dt_compat_any_has_prop() without an explicit value argument of True
makes that function to always return true. Set function argument
value to True to get the expected behavior.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-08-21 14:30:47 +02:00
Bo Sun
c02a99fa56 drivers: serial: ns16550: add automatic DLF calculation
The static 'dlf' property is valid only for a specific PCLK/baud rate
combination. The current calculation accounts for this fixed value when
selecting the integer divisor, but cannot adapt to runtime baud rate
changes.

A low fixed PCLK may require a fractional divisor to reduce baud rate
error for the requested baudrate.

Add an opt-in 'dlf-auto' property to calculate the integer divisor and
DLF value together whenever the baud rate changes, using 1/64-resolution
fixed-point arithmetic. When enabled, 'dlf-auto' overrides 'dlf'.

Also enable DLF support when an instance uses either 'dlf' or
'dlf-auto'. Existing 'dlf' users are unaffected.

Signed-off-by: Bo Sun <bo.sun@kernel.li>
2026-08-19 18:40:54 -04:00
Fiona Behrens
a36a77e9b8 drivers: reset: add ch32 reset controller
Add reset driver for the reset part of the ch32 rcc.

Use this new reset driven in `wch,usart` to reset the usart peripheral
before use.

Signed-off-by: Fiona Behrens <me@kloenk.dev>
2026-08-19 18:40:22 -04:00
Aksel Skauge Mellbye
5c8ea82aa9 drivers: serial: silabs: Use sl_hal_eusart instead of emlib
Update driver to use new HAL library that supports both
Series 2 and Series 3 SoCs.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2026-08-19 17:12:37 +01:00
Fabio Baltieri
25040cac20 drivers: serial: stm32: declare few lock functions as maybe unused
This fixes a potential build warning introduced in 7b2a3c0cca, where
the static functions would get declard but not used if the board has:
- CONFIG_PM=y
- CONFIG_UART_ASYNC_API=y
- CONFIG_DMA=y
- the dma node enabled in devicetree

Reproduced with:

west build -p -b stm32f4_disco samples/hello_world -DCONFIG_PM=y
-DCONFIG_UART_ASYNC_API=y -DCONFIG_DMA=y

zephyrproject/zephyr/drivers/serial/uart_stm32.c:218:13: warning:
'uart_stm32_rx_wakeup_lock_get' defined but not used

Found this downstream, finding the specific combination of option and
dt override to reproduce this was a big mess, there's no benefit chasing
down the specific combination of ifdeffery here so let's just mark them
as maybe unused and if that combo hits the compiler can just drop them.
Between ifdefs form Kconfig and the HAL this driver is already VERY hard
to follow.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2026-08-19 17:06:13 +01:00
Anas Nashif
4024c955c9 drivers: name the parameters in function declarations
MISRA C:2012 Rule 8.2 requires every parameter in a function type to be
named, including the parameters of function pointer parameters.
The cache, clock control, comparator, entropy, Ethernet, I2S and serial
drivers left callback parameters unnamed, or carried forward
declarations that dropped the names the definitions already use. The two
virtio callbacks get ARG_UNUSED() for the arguments they deliberately
ignore.

Name them after the arguments the documentation or the
definitions already use. No functional change.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-08-18 20:22:43 -04:00
Tony Han
71a994f06f drivers: serial: mchp: add UART driver for sama5d2 SoC
Add driver for sama5d2's UART (Universal Asynchronous Receiver
Transmitter).

Signed-off-by: Tony Han <tony.han@microchip.com>
2026-08-18 17:20:08 -04:00
Eden Frosst
7b2a3c0cca drivers: serial: stm32: release the RX wake lock on hardware timeout
A UART that woke the SoC keeps PM_STATE_SUSPEND_TO_IDLE locked forever
once the hardware receiver timeout is in use.

The WKUP interrupt takes the lock and sets rx_woken. The IDLE arm of
uart_stm32_isr() would release it, but set_timeout_itr() disables the
IDLE interrupt when it programs RTOR, so the RTO arm reports the end of
reception instead and only clears the flag and flushes. The lock is never
released, so the system never enters a Stop state again.

Move acquire and release into helpers and call them from both paths, so
the behaviour at the end of reception is consistent.

Also move enable_wakeup_line out of the block with the PM policy helpers.

Tested on a nucleo_l476rg, cyclic asynchronous reception with PM enabled.

Fixes: #116273
Signed-off-by: Eden Frosst <eden.frosst@rbr-global.com>
2026-08-17 20:51:00 -05:00
Andreas Weissel
c6abf9a0fd drivers: serial: ns16550: include dlf in baudrate divisor calculation
The baudrate divisor calculation should take the fractional parameter
into account when a DLF-capable UART is used. Otherwise non-optimal
integer divisors can be derived, especially for low pclk or high
baud_rate values.

Signed-off-by: Andreas Weissel <andreas.weissel@synaptics.com>
2026-08-17 16:28:34 -04:00
Krzysztof Chruściński
34c88f5de0 drivers: serial: nrfx_uarte: Delay the initilization if GPPI relies on IPC
If GPPI is using IPC communication then delay the initialization of an
UARTE instance which is using GPPI connection after GPPI is initialized
which happens after IPC service is setup.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2026-08-17 14:14:08 +02:00
Johan Hedberg
f0dc851ead drivers: serial: gecko: fix TX interrupt storm
uart_gecko_irq_tx_enable() enables both the TXBL and TXC interrupts,
but nothing in the standard interrupt-driven flow clears the TXC
flag: it is write-1-to-clear and only uart_gecko_irq_tx_complete()
clears it, which typical interrupt handlers (servicing
uart_irq_tx_ready() and uart_irq_rx_ready()) never call. Once a
transmission completes, TXC stays pending and the UART interrupt
re-enters continuously whenever TX is enabled, spinning at hardware
interrupt priority between TXBL servicing opportunities.

This is the same defect as in the silabs usart driver fixed by the
previous commit, where it was measured on hardware (82017 ISR entries
for 1811 TX-ready services on xg24_rb4186c). The gecko driver shares
the exact structure: TXC enabled as an interrupt source, no stale
flag clearing in irq_tx_enable() or irq_tx_disable(), and
irq_is_pending() not reporting TXC. This change is build-tested for
slwrb4104a but not validated on Series 0/1 hardware.

Only enable TXBL, which is sufficient to pace FIFO refills, and clear
the stale TXC flag when TX is disabled so uart_irq_tx_complete()
cannot report a completion from a previous transmission.

Assisted-by: Claude:claude-fable-5
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2026-08-14 16:19:08 -04:00
Johan Hedberg
b669d8fa12 drivers: serial: silabs: usart: fix TX interrupt storm
uart_silabs_irq_tx_enable() enables both the TXBL and TXC interrupts,
but nothing in the standard interrupt-driven flow clears the TXC flag:
it is write-1-to-clear and only uart_silabs_irq_tx_complete() clears
it, which typical interrupt handlers (servicing uart_irq_tx_ready()
and uart_irq_rx_ready(), as the console, shell and Bluetooth monitor
do) never call. Once the first frame completes, TXC stays pending and
the UART interrupt re-enters continuously for the whole duration of a
transmission, spinning at hardware interrupt priority between TXBL
servicing opportunities (one byte time apart at the configured baud
rate). The driver's own irq_is_pending() does not include TXC either,
so the documented "while (uart_irq_is_pending())" handler idiom cannot
observe the interrupt cause it is being invoked for.

This is distinct from and not addressed by commit 3a6406439c
("drivers: serial: silabs: Only clear processed flags"), which fixed
flag clearing inside irq_tx_complete() itself but did not change TXC
being enabled as an interrupt source that no standard handler
acknowledges.

Measured on xg24_rb4186c with an interrupt-driven TX user that
services only uart_irq_tx_ready(): 82017 ISR entries for 1811 TX-ready
services. The storm throttles every thread on the CPU to the UART
byte rate, and starves the radio hard enough to break Bluetooth link
supervision under load. With this fix the same workload shows 805139
TX-ready services in 806757 ISR entries.

Only enable TXBL, which is sufficient to pace FIFO refills, and clear
the stale TXC flag when TX is disabled so uart_irq_tx_complete()
cannot report a completion from a previous transmission. TXC remains
readable through uart_irq_tx_complete(), which uses the raw interrupt
flag rather than the enabled mask.

The eusart driver also enables TXC from irq_tx_enable(), but clears
stale TXC flags in both irq_tx_enable() and irq_tx_disable(), which
prevents the storm; this was verified on the same hardware (497
interrupts for 497 TX-ready services when transmitting 512 bytes).
The legacy gecko driver shares the vulnerable structure and is fixed
in the following commit.

Assisted-by: Claude:claude-fable-5
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2026-08-14 16:19:08 -04:00
Hans Wilmers
357467a011 serial: uart_native_pty: Add runtime UART configuration stub
Add a stub configure callback to the native PTY UART driver when
CONFIG_UART_USE_RUNTIME_CONFIGURE is enabled.

The stub accepts valid configuration requests without applying any UART
settings and returns -EINVAL when the configuration pointer is NULL.

This enables applications that require the runtime UART configuration API,
such as Modbus RTU, to use the native PTY UART driver.

Signed-off-by: Hans Wilmers <hans@wilmers.no>
2026-08-14 15:27:06 +02:00
Jakub Zymelka
016e1056d6 drivers: serial: nrfx_uarte: fix CBWT RX disable with pending ENDRX
Do not defer STOPRX when CBWT is active because CBWT does not process
ENDRX interrupts. Trigger STOPRX immediately to complete RX teardown
and prevent subsequent uart_rx_enable() calls from returning -EBUSY.

Fixes #115897 and #115899

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2026-08-13 13:12:20 -04:00
Steven Macías
63f51d2bc2 drivers: uart: mspm0: add fifo threshold properties
By default, the UART RX FIFO is configured to trigger an interrupt
when it is half full. This end up breaking implementations that
assumed a per-byte interrupt delivery. These changes make these
properties adjustable in the DTS for RX and TX FIFOs.

Signed-off-by: Steven Macías <esmu@bang-olufsen.dk>
2026-08-13 06:32:32 -04:00
Aksel Skauge Mellbye
3a6406439c drivers: serial: silabs: Only clear processed flags
In interrupt handlers, only clear interrupt flags that have been
processed. This fixes a race condition where an interrupt that was
raised after flags were read for processing was prematurely
cleared without the corresponding action being taken.

When this condition was met, irq_tx_complete() never reported that
transmission was complete, while err_check() failed to report errors.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2026-08-11 07:50:00 -04:00
Krzysztof Chruściński
fbe8357d21 drivers: serial: nrfx_uarte: Fix calculation of an internal variable
bounce_buf_swap_len variable is used when mode that uses TIMER to
count RX bytes was used. Macro for calculating that variable was
invoked with incorrect argument as UARTE_US_TO_BYTES was applied
to baudrate argument. Because of that
CONFIG_UART_NRFX_UARTE_BOUNCE_BUF_SWAP_LATENCY was in fact not
applied.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2026-08-11 07:48:37 -04:00
Nhut Nguyen
4966603fac drivers: uart: renesas: Map MMIO region through MMIO device APIs
Map MMIO region through MMIO device APIs to support ARM64 with MMU

Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
2026-08-11 07:40:28 -04:00
Alberto Escolar Piedras
94293cbd93 drivers serial uart_native_pty: Fix a backwards comment
The variable is the oposite of what the comment said.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2026-08-10 16:17:08 -04:00
Mihai Renea
15fa7763e9 drivers: uart_mchp_sercom_g1: fix RX error forwarding
Fix RX error not getting forwarded as reason to the UART_RX_STOPPED event.

Signed-off-by: Mihai Renea <mihai.renea@ml-pa.com>
2026-08-10 09:14:00 -07:00
Jakub Zymelka
2dfb81ef57 drivers: serial: nrf_uarte: restore IRQ state on DMM error
Restore the previous interrupt state when DMM RX buffer preparation
fails. Returning with the IRQ lock held could leave interrupts disabled
after uart_rx_buf_rsp() reports the error.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2026-08-09 17:45:37 -04:00
Jakub Zymelka
beed381352 drivers: serial: nrf_uarte: use DMAEND on frame timeout
Model DMAEND and FRAMETIMEOUT_DMAEND support as a devicetree
capability. Use DMAEND for finite asynchronous RX frame timeouts on
capable UARTE instances and retain STOPRX on unsupported hardware.

Disable TIMER-based byte counting when DMAEND is available. Preserve
buffer accounting when uart_rx_disable() races with an ENDRX rollover,
reject buffer responses during teardown, and restore the interrupt
state after DMM preparation failures.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2026-08-09 17:45:37 -04:00
Fabrice DJIATSA
27965929cb drivers: serial: stm32: don't force RXNE IRQ on async rx disable
uart_stm32_async_rx_disable() forced RXNE on and left the ERROR
interrupt enabled, causing per-byte/per-overrun ISR load on continuous
RX streams.

Keep async and interrupt-driven RX ownership separate: async disables
RXNE on enable and, on disable, only tears down async state and
disables ERROR. RXNE remains off; callers that switch back to
interrupt-driven RX must re-enable it via uart_irq_rx_enable().

This avoids ISR flooding for async users and matches API ownership.


Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2026-08-08 16:32:32 -04:00
Yuzhuo Liu
eb525902e0 drivers: uart: bee: add async API for Realtek Bee series
Add UART asynchronous driver support for Realtek Bee series SoCs,
including RTL87x2G and RTL8752H.

This driver supports:
- Asynchronous TX/RX transfers

Signed-off-by: Yuzhuo Liu <yuzhuo_liu@realsil.com.cn>
2026-08-08 16:31:05 -04:00
Raffael Rostagno
35987fa585 drivers: serial: esp32: Hold UART pads during light sleep
GPIO isolation during sleep leaves all pins floating, for power saving.
In some configurations the UART peripheral will remain ON during sleep
and can be affected by signal shifts in the pins. Use the pad hold
function to leave signals recessive and avoid spurious UART events
which can dirty the FIFO and leave pending interrupts which can
stall the system.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2026-08-07 06:49:39 -04:00
Vladyslav Goncharuk
f57b260f2d drivers: serial: use Xen sched yield helper
Use xen_sched_yield() in the Xen HVC UART driver instead of calling the
low-level scheduler hypercall entry point directly.

This keeps the driver on the public Xen scheduler helper API while
preserving the existing behavior. The driver still yields the current
VCPU when the TX ring is full so the console backend can consume data.

Signed-off-by: Vladyslav Goncharuk <vladyslav_goncharuk@epam.com>
Assisted-by: Codex:gpt-5 cpp-code-map
2026-08-06 14:38:03 +02:00
Muhammad Waleed Badar
f6457d5e82 drivers: serial: remove BCM2711 auxiliary UART driver
Remove the dedicated BCM2711 auxiliary UART driver and its associated
Kconfig entry now that support has been integrated into the generic
NS16550 driver.

Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
2026-08-05 09:28:40 +02:00
Muhammad Waleed Badar
d7c5d59863 drivers: serial: ns16550: add BCM283x auxiliary UART support
Add support for the Broadcom BCM283x auxiliary UART variant to the
NS16550 driver by introducing a dedicated Kconfig option and variant-
specific register definitions required for the extended register set.

This enables the generic NS16550 driver to support the auxiliary UART
found on Broadcom BCM283x SoCs.

Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
2026-08-05 09:28:40 +02:00
Ibrahim Abdalkader
ae44cc2f2b drivers: serial: uart_bridge: forward modem control lines to the peer
The bridge already forwards the port configuration (baudrate,
parity, etc...) to the peer, but not the modem control lines.
Forward DTR RTS state to the peer port as well, so a bridged
serial port carries the control lines through like a USB-serial
adapter does.

Note the forwarding is compiled in only if CONFIG_UART_LINE_CTRL
is enabled.

Signed-off-by: Ibrahim Abdalkader <i.abdalkader@gmail.com>
2026-08-04 18:47:52 +01:00
Benjamin Cabé
121c894bce drivers: serial: uart_sedi: Accumulate error flags in err_check
Each detected error was assigned with '=', so simultaneous conditions
reported only the last one checked. OR the flags together.

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-08-04 06:50:31 -04:00
Elie Carrot
d863ec49cb drivers: uart: add WCH CH5xx UART driver support
Add UART driver support for the CH5xx.
This enables the hello_world and the drivers/uart/echo_bot samples.

Signed-off-by: Elie Carrot <elie.carrot@smile.fr>
2026-08-03 15:00:06 -04:00
Perry Naseck
a9a76ea2e6 serial: mcux_lpuart: Fix UART noise error marked as parity error
This commit fixes a small bug where a noise error is misclassified as
a parity error.

Signed-off-by: Perry Naseck <pnaseck@media.mit.edu>
2026-07-31 20:00:53 -04:00
Pisit Sawangvonganan
698b2a3a13 drivers: uart: align async timeout units documentation
Align the public UART async API with its microsecond-based implementation.
Update the wide-data (u16 variant) TX and RX API documentation to
specify microseconds and SYS_FOREVER_US.

Replace millisecond-named forever sentinels in the serial test driver and
asynchronous UART callers, while retaining existing microsecond timeout
values in drivers, tests, and samples.

Assisted-by: Copilot:GPT-5.6 Terra
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2026-07-31 14:59:13 -04:00
Alberto Escolar Piedras
7e0c1b09f4 drivers: serial: native_tty: Add missing dependency
This driver needs the nsi_errno conversion component.
Let's make sure we build it by selecting it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2026-07-31 13:22:16 -04:00
Etienne Carriere
aa3187f793 drivers: Include include/zephyr/sys/clock.h
Header file include/zephyr/sys_clock.h is deprecated and will be removed
someday. Update the whole file tree to include zephyr/sys/clock.h
straight instead of zephyr/sys_clock.h.

This change was made running the sed shell command below:
$ sed -i 's/zephyr\/sys_clock\.h/zephyr\/sys\/clock\.h/' \
      `grep -rsl "zephyr/sys_clock\.h" drivers/`

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-07-30 07:45:05 -05:00
Johnny Chuang
f84834f2f4 drivers: serial: Add UART driver for ELAN EM32 series
Add initial UART driver support for the ELAN EM32 SoC family. The driver
implements basic polling TX/RX via the Zephyr serial API and instantiates
devices from devicetree when an EM32 UART node is present and okay.

Devicetree:
- Compatible: "elan,em32-uart" (binding included)

Notes:
- The driver is initialized at PRE_KERNEL_1
  with CONFIG_SERIAL_INIT_PRIORITY
so the device is ready before the console backend binds.

Signed-off-by: Johnny Chuang <johnny.chuang@emc.com.tw>
2026-07-28 12:28:40 -07:00
TOKITA Hiroshi
d58fbb8cfc include: zephyr: xen: public: remove and migrate to the zephyr-xenlib
This PR migrates the MIT-licensed Xen public headers into the
`include/zephyr/xen/public` directory to the zephyr-xenlib module.

Since the xen public headers require GCC extensions,
enable GNU_C_EXTENSIONS along with enabling CONFIG_XEN.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2026-07-27 14:40:21 +02:00
Henrik Brix Andersen
8ba1698fbf Revert "drivers: uart: unify xilinx ps uart driver with cadence uart driver"
This reverts commit 189ccda20b as it is
causing breakage on qemu_cortex_r5/zynqmp_rpu.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2026-07-27 06:09:38 -05:00
Muhammad Waleed Badar
189ccda20b drivers: uart: unify xilinx ps uart driver with cadence uart driver
Remove the dedicated xlnx_xuartps driver and consolidate support
into the Cadence UART driver (uart_cdns), as both drivers target
the same underlying Cadence UART IP used by Xilinx platforms.

Update device tree bindings and DTS files to use the Cadence
compatible string on supported platforms, remove obsolete driver
sources, and adjust build system configuration accordingly.

Also update test overlays to reflect the driver consolidation.

Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
2026-07-27 09:20:04 +02:00