boards: arm: 96b_carbon_nrf51: migrate to pinctrl

Use pinctrl instead of `-pin` properties.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
Gerard Marull-Paretas 2022-03-16 17:45:55 +01:00 committed by Carles Cufí
commit ffa240c91b
3 changed files with 57 additions and 8 deletions

View file

@ -0,0 +1,46 @@
/*
* Copyright (c) 2022 Nordic Semiconductor
* SPDX-License-Identifier: Apache-2.0
*/
&pinctrl {
i2c0_default: i2c0_default {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 28)>,
<NRF_PSEL(TWIM_SCL, 0, 2)>;
};
};
i2c0_sleep: i2c0_sleep {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 28)>,
<NRF_PSEL(TWIM_SCL, 0, 2)>;
low-power-enable;
};
};
uart0_default: uart0_default {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 29)>,
<NRF_PSEL(UART_RX, 0, 11)>;
};
};
uart0_sleep: uart0_sleep {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 29)>,
<NRF_PSEL(UART_RX, 0, 11)>;
low-power-enable;
};
};
spi1_default: spi1_default {
group1 {
psels = <NRF_PSEL(SPIS_SCK, 0, 7)>,
<NRF_PSEL(SPIS_MOSI, 0, 0)>,
<NRF_PSEL(SPIS_MISO, 0, 30)>,
<NRF_PSEL(SPIS_CSN, 0, 25)>;
};
};
};

View file

@ -6,6 +6,7 @@
/dts-v1/; /dts-v1/;
#include <nordic/nrf51822_qfac.dtsi> #include <nordic/nrf51822_qfac.dtsi>
#include "96b_carbon_nrf51-pinctrl.dtsi"
/ { / {
model = "Seeed Studio Carbon nRF51 96board"; model = "Seeed Studio Carbon nRF51 96board";
@ -30,26 +31,26 @@
&i2c0 { &i2c0 {
status = "okay"; status = "okay";
sda-pin = <28>; pinctrl-0 = <&i2c0_default>;
scl-pin = <2>; pinctrl-1 = <&i2c0_sleep>;
pinctrl-names = "default", "sleep";
}; };
&uart0 { &uart0 {
current-speed = <115200>; current-speed = <115200>;
status = "okay"; status = "okay";
tx-pin = <29>; pinctrl-0 = <&uart0_default>;
rx-pin = <11>; pinctrl-1 = <&uart0_sleep>;
pinctrl-names = "default", "sleep";
}; };
&spi1 { &spi1 {
compatible = "nordic,nrf-spis"; compatible = "nordic,nrf-spis";
status = "okay"; status = "okay";
sck-pin = <7>;
mosi-pin = <0>;
miso-pin = <30>;
csn-pin = <25>;
def-char = <0x00>; def-char = <0x00>;
pinctrl-0 = <&spi1_default>;
pinctrl-names = "default";
bt-hci@0 { bt-hci@0 {
compatible = "zephyr,bt-hci-spi-slave"; compatible = "zephyr,bt-hci-spi-slave";
reg = <0>; reg = <0>;

View file

@ -16,3 +16,5 @@ CONFIG_UART_CONSOLE=y
# spi # spi
CONFIG_SPI=y CONFIG_SPI=y
CONFIG_SPI_SLAVE=y CONFIG_SPI_SLAVE=y
CONFIG_PINCTRL=y