1/*
2 * Copyright (c) 2019 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/dts-v1/;
8#include <nordic/nrf52833_qiaa.dtsi>
9
10/ {
11	model = "Nordic nRF52833 DK NRF52833";
12	compatible = "nordic,nrf52833-dk-nrf52833";
13
14	chosen {
15		zephyr,console = &uart0;
16		zephyr,shell-uart = &uart0;
17		zephyr,uart-mcumgr = &uart0;
18		zephyr,bt-mon-uart = &uart0;
19		zephyr,bt-c2h-uart = &uart0;
20		zephyr,sram = &sram0;
21		zephyr,flash = &flash0;
22		zephyr,code-partition = &slot0_partition;
23	};
24
25	leds {
26		compatible = "gpio-leds";
27		led0: led_0 {
28			gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
29			label = "Green LED 0";
30		};
31		led1: led_1 {
32			gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
33			label = "Green LED 1";
34		};
35		led2: led_2 {
36			gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
37			label = "Green LED 2";
38		};
39		led3: led_3 {
40			gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
41			label = "Green LED 3";
42		};
43	};
44
45	pwmleds {
46		compatible = "pwm-leds";
47		pwm_led0: pwm_led_0 {
48			pwms = <&pwm0 13>;
49		};
50	};
51
52	buttons {
53		compatible = "gpio-keys";
54		button0: button_0 {
55			gpios = <&gpio0 11 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
56			label = "Push button switch 0";
57		};
58		button1: button_1 {
59			gpios = <&gpio0 12 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
60			label = "Push button switch 1";
61		};
62		button2: button_2 {
63			gpios = <&gpio0 24 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
64			label = "Push button switch 2";
65		};
66		button3: button_3 {
67			gpios = <&gpio0 25 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
68			label = "Push button switch 3";
69		};
70	};
71
72	arduino_header: connector {
73		compatible = "arduino-header-r3";
74		#gpio-cells = <2>;
75		gpio-map-mask = <0xffffffff 0xffffffc0>;
76		gpio-map-pass-thru = <0 0x3f>;
77		gpio-map = <0 0 &gpio0 3 0>,	/* A0 */
78			   <1 0 &gpio0 4 0>,	/* A1 */
79			   <2 0 &gpio0 28 0>,	/* A2 */
80			   <3 0 &gpio0 29 0>,	/* A3 */
81			   <4 0 &gpio0 30 0>,	/* A4 */
82			   <5 0 &gpio0 31 0>,	/* A5 */
83			   <6 0 &gpio1 1 0>,	/* D0 */
84			   <7 0 &gpio1 2 0>,	/* D1 */
85			   <8 0 &gpio1 3 0>,	/* D2 */
86			   <9 0 &gpio1 4 0>,	/* D3 */
87			   <10 0 &gpio1 5 0>,	/* D4 */
88			   <11 0 &gpio1 6 0>,	/* D5 */
89			   <12 0 &gpio1 7 0>,	/* D6 */
90			   <13 0 &gpio1 8 0>,	/* D7 */
91			   <14 0 &gpio0 17 0>,	/* D8 */
92			   <15 0 &gpio0 19 0>,	/* D9 */
93			   <16 0 &gpio0 20 0>,	/* D10 */
94			   <17 0 &gpio0 21 0>,	/* D11 */
95			   <18 0 &gpio0 22 0>,	/* D12 */
96			   <19 0 &gpio0 23 0>,	/* D13 */
97			   <20 0 &gpio0 26 0>,	/* D14 */
98			   <21 0 &gpio0 27 0>;	/* D15 */
99	};
100
101	/* These aliases are provided for compatibility with samples */
102	aliases {
103		led0 = &led0;
104		led1 = &led1;
105		led2 = &led2;
106		led3 = &led3;
107		pwm-led0 = &pwm_led0;
108		sw0 = &button0;
109		sw1 = &button1;
110		sw2 = &button2;
111		sw3 = &button3;
112		bootloader-led0 = &led0;
113	};
114};
115
116&adc {
117	status = "okay";
118};
119
120&gpiote {
121	status = "okay";
122};
123
124&gpio0 {
125	status = "okay";
126};
127
128&gpio1 {
129	status = "okay";
130};
131
132&uart0 {
133	compatible = "nordic,nrf-uarte";
134	status = "okay";
135	current-speed = <115200>;
136	tx-pin = <6>;
137	rx-pin = <8>;
138	rx-pull-up;
139	rts-pin = <5>;
140	cts-pin = <7>;
141	cts-pull-up;
142};
143
144arduino_serial: &uart1 {
145	status = "okay";
146	current-speed = <115200>;
147	rx-pin = <33>;
148	rx-pull-up;
149	tx-pin = <34>;
150};
151
152arduino_i2c: &i2c0 {
153	compatible = "nordic,nrf-twi";
154	status = "okay";
155	sda-pin = <26>;
156	scl-pin = <27>;
157};
158
159&i2c1 {
160	compatible = "nordic,nrf-twi";
161	/* Cannot be used together with spi1. */
162	/* status = "okay"; */
163	sda-pin = <30>;
164	scl-pin = <31>;
165};
166
167&pwm0 {
168	status = "okay";
169	ch0-pin = <13>;
170	ch0-inverted;
171};
172
173&spi0 {
174	compatible = "nordic,nrf-spi";
175	/* Cannot be used together with i2c0. */
176	/* status = "okay"; */
177	sck-pin = <27>;
178	mosi-pin = <26>;
179	miso-pin = <29>;
180};
181
182&spi1 {
183	compatible = "nordic,nrf-spi";
184	status = "okay";
185	sck-pin = <31>;
186	mosi-pin = <30>;
187	miso-pin = <40>;
188};
189
190arduino_spi: &spi3 {
191	status = "okay";
192	sck-pin = <23>;
193	miso-pin = <22>;
194	mosi-pin = <21>;
195	cs-gpios = <&arduino_header 16 GPIO_ACTIVE_LOW>; /* D10 */
196};
197
198&flash0 {
199
200	partitions {
201		compatible = "fixed-partitions";
202		#address-cells = <1>;
203		#size-cells = <1>;
204
205		boot_partition: partition@0 {
206			label = "mcuboot";
207			reg = <0x000000000 0xC000>;
208		};
209		slot0_partition: partition@c000 {
210			label = "image-0";
211			reg = <0x0000C000 0x32000>;
212		};
213		slot1_partition: partition@3e000 {
214			label = "image-1";
215			reg = <0x0003E000 0x32000>;
216		};
217		scratch_partition: partition@70000 {
218			label = "image-scratch";
219			reg = <0x00070000 0xA000>;
220		};
221		storage_partition: partition@7a000 {
222			label = "storage";
223			reg = <0x0007A000 0x00006000>;
224		};
225	};
226};
227
228zephyr_udc0: &usbd {
229	compatible = "nordic,nrf-usbd";
230	status = "okay";
231};
232