boards: arm: bt510: migrate to pinctrl
Use pinctrl instead of `-pin` properties. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
607d0655f1
commit
24ccd15ef3
3 changed files with 46 additions and 4 deletions
37
boards/arm/bt510/bt510-pinctrl.dtsi
Normal file
37
boards/arm/bt510/bt510-pinctrl.dtsi
Normal file
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* 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)>;
|
||||
};
|
||||
};
|
||||
|
||||
uart0_sleep: uart0_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(UART_TX, 0, 6)>,
|
||||
<NRF_PSEL(UART_RX, 0, 8)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
|
||||
i2c0_default: i2c0_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(TWIM_SDA, 0, 26)>,
|
||||
<NRF_PSEL(TWIM_SCL, 0, 27)>;
|
||||
};
|
||||
};
|
||||
|
||||
i2c0_sleep: i2c0_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(TWIM_SDA, 0, 26)>,
|
||||
<NRF_PSEL(TWIM_SCL, 0, 27)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
/dts-v1/;
|
||||
#include <nordic/nrf52840_qiaa.dtsi>
|
||||
#include "bt510-pinctrl.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Laird Sentrius BT510 Sensor";
|
||||
|
@ -103,16 +104,18 @@
|
|||
compatible = "nordic,nrf-uarte";
|
||||
current-speed = <115200>;
|
||||
status = "okay";
|
||||
tx-pin = <6>;
|
||||
rx-pin = <8>;
|
||||
pinctrl-0 = <&uart0_default>;
|
||||
pinctrl-1 = <&uart0_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
compatible = "nordic,nrf-twim";
|
||||
status = "okay";
|
||||
sda-pin = <26>;
|
||||
scl-pin = <27>;
|
||||
|
||||
pinctrl-0 = <&i2c0_default>;
|
||||
pinctrl-1 = <&i2c0_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
lis2dh12@18 {
|
||||
compatible = "st,lis2dh12", "st,lis2dh";
|
||||
reg = <0x18>;
|
||||
|
|
|
@ -23,3 +23,5 @@ CONFIG_GPIO_AS_PINRESET=y
|
|||
# 32KHz clock source
|
||||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
|
||||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_150PPM=y
|
||||
|
||||
CONFIG_PINCTRL=y
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue