1/* 2 * BMD-340-EVAL board configuration 3 * Copyright (c) 2020 u-blox AG 4 * 5 * SPDX-License-Identifier: Apache-2.0 6 */ 7 8/dts-v1/; 9#include <nordic/nrf52840_qiaa.dtsi> 10#include "ubx_bmd340eval_nrf52840-pinctrl.dtsi" 11#include <zephyr/dt-bindings/input/input-event-codes.h> 12 13/ { 14 model = "u-blox BMD-340-EVAL EVK nRF52840"; 15 compatible = "u-blox,ubx-bmd340eval-nrf52840"; 16 17 chosen { 18 zephyr,console = &uart0; 19 zephyr,shell-uart = &uart0; 20 zephyr,uart-mcumgr = &uart0; 21 zephyr,bt-mon-uart = &uart0; 22 zephyr,bt-c2h-uart = &uart0; 23 zephyr,sram = &sram0; 24 zephyr,flash = &flash0; 25 zephyr,code-partition = &slot0_partition; 26 zephyr,ieee802154 = &ieee802154; 27 }; 28 29 leds { 30 compatible = "gpio-leds"; 31 led0: led_0 { 32 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; 33 label = "Red LED 0"; 34 }; 35 led1: led_1 { 36 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; 37 label = "Red LED 1"; 38 }; 39 led2: led_2 { 40 gpios = <&gpio0 15 GPIO_ACTIVE_LOW>; 41 label = "Green LED 2"; 42 }; 43 led3: led_3 { 44 gpios = <&gpio0 16 GPIO_ACTIVE_LOW>; 45 label = "Green LED 3"; 46 }; 47 }; 48 49 pwmleds { 50 compatible = "pwm-leds"; 51 pwm_led0: pwm_led_0 { 52 pwms = <&pwm0 0 PWM_MSEC(20) PWM_POLARITY_INVERTED>; 53 }; 54 }; 55 56 buttons { 57 compatible = "gpio-keys"; 58 button0: button_0 { 59 gpios = <&gpio0 11 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; 60 label = "Push button switch 0"; 61 zephyr,code = <INPUT_KEY_0>; 62 }; 63 button1: button_1 { 64 gpios = <&gpio0 12 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; 65 label = "Push button switch 1"; 66 zephyr,code = <INPUT_KEY_1>; 67 }; 68 button2: button_2 { 69 gpios = <&gpio0 24 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; 70 label = "Push button switch 2"; 71 zephyr,code = <INPUT_KEY_2>; 72 }; 73 button3: button_3 { 74 gpios = <&gpio0 25 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; 75 label = "Push button switch 3"; 76 zephyr,code = <INPUT_KEY_3>; 77 }; 78 }; 79 80 arduino_header: connector { 81 compatible = "arduino-header-r3"; 82 #gpio-cells = <2>; 83 gpio-map-mask = <0xffffffff 0xffffffc0>; 84 gpio-map-pass-thru = <0 0x3f>; 85 gpio-map = <0 0 &gpio0 3 0>, /* A0 */ 86 <1 0 &gpio0 4 0>, /* A1 */ 87 <2 0 &gpio0 28 0>, /* A2 */ 88 <3 0 &gpio0 29 0>, /* A3 */ 89 <4 0 &gpio0 30 0>, /* A4 */ 90 <5 0 &gpio0 31 0>, /* A5 */ 91 <6 0 &gpio1 1 0>, /* D0 */ 92 <7 0 &gpio1 2 0>, /* D1 */ 93 <8 0 &gpio1 3 0>, /* D2 */ 94 <9 0 &gpio1 4 0>, /* D3 */ 95 <10 0 &gpio1 5 0>, /* D4 */ 96 <11 0 &gpio1 6 0>, /* D5 */ 97 <12 0 &gpio1 7 0>, /* D6 */ 98 <13 0 &gpio1 8 0>, /* D7 */ 99 <14 0 &gpio1 10 0>, /* D8 */ 100 <15 0 &gpio1 11 0>, /* D9 */ 101 <16 0 &gpio1 12 0>, /* D10 */ 102 <17 0 &gpio1 13 0>, /* D11 */ 103 <18 0 &gpio1 14 0>, /* D12 */ 104 <19 0 &gpio1 15 0>, /* D13 */ 105 <20 0 &gpio0 26 0>, /* D14 */ 106 <21 0 &gpio0 27 0>; /* D15 */ 107 }; 108 109 arduino_adc: analog-connector { 110 compatible = "arduino,uno-adc"; 111 #io-channel-cells = <1>; 112 io-channel-map = <0 &adc 1>, /* A0 = P0.3 = AIN1 */ 113 <1 &adc 2>, /* A1 = P0.4 = AIN2 */ 114 <2 &adc 4>, /* A2 = P0.28 = AIN4 */ 115 <3 &adc 5>, /* A3 = P0.29 = AIN5 */ 116 <4 &adc 6>, /* A4 = P0.30 = AIN6 */ 117 <5 &adc 7>; /* A5 = P0.31 = AIN7 */ 118 }; 119 120 /* These aliases are provided for compatibility with samples */ 121 aliases { 122 led0 = &led0; 123 led1 = &led1; 124 led2 = &led2; 125 led3 = &led3; 126 pwm-led0 = &pwm_led0; 127 sw0 = &button0; 128 sw1 = &button1; 129 sw2 = &button2; 130 sw3 = &button3; 131 watchdog0 = &wdt0; 132 }; 133}; 134 135&adc { 136 status = "okay"; 137}; 138 139&uicr { 140 gpio-as-nreset; 141}; 142 143&gpiote { 144 status = "okay"; 145}; 146 147&gpio0 { 148 status = "okay"; 149}; 150 151&gpio1 { 152 status = "okay"; 153}; 154 155&uart0 { 156 compatible = "nordic,nrf-uarte"; 157 status = "okay"; 158 current-speed = <115200>; 159 pinctrl-0 = <&uart0_default>; 160 pinctrl-1 = <&uart0_sleep>; 161 pinctrl-names = "default", "sleep"; 162}; 163 164arduino_serial: &uart1 { 165 status = "okay"; 166 current-speed = <115200>; 167 pinctrl-0 = <&uart1_default>; 168 pinctrl-1 = <&uart1_sleep>; 169 pinctrl-names = "default", "sleep"; 170}; 171 172arduino_i2c: &i2c0 { 173 compatible = "nordic,nrf-twi"; 174 status = "okay"; 175 pinctrl-0 = <&i2c0_default>; 176 pinctrl-1 = <&i2c0_sleep>; 177 pinctrl-names = "default", "sleep"; 178}; 179 180&i2c1 { 181 compatible = "nordic,nrf-twi"; 182 /* Cannot be used together with spi1. */ 183 /* status = "okay"; */ 184 pinctrl-0 = <&i2c1_default>; 185 pinctrl-1 = <&i2c1_sleep>; 186 pinctrl-names = "default", "sleep"; 187}; 188 189&pwm0 { 190 status = "okay"; 191 pinctrl-0 = <&pwm0_default>; 192 pinctrl-1 = <&pwm0_sleep>; 193 pinctrl-names = "default", "sleep"; 194}; 195 196&spi0 { 197 compatible = "nordic,nrf-spi"; 198 /* Cannot be used together with i2c0. */ 199 /* status = "okay"; */ 200 pinctrl-0 = <&spi0_default>; 201 pinctrl-1 = <&spi0_sleep>; 202 pinctrl-names = "default", "sleep"; 203}; 204 205&spi1 { 206 compatible = "nordic,nrf-spi"; 207 status = "okay"; 208 pinctrl-0 = <&spi1_default>; 209 pinctrl-1 = <&spi1_sleep>; 210 pinctrl-names = "default", "sleep"; 211}; 212 213&spi2 { 214 compatible = "nordic,nrf-spi"; 215 status = "disabled"; 216 pinctrl-0 = <&spi2_default>; 217 pinctrl-1 = <&spi2_sleep>; 218 pinctrl-names = "default", "sleep"; 219}; 220 221&qspi { 222 status = "okay"; 223 pinctrl-0 = <&qspi_default>; 224 pinctrl-1 = <&qspi_sleep>; 225 pinctrl-names = "default", "sleep"; 226 mx25r64: mx25r6435f@0 { 227 compatible = "nordic,qspi-nor"; 228 reg = <0>; 229 /* MX25R64 supports only pp and pp4io */ 230 writeoc = "pp4io"; 231 /* MX25R64 supports all readoc options */ 232 readoc = "read4io"; 233 sck-frequency = <8000000>; 234 jedec-id = [c2 28 17]; 235 sfdp-bfp = [ 236 e5 20 f1 ff ff ff ff 03 237 44 eb 08 6b 08 3b 04 bb 238 ee ff ff ff ff ff 00 ff 239 ff ff 00 ff 0c 20 0f 52 240 10 d8 00 ff 23 72 f5 00 241 82 ed 04 cc 44 83 68 44 242 30 b0 30 b0 f7 c4 d5 5c 243 00 be 29 ff f0 d0 ff ff 244 ]; 245 size = <67108864>; 246 has-dpd; 247 t-enter-dpd = <10000>; 248 t-exit-dpd = <35000>; 249 }; 250}; 251 252arduino_spi: &spi3 { 253 status = "okay"; 254 cs-gpios = <&arduino_header 16 GPIO_ACTIVE_LOW>; /* D10 */ 255 pinctrl-0 = <&spi3_default>; 256 pinctrl-1 = <&spi3_sleep>; 257 pinctrl-names = "default", "sleep"; 258}; 259 260&ieee802154 { 261 status = "okay"; 262}; 263 264&flash0 { 265 266 partitions { 267 compatible = "fixed-partitions"; 268 #address-cells = <1>; 269 #size-cells = <1>; 270 271 boot_partition: partition@0 { 272 label = "mcuboot"; 273 reg = <0x00000000 0x0000C000>; 274 }; 275 slot0_partition: partition@c000 { 276 label = "image-0"; 277 reg = <0x0000C000 0x00067000>; 278 }; 279 slot1_partition: partition@73000 { 280 label = "image-1"; 281 reg = <0x00073000 0x00067000>; 282 }; 283 scratch_partition: partition@da000 { 284 label = "image-scratch"; 285 reg = <0x000da000 0x0001e000>; 286 }; 287 288 /* 289 * The flash starting at 0x000f8000 and ending at 290 * 0x000fffff is reserved for use by the application. 291 */ 292 293 /* 294 * Storage partition will be used by FCB/LittleFS/NVS 295 * if enabled. 296 */ 297 storage_partition: partition@f8000 { 298 label = "storage"; 299 reg = <0x000f8000 0x00008000>; 300 }; 301 }; 302}; 303 304zephyr_udc0: &usbd { 305 compatible = "nordic,nrf-usbd"; 306 status = "okay"; 307}; 308