Skip to content

Commit f36f432

Browse files
bogdanovskartben
authored andcommitted
boards: ti: lp_em_cc2340r5: Add UART support
Enable UART. Signed-off-by: Lars Thalian Morstad <l-morstad@ti.com> Signed-off-by: Vebjorn Myklebust <v.myklebust@ti.com> Signed-off-by: Stoyan Bogdanov <sbogdanov@baylibre.com> Signed-off-by: Julien Panis <jpanis@baylibre.com>
1 parent f532172 commit f36f432

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Copyright (c) 2024 Texas Instruments Incorporated
3+
* Copyright (c) 2024 BayLibre, SAS
4+
*
5+
* SPDX-License-Identifier: Apache-2.0
6+
*/
7+
8+
#include <zephyr/dt-bindings/pinctrl/cc23x0-pinctrl.h>
9+
10+
&pinctrl {
11+
/* UART0 */
12+
uart0_tx_default: uart0_tx_default {
13+
pinmux = <20 DIO20_UART0_TXD>;
14+
bias-disable;
15+
};
16+
uart0_rx_default: uart0_rx_default {
17+
pinmux = <22 DIO22_UART0_RXD>;
18+
bias-disable;
19+
input-enable;
20+
};
21+
};

boards/ti/lp_em_cc2340r5/lp_em_cc2340r5.dts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
#include <ti/cc2340r5.dtsi>
1111
#include "boosterpack_connector.dtsi"
12+
#include "lp_em_cc2340r5-pinctrl.dtsi"
1213
#include <zephyr/dt-bindings/gpio/gpio.h>
1314
#include <zephyr/dt-bindings/input/input-event-codes.h>
1415

@@ -20,6 +21,8 @@
2021
zephyr,sram = &sram0;
2122
zephyr,flash = &flash0;
2223
zephyr,code-partition = &slot0_partition;
24+
zephyr,console = &uart0;
25+
zephyr,shell-uart = &uart0;
2326
};
2427

2528
aliases {
@@ -63,3 +66,10 @@
6366
&gpio0 {
6467
status = "okay";
6568
};
69+
70+
&uart0 {
71+
status = "okay";
72+
current-speed = <115200>;
73+
pinctrl-0 = <&uart0_rx_default &uart0_tx_default>;
74+
pinctrl-names = "default";
75+
};

0 commit comments

Comments
 (0)