Skip to content

Commit

Permalink
modified: boards/nrf5340tag_nrf5340_cpuapp.overlay
Browse files Browse the repository at this point in the history
	- adding support for nRF5340 Tag

Signed-off-by: Shreya Patel <[email protected]>
  • Loading branch information
paTelshREya committed Apr 10, 2024
1 parent 392a1da commit 877d63b
Showing 1 changed file with 88 additions and 3 deletions.
91 changes: 88 additions & 3 deletions boards/nrf5340tag_nrf5340_cpuapp.overlay
Original file line number Diff line number Diff line change
@@ -1,9 +1,94 @@
/* Copyright (c) 2020 Nordic Semiconductor ASA
/* Copyright (c) 2021 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

#include <zephyr/dt-bindings/lora/sx126x.h>

&temp {
status = "okay";
};

/ {
/*
* In some default configurations within the nRF Connect SDK,
* e.g. on nRF52840, the chosen zephyr,entropy node is &cryptocell.
* This devicetree overlay ensures that default is overridden wherever it
* is set, as this application uses the RNG node for entropy exclusively.
*/
chosen {
zephyr,entropy = &rng;
};

aliases {
lora0 = &lora;
};
};

&pinctrl {

uart1_default: uart1_default {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 2)>;
};
group2 {
psels = <NRF_PSEL(UART_RX, 0, 3)>;
};
};

uart1_sleep: uart1_sleep {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 2)>,
<NRF_PSEL(UART_RX, 0, 3)>;
};
};

spi1_default: spi1_default {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 28)>,
<NRF_PSEL(SPIM_MOSI, 0, 26)>,
<NRF_PSEL(SPIM_MISO, 0, 4)>;
};
};

spi1_sleep: spi1_sleep {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 28)>,
<NRF_PSEL(SPIM_MOSI, 0, 26)>,
<NRF_PSEL(SPIM_MISO, 0, 4)>;
};
};
};

&uart0 {
status = "okay";
hw-flow-control;
status = "okay";
hw-flow-control;
};

&uart1 {
status = "okay";
current-speed = <9600>;
pinctrl-0 = <&uart1_default>;
pinctrl-1 = <&uart1_sleep>;
pinctrl-names = "default", "sleep";
};

&spi1 {
compatible = "nordic,nrf-spim";
status = "okay";
cs-gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;

pinctrl-0 = <&spi1_default>;
pinctrl-1 = <&spi1_sleep>;
pinctrl-names = "default", "sleep";
lora: lora@0 {
compatible = "semtech,sx1262";
reg = <0>;
reset-gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
busy-gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>;
tx-enable-gpios = <&gpio0 22 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>;
rx-enable-gpios = <&gpio0 20 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>;
dio1-gpios = <&gpio0 21 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH) >;
spi-max-frequency = <125000>;
};
};

0 comments on commit 877d63b

Please sign in to comment.