1/*
2 * Copyright (c) 2022 Embla Flatlandsmo <embla.flatlandsmo@gmail.com>
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/dts-v1/;
8#include <nordic/nrf52840_qiaa.dtsi>
9#include <nordic/nrf52840_partition_uf2_sdv6.dtsi>
10#include "adafruit_itsybitsy_nrf52840-pinctrl.dtsi"
11#include <zephyr/dt-bindings/input/input-event-codes.h>
12#include <zephyr/dt-bindings/led/led.h>
13
14/ {
15	model = "Adafruit ItsyBitsy nRF52840 Express";
16	compatible = "adafruit,itsybitsy-nrf52840";
17
18	chosen {
19		zephyr,ieee802154 = &ieee802154;
20	};
21
22	leds {
23		compatible = "gpio-leds";
24		led0: led_0 {
25			gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
26			label = "Red LED";
27		};
28	};
29
30	buttons {
31		compatible = "gpio-keys";
32		button0: button_0 {
33			gpios = <&gpio0 29 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
34			label = "Push button switch";
35			zephyr,code = <INPUT_KEY_0>;
36		};
37	};
38
39	/* These aliases are provided for compatibility with samples */
40	aliases {
41		led0 = &led0;
42		sw0 = &button0;
43		watchdog0 = &wdt0;
44		led-strip = &apa102;
45	};
46};
47
48&reg1 {
49	regulator-initial-mode = <NRF5X_REG_MODE_DCDC>;
50};
51
52&adc {
53	status = "okay";
54};
55
56&uicr {
57	gpio-as-nreset;
58};
59
60&gpiote {
61	status = "okay";
62};
63
64&gpio0 {
65	status = "okay";
66};
67
68&gpio1 {
69	status = "okay";
70};
71
72&uart0 {
73	compatible = "nordic,nrf-uarte";
74	current-speed = <115200>;
75	status = "disabled";
76	pinctrl-0 = <&uart0_default>;
77	pinctrl-1 = <&uart0_sleep>;
78	pinctrl-names = "default", "sleep";
79};
80
81&i2c0 {
82	compatible = "nordic,nrf-twi";
83	status = "okay";
84	pinctrl-0 = <&i2c0_default>;
85	pinctrl-1 = <&i2c0_sleep>;
86	pinctrl-names = "default", "sleep";
87};
88
89&spi1 {
90	compatible = "nordic,nrf-spi";
91	status = "okay";
92	pinctrl-0 = <&spi1_default>;
93	pinctrl-1 = <&spi1_sleep>;
94	pinctrl-names = "default", "sleep";
95};
96
97&spi2 {
98	compatible = "nordic,nrf-spi";
99	status = "okay";
100	pinctrl-0 = <&spi2_default>;
101	pinctrl-1 = <&spi2_sleep>;
102	pinctrl-names = "default", "sleep";
103	apa102: apa102@0 {
104		compatible = "apa,apa102";
105		reg = <0>;
106		spi-max-frequency = <5250000>;
107		chain-length = <1>;
108		color-mapping = <LED_COLOR_ID_BLUE
109				 LED_COLOR_ID_GREEN
110				 LED_COLOR_ID_RED>;
111	};
112};
113
114&qspi {
115	status = "okay";
116	pinctrl-0 = <&qspi_default>;
117	pinctrl-1 = <&qspi_sleep>;
118	pinctrl-names = "default", "sleep";
119	gd25q16: gd25q16@0 {
120		compatible = "nordic,qspi-nor";
121		reg = <0>;
122		writeoc = "pp4o";
123		readoc = "read4io";
124		sck-frequency = <32000000>;
125		jedec-id = [c8 40 15];
126		size = <16777216>;
127		has-dpd;
128		t-enter-dpd = <20000>;
129		t-exit-dpd = <20000>;
130		quad-enable-requirements = "S2B1v1";
131	};
132};
133
134&ieee802154 {
135	status = "okay";
136};
137
138&gd25q16 {
139	partitions {
140		compatible = "fixed-partitions";
141		#address-cells = <1>;
142		#size-cells = <1>;
143		lfs_partition: partition@0 {
144			label = "lfs_storage";
145			reg = <0x00000000 DT_SIZE_M(2)>;
146		};
147	};
148};
149
150zephyr_udc0: &usbd {
151	compatible = "nordic,nrf-usbd";
152	status = "okay";
153};
154
155#include <../boards/common/usb/cdc_acm_serial.dtsi>
156