Commit graph

1,992 commits

Author SHA1 Message Date
Declan Snyder
a6836866b1 drivers: lpuart: Dont say we support async without DMA
The dma has to be enabled on the platform in order for ASYNC API to
work. This can be indicated by whether or not any LPUART node has the
`dmas` property set.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-09-20 11:11:09 +02:00
Mahesh Mahadevan
efe34d04d2 drivers: nxp: Use a MACRO to enable Wakeup signals
Switch to using the new NXP_ENABLE_WAKEUP_SIGNAL and
NXP_DISABLE_WAKEUP_SIGNAL macros to avoid adding
platform specific calls in the Zephyr drivers.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2025-09-20 11:09:00 +02:00
Gerard Marull-Paretas
e3e2a40895 drivers: serial: sf32lb: add basic driver
Just basic driver with poll-in/out capability.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2025-09-19 16:34:15 +02:00
Benjamin Cabé
27fa721632 drivers: serial: opentitan: remove bogus depends on clause
CONFIG_SERIAL_SUPPORT_INTERRUPT is a Kconfig option that is supposed to
be selected by serial drivers that support interrupts. This commit
removes a bogus "depends on !SERIAL_SUPPORT_INTERRUPT" which does not
make sense and causes some tests to fail.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-09-19 08:06:42 +02:00
Julien Panis
c625853b19 drivers: serial: cc23x0: Add power management
Add PM support to cc23x0 UART module.

Signed-off-by: Julien Panis <jpanis@baylibre.com>
2025-09-18 13:47:56 -04:00
Hau Ho
48decca1fc drivers: serial: Update serial driver to support RX26T
- Update serial driver for RX26T support. This MCU using grp interrupt
feature (not supported yet), so need to add some marcos to enable
support.
- Change the struct st_sci0 to use a common sci iodefine struct as
st_sci

Signed-off-by: Hau Ho <hau.ho.xc@bp.renesas.com>
Signed-off-by: Phi Tran <phi.tran.jg@bp.renesas.com>
2025-09-18 15:40:34 +01:00
Martin Hoff
4c2bc42f7b drivers: serial: silabs: Change poll_out function to blocking mode
Since the UART API explicitly states that the poll_out function needs
to block until the character is sent, change the mechanism and add
a busy-wait loop to ensure transmission completion before proceeding.

Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
2025-09-18 09:46:49 +01:00
Martin Hoff
c37ffd396b drivers: serial: silabs: Update ISR to check for DMA device presence
Since the symbol CONFIG_UART_ASYNC_API is shared between EUSART and USART
drivers, it creates a scenario where EUSART can have
CONFIG_UART_SILABS_USART_ASYNC=y but with no DMA device declared for it
in the DTS (because we only want async API for the USART driver).
We handled this case by disabling async transfer when the DMA
device is null, but when we activate CONFIG_PM, we have a hard fault due
to null pointer dereference in the ISR.
This bug was only discovered today when trying to enable CONFIG_PM over the
uart_async_api test, which led to a hard fault in the ISR. This occurs
because we only enable interrupts when the PM is enabled in the "poll_out"
function to put the PM lock back.

Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
2025-09-18 09:46:49 +01:00
Devin Jaenicke
ba42b5db21 drivers: serial: silabs: fix to allow euart to function on bgm220s
The efr32xg22 series does not support the same async operations as other
efr32 series chips. This change allows the eusart driver to function.

Signed-off-by: Devin Jaenicke <devinjaenicke@glassboard.com>
2025-09-17 11:16:17 +01:00
Pete Johanson
f51ba58dfd drivers: serial: Fix TX of single byte on MAX32.
MAX32 UART's "almost empty" fires when the FIFO gets down to one byte, but
when sending just one byte, no interrupt is raised, resulting in stalled
TX. Use a timer to ensure the ISR is invoked and TX processing continues in
that scenario.

Signed-off-by: Pete Johanson <pete.johanson@analog.com>
2025-09-12 14:22:55 -04:00
Fin Maaß
d2988fc91f drivers: serial: litex: trivial changes
some trivial changes

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-09-12 13:18:30 +02:00
Fin Maaß
cf3701ccad drivers: serial: litex: only clear rx pending if needed
only clear rx pending if needed

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-09-12 13:18:30 +02:00
Fin Maaß
b97a0b174a drivers: serial: litex: fix set pending in uart_litex_fifo_fill function
fix set pending in uart_litex_fifo_fill function

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-09-12 13:18:30 +02:00
Fin Maaß
d245529329 drivers: serial: litex: remove unneeded soft irq
remove unneeded soft irq, as disabeled irqs
will still be registered, but just not propagated
to the cpu until it is enabled again.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-09-12 13:18:30 +02:00
Samuel Coleman
8cc80069a7 drivers: serial: stm32: expand DMAT errata test.
I manually checked the errata sheets for all STM32Hxx/STM32Uxx parts to
confirm the defect's presence or absence. It appears to have been resolved
in silicon on newer parts (e.g., STM32U3xx family), so hopefully this test
will not need grow further (knock on wood).

Co-authored-by: Nicolas Zuluaga <nicolas.zuluaga@rbr-global.com>
Signed-off-by: Samuel Coleman <samuel.coleman@rbr-global.com>
2025-09-12 08:19:25 +01:00
Jakub Klimczak
f7d8688a35 drivers: serial: Add UART VIRTIO Console
Add a UART driver for the VIRTIO console device.
This driver has support for both polling- and interrupt-based i/o,
as well as interacting with up to 32 console ports (disabled by
default). Based on the Xen HVC driver.
Tested with the console subsystem sample programs. Aside from
enabling CONFIG_PCIE, setting CONFIG_HEAP_MEM_POOL_SIZE to a
high enough value (for example 100000) is necessary -- as is done
in the virtiofs sample.

Signed-off-by: Jakub Klimczak <jklimczak@internships.antmicro.com>
2025-09-11 06:26:02 -04:00
Hao Luo
53e28e0de2 driver: uart: ambiq: need to wait for IO stable after resume
Add a short delay to wait for IO stable when resume from sleep
to prevent printing gibberish.

Signed-off-by: Hao Luo <hluo@ambiq.com>
2025-09-11 09:55:05 +02:00
Hao Luo
1f95b06c95 drivers: uart: ambiq: fix incorrect uart tx ready status
This commit fixes incorrect uart tx ready status

Signed-off-by: Hao Luo <hluo@ambiq.com>
2025-09-11 09:55:05 +02:00
Khoa Nguyen
db981f65e9 drivers: Add assign event for current core for all Renesas drivers
Add assign event for current core for all Renesas drivers

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2025-09-11 09:53:13 +02:00
Aditi Bhaskar
2d854b3e50 Drivers: UART pdl-based driver bug fixed
- Resolved failure in uart_basic_api test (rx now handled)
 - Fixed interrupt mask configuration in uart-pdl driver
 - Removed redundant irq handling functions

Signed-off-by: Aditi Bhaskar <aditi.bhaskar@infineon.com>
2025-09-10 22:43:32 -04:00
Mickael Bosch
bfea9cf94f drivers: serial: stm32: fix non-LP UARTs with PM
Re-configure the registers if they re erased because of a STOP2 low power
mode.

Return the error code when re-initializing the UART after a STANDBY low
power mode.

Fix few typos and comments.

Run clang format on uart_stm32_pm_action()

Signed-off-by: Mickael Bosch <mickael.bosch@linux.com>
2025-09-03 17:05:17 +02:00
Benjamin Cabé
0132ea07fb doc: fix spelling errors tree-wide
fix some spelling errors in code comments and Kconfig helps

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-09-03 17:04:13 +02:00
Gerson Fernando Budke
6bdd63fe93 drivers: serial: sam0: Fix rx ready
The uart_sam0_irg_rx_ready() function always returns true, even if
interrupt is disabled. This happens because the function do not
evaluate if the interrupt is enable of not. This fixes the issue
by adding the missing check.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2025-09-01 16:56:36 +01:00
Aksel Skauge Mellbye
b83267dba0 drivers: serial: silabs_usart: Fix configure error cases
Enable uart_elementary test and fix edge cases where the
configure function did not return the appropriate error code
when given invalid parity or flow control parameters.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-08-28 00:40:11 +02:00
Raffael Rostagno
d1ecc51dcd drivers: uart: esp32h2: Add support
Add UART support for ESP32-H2.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-08-26 22:07:36 +02:00
Kamil Krzyżanowski
db15de5274 drivers: serial: stm32: fix race condition when both APIs enabled
Fix a bug where if CONFIG_UART_ASYNC_API was enabled in the config, the
interrupt flags would get cleared after the interrupt driven API callback
finished executing, causing data loss if data happened to arrive after the
callback but before the flags were cleared.

Signed-off-by: Kamil Krzyżanowski <kamnxt@kamnxt.com>
2025-08-22 16:51:17 +02:00
Krzysztof Chruściński
5e838284ab drivers: serial: nrfx_uarte: Add support for device deinit
Add device deinit function. Support is optional as it is not widely
used and it enables pinctrl sleep state so it impacts memory footprint.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-08-22 12:35:42 +02:00
Jake Greaves
ba4bb91b1b drivers: serial: STM32U5 series lpuart
Allow LPUART to function and wakeup the device from STOP modes

Signed-off-by: Jake Greaves <jake.greaves@analog.com>
2025-08-21 17:13:36 +02:00
Camille BAUD
eab94972ed drivers: uart: Update bflb uart driver for BL70x
BL70x almost equal BL60x here

Signed-off-by: Camille BAUD <mail@massdriver.space>
2025-08-20 16:30:48 +02:00
Tim Pambor
120f5a073c serial: uart_native_pty: IRQ support
Add support for the interrupt-driven API. Interrupts are
emulated using a polling thread.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-08-19 19:14:21 +02:00
Jackson Farley
bfdfa2086f serial: Add error checking and interrupt support on mspm0 driver
It is now possible to enable CONFIG_UART_INTERRUPT_DRIVEN for mspm0
uart driver.

Signed-off-by: Jackson Farley <j-farley@ti.com>
Co-authored-by: Hans Binderup <habi@bang-olufsen.dk>
2025-08-19 19:13:34 +02:00
Joel Guittet
3e3ceeae49 drivers: serial: add uart-bitbang support
Initial support for uart bitbang driver.

Signed-off-by: Joel Guittet <joelguittet@gmail.com>
2025-08-19 19:13:19 +02:00
Sri Surya
acdf69be17 drivers: serial: pl011: Add support for Ambiq Apollo2 SoC UART
Added UART Support for Apollo2 SOC and cleanup.

Signed-off-by: Sri Surya <srisurya@linumiz.com>
2025-08-19 18:00:41 +02:00
Eden Frosst
0598b2cc81 drivers: serial: stm32: propagate baud rate config failure
The uart_stm32 driver gives no way for a user to
tell if setting a new baud rate was successful.
Propagate error checks up to the API level.

Signed-off-by: Eden Frosst <edenfrosst@gmail.com>
2025-08-18 21:59:59 +02:00
Tim Pambor
e4e5e7adc8 drivers: uart: emul: Fix uninitialized variable errors
Fix compiler errors about variables potentially being used uninitialized.
These are false positives, as the compiler is confused by the
K_SPINLOCK() macro. Explicit initialization avoids these errors.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2025-08-14 15:49:49 +02:00
Mike J. Chen
4e0e3c990d drivers: dma: dma_mcux_lpc: fix src_inc/dst_inc for block chain
The dma driver was determining src_inc and dst_inc from the
config of the first block buffer and ignoring the config
flags for any additional buffers in the chain, which could
lead to incorrect transfers (e.g. in a multiple rx buffer
case, if the first buffer was to receive to NULL,
but the subsequent buffers were not NULL, the bug
would manifest as all transfers being made with
dst_inc of 0). Change the driver to setup
each dma descriptor according to the addr_adj flag
of each block_buffer.

Add check that peripheral transfers have addr_adj set to
NO_CHANGE instead of assuming it, to help catch errors.

Also now check for invalid addr_adj request of
decrement, which this controller doesn't support.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2025-08-13 11:08:21 +01:00
Henrik Brix Andersen
1d45e17037 Revert "serial: uart_native_pty: IRQ support"
This reverts commit df1e6f5290.

Fixes: #94425

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2025-08-12 20:33:02 -04:00
Tim Pambor
df1e6f5290 serial: uart_native_pty: IRQ support
Add support for the interrupt-driven API. Interrupts are
emulated using a polling thread.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2025-08-12 21:33:00 +02:00
Phi Tran
6966f0a910 drivers: uart: Update sci uart for support RX261
This commit to update sci uart for support RX261

Signed-off-by: Phi Tran <phi.tran.jg@bp.renesas.com>
2025-08-11 12:48:35 +03:00
Sunil Abraham
fe830c5c16 drivers: uart: microchip: add minimal support for sercom uart g1 IPs
Add uart driver with minimal features.
Implement polling receive and transmit functionality.

Signed-off-by: Sunil Abraham <sunil.abraham@microchip.com>
2025-08-08 11:52:35 +03:00
Khoa Nguyen
3aa72e4e9e drivers: Update p_context for all Renesas drivers
The p_context no longer has the const type, so all
Renesas-supported drivers need to be updated accordingly.

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2025-08-08 11:52:13 +03:00
Sreeram Tatapudi
600e86d475 drivers: serial: Adding PDL based UART driver
Adding a basic UART driver based on the PDL API

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2025-08-04 19:57:57 +01:00
Camille BAUD
bdffc08279 bflb: Make BL60x independant from SDK
Reorganize and update soc folder files for SDK-independance
Reorganize and update hal_bouffalolab files for SDK-independance
Reorganize and update soc dts files for SDK-independance
Update serial and pinctrl driver files for SDK-independance
Update ai_wb2_12f, bl604e_iot_dvk, and dt_bl10_dvk
to new bl60x support
and fixup openocd config of ai_wb2_12f

Signed-off-by: Camille BAUD <mail@massdriver.space>
2025-08-01 07:57:36 -04:00
Swift Tian
814ed6803f tests: fix arm_irq_vector_table fail on Ambiq platforms
Fixed build fail since 4c93fcd35b.
Fixed test run fail on Ambiq platforms.
Added Ambiq section in the test.

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2025-07-30 07:27:19 -04:00
Bjarki Arge Andreasen
2b0d1ae4d0 soc: nordic: nrf54h: transition from gpd to zephyr pinctrl and pds
Transition nrf54h away from the soc specific gpd
(global power domain) driver which mixed power domains, pinctrl
and gpio pin retention into a non scalable solution, forcing soc
specific logic to bleed into nrf drivers.

The new solution uses zephyrs PM_DEVICE based power domains to
properly model the hardware layout of device and pin power domains,
and moves pin retention logic out of drivers into pinctrl and
gpio, which are the components which manage pins (pads).

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-07-29 09:03:37 -04:00
Michał Bainczyk
2e06c4ed20 drivers: nrf: add build asserts for memory-regions property
Add build asserts for "memory-regions" property in nrf drivers which is
required on targets with DMM for saadc, pdm, pwm, twim, twim_rtio, twis,
tdm, uarte, spim and spis. On targets where the property is not required
the assertion macro expands to nothing.

Signed-off-by: Michał Bainczyk <michal.bainczyk@nordicsemi.no>
2025-07-28 04:27:25 -04:00
Michał Stasiak
e8dd83b43d drivers: serial: nrfx_uarte: enable cross domain pins for nRF54L15
UARTE20 and UARTE21 instances enable usage of pins on different
port, but require request for constant latency mode. Added
handling of such scenario in the driver. Added testcase
to cover it.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2025-07-25 17:03:11 +01:00
Vytautas Virvičius
358e796374 drivers: serial: native_tty: change init priority
Change init priority from '55' to 'CONFIG_SERIAL_INIT_PRIORITY' to align
with how other serial devices are initialized.

Signed-off-by: Vytautas Virvičius <vytautas@virvicius.dev>
2025-07-25 07:45:19 -04:00
Vytautas Virvičius
e1eaa0e39e drivers: serial: native_tty: config_get support
This commit adds config_get support for native_tty. This is helpful as
some driver code (e.g. u_blox m8) will error out if they can't read the
current configuration.

Signed-off-by: Vytautas Virvičius <vytautas@virvicius.dev>
2025-07-24 02:47:59 -04:00
Fabio Baltieri
ad998d6f36 Revert "driver: serial: uart_ns16550: Add pm support for uart_ns16550 driver"
This reverts commit fd88386a9f, it breaks
uart support on ITE platforms when PM is enabled but PM_RUNTIME is not,
possibly others as well.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-07-23 17:16:40 +01:00