1/*
2 * Copyright (c) 2020 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/ {
8	leds {
9		compatible = "gpio-leds";
10		led0: led_0 {
11			gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
12			label = "Green LED 0";
13		};
14		led1: led_1 {
15			gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
16			label = "Green LED 1";
17		};
18		led2: led_2 {
19			gpios = <&gpio0 30 GPIO_ACTIVE_LOW>;
20			label = "Green LED 2";
21		};
22		led3: led_3 {
23			gpios = <&gpio0 31 GPIO_ACTIVE_LOW>;
24			label = "Green LED 3";
25		};
26	};
27
28	buttons {
29		compatible = "gpio-keys";
30		button0: button_0 {
31			gpios = <&gpio0 23 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
32			label = "Push button 1";
33			zephyr,code = <INPUT_KEY_0>;
34		};
35		button1: button_1 {
36			gpios = <&gpio0 24 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
37			label = "Push button 2";
38			zephyr,code = <INPUT_KEY_1>;
39		};
40		button2: button_2 {
41			gpios = <&gpio0 8 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
42			label = "Push button 3";
43			zephyr,code = <INPUT_KEY_2>;
44		};
45		button3: button_3 {
46			gpios = <&gpio0 9 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
47			label = "Push button 4";
48			zephyr,code = <INPUT_KEY_3>;
49		};
50	};
51
52	arduino_header: connector {
53		compatible = "arduino-header-r3";
54		#gpio-cells = <2>;
55		gpio-map-mask = <0xffffffff 0xffffffc0>;
56		gpio-map-pass-thru = <0 0x3f>;
57		gpio-map = <0 0 &gpio0 4 0>,	/* A0 */
58			   <1 0 &gpio0 5 0>,	/* A1 */
59			   <2 0 &gpio0 6 0>,	/* A2 */
60			   <3 0 &gpio0 7 0>,	/* A3 */
61			   <4 0 &gpio0 25 0>,	/* A4 */
62			   <5 0 &gpio0 26 0>,	/* A5 */
63			   <6 0 &gpio1 0 0>,	/* D0 */
64			   <7 0 &gpio1 1 0>,	/* D1 */
65			   <8 0 &gpio1 4 0>,	/* D2 */
66			   <9 0 &gpio1 5 0>,	/* D3 */
67			   <10 0 &gpio1 6 0>,	/* D4 */
68			   <11 0 &gpio1 7 0>,	/* D5 */
69			   <12 0 &gpio1 8 0>,	/* D6 */
70			   <13 0 &gpio1 9 0>,	/* D7 */
71			   <14 0 &gpio1 10 0>,	/* D8 */
72			   <15 0 &gpio1 11 0>,	/* D9 */
73			   <16 0 &gpio1 12 0>,	/* D10 */
74			   <17 0 &gpio1 13 0>,	/* D11 */
75			   <18 0 &gpio1 14 0>,	/* D12 */
76			   <19 0 &gpio1 15 0>,	/* D13 */
77			   <20 0 &gpio1 2 0>,	/* D14 */
78			   <21 0 &gpio1 3 0>;	/* D15 */
79	};
80
81	/* These aliases are provided for compatibility with samples */
82	aliases {
83		led0 = &led0;
84		led1 = &led1;
85		led2 = &led2;
86		led3 = &led3;
87		sw0 = &button0;
88		sw1 = &button1;
89		sw2 = &button2;
90		sw3 = &button3;
91		bootloader-led0 = &led0;
92		mcuboot-button0 = &button0;
93		mcuboot-led0 = &led0;
94	};
95};
96