Commit graph

2,140 commits

Author SHA1 Message Date
Fin Maaß
6d89a4b2b3 drivers: uart: litex: use mem_addr_t
use mem_addr_t for register addresses.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-04-15 17:15:46 -04:00
Carlo Caione
36f3bebfb7 drivers: serial: mbox: convert NXP drivers to device MMIO API
Convert three NXP drivers from raw DT_REG_ADDR() register access
to the Zephyr device MMIO API (DEVICE_MMIO_ROM / DEVICE_MMIO_RAM /
DEVICE_MMIO_MAP):

With the MMIO API, the drivers create their own mapping at init time via
DEVICE_MMIO_MAP() thus the corresponding mmu_regions entries are removed
from the five NXP SoC files that carried them.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2026-04-15 17:15:37 -04:00
Krzysztof Chruściński
67f1cee897 drivers: serial: nrfx_uarte: Add support for variable frame size
nRF54x devices supports 4-9 bit frame size. Extend UART driver to
support data sizes supported by the Zephyr UART API (5-9 bits).

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2026-04-15 17:15:26 -04:00
Anand Kumar
dadf30044c drivers: serial: stm32: add UART IRQ sharing support
Add shared interrupt support for STM32 UART on SoC families where
multiple USART/LPUART peripherals share a single IRQ line (F0, G0,
L0, U0, C0).

Add a compile-time BUILD_ASSERT in the STM32 UART driver that detects
when two or more enabled UART instances share an IRQ and
CONFIG_SHARED_INTERRUPTS is not set.

Add configdefault SHARED_INTERRUPTS and SHARED_IRQ_MAX_NUM_CLIENTS
to the SoC Kconfig for STM32F0x, STM32L0x, STM32U0x, and STM32C0x.

Update DTS comments in the F0 family that previously stated shared
UART IRQs are unsupported.

The SHARED_IRQ_MAX_NUM_CLIENTS combinations in the F0x Kconfig were
generated with:

  from itertools import combinations
  usarts = ['usart3','usart4','usart5','usart6','usart7','usart8']
  for n in range(6, 2, -1):
      for combo in combinations(usarts, n):
          conds = ' && '.join(
              f'$(dt_nodelabel_enabled,{u})'
              for u in combo)
          print(f'\tdefault {n} if {conds}')

Fixes zephyrproject-rtos#39565

Signed-off-by: Anand Kumar <anandvtu16158@gmail.com>
2026-04-14 22:21:03 -04:00
Nick Stoughton
12ba507599 drivers: serial: nrfx_uarte: remove unused variable
Removes compiler warning if `CONFIG_UART_USE_RUNTIME_CONFIGURE` is not
defined.

Signed-off-by: Nick Stoughton <nick.stoughton@eargo.com>
2026-04-01 11:51:24 -05:00
Ahmed Ahmed
c64d271a03 drivers: serial: nrfx_uarte: Fix high-speed UART baudrate calculation
The UARTE_GET_CUSTOM_BAUDRATE macro used an incorrect formula that
did not match the one specified in the nRF54x UARTE datasheet.

The correct formula is:
  2^12 * floor(2^20 / round(f_PCLK / desired_baudrate))

Update the macro to match the datasheet formula, to reduce the
baudrate error for high-speed UART instances on nRF54x devices.

Signed-off-by: Ahmed Ahmed <ahmed.ahmed@dewinelabs.com>
2026-03-30 09:58:40 -05:00
Pisit Sawangvonganan
4328b32b5c drivers: fix typo in (serial, spi, tee, timer, usb, usb_c, video)
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within:
- `drivers/serial`
- `drivers/spi`
- `drivers/tee`
- `drivers/timer`
- `drivers/usb`
- `drivers/usb_c`
- `drivers/video`

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2026-03-27 20:21:24 -04:00
Raffael Rostagno
90036ba970 drivers: uart: esp32: Remove sleep pinctrl init
Remove pinctrl sleep group init. Low power state for pinctrl will
be managed using harware feature.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2026-03-24 09:05:47 -04:00
Fabin V Martin
e7e3032e61 drivers: uart: microchip: sercom g1: changes for pic32cz_ca80
Updated the interrupt handler to connect all interrupt lines added
in the corresponding sercom uart node.

Signed-off-by: Fabin V Martin <Fabinv.Martin@microchip.com>
2026-03-24 07:06:16 -04:00
Missael Maciel
af089536ca drivers: uart: mcux_flexcomm: Avoid reading registers when no clock
Clock attach verification added previous to read flexcomm registers.
This ensures the flexcomm has a clock attached and is ready for
transmission, avoiding the system gets stuck in an infinite loop
while reading the registers.

Signed-off-by: Missael Maciel <davidmissael.maciel@nxp.com>
2026-03-24 05:26:46 +01:00
Tony Han
bc3586a8c2 drivers: serial: mchp: add minimal drivers for G1 DBGU (Debug Unit)
Add uart driver with minimal features for DBGU for sam9x7 SOCs.

Signed-off-by: Tony Han <tony.han@microchip.com>
2026-03-23 12:27:55 -05:00
Aaron Brice
01b611100c drivers: serial: renesas_ra: Fix tx_enable
In uart_ra_sci_irq_tx_enable() it clears the Transmit Data Empty and
Transmit End flags.  Doing this results in the uart re-sending the last
byte written to the TDR if the fifo is not being used.  Avoid clearing the
status in the fifo-disabled case.

Signed-off-by: Aaron Brice <aaron@embeddedts.com>
2026-03-23 10:16:50 +01:00
Hau Ho
53399d85d1 drivers: serial: Support serial driver for RX14T SoC
Modify driver code to adapt with RX14T SoC

Signed-off-by: Hau Ho <hau.ho.xc@bp.renesas.com>
2026-03-23 10:16:41 +01:00
John Batch
02d10281ee drivers: serial: infineon: use shared HF clock utility
Remove the duplicated ifx_cat1_get_hfclk_for_peri_group() function and
use version from shared header file.

Assisted-by: GitHub Copilot:claude-opus-4.6
Signed-off-by: John Batch <john.batch@infineon.com>
2026-03-20 09:55:43 -05:00
Jackson Farley
ea88bf7cf6 drivers: uart: added rx timeout for MSPM0
The low RX FIFO threshold of 1 could lead to issues during higher baud
rates, thus the threshold is increased and the RX Timeout feature on the
MSPM0 is introduced.

Signed-off-by: Jackson Farley <j-farley@ti.com>
2026-03-20 20:45:39 +09:00
Jackson Farley
5384bd0b5f drivers: serial: uart bugfix for interrupt ISR
The isr implementation would clear pending interrupts that had fired
since the first check for pending interrupts, leading to missed events.
This PR amends that issue and fixes typos in comparing IIDX types rather
than bitmasks to explicit comparisons

Signed-off-by: Jackson Farley <j-farley@ti.com>
2026-03-20 20:45:39 +09:00
Fin Maaß
65860193cf drivers: serial: test: implement missing irq_is_pending
implement missing irq_is_pending.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-03-20 20:43:25 +09:00
Krzysztof Chruściński
c2bcc85da4 drivers: serial: nrfx_uarte: Return error if PM suspend fails
PM suspend operation cannot be performed for UART using asynchronous
API is there are any active operations. Instead of asserting return
error.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2026-03-20 18:17:37 +09:00
Ofir Shemesh
0a755ae198 serial: mcux_lpuart: report RX errors in async mode
The async mode ISR silently cleared RX error flags (overrun, parity,
framing, noise) without notifying the application. This violates the
Zephyr async UART API which requires a UART_RX_STOPPED event followed
by UART_RX_BUF_RELEASED and UART_RX_DISABLED.

Enable RX error interrupts alongside the idle-line interrupt, and
handle them in the ISR by reporting UART_RX_STOPPED with the
appropriate reason bitmask, then calling rx_disable() for the full
API-mandated teardown sequence.

Also set rx_dma_params.buf to NULL in rx_disable() after releasing
buffers, so stale pointers are not left behind.

Signed-off-by: Ofir Shemesh <ofirshemesh777@gmail.com>
2026-03-20 13:31:47 +09:00
Ofir Shemesh
399ceea11c serial: mcux_lpuart: clear RX DMA buffer pointer on disable
Clear rx_dma_params.buf to NULL in mcux_lpuart_rx_disable() after
releasing all buffers. Without this, the stale pointer remains set
after RX teardown, which can cause subsequent checks against buf
to incorrectly assume RX is still active.

Signed-off-by: Ofir Shemesh <ofirshemesh777@gmail.com>
2026-03-20 13:31:47 +09:00
Sylvio Alves
262b0280ba drivers: serial: add esp32c5 support
Extend UART and USB serial drivers to support ESP32-C5. Add UHCI0
compatibility macro since the ESP32-C5 HAL exports the UHCI
peripheral as UHCI instead of UHCI0.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-03-19 14:53:05 -05:00
Sean Kyer
ffc3abcf2c drivers: serial: uart_max32: Add backup restoration support
Extended the resume routine of UART to support for device
reset from Backup power mode.

Signed-off-by: Sean Kyer <Sean.Kyer@analog.com>
2026-03-19 17:03:30 +01:00
Miguel Gazquez
3d797110e6 drivers: serial: uart_esp32: use dev instead of data->uart_dev
Pass the function argument `dev` to the async callback instead of
`data->uart_dev`. The pointers are identical, but `dev` is already
available in this context, so it's clearer to use it directly.

Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
2026-03-19 16:59:36 +01:00
Francois Ramu
f7b1c8e2b9 drivers: serial: stm32: update driver for stm32 hal2
Add abstraction function to check the TX/RX fifo flags and enable/disable,
and redefine a few macros (like stop bits or data width) for STM32 HAL2.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2026-03-19 11:39:33 +00:00
William Markezana
d547042bf9 drivers: bflb: extend shared drivers with BL70XL SoC support
Add CONFIG_SOC_SERIES_BL70XL to preprocessor conditionals across
existing Bouffalo Lab drivers that share register-compatible code
paths with BL60x/BL70x:

- cache: L1C flush-enable workaround applies to BL70XL
- flash: XIP address defines, L1C wrap, QPI JEDEC ID support
- gpio: BL70XL includes, fix BIT() usage for pin set/clear
- i2c: clock source calculation
- serial: UART clock divider, guard UART1 (BL70XL has only UART0)
- spi: GLB address and FIFO size, clock calculation
- syscon: efuse SAHB clock selection
- input: IR receiver pin mapping and clock divider

Signed-off-by: William Markezana <william.markezana@gmail.com>
2026-03-18 17:40:26 -05:00
Jacob Wienecke
b5af9747c8 serial: mcux_flexcomm: apply pinctrl in PM
Apply PINCTRL_STATE_SLEEP on suspend and PINCTRL_STATE_DEFAULT on resume
so that pin configuration is updated for low power modes.

Previously the suspend and resume actions were empty, leaving pins in
their active configuration during sleep. On SoCs like RW6xx where pad
control registers survive low power modes, this allos boards to define
sleep pinctrl states with appropriate pull or drive setting s to minimize
leakage.

Signed-off-by: Jacob Wienecke <jacob.wienecke@nxp.com>
2026-03-18 11:03:32 +09:00
Ayush Singh
c1e14900b0 drivers: serial: Add RPMSG UART
A lot of BeagleBoard.org boards contain SOCs with co-processors such as
M4F in AM62x (PocketBeagle 2 [0]), R5s in AM67A (BeagleY-AI [1]). In such
targets, the application is normally loaded by the Linux host using
remoteproc.

There have been some out of tree patches to have micropython and other
Zephyr applications output to allow having a console without requiring
manual connections. This patch attempts to provide a more concrete and
upstream way to have that functionality.

The implementation uses existing rpmsg service subsystem.

Only implemented poll_out

Tested on PocketBeagle 2 M4F core.

[0]: https://docs.zephyrproject.org/latest/boards/beagle/pocketbeagle_2/doc/index.html
[1]: https://docs.zephyrproject.org/latest/boards/beagle/beagley_ai/doc/index.html

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2026-03-16 18:58:35 -05:00
Marco Widmer
5abd0035f2 drivers: serial: cmsdk_apb: lock irqs when writing the ctrl register
Enabling and disabling interrupts may happen concurrently from thread
and interrupt context. Add locks to synchronize the access to the ctrl
register.

This was observed to improve the stability of the zephyr,bt-hci-uart
driver when used with the cmsdk_apb uart driver.

Signed-off-by: Marco Widmer <marco.widmer@bytesatwork.ch>
2026-03-13 14:43:17 +01:00
Marco Widmer
c73c1cb476 drivers: serial: cmsdk_apb: rework interrupt "priming"
Similar to the TX interrupt, the RX interrupt is also an edge interrupt
that only fires when a new bytes is received. When enabling the RX
interrupt, data may be already present in the RX FIFO. Call the
interrupt handler manually to start processing.

Also check if calling the interrupt handler is really required.

Signed-off-by: Marco Widmer <marco.widmer@bytesatwork.ch>
2026-03-13 14:43:17 +01:00
Marco Widmer
fd801f8a0c drivers: serial: cmsdk_apb: fix irq_is_pending when interrupts disabled
irq_is_pending should not return 1 when interrupts are disabled through
irq_XX_disable. Check the interrupt enable bit before returning.

Signed-off-by: Marco Widmer <marco.widmer@bytesatwork.ch>
2026-03-13 14:43:17 +01:00
Sylvio Alves
c64a74e711 espressif: adapt to hal_espressif IDF master sync
Adapt all Espressif SoC and driver code to the updated
hal_espressif module synced with IDF master branch.

Main changes:
- clock control: delegate peripheral clock gating to HAL
  layer using new clock/reset APIs
- SPI/GDMA: adapt to restructured DMA HAL with new channel
  allocation and configuration interfaces
- ethernet: add RMII clock configuration and PHY management
- GPIO: simplify using direct HAL function calls
- flash: adapt to updated SPI flash HAL interfaces
- linker scripts: update IRAM/DRAM mappings for new HAL
  object files
- DTS: fix ESP32-S2 PSRAM dcache1 address to match actual
  MMU mapping region (0x3f800000 DRAM1 instead of 0x3f500000
  DPORT which lacks 8-bit access capability)
- west.yml: update hal_espressif revision

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-03-13 11:38:18 +01:00
Raffael Rostagno
5250dc705a drivers: uart: esp32: Add device PM
Add device PM to ESP32 UART driver.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2026-03-10 15:09:30 +01:00
Nhut Nguyen
ddef67d4ae drivers: serial: renesas: Add support for RZ/T2H, N2H
Update serial driver to support Renesas RZ/T2H, N2H

Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
2026-03-10 09:33:25 +01:00
Yuzhuo Liu
3c46baa1a2 drivers: serial: add rtl8752h serial driver
Add rtl8752h series in bee serial driver.

Signed-off-by: Yuzhuo Liu <yuzhuo_liu@realsil.com.cn>
2026-03-09 15:03:48 -05:00
Merin George
563ec38fc6 drivers: serial: infineon: updated hardware flow control support
Update the Infineon PDL UART driver to support Zephyr's standard
UART hardware flow control configuration.

Flow control is now derived from uart_config.flow_control allowing
applications to enable RTS/CTS using the generic UART API and
devicetree settings

configure the RTS rx fifo trigger level when flow control is enabled

Signed-off-by: Merin George <merin.george@infineon.com>
2026-03-06 09:57:43 +01:00
Yassine El Aissaoui
f66677833f drivers: mcux_lpuart: Handle STANDBY PM state in state-lock functions
STANDBY state can place the peripheral into a
low‑power state, and transitioning to it before
a TX transmission completes may cause data loss

Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
2026-03-05 04:41:25 +01:00
Keith Packard
bbb6e78229 drivers/serial: Add missing declarations in uart_max32.c
When UART_INTERRUPT_DRIVE, PM and UART_CONSOLE_INPUT_EXPIRED are all
defined the driver uses the device flags without the necessary declaratoins
or fetching the hardware register.

Signed-off-by: Keith Packard <keithp@keithp.com>
2026-03-04 14:28:47 +00:00
Hoang Nguyen
e42c9ac45c drivers: serial: Add support for Renesas RZ/G3E
Add serial driver support for Renesas RZ/G3E

Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
2026-03-03 13:28:32 +01:00
Fabin V Martin
20630ff455 drivers: uart: microchip: sercom g1: code improvements
Some naming changes and removed redundant code.

Signed-off-by: Fabin V Martin <Fabinv.Martin@microchip.com>
2026-03-02 11:00:26 +01:00
Khoa Tran
dc4e092830 drivers: serial: Initial SAU UART driver support for Renesas RA0 series
Initial SAU UART driver support for Renesas RA0 series

Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2026-03-02 10:48:45 +01:00
Pete Johanson
4f1956a130 drivers: serial: More complete TX errata fix for MAX32
Some MAX32 targets may fail to raise TX half/almost empty interrupts,
so add an optional workaround for those scenarios to ensure no missed
TX completion when using the interrupt API.

Signed-off-by: Pete Johanson <pete.johanson@analog.com>
2026-02-27 21:09:31 +00:00
Ayush Singh
f5e5e5f4f1 serial: cc13xx_cc26xx: Fix TX interrupt
In cc13xx_cc26xx, the TX interrupt seems to be generated once initially on
enable and subsequently, when buffer goes from full to empty (since we are
operating in 1-byte buffer mode).

Due to this, if the TX interrupt is cleared in the configure function, a
new TX interrupt will not be generated untill we transition from a full to
empty buffer, even though the buffer itself is empty.

When using Zephyr Interrupt-driven UART API, one first needs to enable TX
interrupts `uart_irq_tx_enable()`, and then write data from the interrupt
callback, after checking `uart_irq_tx_ready()`. In case of cc13xx_cc26xx,
calling `uart_irq_tx_enable()` unmasks the TX interrupt, however, it will
not generate a new TX interrupt. Thus the callback will not be called
unless we first write something to the uart (using polling-API), causing a
transition in buffer state.

According to TI docs, writing 1 byte to the buffer will also clear the
TX interrupt, so it does not make sense to try clearing the interrupt
manulally in `configure` function.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2026-02-27 07:58:45 +01:00
Brett Peterson
cd4e2c88c0 drivers: serial: uart update for dma
Updating UART driver to work with recent dma driver changes.

Signed-off-by: Brett Peterson <brett.peterson@infineon.com>
2026-02-26 21:24:20 +00:00
Quy Tran
e35a33a298 drivers: serial: Add support for group interrupt in the serial driver
Apply the grp irq support in serial driver for MCB-RX26T

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2026-02-25 13:02:41 +01:00
Tahsin Mutlugun
a36ab08276 drivers: serial: uart_max32: Add runtime power management support
Refactor MAX32 UART driver to use pm_device_driver_init so that the
device is moved to the appropriate power state expected by the system
during initialization.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2026-02-24 13:52:15 +01:00
Tahsin Mutlugun
7d2396d876 drivers: serial: uart_max32: Add PM policy constraints
Add PM policy constraints so that UART driver can prevent the system
going to sleep before all characters are sent or received.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2026-02-24 13:52:15 +01:00
Michal Smola
f5c65899dc drivers: nxp: Allow usage of clocks without subsystem name
Several NXP drivers require clock control subsystem name definition in
Devicetree. It prevents usage of clock control without subsystem such
as fixed-clock. fixed-clock can be used for early SoC enablement when
complete clock controller is not available or not required.
Allow optional usage of clock control without subsystem by using 0 as
subsystem name if the name is not defined in devicetree. Add the option
for port, i2c, spi and serial drivers.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
2026-02-23 16:59:01 +00:00
Fiona Behrens
e4068f8757 soc: nuvoton m48x: use numaker reset driver for uart
Use the numaker reset driver for the reset in the numicro uart driver.

Signed-off-by: Fiona Behrens <me@kloenk.dev>
2026-02-23 08:48:43 +01:00
Fabin V Martin
4f95b4d152 drivers: uart: microchip: sercom g1: refactor code
Changes added to make g1 driver to be used across multiple
SoC's and also avoids use of multiple SOC symbols in the
source file for selecting between the similar but differently
named macros and reg definitions across multiple DFP's.

Signed-off-by: Fabin V Martin <Fabinv.Martin@microchip.com>
2026-02-20 10:31:08 -08:00
Pete Johanson
9a175efbe6 drivers: serial: Disable async support on MAX32 RV32
MAX32 RV32 core DMA support is still a WIP, so disable async API for now
there.

Signed-off-by: Pete Johanson <pete.johanson@analog.com>
2026-02-20 07:03:31 +01:00