1/* 2 * Copyright (c) 2018 Phytec Messtechnik GmbH 3 * Copyright (c) 2017 Linaro Limited 4 * 5 * SPDX-License-Identifier: Apache-2.0 6 */ 7#include "reel_board-pinctrl.dtsi" 8#include <zephyr/dt-bindings/input/input-event-codes.h> 9 10/ { 11 chosen { 12 zephyr,ieee802154 = &ieee802154; 13 }; 14 15 leds { 16 compatible = "gpio-leds"; 17 red_led: led_0 { 18 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; 19 label = "User D3 red"; 20 }; 21 green_led: led_1 { 22 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; 23 label = "User D3 green"; 24 }; 25 blue_led: led_2 { 26 gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; 27 label = "User D3 blue"; 28 }; 29 }; 30 31 pwmleds { 32 compatible = "pwm-leds"; 33 red_pwm_led: pwm_led_0 { 34 pwms = <&pwm0 1 PWM_MSEC(20) PWM_POLARITY_INVERTED>; 35 }; 36 green_pwm_led: pwm_led_1 { 37 pwms = <&pwm0 2 PWM_MSEC(20) PWM_POLARITY_INVERTED>; 38 }; 39 blue_pwm_led: pwm_led_2 { 40 pwms = <&pwm0 3 PWM_MSEC(20) PWM_POLARITY_INVERTED>; 41 }; 42 }; 43 44 gpio_keys { 45 compatible = "gpio-keys"; 46 user_button: button_0 { 47 gpios = <&gpio0 7 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; 48 label = "User Button"; 49 zephyr,code = <INPUT_KEY_0>; 50 }; 51 }; 52 53 arduino_header: connector { 54 compatible = "arduino-header-r3"; 55 #gpio-cells = <2>; 56 gpio-map-mask = <0xffffffff 0xffffffc0>; 57 gpio-map-pass-thru = <0 0x3f>; 58 gpio-map = <0 0 &gpio0 3 0>, /* A0 */ 59 <1 0 &gpio0 4 0>, /* A1 */ 60 <2 0 &gpio0 28 0>, /* A2 */ 61 <3 0 &gpio0 29 0>, /* A3 */ 62 <4 0 &gpio0 30 0>, /* A4 */ 63 <5 0 &gpio0 31 0>, /* A5 */ 64 <6 0 &gpio1 1 0>, /* D0 */ 65 <7 0 &gpio1 2 0>, /* D1 */ 66 <8 0 &gpio1 3 0>, /* D2 */ 67 <9 0 &gpio1 4 0>, /* D3 */ 68 <10 0 &gpio1 5 0>, /* D4 */ 69 <11 0 &gpio1 6 0>, /* D5 */ 70 <12 0 &gpio1 7 0>, /* D6 */ 71 <13 0 &gpio1 8 0>, /* D7 */ 72 <14 0 &gpio1 10 0>, /* D8 */ 73 <15 0 &gpio1 11 0>, /* D9 */ 74 <16 0 &gpio1 12 0>, /* D10 */ 75 <17 0 &gpio1 13 0>, /* D11 */ 76 <18 0 &gpio1 14 0>, /* D12 */ 77 <19 0 &gpio1 15 0>, /* D13 */ 78 <20 0 &gpio0 26 0>, /* D14 */ 79 <21 0 &gpio0 27 0>; /* D15 */ 80 }; 81 82 aliases { 83 led0 = &red_led; 84 led1 = &green_led; 85 led2 = &blue_led; 86 pwm-led0 = &red_pwm_led; 87 pwm-led1 = &green_pwm_led; 88 pwm-led2 = &blue_pwm_led; 89 red-pwm-led = &red_pwm_led; 90 green-pwm-led = &green_pwm_led; 91 blue-pwm-led = &blue_pwm_led; 92 sw0 = &user_button; 93 accel0 = &mma8642fc; 94 }; 95}; 96 97&uicr { 98 gpio-as-nreset; 99}; 100 101&gpiote { 102 status = "okay"; 103}; 104 105&gpio0 { 106 status = "okay"; 107}; 108 109&gpio1 { 110 status = "okay"; 111}; 112 113&uart0 { 114 compatible = "nordic,nrf-uart"; 115 current-speed = <115200>; 116 status = "okay"; 117 pinctrl-0 = <&uart0_default>; 118 pinctrl-1 = <&uart0_sleep>; 119 pinctrl-names = "default", "sleep"; 120}; 121 122arduino_serial: &uart1 { 123 status = "okay"; 124 current-speed = <115200>; 125 pinctrl-0 = <&uart1_default>; 126 pinctrl-1 = <&uart1_sleep>; 127 pinctrl-names = "default", "sleep"; 128}; 129 130arduino_i2c: &i2c0 { 131 compatible = "nordic,nrf-twim"; 132 status = "okay"; 133 clock-frequency = <I2C_BITRATE_FAST>; 134 135 pinctrl-0 = <&i2c0_default>; 136 pinctrl-1 = <&i2c0_sleep>; 137 pinctrl-names = "default", "sleep"; 138 mma8642fc: mma8652fc@1d { 139 compatible = "nxp,fxos8700","nxp,mma8652fc"; 140 reg = <0x1d>; 141 int1-gpios = <&gpio0 24 GPIO_ACTIVE_LOW>; 142 int2-gpios = <&gpio0 25 GPIO_ACTIVE_LOW>; 143 }; 144 145 ti_hdc@43 { 146 compatible = "ti,hdc","ti,hdc1010"; 147 reg = <0x43>; 148 drdy-gpios = <&gpio0 22 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; 149 }; 150 151 apds9960@39 { 152 compatible = "avago,apds9960"; 153 reg = <0x39>; 154 int-gpios = <&gpio0 23 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; 155 }; 156}; 157 158&pwm0 { 159 status = "okay"; 160 pinctrl-0 = <&pwm0_default>; 161 pinctrl-1 = <&pwm0_sleep>; 162 pinctrl-names = "default", "sleep"; 163}; 164 165&ieee802154 { 166 status = "okay"; 167}; 168 169arduino_spi: &spi3 { 170 status = "okay"; 171 cs-gpios = <&arduino_header 16 GPIO_ACTIVE_LOW>; /* D10 */ 172 pinctrl-0 = <&spi3_default>; 173 pinctrl-1 = <&spi3_sleep>; 174 pinctrl-names = "default", "sleep"; 175}; 176 177&flash0 { 178 179 partitions { 180 compatible = "fixed-partitions"; 181 #address-cells = <1>; 182 #size-cells = <1>; 183 184 boot_partition: partition@0 { 185 label = "mcuboot"; 186 reg = <0x00000000 0x0000C000>; 187 }; 188 slot0_partition: partition@c000 { 189 label = "image-0"; 190 reg = <0x0000C000 0x00067000>; 191 }; 192 slot1_partition: partition@73000 { 193 label = "image-1"; 194 reg = <0x00073000 0x00067000>; 195 }; 196 scratch_partition: partition@da000 { 197 label = "image-scratch"; 198 reg = <0x000da000 0x0001e000>; 199 }; 200 201 /* 202 * The flash starting at 0x000f8000 and ending at 203 * 0x000fffff is reserved for use by the application. 204 */ 205 206 /* 207 * Storage partition will be used by FCB/LittleFS/NVS 208 * if enabled. 209 */ 210 storage_partition: partition@f8000 { 211 label = "storage"; 212 reg = <0x000f8000 0x00008000>; 213 }; 214 }; 215}; 216 217zephyr_udc0: &usbd { 218 compatible = "nordic,nrf-usbd"; 219 status = "okay"; 220}; 221