1/*
2 * Copyright (c) 2017 Linaro Limited
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/dts-v1/;
8#include <nordic/nrf52840_qiaa.dtsi>
9#include "nrf52840_mdk-pinctrl.dtsi"
10#include <zephyr/dt-bindings/input/input-event-codes.h>
11
12/ {
13	model = "nRF52840-MDK Dev Kit";
14	compatible = "nordic,pca10056-dk";
15
16	chosen {
17		zephyr,console = &uart0;
18		zephyr,shell-uart = &uart0;
19		zephyr,uart-mcumgr = &uart0;
20		zephyr,bt-mon-uart = &uart0;
21		zephyr,bt-c2h-uart = &uart0;
22		zephyr,sram = &sram0;
23		zephyr,flash = &flash0;
24		zephyr,code-partition = &slot0_partition;
25		zephyr,ieee802154 = &ieee802154;
26	};
27
28	leds {
29		compatible = "gpio-leds";
30		led0_green: led_0 {
31			gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
32			label = "Green LED 0";
33		};
34		led1_red: led_1 {
35			gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
36			label = "Red LED 1";
37		};
38		led2_blue: led_2 {
39			gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
40			label = "Blue LED 2";
41		};
42	};
43
44	pwmleds {
45		compatible = "pwm-leds";
46		pwm_led0_green: pwm_led_0 {
47			pwms = <&pwm0 0 PWM_MSEC(20) PWM_POLARITY_INVERTED>;
48			label = "Green PWM LED 0";
49		};
50		pwm_led1_red: pwm_led_1 {
51			pwms = <&pwm0 1 PWM_MSEC(20) PWM_POLARITY_INVERTED>;
52			label = "Red PWM LED 1";
53		};
54		pwm_led2_blue: pwm_led_2 {
55			pwms = <&pwm0 2 PWM_MSEC(20) PWM_POLARITY_INVERTED>;
56			label = "Blue PWM LED 2";
57		};
58	};
59
60	buttons {
61		compatible = "gpio-keys";
62		button0: button_0 {
63			gpios = <&gpio1 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
64			label = "Push button switch 0";
65			zephyr,code = <INPUT_KEY_0>;
66		};
67	};
68
69	/* These aliases are provided for compatibility with samples */
70	aliases {
71		sw0 = &button0;
72		led0 = &led0_green;
73		led1 = &led1_red;
74		led2 = &led2_blue;
75		led0-green = &led0_green;
76		led1-red   = &led1_red;
77		led1-blue  = &led2_blue;
78		pwm-led0 = &pwm_led0_green;
79		pwm-led1 = &pwm_led1_red;
80		pwm-led2 = &pwm_led2_blue;
81		green-pwm-led = &pwm_led0_green;
82		red-pwm-led = &pwm_led1_red;
83		blue-pwm-led = &pwm_led2_blue;
84		watchdog0 = &wdt0;
85		spi-flash0 = &mx25r64;
86	};
87};
88
89&adc {
90	status = "okay";
91};
92
93&uicr {
94	gpio-as-nreset;
95};
96
97&gpiote {
98	status = "okay";
99};
100
101&gpio0 {
102	status = "okay";
103};
104
105&gpio1 {
106	status = "okay";
107};
108
109&uart0 {
110	compatible = "nordic,nrf-uart";
111	current-speed = <115200>;
112	status = "okay";
113	pinctrl-0 = <&uart0_default>;
114	pinctrl-1 = <&uart0_sleep>;
115	pinctrl-names = "default", "sleep";
116};
117
118&i2c0 {
119	compatible = "nordic,nrf-twi";
120	status = "okay";
121	pinctrl-0 = <&i2c0_default>;
122	pinctrl-1 = <&i2c0_sleep>;
123	pinctrl-names = "default", "sleep";
124};
125
126&i2c1 {
127	compatible = "nordic,nrf-twi";
128	status = "okay";
129	pinctrl-0 = <&i2c1_default>;
130	pinctrl-1 = <&i2c1_sleep>;
131	pinctrl-names = "default", "sleep";
132};
133
134&pwm0 {
135	status = "okay";
136	pinctrl-0 = <&pwm0_default>;
137	pinctrl-1 = <&pwm0_sleep>;
138	pinctrl-names = "default", "sleep";
139};
140
141&qspi {
142	status = "okay";
143	pinctrl-0 = <&qspi_default>;
144	pinctrl-1 = <&qspi_sleep>;
145	pinctrl-names = "default", "sleep";
146	mx25r64: mx25r6435f@0 {
147		compatible = "nordic,qspi-nor";
148		reg = <0>;
149		writeoc = "pp4io";
150		readoc = "read4io";
151		sck-frequency = <8000000>;
152		jedec-id = [c2 28 17];
153		sfdp-bfp = [
154			e5 20 f1 ff  ff ff ff 03  44 eb 08 6b  08 3b 04 bb
155			ee ff ff ff  ff ff 00 ff  ff ff 00 ff  0c 20 0f 52
156			10 d8 00 ff  23 72 f5 00  82 ed 04 cc  44 83 68 44
157			30 b0 30 b0  f7 c4 d5 5c  00 be 29 ff  f0 d0 ff ff
158		];
159		size = <67108864>;
160		has-dpd;
161		t-enter-dpd = <10000>;
162		t-exit-dpd = <35000>;
163	};
164};
165
166&ieee802154 {
167	status = "okay";
168};
169
170&flash0 {
171
172	partitions {
173		compatible = "fixed-partitions";
174		#address-cells = <1>;
175		#size-cells = <1>;
176
177		boot_partition: partition@0 {
178			label = "mcuboot";
179			reg = <0x00000000 0x0000C000>;
180		};
181		slot0_partition: partition@c000 {
182			label = "image-0";
183			reg = <0x0000C000 0x00067000>;
184		};
185		slot1_partition: partition@73000 {
186			label = "image-1";
187			reg = <0x00073000 0x00067000>;
188		};
189		scratch_partition: partition@da000 {
190			label = "image-scratch";
191			reg = <0x000da000 0x0001e000>;
192		};
193
194		/*
195		 * The flash starting at 0x000f8000 and ending at
196		 * 0x000fffff is reserved for use by the application.
197		 */
198
199		/*
200		 * Storage partition will be used by FCB/LittleFS/NVS
201		 * if enabled.
202		 */
203		storage_partition: partition@f8000 {
204			label = "storage";
205			reg = <0x000f8000 0x00008000>;
206		};
207	};
208};
209
210zephyr_udc0: &usbd {
211	compatible = "nordic,nrf-usbd";
212	status = "okay";
213};
214