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