1/*
2 * Copyright (c) 2018 LEDCity AG
3 * Copyright (c) 2017 Linaro Limited
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 */
7
8/dts-v1/;
9#include <nordic/nrf52832_qfaa.dtsi>
10#include "feather_connector.dtsi"
11#include "nrf52_adafruit_feather-pinctrl.dtsi"
12#include <zephyr/dt-bindings/input/input-event-codes.h>
13
14/ {
15	model = "nRF52 Adafruit Feather";
16	compatible = "adafruit,nrf52_adafruit_feather";
17
18	aliases {
19		pwm-led0 = &red_pwm_led;
20	};
21
22	chosen {
23		zephyr,console = &uart0;
24		zephyr,shell-uart = &uart0;
25		zephyr,uart-mcumgr = &uart0;
26		zephyr,bt-mon-uart = &uart0;
27		zephyr,bt-c2h-uart = &uart0;
28		zephyr,sram = &sram0;
29		zephyr,flash = &flash0;
30		zephyr,code-partition = &slot0_partition;
31	};
32
33	/* These aliases are provided for compatibility with samples */
34	aliases {
35		led0 = &led0;
36		led1 = &led1;
37		sw0 = &button0;
38		watchdog0 = &wdt0;
39	};
40
41	leds {
42		compatible = "gpio-leds";
43		led0: led_0 {
44			gpios = <&gpio0 17 0>;
45			label = "Red LED";
46		};
47		led1: led_1 {
48			gpios = <&gpio0 19 0>;
49			label = "Blue LED";
50		};
51	};
52
53	pwmleds {
54		compatible = "pwm-leds";
55		red_pwm_led: pwm_led_0 {
56			pwms = <&pwm0 0 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
57		};
58		blue_pwm_led: pwm_led_1 {
59			pwms = <&pwm0 1 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
60		};
61	};
62
63	buttons {
64		compatible = "gpio-keys";
65		button0: button_0 {
66			gpios = <&gpio0 20 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
67			label = "Button";
68			zephyr,code = <INPUT_KEY_0>;
69		};
70	};
71};
72
73&reg {
74	regulator-initial-mode = <NRF5X_REG_MODE_DCDC>;
75};
76
77&uicr {
78	gpio-as-nreset;
79};
80
81&gpiote {
82	status = "okay";
83};
84
85&gpio0 {
86	status = "okay";
87};
88
89&uart0 {
90	compatible = "nordic,nrf-uart";
91	current-speed = <115200>;
92	status = "okay";
93	pinctrl-0 = <&uart0_default>;
94	pinctrl-1 = <&uart0_sleep>;
95	pinctrl-names = "default", "sleep";
96};
97
98&i2c0 {
99	compatible = "nordic,nrf-twi";
100	pinctrl-0 = <&i2c0_default>;
101	pinctrl-1 = <&i2c0_sleep>;
102	pinctrl-names = "default", "sleep";
103};
104
105&flash0 {
106
107	partitions {
108		compatible = "fixed-partitions";
109		#address-cells = <1>;
110		#size-cells = <1>;
111
112		boot_partition: partition@0 {
113			label = "mcuboot";
114			reg = <0x00000000 0xc000>;
115		};
116		slot0_partition: partition@c000 {
117			label = "image-0";
118			reg = <0x0000C000 0x32000>;
119		};
120		slot1_partition: partition@3e000 {
121			label = "image-1";
122			reg = <0x0003E000 0x32000>;
123		};
124		scratch_partition: partition@70000 {
125			label = "image-scratch";
126			reg = <0x00070000 0xa000>;
127		};
128		storage_partition: partition@7a000 {
129			label = "storage";
130			reg = <0x0007a000 0x00006000>;
131		};
132	};
133};
134
135&pwm0 {
136	status = "okay";
137	pinctrl-0 = <&pwm0_default>;
138	pinctrl-1 = <&pwm0_sleep>;
139	pinctrl-names = "default", "sleep";
140};
141