boards: arm: bbc_microbit_v2: 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
1faacdaafa
commit
052d0cd0ba
37
boards/arm/bbc_microbit_v2/bbc_microbit_v2-pinctrl.dtsi
Normal file
37
boards/arm/bbc_microbit_v2/bbc_microbit_v2-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, 1, 8)>;
|
||||
};
|
||||
};
|
||||
|
||||
uart0_sleep: uart0_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(UART_TX, 0, 6)>,
|
||||
<NRF_PSEL(UART_RX, 1, 8)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
|
||||
i2c0_default: i2c0_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(TWIM_SDA, 0, 16)>,
|
||||
<NRF_PSEL(TWIM_SCL, 0, 8)>;
|
||||
};
|
||||
};
|
||||
|
||||
i2c0_sleep: i2c0_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(TWIM_SDA, 0, 16)>,
|
||||
<NRF_PSEL(TWIM_SCL, 0, 8)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
@ -6,6 +6,7 @@
|
||||
|
||||
/dts-v1/;
|
||||
#include <nordic/nrf52833_qiaa.dtsi>
|
||||
#include "bbc_microbit_v2-pinctrl.dtsi"
|
||||
|
||||
/ {
|
||||
model = "BBC Micro:bit V2";
|
||||
@ -111,19 +112,21 @@
|
||||
compatible = "nordic,nrf-uart";
|
||||
status = "okay";
|
||||
current-speed = <115200>;
|
||||
tx-pin = <6>;
|
||||
rx-pin = <40>;
|
||||
pinctrl-0 = <&uart0_default>;
|
||||
pinctrl-1 = <&uart0_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
compatible = "nordic,nrf-twim";
|
||||
status = "okay";
|
||||
clock-frequency = <I2C_BITRATE_FAST>;
|
||||
sda-pin = <16>;
|
||||
scl-pin = <8>;
|
||||
|
||||
/* See https://tech.microbit.org/hardware/i2c/ for board variants */
|
||||
|
||||
pinctrl-0 = <&i2c0_default>;
|
||||
pinctrl-1 = <&i2c0_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
lsm303agr-magn@1e {
|
||||
compatible = "st,lis2mdl", "st,lsm303agr-magn";
|
||||
status = "okay";
|
||||
|
||||
@ -17,3 +17,5 @@ CONFIG_SERIAL=y
|
||||
# enable console
|
||||
CONFIG_CONSOLE=y
|
||||
CONFIG_UART_CONSOLE=y
|
||||
|
||||
CONFIG_PINCTRL=y
|
||||
|
||||
Loading…
Reference in New Issue
Block a user