Skip to content

Commit 0de383f

Browse files
driver: serial: Add Infineon CAT2 UART driver
Add initial implementation of the Infineon CAT2 UART driver based on the Peripheral Driver Library (PDL) for CAT2 (PSoC 4100TP) devices. - Supports UART transmit and receive using PDL SCB UART APIs - Configurable baud rate, parity, stop bits, and data bits from devicetree - Uses pinctrl to configure TX/RX pins - Supports Zephyr console and shell subsystems - Provides build-time validation for UART configuration parameters - Default UART configuration defined in `uart_ifx_cat2_pdl.c` Signed-off-by: Dharun krithik k <[email protected]> Signed-off-by: Sayooj K Karun <[email protected]>
1 parent f11db0c commit 0de383f

File tree

11 files changed

+935
-3
lines changed

11 files changed

+935
-3
lines changed

boards/infineon/cy8cproto_041tp/cy8cproto_041tp.dts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
/dts-v1/;
99
#include <arm/infineon/cat2/mpns/cy8c4147azq_t495.dtsi>
1010
#include <arm/infineon/cat2/psoc4100tp/system_clocks.dtsi>
11+
#include "cy8cproto_041tp-pinctrl.dtsi"
1112

1213
/ {
1314
model = "CY8CPROTO-041TP Development Board";
@@ -16,9 +17,20 @@
1617
chosen {
1718
zephyr,sram = &sram0;
1819
zephyr,flash = &flash0;
20+
zephyr,console = &uart0;
21+
zephyr,shell-uart = &uart0;
1922
};
2023
};
2124

25+
uart0: &scb0 {
26+
compatible = "infineon,cat2-uart";
27+
status = "okay";
28+
current-speed = <115200>;
29+
clocks = <&peri0_group0_16bit_0>;
30+
pinctrl-0 = <&p5_2_scb0_uart_tx &p5_1_scb0_uart_rx>;
31+
pinctrl-names = "default";
32+
};
33+
2234
&peri0_group0_16bit_0 {
2335
status = "okay";
2436
resource-type = <IFX_RSC_SCB>;

drivers/i2c/i2c_ifx_cat1_pdl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (c) 2025 Infineon Technologies AG, or an affiliate of Infineon Technologies AG.
2+
* Copyright (c) 2025 Infineon Technologies AG, or an affiliate of Infineon Technologies AG.
33
* All rights reserved.
44
*
55
* SPDX-License-Identifier: Apache-2.0

drivers/serial/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ zephyr_library_sources_ifdef(CONFIG_UART_NUMICRO uart_numicro.c)
6767
zephyr_library_sources_ifdef(CONFIG_UART_NXP_S32_LINFLEXD uart_nxp_s32_linflexd.c)
6868
zephyr_library_sources_ifdef(CONFIG_UART_OPENTITAN uart_opentitan.c)
6969
zephyr_library_sources_ifdef(CONFIG_UART_PDL_INFINEON_CAT1 uart_ifx_cat1_pdl.c)
70+
zephyr_library_sources_ifdef(CONFIG_UART_PDL_INFINEON_CAT2 uart_ifx_cat2_pdl.c)
7071
zephyr_library_sources_ifdef(CONFIG_UART_PIPE uart_pipe.c)
7172
zephyr_library_sources_ifdef(CONFIG_UART_PL011 uart_pl011.c)
7273
zephyr_library_sources_ifdef(CONFIG_UART_PSOC6 uart_psoc6.c)

drivers/serial/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ rsource "Kconfig.gd32"
181181
rsource "Kconfig.gecko"
182182
rsource "Kconfig.hostlink"
183183
rsource "Kconfig.ifx_cat1"
184+
rsource "Kconfig.ifx_cat2"
184185
rsource "Kconfig.imx"
185186
rsource "Kconfig.intel_lw"
186187
rsource "Kconfig.it51xxx"

drivers/serial/Kconfig.ifx_cat2

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright (c) 2025 Infineon Technologies AG,
2+
# or an affiliate of Infineon Technologies AG.
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
config UART_PDL_INFINEON_CAT2
7+
bool "Infineon CAT2 UART driver (PDL)"
8+
default y
9+
depends on DT_HAS_INFINEON_CAT2_UART_ENABLED
10+
select SERIAL_HAS_DRIVER
11+
select SERIAL_SUPPORT_INTERRUPT
12+
select USE_INFINEON_UART
13+
select PINCTRL
14+
help
15+
This option enables the UART driver for Infineon CAT2 PDL family.

0 commit comments

Comments
 (0)