Skip to content

Commit 0b9b4a4

Browse files
committed
snippets: thingy91x-uart0-exp-board: new snippet
This snippet can be used to expose console and shell on Expansion Board for thingy91x. This is useful for having nrf9151 logs on this UART interface and nrf5340 logs on RTT interface. Signed-off-by: Marcin Niestroj <marcin.niestroj@canonical.com>
1 parent 9aba6b7 commit 0b9b4a4

4 files changed

Lines changed: 63 additions & 0 deletions

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* Copyright (c) 2026 Golioth, Inc.
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
#include <nrf9160/nrf9160dk_uart1_on_if0_3.dtsi>
8+
9+
/ {
10+
chosen {
11+
ncs,sm-uart = &dtr_uart1;
12+
};
13+
};
14+
15+
&uart1 {
16+
compatible = "nordic,nrf-uarte";
17+
current-speed = <115200>;
18+
hw-flow-control;
19+
status = "okay";
20+
21+
dtr_uart1: dtr-uart {
22+
compatible = "nordic,dtr-uart";
23+
dtr-gpios = <&interface_to_nrf52840 4 (GPIO_PULL_DOWN | GPIO_ACTIVE_LOW)>;
24+
ri-gpios = <&interface_to_nrf52840 5 (GPIO_ACTIVE_LOW)>;
25+
status = "okay";
26+
};
27+
};
28+
29+
&gpio0 {
30+
status = "okay";
31+
/* Use PORT event for DTR (22) pin to save power */
32+
sense-edge-mask = <0x00400000>;
33+
};

zephyr/module.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ build:
33
kconfig: Kconfig
44
settings:
55
board_root: .
6+
snippet_root: zephyr
67
samples:
78
- samples
89
runners:
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
name: thingy91x-uart0-exp-board
2+
boards:
3+
/thingy91x/nrf9151/ns/:
4+
append:
5+
EXTRA_DTC_OVERLAY_FILE: thingy91x-uart0-exp-board.overlay
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
&uart0 {
2+
pinctrl-0 = <&uart_exp_board_default>;
3+
pinctrl-1 = <&uart_exp_board_sleep>;
4+
};
5+
6+
&pinctrl {
7+
uart_exp_board_default: uart_exp_board_default {
8+
group1 {
9+
psels = <NRF_PSEL(UART_TX, 0, 18)>;
10+
};
11+
group2 {
12+
psels = <NRF_PSEL(UART_RX, 0, 19)>;
13+
bias-pull-up;
14+
};
15+
};
16+
17+
uart_exp_board_sleep: uart_exp_board_sleep {
18+
group1 {
19+
psels = <NRF_PSEL(UART_TX, 0, 18)>,
20+
<NRF_PSEL(UART_RX, 0, 19)>;
21+
low-power-enable;
22+
};
23+
};
24+
};

0 commit comments

Comments
 (0)