1/*
2 * Copyright (c) 2020 Laird Connectivity
3 * Copyright (c) 2024 Ezurio
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 */
7
8/dts-v1/;
9#include <nordic/nrf52840_qiaa.dtsi>
10#include "bt510-pinctrl.dtsi"
11#include <zephyr/dt-bindings/input/input-event-codes.h>
12
13/ {
14	model = "Ezurio Sentrius BT510 Sensor";
15	compatible = "ezurio,bt510";
16
17	chosen {
18		zephyr,console = &uart0;
19		zephyr,shell-uart = &uart0;
20		zephyr,uart-mcumgr = &uart0;
21		zephyr,bt-mon-uart = &uart0;
22		zephyr,bt-c2h-uart = &uart0;
23		zephyr,sram = &sram0;
24		zephyr,flash = &flash0;
25		zephyr,code-partition = &slot0_partition;
26		zephyr,ieee802154 = &ieee802154;
27	};
28
29	leds {
30		compatible = "gpio-leds";
31		led1a: led_1a {
32			gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
33			label = "Green LED 1A";
34		};
35		led1b: led_1b {
36			gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
37			label = "Red LED 1B";
38		};
39	};
40
41	buttons {
42		compatible = "gpio-keys";
43		button0: button_0 {
44			gpios = <&gpio1 10 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
45			label = "Push button switch 1 (SW1)";
46			zephyr,code = <INPUT_KEY_0>;
47		};
48		tm0: tm_0 {
49			gpios = <&gpio0 3 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
50			label = "Test mode (TM)";
51			zephyr,code = <INPUT_KEY_1>;
52		};
53	};
54
55	/* These aliases are provided for compatibility with samples */
56	aliases {
57		led0 = &led1a;
58		led1 = &led1b;
59		sw0 = &button0;
60		mcuboot-button0 = &button0;
61		mcuboot-led0 = &led1a;
62		watchdog0 = &wdt0;
63		accel0 = &lis2dh12;
64	};
65
66	mag0: mag_0 {
67		compatible = "honeywell,sm351lt";
68		gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
69	};
70};
71
72&adc {
73	status = "okay";
74};
75
76&uicr {
77	gpio-as-nreset;
78};
79
80&gpiote {
81	status = "okay";
82};
83
84&gpio0 {
85	status = "okay";
86};
87
88&gpio1 {
89	status = "okay";
90};
91
92&uart0 {
93	compatible = "nordic,nrf-uarte";
94	current-speed = <115200>;
95	status = "okay";
96	pinctrl-0 = <&uart0_default>;
97	pinctrl-1 = <&uart0_sleep>;
98	pinctrl-names = "default", "sleep";
99};
100
101&i2c0 {
102	compatible = "nordic,nrf-twim";
103	status = "okay";
104
105	pinctrl-0 = <&i2c0_default>;
106	pinctrl-1 = <&i2c0_sleep>;
107	pinctrl-names = "default", "sleep";
108	lis2dh12: lis2dh12@18 {
109		compatible = "st,lis2dh12", "st,lis2dh";
110		reg = <0x18>;
111		irq-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>,
112				<&gpio1 12 GPIO_ACTIVE_HIGH>;
113		disconnect-sdo-sa0-pull-up;
114	};
115
116	si7055@40 {
117		compatible = "silabs,si7055";
118		reg = <0x40>;
119	};
120};
121
122&ieee802154 {
123	status = "okay";
124};
125
126&flash0 {
127	partitions {
128		compatible = "fixed-partitions";
129		#address-cells = <1>;
130		#size-cells = <1>;
131
132		/* 96K */
133		boot_partition: partition@0 {
134			label = "mcuboot";
135			reg = <0x00000000 0x00018000>;
136		};
137		/* 396K */
138		slot0_partition: partition@18000 {
139			label = "image-0";
140			reg = <0x00018000 0x00063000>;
141		};
142		/* 396K */
143		slot1_partition: partition@7b000 {
144			label = "image-1";
145			reg = <0x0007b000 0x00063000>;
146		};
147		/* 8K */
148		scratch_partition: partition@de000 {
149			label = "image-scratch";
150			reg = <0x000de000 0x00002000>;
151		};
152
153		/*
154		 * The flash starting at 0x000e0000 and ending at
155		 * 0x000fffff is reserved for use by the application.
156		 */
157
158		/*
159		 * Storage partition will be used by FCB/LittleFS/NVS
160		 * if enabled.
161		 */
162		/* 128K */
163		storage_partition: partition@e0000 {
164			label = "storage";
165			reg = <0x000e0000 0x00020000>;
166		};
167	};
168};
169