1/*
2 * Copyright (c) 2018 Nordic Semiconductor ASA.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/dts-v1/;
8#include <nordic/nrf51822_qfac.dtsi>
9#include "nrf51dongle_nrf51822-pinctrl.dtsi"
10
11/ {
12	model = "Nordic nRF51 Dongle NRF51822";
13	compatible = "nordic,nrf51-dongle-nrf51822";
14
15	chosen {
16		zephyr,console = &uart0;
17		zephyr,shell-uart = &uart0;
18		zephyr,uart-mcumgr = &uart0;
19		zephyr,bt-mon-uart = &uart0;
20		zephyr,bt-c2h-uart = &uart0;
21		zephyr,sram = &sram0;
22		zephyr,flash = &flash0;
23		zephyr,code-partition = &slot0_partition;
24	};
25
26	leds {
27		compatible = "gpio-leds";
28		led0_red: led_0 {
29			gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
30			label = "Red LED 0";
31		};
32		led0_green: led_1 {
33			gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
34			label = "Green LED 0";
35		};
36		led0_blue: led_2 {
37			gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
38			label = "Blue LED 0";
39		};
40	};
41
42	pwmleds {
43		compatible = "pwm-leds";
44		pwm_led0: pwm_led_0 {
45			pwms = <&sw_pwm 0 PWM_MSEC(20) PWM_POLARITY_INVERTED>;
46		};
47	};
48
49	/* These aliases are provided for compatibility with samples */
50	aliases {
51		led0 = &led0_red;
52		led1 = &led0_green;
53		led2 = &led0_blue;
54		pwm-led0 = &pwm_led0;
55		watchdog0 = &wdt0;
56	};
57};
58
59&sw_pwm {
60	status ="okay";
61	channel-gpios = <&gpio0 21 PWM_POLARITY_INVERTED>;
62	clock-prescaler = <8>;
63};
64
65&gpiote {
66	status ="okay";
67};
68
69&gpio0 {
70	status ="okay";
71};
72
73&adc {
74	status ="okay";
75};
76
77&uart0 {
78	current-speed = <115200>;
79	status = "okay";
80	pinctrl-0 = <&uart0_default>;
81	pinctrl-1 = <&uart0_sleep>;
82	pinctrl-names = "default", "sleep";
83};
84
85&flash0 {
86
87	partitions {
88		compatible = "fixed-partitions";
89		#address-cells = <1>;
90		#size-cells = <1>;
91
92		boot_partition: partition@0 {
93			label = "mcuboot";
94			reg = <0x00000000 0x8000>;
95		};
96		slot0_partition: partition@8000 {
97			label = "image-0";
98			reg = <0x00008000 0x1b000>;
99		};
100		slot1_partition: partition@23000 {
101			label = "image-1";
102			reg = <0x00023000 0x1b000>;
103		};
104		storage_partition: partition@3e000 {
105			label = "storage";
106			reg = <0x0003e000 0x00002000>;
107		};
108	};
109};
110