Skip to content

Commit 600e86d

Browse files
sreeramIfxfabiobaltieri
authored andcommitted
drivers: serial: Adding PDL based UART driver
Adding a basic UART driver based on the PDL API Signed-off-by: Sreeram Tatapudi <[email protected]>
1 parent 6928218 commit 600e86d

File tree

10 files changed

+1125
-7
lines changed

10 files changed

+1125
-7
lines changed

boards/infineon/kit_psc3m5_evk/kit_psc3m5_evk-common.dtsi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@
6464
status = "okay";
6565
};
6666

67+
&gpio_prt6 {
68+
status = "okay";
69+
};
70+
6771
&gpio_prt8 {
6872
status = "okay";
6973
};
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Copyright (c) 2025 Cypress Semiconductor Corporation.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
/* Configure pin drive mode for uart pins */
7+
&p6_3_scb3_uart_tx {
8+
drive-push-pull;
9+
};
10+
11+
&p6_2_scb3_uart_rx {
12+
input-enable;
13+
};
14+
15+
&p6_1_scb3_uart_rts {
16+
drive-push-pull;
17+
};
18+
19+
&p6_0_scb3_uart_cts {
20+
input-enable;
21+
};

boards/infineon/kit_psc3m5_evk/kit_psc3m5_evk.dts

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <arm/infineon/cat1b/psc3/system_clocks.dtsi>
99
#include <arm/infineon/cat1b/psc3/psc3_partition.dtsi>
1010
#include "kit_psc3m5_evk-common.dtsi"
11+
#include "kit_psc3m5_evk-pinctrl.dtsi"
1112

1213
/ {
1314
model = "The Infineon PSOC™ Control C3M5 Evaluation Kit";
@@ -20,13 +21,13 @@
2021
chosen {
2122
zephyr,sram = &sram0;
2223
zephyr,flash = &slot0_partition;
23-
zephyr,console = &uart1;
24-
zephyr,shell-uart = &uart1;
24+
zephyr,console = &uart3;
25+
zephyr,shell-uart = &uart3;
2526
};
2627
};
2728

28-
uart1: &scb3 {
29-
compatible = "infineon,cat1-uart";
29+
uart3: &scb3 {
30+
compatible = "infineon,cat1-uart-pdl";
3031
status = "okay";
3132
current-speed = <115200>;
3233

@@ -36,12 +37,18 @@ uart1: &scb3 {
3637
pinctrl-names = "default";
3738
};
3839

40+
&peri0_group4_8bit_0 {
41+
status = "okay";
42+
scb-block = <3>;
43+
div-value = <109>;
44+
};
45+
3946
&path_mux0 {
4047
status = "okay";
4148
};
4249

4350
&path_mux1 {
44-
status = "disabled";
51+
status = "okay";
4552
};
4653

4754
&path_mux2 {
@@ -57,12 +64,11 @@ uart1: &scb3 {
5764
};
5865

5966
&clk_hf1 {
60-
status = "disabled";
67+
status = "okay";
6168
};
6269

6370
&clk_hf2 {
6471
status = "okay";
65-
clocks = <&fll0>;
6672
};
6773

6874
&clk_hf3 {

boards/infineon/kit_psc3m5_evk/kit_psc3m5_evk_defconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,10 @@ CONFIG_GPIO=y
1313

1414
# Enable clock controller
1515
CONFIG_CLOCK_CONTROL=y
16+
17+
# Enable console
18+
CONFIG_CONSOLE=y
19+
CONFIG_UART_CONSOLE=y
20+
21+
# Enable UART driver
22+
CONFIG_SERIAL=y

boards/infineon/kit_psc3m5_evk/kit_psc3m5_evk_psc3m5fds2afq1_ns_defconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,10 @@ CONFIG_GPIO=y
1414

1515
# Enable clock controller
1616
CONFIG_CLOCK_CONTROL=y
17+
18+
# Enable console
19+
CONFIG_CONSOLE=y
20+
CONFIG_UART_CONSOLE=y
21+
22+
# Enable UART driver
23+
CONFIG_SERIAL=y

drivers/serial/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ zephyr_library_sources_ifdef(CONFIG_UART_NUMAKER uart_numaker.c)
6363
zephyr_library_sources_ifdef(CONFIG_UART_NUMICRO uart_numicro.c)
6464
zephyr_library_sources_ifdef(CONFIG_UART_NXP_S32_LINFLEXD uart_nxp_s32_linflexd.c)
6565
zephyr_library_sources_ifdef(CONFIG_UART_OPENTITAN uart_opentitan.c)
66+
zephyr_library_sources_ifdef(CONFIG_UART_PDL_INFINEON_CAT1 uart_ifx_cat1_pdl.c)
6667
zephyr_library_sources_ifdef(CONFIG_UART_PIPE uart_pipe.c)
6768
zephyr_library_sources_ifdef(CONFIG_UART_PL011 uart_pl011.c)
6869
zephyr_library_sources_ifdef(CONFIG_UART_PSOC6 uart_psoc6.c)

drivers/serial/Kconfig.ifx_cat1

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,14 @@ config UART_INFINEON_CAT1
1616
select DMA if UART_ASYNC_API
1717
help
1818
This option enables the UART driver for Infineon CAT1 family.
19+
20+
config UART_PDL_INFINEON_CAT1
21+
bool "Infineon CAT1 UART driver (PDL)"
22+
default y
23+
depends on DT_HAS_INFINEON_CAT1_UART_PDL_ENABLED
24+
select SERIAL_HAS_DRIVER
25+
select SERIAL_SUPPORT_INTERRUPT
26+
select USE_INFINEON_UART
27+
select PINCTRL
28+
help
29+
This option enables the UART driver for Infineon CAT1 family.

0 commit comments

Comments
 (0)