samples: out_of_tree_board: port nRF board to pinctrl
nRF boards are expected to use pinctrl now, so port this sample as well. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
504e6cb10b
commit
452133cf47
3 changed files with 32 additions and 4 deletions
|
@ -23,3 +23,5 @@ CONFIG_GPIO_AS_PINRESET=y
|
|||
# bluetooth
|
||||
CONFIG_BT=y
|
||||
CONFIG_BT_CTLR=y
|
||||
|
||||
CONFIG_PINCTRL=y
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* Copyright (c) 2022 Nordic Semiconductor
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
&pinctrl {
|
||||
uart0_default: uart0_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(UART_TX, 0, 6)>,
|
||||
<NRF_PSEL(UART_RX, 0, 8)>,
|
||||
<NRF_PSEL(UART_RTS, 0, 5)>,
|
||||
<NRF_PSEL(UART_CTS, 0, 7)>;
|
||||
};
|
||||
};
|
||||
|
||||
uart0_sleep: uart0_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(UART_TX, 0, 6)>,
|
||||
<NRF_PSEL(UART_RX, 0, 8)>,
|
||||
<NRF_PSEL(UART_RTS, 0, 5)>,
|
||||
<NRF_PSEL(UART_CTS, 0, 7)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
/dts-v1/;
|
||||
#include <nordic/nrf52840_qiaa.dtsi>
|
||||
#include "nrf52840dk_nrf52840-pinctrl.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Nordic nRF52840 DK NRF52840";
|
||||
|
@ -36,10 +37,9 @@
|
|||
compatible = "nordic,nrf-uart";
|
||||
current-speed = <115200>;
|
||||
status = "okay";
|
||||
tx-pin = <6>;
|
||||
rx-pin = <8>;
|
||||
rts-pin = <5>;
|
||||
cts-pin = <7>;
|
||||
pinctrl-0 = <&uart0_default>;
|
||||
pinctrl-1 = <&uart0_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
};
|
||||
|
||||
&flash0 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue