1/*
2 * Copyright (c) 2024 Luis Ubieda
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/dts-v1/;
8#include <nordic/nrf52840_qiaa.dtsi>
9#include "croxel_cx1825_nrf52840-pinctrl.dtsi"
10#include <zephyr/dt-bindings/input/input-event-codes.h>
11
12/ {
13	model = "Croxel CX1825 NRF52840";
14	compatible = "croxel,cx1825-nrf52840";
15
16	chosen {
17		zephyr,sram = &sram0;
18		zephyr,flash = &flash0;
19		zephyr,code-partition = &slot0_partition;
20		zephyr,console = &cdc_acm_0;
21		zephyr,shell-uart = &cdc_acm_0;
22	};
23
24	leds {
25		compatible = "gpio-leds";
26		led0: led_0 {
27			gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
28			label = "Red LED";
29		};
30		led1: led_1 {
31			gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
32			label = "Green LED";
33		};
34	};
35
36	buttons {
37		compatible = "gpio-keys";
38		button0: button_0 {
39			gpios = <&gpio0 16 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
40			label = "Push button switch 0";
41			zephyr,code = <INPUT_KEY_0>;
42		};
43	};
44
45	/* These aliases are provided for compatibility with samples */
46	aliases {
47		led0 = &led0;
48		led1 = &led1;
49		sw0 = &button0;
50		bootloader-led0 = &led0;
51		mcuboot-button0 = &button0;
52		mcuboot-led0 = &led0;
53		watchdog0 = &wdt0;
54	};
55};
56
57&adc {
58	status = "okay";
59};
60
61&uicr {
62	gpio-as-nreset;
63};
64
65&gpiote {
66	status = "okay";
67};
68
69&gpio0 {
70	status = "okay";
71};
72
73&gpio1 {
74	status = "okay";
75};
76
77&pwm0 {
78	status = "okay";
79	pinctrl-0 = <&pwm0_default>;
80	pinctrl-1 = <&pwm0_sleep>;
81	pinctrl-names = "default", "sleep";
82};
83
84&i2c0 {
85	compatible = "nordic,nrf-twi";
86	status = "okay";
87	pinctrl-0 = <&i2c0_default>;
88	pinctrl-1 = <&i2c0_sleep>;
89	pinctrl-names = "default", "sleep";
90
91	hts221: hts221@5f {
92		compatible = "st,hts221";
93		status = "okay";
94		reg = <0x5f>;
95		drdy-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
96	};
97
98	lps22hb: lps22hb-press@5c {
99		compatible = "st,lps22hb-press";
100		status = "okay";
101		reg = <0x5c>;
102	};
103
104	apds9960: apds9960@39 {
105		compatible = "avago,apds9960";
106		status = "okay";
107		reg = <0x39>;
108		int-gpios = <&gpio0 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
109	};
110
111	lis3dh: lis3dh@18 {
112		compatible = "st,lis3dh", "st,lis2dh";
113		status = "okay";
114		reg = <0x18>;
115		irq-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
116	};
117};
118
119zephyr_udc0: &usbd {
120	compatible = "nordic,nrf-usbd";
121	status = "okay";
122
123	cdc_acm_0: cdc_acm_0 {
124		compatible = "zephyr,cdc-acm-uart";
125	};
126};
127
128&flash0 {
129
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 0x0000C000>;
138		};
139		slot0_partition: partition@c000 {
140			label = "image-0";
141			reg = <0x0000C000 0x00076000>;
142		};
143		slot1_partition: partition@82000 {
144			label = "image-1";
145			reg = <0x00082000 0x00076000>;
146		};
147
148		/*
149		 * Storage partition will be used by FCB/LittleFS/NVS
150		 * if enabled.
151		 */
152		storage_partition: partition@f8000 {
153			label = "storage";
154			reg = <0x000f8000 0x00008000>;
155		};
156	};
157};
158