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&reg1 {
73	regulator-initial-mode = <NRF5X_REG_MODE_DCDC>;
74};
75
76&adc {
77	status = "okay";
78};
79
80&uicr {
81	gpio-as-nreset;
82};
83
84&gpiote {
85	status = "okay";
86};
87
88&gpio0 {
89	status = "okay";
90};
91
92&gpio1 {
93	status = "okay";
94};
95
96&uart0 {
97	compatible = "nordic,nrf-uarte";
98	current-speed = <115200>;
99	status = "okay";
100	pinctrl-0 = <&uart0_default>;
101	pinctrl-1 = <&uart0_sleep>;
102	pinctrl-names = "default", "sleep";
103};
104
105&i2c0 {
106	compatible = "nordic,nrf-twim";
107	status = "okay";
108
109	pinctrl-0 = <&i2c0_default>;
110	pinctrl-1 = <&i2c0_sleep>;
111	pinctrl-names = "default", "sleep";
112	lis2dh12: lis2dh12@18 {
113		compatible = "st,lis2dh12", "st,lis2dh";
114		reg = <0x18>;
115		irq-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>,
116				<&gpio1 12 GPIO_ACTIVE_HIGH>;
117		disconnect-sdo-sa0-pull-up;
118	};
119
120	si7055@40 {
121		compatible = "silabs,si7055";
122		reg = <0x40>;
123	};
124};
125
126&ieee802154 {
127	status = "okay";
128};
129
130&flash0 {
131	partitions {
132		compatible = "fixed-partitions";
133		#address-cells = <1>;
134		#size-cells = <1>;
135
136		/* 96K */
137		boot_partition: partition@0 {
138			label = "mcuboot";
139			reg = <0x00000000 0x00018000>;
140		};
141		/* 396K */
142		slot0_partition: partition@18000 {
143			label = "image-0";
144			reg = <0x00018000 0x00063000>;
145		};
146		/* 396K */
147		slot1_partition: partition@7b000 {
148			label = "image-1";
149			reg = <0x0007b000 0x00063000>;
150		};
151		/* 8K */
152		scratch_partition: partition@de000 {
153			label = "image-scratch";
154			reg = <0x000de000 0x00002000>;
155		};
156
157		/*
158		 * The flash starting at 0x000e0000 and ending at
159		 * 0x000fffff is reserved for use by the application.
160		 */
161
162		/*
163		 * Storage partition will be used by FCB/LittleFS/NVS
164		 * if enabled.
165		 */
166		/* 128K */
167		storage_partition: partition@e0000 {
168			label = "storage";
169			reg = <0x000e0000 0x00020000>;
170		};
171	};
172};
173