boards: arm: blueclover_plt_demo_v2_nrf52832: 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
61b0593645
commit
607d0655f1
3 changed files with 83 additions and 9 deletions
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
* 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, 12)>,
|
||||
<NRF_PSEL(TWIM_SCL, 0, 14)>;
|
||||
};
|
||||
};
|
||||
|
||||
i2c0_sleep: i2c0_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(TWIM_SDA, 0, 12)>,
|
||||
<NRF_PSEL(TWIM_SCL, 0, 14)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
|
||||
pwm0_default: pwm0_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(PWM_OUT0, 0, 22)>;
|
||||
nordic,invert;
|
||||
};
|
||||
};
|
||||
|
||||
pwm0_sleep: pwm0_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(PWM_OUT0, 0, 22)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
|
||||
spi1_default: spi1_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(SPIM_SCK, 0, 2)>,
|
||||
<NRF_PSEL(SPIM_MOSI, 0, 3)>,
|
||||
<NRF_PSEL(SPIM_MISO, 0, 27)>;
|
||||
};
|
||||
};
|
||||
|
||||
spi1_sleep: spi1_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(SPIM_SCK, 0, 2)>,
|
||||
<NRF_PSEL(SPIM_MOSI, 0, 3)>,
|
||||
<NRF_PSEL(SPIM_MISO, 0, 27)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
/dts-v1/;
|
||||
#include <nordic/nrf52832_qfaa.dtsi>
|
||||
#include "blueclover_plt_demo_v2_nrf52832-pinctrl.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Blue Clover PLT Demo Board V2";
|
||||
|
@ -54,16 +55,18 @@
|
|||
status = "okay";
|
||||
compatible = "nordic,nrf-uart";
|
||||
current-speed = <115200>;
|
||||
tx-pin = <6>;
|
||||
rx-pin = <8>;
|
||||
pinctrl-0 = <&uart0_default>;
|
||||
pinctrl-1 = <&uart0_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
compatible = "nordic,nrf-twi";
|
||||
status = "okay";
|
||||
sda-pin = <12>;
|
||||
scl-pin = <14>;
|
||||
|
||||
pinctrl-0 = <&i2c0_default>;
|
||||
pinctrl-1 = <&i2c0_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
sht3xd@44 {
|
||||
compatible = "sensirion,sht3xd";
|
||||
reg = <0x44>;
|
||||
|
@ -80,17 +83,18 @@
|
|||
&pwm0 {
|
||||
/* buzzer */
|
||||
status = "okay";
|
||||
ch0-pin = <22>;
|
||||
ch0-inverted;
|
||||
pinctrl-0 = <&pwm0_default>;
|
||||
pinctrl-1 = <&pwm0_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
};
|
||||
|
||||
&spi1 {
|
||||
compatible = "nordic,nrf-spi";
|
||||
status = "okay";
|
||||
sck-pin = <2>;
|
||||
mosi-pin = <3>;
|
||||
miso-pin = <27>; /* unused */
|
||||
|
||||
pinctrl-0 = <&spi1_default>;
|
||||
pinctrl-1 = <&spi1_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
apa102@0 {
|
||||
compatible = "apa,apa102";
|
||||
reg = <0>;
|
||||
|
|
|
@ -26,3 +26,5 @@ CONFIG_UART_CONSOLE=y
|
|||
|
||||
# additional board options
|
||||
CONFIG_GPIO_AS_PINRESET=y
|
||||
|
||||
CONFIG_PINCTRL=y
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue