Skip to content

Commit a0f4257

Browse files
committed
boards: ti: lp_em_cc2340r5: Add UART support
Enable UART. Signed-off-by: Lars Thalian Morstad <[email protected]> Signed-off-by: Vebjorn Myklebust <[email protected]> Signed-off-by: Stoyan Bogdanov <[email protected]> Signed-off-by: Julien Panis <[email protected]>
1 parent d67b19c commit a0f4257

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

@@ -21,6 +22,8 @@
2122
chosen {
2223
zephyr,sram = &sram0;
2324
zephyr,flash = &flash0;
25+
zephyr,console = &uart0;
26+
zephyr,shell-uart = &uart0;
2427
};
2528

2629
aliases {
@@ -64,3 +67,10 @@
6467
&gpio0 {
6568
status = "okay";
6669
};
70+
71+
&uart0 {
72+
status = "okay";
73+
current-speed = <115200>;
74+
pinctrl-0 = <&uart0_rx_default &uart0_tx_default>;
75+
pinctrl-names = "default";
76+
};

0 commit comments

Comments
 (0)