2021-04-06 02:11:45 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2021 Guillaume Paquet <guillaume.paquet@smile.fr>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
/dts-v1/;
|
|
|
|
#include <nordic/nrf52840_qiaa.dtsi>
|
2024-09-11 15:56:17 +08:00
|
|
|
#include <nordic/nrf52840_partition.dtsi>
|
2022-05-06 16:56:39 +08:00
|
|
|
#include <zephyr/dt-bindings/lora/sx126x.h>
|
2022-03-17 20:19:35 +08:00
|
|
|
#include "rak4631_nrf52840-pinctrl.dtsi"
|
2021-04-06 02:11:45 +08:00
|
|
|
|
|
|
|
/ {
|
|
|
|
model = "RAKWireless RAK4631 WisBlock LPWAN Module with a Nordic NRF52840 SoC";
|
|
|
|
compatible = "nordic,rak4631_nrf52840";
|
|
|
|
|
|
|
|
chosen {
|
|
|
|
zephyr,console = &uart1;
|
|
|
|
zephyr,shell-uart = &uart1;
|
|
|
|
zephyr,uart-mcumgr = &uart1;
|
|
|
|
zephyr,bt-mon-uart = &uart1;
|
|
|
|
zephyr,bt-c2h-uart = &uart1;
|
|
|
|
};
|
|
|
|
|
|
|
|
leds {
|
|
|
|
compatible = "gpio-leds";
|
|
|
|
blue_led: led_2 {
|
|
|
|
gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
|
|
|
|
label = "Blue LED";
|
|
|
|
};
|
|
|
|
green_led: led_1 {
|
|
|
|
gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
|
|
|
|
label = "Green LED";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Declaration of aliases */
|
|
|
|
aliases {
|
|
|
|
led0 = &blue_led;
|
|
|
|
lora0 = &lora;
|
2022-07-19 16:33:14 +08:00
|
|
|
watchdog0 = &wdt0;
|
2021-04-06 02:11:45 +08:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-06-20 16:23:10 +08:00
|
|
|
®0 {
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
®1 {
|
|
|
|
regulator-initial-mode = <NRF5X_REG_MODE_DCDC>;
|
|
|
|
};
|
|
|
|
|
2021-04-06 02:11:45 +08:00
|
|
|
&adc {
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
2023-09-18 17:34:15 +08:00
|
|
|
&uicr {
|
|
|
|
gpio-as-nreset;
|
|
|
|
};
|
|
|
|
|
2021-04-06 02:11:45 +08:00
|
|
|
&gpiote {
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
&gpio0 {
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
&gpio1 {
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
&uart0 {
|
|
|
|
compatible = "nordic,nrf-uart";
|
|
|
|
status = "okay";
|
|
|
|
current-speed = <115200>;
|
2022-03-17 20:19:35 +08:00
|
|
|
pinctrl-0 = <&uart0_default>;
|
|
|
|
pinctrl-1 = <&uart0_sleep>;
|
|
|
|
pinctrl-names = "default", "sleep";
|
2021-04-06 02:11:45 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
&uart1 {
|
|
|
|
compatible = "nordic,nrf-uarte";
|
|
|
|
current-speed = <115200>;
|
|
|
|
status = "okay";
|
2022-03-17 20:19:35 +08:00
|
|
|
pinctrl-0 = <&uart1_default>;
|
|
|
|
pinctrl-1 = <&uart1_sleep>;
|
|
|
|
pinctrl-names = "default", "sleep";
|
2021-04-06 02:11:45 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
&i2c0 {
|
|
|
|
compatible = "nordic,nrf-twi";
|
|
|
|
status = "okay";
|
2022-03-17 20:19:35 +08:00
|
|
|
pinctrl-0 = <&i2c0_default>;
|
|
|
|
pinctrl-1 = <&i2c0_sleep>;
|
|
|
|
pinctrl-names = "default", "sleep";
|
2021-04-06 02:11:45 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
&i2c1 {
|
|
|
|
compatible = "nordic,nrf-twi";
|
|
|
|
/* Cannot be used together with spi1. */
|
|
|
|
/* status = "okay"; */
|
2022-03-17 20:19:35 +08:00
|
|
|
pinctrl-0 = <&i2c1_default>;
|
|
|
|
pinctrl-1 = <&i2c1_sleep>;
|
|
|
|
pinctrl-names = "default", "sleep";
|
2021-04-06 02:11:45 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
&spi1 {
|
|
|
|
compatible = "nordic,nrf-spi";
|
|
|
|
status = "okay";
|
|
|
|
cs-gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
|
|
|
|
|
2022-03-17 20:19:35 +08:00
|
|
|
pinctrl-0 = <&spi1_default>;
|
|
|
|
pinctrl-1 = <&spi1_sleep>;
|
|
|
|
pinctrl-names = "default", "sleep";
|
2021-11-07 23:23:07 +08:00
|
|
|
lora: lora@0 {
|
2021-04-06 02:11:45 +08:00
|
|
|
compatible = "semtech,sx1262";
|
|
|
|
reg = <0>;
|
|
|
|
reset-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
|
|
|
|
busy-gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
|
|
|
|
tx-enable-gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
|
|
|
|
rx-enable-gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
|
2022-08-18 03:17:59 +08:00
|
|
|
dio1-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
|
2021-04-06 02:11:45 +08:00
|
|
|
dio2-tx-enable;
|
|
|
|
dio3-tcxo-voltage = <SX126X_DIO3_TCXO_3V3>;
|
|
|
|
tcxo-power-startup-delay-ms = <5>;
|
|
|
|
spi-max-frequency = <1000000>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
&qspi {
|
|
|
|
status = "okay";
|
2022-03-17 20:19:35 +08:00
|
|
|
pinctrl-0 = <&qspi_default>;
|
|
|
|
pinctrl-1 = <&qspi_sleep>;
|
|
|
|
pinctrl-names = "default", "sleep";
|
2021-04-06 02:11:45 +08:00
|
|
|
};
|
|
|
|
|
2021-08-05 21:46:23 +08:00
|
|
|
zephyr_udc0: &usbd {
|
2021-04-06 02:11:45 +08:00
|
|
|
compatible = "nordic,nrf-usbd";
|
|
|
|
status = "okay";
|
|
|
|
};
|