1/*
2 * Copyright (c) 2019 Ajay Meena <intajayk@gmail.com>
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/dts-v1/;
8#include <nordic/nrf52840_qiaa.dtsi>
9#include "nrf52840_papyr-pinctrl.dtsi"
10#include <zephyr/dt-bindings/input/input-event-codes.h>
11
12/ {
13	model = "Papyr";
14	compatible = "nordic,pca10056-dk";
15
16	chosen {
17		zephyr,code-partition = &slot0_partition;
18		zephyr,console = &uart0;
19		zephyr,uart-mcumgr = &uart0;
20		zephyr,shell-uart = &uart0;
21		zephyr,bt-mon-uart = &uart0;
22		zephyr,bt-c2h-uart = &uart0;
23		zephyr,sram = &sram0;
24		zephyr,flash = &flash0;
25		zephyr,ieee802154 = &ieee802154;
26	};
27
28	leds {
29		compatible = "gpio-leds";
30		led0: led_0 {
31			gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
32			label = "Green LED 0";
33		};
34		led1: led_1 {
35			gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
36			label = "Blue LED 1";
37		};
38		led2: led_2 {
39			gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
40			label = "Red LED 2";
41		};
42	};
43
44	pwmleds {
45		compatible = "pwm-leds";
46		pwm_led0: pwm_led_0 {
47			pwms = <&pwm0 0 PWM_MSEC(20) PWM_POLARITY_INVERTED>;
48			label = "Green PWM LED 0";
49		};
50		pwm_led1: pwm_led_1 {
51			pwms = <&pwm0 2 PWM_MSEC(20) PWM_POLARITY_INVERTED>;
52			label = "Blue PWM LED 1";
53		};
54		pwm_led2: pwm_led_2 {
55			pwms = <&pwm0 1 PWM_MSEC(20) PWM_POLARITY_INVERTED>;
56			label = "Red PWM LED 2";
57		};
58	};
59
60	buttons {
61		compatible = "gpio-keys";
62		button0: button_0 {
63			gpios = <&gpio0 18 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		led0 = &led0;
72		led1 = &led1;
73		led2 = &led2;
74		pwm-led0 = &pwm_led0;
75		pwm-led1 = &pwm_led1;
76		pwm-led2 = &pwm_led2;
77		green-pwm-led = &pwm_led0;
78		blue-pwm-led = &pwm_led1;
79		red-pwm-led = &pwm_led2;
80		sw0 = &button0;
81		watchdog0 = &wdt0;
82	};
83};
84
85&adc {
86	status = "okay";
87};
88
89&uicr {
90	gpio-as-nreset;
91};
92
93&gpiote {
94	status = "okay";
95};
96
97&gpio0 {
98	status = "okay";
99};
100
101&gpio1 {
102	status = "okay";
103};
104
105&uart0 {
106	compatible = "nordic,nrf-uart";
107	current-speed = <115200>;
108	status = "okay";
109	pinctrl-0 = <&uart0_default>;
110	pinctrl-1 = <&uart0_sleep>;
111	pinctrl-names = "default", "sleep";
112};
113
114&i2c0 {
115	compatible = "nordic,nrf-twi";
116	status = "okay";
117	pinctrl-0 = <&i2c0_default>;
118	pinctrl-1 = <&i2c0_sleep>;
119	pinctrl-names = "default", "sleep";
120};
121
122&spi1 {
123	compatible = "nordic,nrf-spi";
124	status = "okay";
125	pinctrl-0 = <&spi1_default>;
126	pinctrl-1 = <&spi1_sleep>;
127	pinctrl-names = "default", "sleep";
128};
129
130&pwm0 {
131	status = "okay";
132	pinctrl-0 = <&pwm0_default>;
133	pinctrl-1 = <&pwm0_sleep>;
134	pinctrl-names = "default", "sleep";
135};
136
137&ieee802154 {
138	status = "okay";
139};
140
141&flash0 {
142	partitions {
143		compatible = "fixed-partitions";
144		#address-cells = <1>;
145		#size-cells = <1>;
146
147		boot_partition: partition@0 {
148			label = "mcuboot";
149			reg = <0x00000000 0x0000C000>;
150		};
151		slot0_partition: partition@c000 {
152			label = "image-0";
153			reg = <0x0000C000 0x00067000>;
154		};
155		slot1_partition: partition@73000 {
156			label = "image-1";
157			reg = <0x00073000 0x00067000>;
158		};
159		scratch_partition: partition@da000 {
160			label = "image-scratch";
161			reg = <0x000da000 0x0001e000>;
162		};
163
164		/*
165		 * The flash starting at 0x000f8000 and ending at
166		 * 0x000fffff is reserved for use by the application.
167		 */
168
169		/*
170		 * Storage partition will be used by FCB/LittleFS/NVS
171		 * if enabled.
172		 */
173		storage_partition: partition@f8000 {
174			label = "storage";
175			reg = <0x000f8000 0x00008000>;
176		};
177	};
178};
179
180zephyr_udc0: &usbd {
181	compatible = "nordic,nrf-usbd";
182	status = "okay";
183};
184