Skip to content

Commit 8b35559

Browse files
gmarullcarlescufi
authored andcommitted
boards: custom_plank: migrate to pinctrl
The board still used deprecated nRF *-pin properties, migrate it to pinctrl. Signed-off-by: Gerard Marull-Paretas <[email protected]>
1 parent 62957ec commit 8b35559

File tree

2 files changed

+30
-4
lines changed

2 files changed

+30
-4
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Copyright (c) 2022 Nordic Semiconductor ASA
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
&pinctrl {
7+
uart0_default: uart0_default {
8+
group1 {
9+
psels = <NRF_PSEL(UART_TX, 0, 6)>,
10+
<NRF_PSEL(UART_RX, 0, 8)>,
11+
<NRF_PSEL(UART_RTS, 0, 5)>,
12+
<NRF_PSEL(UART_CTS, 0, 7)>;
13+
};
14+
};
15+
16+
uart0_sleep: uart0_sleep {
17+
group1 {
18+
psels = <NRF_PSEL(UART_TX, 0, 6)>,
19+
<NRF_PSEL(UART_RX, 0, 8)>,
20+
<NRF_PSEL(UART_RTS, 0, 5)>,
21+
<NRF_PSEL(UART_CTS, 0, 7)>;
22+
low-power-enable;
23+
};
24+
};
25+
26+
};

boards/arm/custom_plank/custom_plank.dts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
/dts-v1/;
77
#include <nordic/nrf52840_qiaa.dtsi>
8+
#include "custom_plank-pinctrl.dtsi"
89

910
/ {
1011
model = "Custom Plank Board";
@@ -31,8 +32,7 @@
3132
status = "okay";
3233

3334
current-speed = <115200>;
34-
tx-pin = <6>;
35-
rx-pin = <8>;
36-
rts-pin = <5>;
37-
cts-pin = <7>;
35+
pinctrl-0 = <&uart0_default>;
36+
pinctrl-1 = <&uart0_sleep>;
37+
pinctrl-names = "default", "sleep";
3838
};

0 commit comments

Comments
 (0)