1/*
2 * Copyright (c) 2022 Actinius
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6#include "actinius_icarus_som_dk_common-pinctrl.dtsi"
7#include <dt-bindings/led/led.h>
8#include <zephyr/dt-bindings/input/input-event-codes.h>
9
10/ {
11	model = "Actinius Icarus SoM DK";
12	compatible = "actinius,icarus_som_dk";
13
14	chosen {
15		zephyr,console = &uart0;
16		zephyr,shell-uart = &uart0;
17		zephyr,uart-mcumgr = &uart0;
18	};
19
20	leds {
21		compatible = "gpio-leds";
22
23		blue_led: led_0 {
24			gpios = <&gpio0 3 GPIO_ACTIVE_HIGH>;
25			label = "Blue LED";
26		};
27	};
28
29	pwmleds {
30		compatible = "pwm-leds";
31
32		blue_pwm_led: led_pwm_0 {
33			pwms = <&pwm0 0 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
34			label = "Blue PWM LED";
35		};
36	};
37
38	buttons {
39		compatible = "gpio-keys";
40
41		button0: button_0 {
42			gpios = <&gpio0 23 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
43			label = "Push Button 1";
44			zephyr,code = <INPUT_KEY_0>;
45		};
46	};
47
48	aliases {
49		led0 = &blue_led;
50		pwm-led0 = &blue_pwm_led;
51		blue-pwm-led = &blue_pwm_led;
52		sw0 = &button0;
53		bootloader-led0 = &blue_led;
54		mcuboot-button0 = &button0;
55		mcuboot-led0 = &blue_led;
56		watchdog0 = &wdt0;
57		accel0 = &lis2dh12_accel;
58		led-strip = &neopixel_led;
59	};
60
61	sim_select: sim-select {
62		compatible = "actinius-sim-select";
63		sim-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
64		sim = "esim";
65	};
66};
67
68&adc {
69	status ="okay";
70};
71
72&gpiote {
73	status = "okay";
74};
75
76&gpio0 {
77	status = "okay";
78};
79
80&uart0 {
81	status = "okay";
82
83	current-speed = <115200>;
84	pinctrl-0 = <&uart0_default>;
85	pinctrl-1 = <&uart0_sleep>;
86	pinctrl-names = "default", "sleep";
87};
88
89neopixel_spi: &spi1 {
90	compatible = "nordic,nrf-spim";
91	status = "okay";
92
93	pinctrl-0 = <&neopixel_spi_default>;
94	pinctrl-1 = <&neopixel_spi_sleep>;
95	pinctrl-names = "default", "sleep";
96
97	neopixel_led: ws2812@0 {
98		compatible = "worldsemi,ws2812-spi";
99
100		reg = <0>; /* ignored, but necessary for SPI bindings */
101		spi-max-frequency = <4000000>;
102
103		chain-length = <1>;
104		color-mapping =	<LED_COLOR_ID_GREEN
105				LED_COLOR_ID_RED
106				LED_COLOR_ID_BLUE>;
107		spi-one-frame = <0x70>;
108		spi-zero-frame = <0x40>;
109	};
110};
111
112&i2c2 {
113	compatible = "nordic,nrf-twim";
114	status = "okay";
115
116	clock-frequency = <I2C_BITRATE_FAST>;
117
118	pinctrl-0 = <&i2c2_default>;
119	pinctrl-1 = <&i2c2_sleep>;
120	pinctrl-names = "default", "sleep";
121	lis2dh12_accel: lis2dh12-accel@19 {
122		compatible = "st,lis2dh12", "st,lis2dh";
123		reg = <0x19>;
124		irq-gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>,
125			<&gpio0 28 GPIO_ACTIVE_HIGH>;
126	};
127};
128
129&spi3 {
130	compatible = "nordic,nrf-spim";
131	status = "okay";
132
133	cs-gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
134
135	pinctrl-0 = <&spi3_default>;
136	pinctrl-1 = <&spi3_sleep>;
137	pinctrl-names = "default", "sleep";
138	w25q64: w25q64jv@0 {
139		compatible = "jedec,spi-nor";
140		reg = <0>;
141		spi-max-frequency = <80000000>;
142		jedec-id = [ef 40 17];
143		size = <0x4000000>;
144		has-dpd;
145		t-enter-dpd = <3500>;
146		t-exit-dpd = <3500>;
147	};
148};
149
150&pwm0 {
151	status = "okay";
152
153	pinctrl-0 = <&pwm0_default>;
154	pinctrl-1 = <&pwm0_sleep>;
155	pinctrl-names = "default", "sleep";
156};
157
158/* Include file with mappings and aliases for arduino compatibility */
159#include "arduino_connector.dtsi"
160
161/* Include default memory partition configuration file */
162#include <common/nordic/nrf91xx_partition.dtsi>
163