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