1/*
2 * Copyright (c) 2021-2022 Actinius
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6#include "actinius_icarus_bee_common-pinctrl.dtsi"
7#include <zephyr/dt-bindings/input/input-event-codes.h>
8
9/ {
10	model = "Actinius Icarus Bee";
11	compatible = "actinius,icarus_bee";
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 21 GPIO_ACTIVE_LOW>;
24			label = "Red LED";
25		};
26
27		green_led: led_1 {
28			gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
29			label = "Green LED";
30		};
31
32		blue_led: led_2 {
33			gpios = <&gpio0 25 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 4 (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	sim_select: sim-select {
86		compatible = "actinius-sim-select";
87		sim-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
88		sim = "esim";
89	};
90};
91
92&adc {
93	status ="okay";
94};
95
96&gpiote {
97	status = "okay";
98};
99
100&gpio0 {
101	status = "okay";
102};
103
104&uart0 {
105	status = "okay";
106
107	current-speed = <115200>;
108	pinctrl-0 = <&uart0_default>;
109	pinctrl-1 = <&uart0_sleep>;
110	pinctrl-names = "default", "sleep";
111};
112
113&i2c2 {
114	compatible = "nordic,nrf-twim";
115	status = "okay";
116
117	clock-frequency = <I2C_BITRATE_FAST>;
118
119	pinctrl-0 = <&i2c2_default>;
120	pinctrl-1 = <&i2c2_sleep>;
121	pinctrl-names = "default", "sleep";
122	lis2dh12_accel: lis2dh12-accel@19 {
123		compatible = "st,lis2dh12", "st,lis2dh";
124		reg = <0x19>;
125		irq-gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>,
126			  <&gpio0 28 GPIO_ACTIVE_HIGH>;
127	};
128};
129
130&spi3 {
131	compatible = "nordic,nrf-spim";
132	status = "okay";
133
134	cs-gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
135
136	pinctrl-0 = <&spi3_default>;
137	pinctrl-1 = <&spi3_sleep>;
138	pinctrl-names = "default", "sleep";
139	w25q64: w25q64jv@0 {
140		compatible = "jedec,spi-nor";
141		reg = <0>;
142		spi-max-frequency = <80000000>;
143		jedec-id = [ef 40 17];
144		size = <0x4000000>;
145		has-dpd;
146		t-enter-dpd = <3500>;
147		t-exit-dpd = <3500>;
148	};
149};
150
151&pwm0 {
152	status = "okay";
153
154	pinctrl-0 = <&pwm0_default>;
155	pinctrl-1 = <&pwm0_sleep>;
156	pinctrl-names = "default", "sleep";
157};
158
159/* Include default memory partition configuration file */
160#include <common/nordic/nrf91xx_partition.dtsi>
161