1/*
2 * Copyright (c) 2019 Stéphane D'Alu
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/dts-v1/;
8#include <nordic/nrf52833_qdaa.dtsi>
9#include "decawave_dwm3001cdk-pinctrl.dtsi"
10#include <zephyr/dt-bindings/input/input-event-codes.h>
11
12/ {
13	model = "Decawave DWM3001CDK";
14	compatible = "decawave,dwm3001";
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		// led from top of board down
31		// D20: something related to jlink, red
32		// D13: DW3000 tx(red)/rx(green)
33		led0: led_0 {
34			gpios = <&gpio0 04 GPIO_ACTIVE_LOW>;
35			label = "D9 green LED";
36		};
37		led1: led_1 {
38			gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
39			label = "D12 red LED";
40		};
41		led2: led_2 {
42			gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
43			label = "D11 red LED";
44		};
45		led3: led_3 {
46			gpios = <&gpio0 05 GPIO_ACTIVE_LOW>;
47			label = "D10 blue LED";
48		};
49	};
50
51	buttons {
52		compatible = "gpio-keys";
53		// SW1 is connected to P0.18, which by default is nRESET and
54		// will reset the board
55		button2: button_2 {
56			gpios = <&gpio0 2 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
57			label = "Push button switch 2";
58			zephyr,code = <INPUT_KEY_1>;
59		};
60	};
61
62	/* These aliases are provided for compatibility with samples */
63	aliases {
64		sw0        = &button2;
65		led0       = &led0;
66		led1       = &led1;
67		led2       = &led2;
68		led3       = &led3;
69		watchdog0  = &wdt0;
70		accel0     = &lis2dh12;
71	};
72
73};
74
75&uicr {
76	gpio-as-nreset;
77};
78
79&gpiote {
80	status = "okay";
81};
82
83&gpio0 {
84	status = "okay";
85};
86
87&uart0 {
88	status = "okay";
89	compatible = "nordic,nrf-uart";
90	current-speed = <115200>;
91	pinctrl-0 = <&uart0_default>;
92	pinctrl-1 = <&uart0_sleep>;
93	pinctrl-names = "default", "sleep";
94};
95
96&gpio1 {
97	status = "okay";
98};
99
100&i2c0 {
101	compatible = "nordic,nrf-twim";
102	status = "okay";
103	clock-frequency = <I2C_BITRATE_FAST>;
104
105	pinctrl-0 = <&i2c0_default>;
106	pinctrl-1 = <&i2c0_sleep>;
107	pinctrl-names = "default", "sleep";
108	lis2dh12: lis2dh12@19 {
109		compatible = "st,lis2dh12", "st,lis2dh";
110		reg = <0x19>;
111		irq-gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
112	};
113};
114
115&spi3 {
116	compatible = "nordic,nrf-spim";
117	status = "okay";
118	cs-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
119
120	pinctrl-0 = <&spi3_default>;
121	pinctrl-1 = <&spi3_sleep>;
122	pinctrl-names = "default", "sleep";
123};
124
125&ieee802154 {
126	status = "okay";
127};
128
129&flash0 {
130	partitions {
131		compatible = "fixed-partitions";
132		#address-cells = <1>;
133		#size-cells = <1>;
134
135		boot_partition: partition@0 {
136			label = "mcuboot";
137			reg = <0x00000000 0xC000>;
138		};
139		slot0_partition: partition@c000 {
140			label = "image-0";
141			reg = <0x0000C000 0x38000>;
142		};
143		slot1_partition: partition@44000 {
144			label = "image-1";
145			reg = <0x00044000 0x36000>;
146		};
147		storage_partition: partition@7a000 {
148			label = "storage";
149			reg = <0x0007A000 0x00006000>;
150		};
151	};
152};
153
154zephyr_udc0: &usbd {
155	compatible = "nordic,nrf-usbd";
156	status = "okay";
157};
158
159&reg1 {
160	regulator-initial-mode = <NRF5X_REG_MODE_DCDC>;
161};
162
163&adc {
164	status = "okay";
165};
166