1/*
2 * Copyright (c) 2020 Guillaume Paquet <guillaume.paquet@smile.fr>
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/dts-v1/;
8#include <nordic/nrf52840_qiaa.dtsi>
9#include "rak5010_nrf52840-pinctrl.dtsi"
10
11/ {
12	model = "RAKWireless RAK5010 Wistrio Board with a Nordic NRF52840 SoC";
13	compatible = "nordic,rak5010_nrf52840";
14
15	chosen {
16		zephyr,console = &uart1;
17		zephyr,shell-uart = &uart1;
18		zephyr,uart-mcumgr = &uart1;
19		zephyr,bt-mon-uart = &uart1;
20		zephyr,bt-c2h-uart = &uart1;
21		zephyr,sram = &sram0;
22		zephyr,flash = &flash0;
23		zephyr,code-partition = &slot0_partition;
24	};
25
26	leds {
27		compatible = "gpio-leds";
28		led0: led_0 {
29			gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
30			label = "Green LED 0";
31		};
32	};
33
34	/* Declaration of aliases */
35	aliases {
36		led0 = &led0;
37		watchdog0 = &wdt0;
38		accel0 = &lis3dh;
39	};
40};
41
42&adc {
43	status = "okay";
44};
45
46&gpiote {
47	status = "okay";
48};
49
50&gpio0 {
51	status = "okay";
52};
53
54&gpio1 {
55	status = "okay";
56};
57
58&uart0 {
59	compatible = "nordic,nrf-uart";
60	status = "okay";
61	current-speed = <115200>;
62
63	/* QUECTEL BG9X */
64	pinctrl-0 = <&uart0_default>;
65	pinctrl-1 = <&uart0_sleep>;
66	pinctrl-names = "default", "sleep";
67	quectel_bg9x: quectel_bg9x {
68		compatible = "quectel,bg9x";
69		mdm-power-gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
70		mdm-reset-gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
71		mdm-dtr-gpios = <&gpio0 26 GPIO_ACTIVE_LOW>;
72		mdm-wdisable-gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
73		status = "okay";
74	};
75};
76
77&uart1 {
78	current-speed = <115200>;
79	status = "okay";
80	pinctrl-0 = <&uart1_default>;
81	pinctrl-1 = <&uart1_sleep>;
82	pinctrl-names = "default", "sleep";
83};
84
85&i2c1 {
86	compatible = "nordic,nrf-twi";
87	status = "okay";
88
89	/* TI OPT3001 light sensor */
90	pinctrl-0 = <&i2c1_default>;
91	pinctrl-1 = <&i2c1_sleep>;
92	pinctrl-names = "default", "sleep";
93	opt3001@44 {
94		compatible = "ti,opt3001";
95		reg = <0x44>;
96	};
97
98	/* ST Microelectronics LIS3DH motion sensor */
99	lis3dh: lis3dh@19 {
100		compatible = "st,lis3dh", "st,lis2dh";
101		reg = <0x19>;
102		irq-gpios = <&gpio0 16 0>;
103	};
104
105	/* ST Microelectronics LPS22HB pressure sensor */
106	lps22hb-press@5c {
107		compatible = "st,lps22hb-press";
108		reg = <0x5c>;
109	};
110};
111
112&qspi {
113	status = "okay";
114	pinctrl-0 = <&qspi_default>;
115	pinctrl-1 = <&qspi_sleep>;
116	pinctrl-names = "default", "sleep";
117	is25wp064a: is25wp064a@0 {
118		compatible = "nordic,qspi-nor";
119		reg = <0>;
120		writeoc = "pp4io";
121		readoc = "read4io";
122		sck-frequency = <16000000>;
123		jedec-id = [9d 70 17];
124		size = <67108864>;
125		has-dpd;
126		t-enter-dpd = <3000>;
127		t-exit-dpd = <5000>;
128	};
129};
130
131&flash0 {
132
133	partitions {
134		compatible = "fixed-partitions";
135		#address-cells = <1>;
136		#size-cells = <1>;
137
138		boot_partition: partition@0 {
139			label = "mcuboot";
140			reg = <0x00000000 0x0000C000>;
141		};
142		slot0_partition: partition@c000 {
143			label = "image-0";
144			reg = <0x0000C000 0x00067000>;
145		};
146		slot1_partition: partition@73000 {
147			label = "image-1";
148			reg = <0x00073000 0x00067000>;
149		};
150		scratch_partition: partition@da000 {
151			label = "image-scratch";
152			reg = <0x000da000 0x0001e000>;
153		};
154
155		/*
156		 * The flash starting at 0x000f8000 and ending at
157		 * 0x000fffff is reserved for use by the application.
158		 */
159
160		/*
161		 * Storage partition will be used by FCB/LittleFS/NVS
162		 * if enabled.
163		 */
164		storage_partition: partition@f8000 {
165			label = "storage";
166			reg = <0x000f8000 0x00008000>;
167		};
168	};
169};
170
171zephyr_udc0: &usbd {
172	compatible = "nordic,nrf-usbd";
173	status = "okay";
174};
175