1/*
2 * Copyright (c) 2019-2022 Actinius
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6#include "actinius_icarus_common-pinctrl.dtsi"
7#include <zephyr/dt-bindings/input/input-event-codes.h>
8
9/ {
10	model = "Actinius Icarus IoT Dev Board";
11	compatible = "actinius,icarus";
12
13	chosen {
14		zephyr,console = &uart0;
15		zephyr,shell-uart = &uart0;
16		zephyr,uart-mcumgr = &uart0;
17	};
18
19	leds {
20		compatible = "gpio-leds";
21
22		red_led: led_0 {
23			gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
24			label = "Red LED";
25		};
26
27		green_led: led_1 {
28			gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
29			label = "Green LED";
30		};
31
32		blue_led: led_2 {
33			gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
34			label = "Blue LED";
35		};
36	};
37
38	pwmleds {
39		compatible = "pwm-leds";
40
41		red_pwm_led: led_pwm_0 {
42			pwms = <&pwm0 0 PWM_MSEC(20) PWM_POLARITY_INVERTED>;
43			label = "Red PWM LED";
44		};
45
46		green_pwm_led: led_pwm_1 {
47			pwms = <&pwm0 1 PWM_MSEC(20) PWM_POLARITY_INVERTED>;
48			label = "Green PWM LED";
49		};
50
51		blue_pwm_led: led_pwm_2 {
52			pwms = <&pwm0 2 PWM_MSEC(20) PWM_POLARITY_INVERTED>;
53			label = "Blue PWM LED";
54		};
55	};
56
57	buttons {
58		compatible = "gpio-keys";
59
60		button0: button_0 {
61			gpios = <&gpio0 5 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
62			label = "Push Button 1";
63			zephyr,code = <INPUT_KEY_0>;
64		};
65	};
66
67	aliases {
68		led0 = &red_led;
69		led1 = &green_led;
70		led2 = &blue_led;
71		pwm-led0 = &red_pwm_led;
72		pwm-led1 = &green_pwm_led;
73		pwm-led2 = &blue_pwm_led;
74		red-pwm-led = &red_pwm_led;
75		green-pwm-led = &green_pwm_led;
76		blue-pwm-led = &blue_pwm_led;
77		sw0 = &button0;
78		bootloader-led0 = &blue_led;
79		mcuboot-button0 = &button0;
80		mcuboot-led0 = &blue_led;
81		watchdog0 = &wdt0;
82		accel0 = &lis2dh12_accel;
83	};
84
85	vbatt {
86		compatible = "voltage-divider";
87		io-channels = <&adc 0>;
88		output-ohms = <10000000>;
89		full-ohms = <(10000000 + 4700000)>;
90	};
91
92	sim_select: sim-select {
93		compatible = "actinius-sim-select";
94		sim-gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
95		sim = "esim";
96	};
97};
98
99&adc {
100	status ="okay";
101};
102
103&gpiote {
104	status = "okay";
105};
106
107&gpio0 {
108	status = "okay";
109};
110
111&uart0 {
112	status = "okay";
113
114	current-speed = <115200>;
115	pinctrl-0 = <&uart0_default>;
116	pinctrl-1 = <&uart0_sleep>;
117	pinctrl-names = "default", "sleep";
118};
119
120&uart1 {
121	status = "okay";
122
123	current-speed = <115200>;
124	pinctrl-0 = <&uart1_default>;
125	pinctrl-1 = <&uart1_sleep>;
126	pinctrl-names = "default", "sleep";
127};
128
129&uart2 {
130	current-speed = <115200>;
131	pinctrl-0 = <&uart2_default>;
132	pinctrl-1 = <&uart2_sleep>;
133	pinctrl-names = "default", "sleep";
134};
135
136&i2c2 {
137	compatible = "nordic,nrf-twim";
138	status = "okay";
139
140	clock-frequency = <I2C_BITRATE_FAST>;
141
142	pinctrl-0 = <&i2c2_default>;
143	pinctrl-1 = <&i2c2_sleep>;
144	pinctrl-names = "default", "sleep";
145	lis2dh12_accel: lis2dh12-accel@19 {
146		compatible = "st,lis2dh12", "st,lis2dh";
147		reg = <0x19>;
148		irq-gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>,
149			  <&gpio0 29 GPIO_ACTIVE_HIGH>;
150	};
151};
152
153&spi3 {
154	compatible = "nordic,nrf-spim";
155	status = "okay";
156
157	pinctrl-0 = <&spi3_default>;
158	pinctrl-1 = <&spi3_sleep>;
159	pinctrl-names = "default", "sleep";
160};
161
162&pwm0 {
163	status = "okay";
164	pinctrl-0 = <&pwm0_default>;
165	pinctrl-1 = <&pwm0_sleep>;
166	pinctrl-names = "default", "sleep";
167};
168
169/* Include file with mappings and aliases for feather compatibility */
170#include "feather_connector.dtsi"
171
172/* Include default memory partition configuration file */
173#include <common/nordic/nrf91xx_partition.dtsi>
174