1/* 2 * Copyright (c) 2020 u-blox AG 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7/dts-v1/; 8#include <nordic/nrf52832_qfaa.dtsi> 9#include "ubx_bmd300eval_nrf52832-pinctrl.dtsi" 10#include <zephyr/dt-bindings/input/input-event-codes.h> 11 12/ { 13 model = "u-blox BMD-300-EVAL EVK nRF52832"; 14 compatible = "u-blox,ubx-bmd300eval-nrf52832"; 15 16 chosen { 17 zephyr,console = &uart0; 18 zephyr,shell-uart = &uart0; 19 zephyr,uart-mcumgr = &uart0; 20 zephyr,bt-mon-uart = &uart0; 21 zephyr,bt-c2h-uart = &uart0; 22 zephyr,sram = &sram0; 23 zephyr,flash = &flash0; 24 zephyr,code-partition = &slot0_partition; 25 }; 26 27 leds { 28 compatible = "gpio-leds"; 29 led0: led_0 { 30 gpios = <&gpio0 17 GPIO_ACTIVE_LOW>; 31 label = "Red LED 0"; 32 }; 33 led1: led_1 { 34 gpios = <&gpio0 18 GPIO_ACTIVE_LOW>; 35 label = "Red LED 1"; 36 }; 37 led2: led_2 { 38 gpios = <&gpio0 19 GPIO_ACTIVE_LOW>; 39 label = "Green LED 2"; 40 }; 41 led3: led_3 { 42 gpios = <&gpio0 20 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 13 (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 14 (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 15 (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 16 (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 &gpio0 11 0>, /* D0 */ 90 <7 0 &gpio0 12 0>, /* D1 */ 91 <8 0 &gpio0 13 0>, /* D2 */ 92 <9 0 &gpio0 14 0>, /* D3 */ 93 <10 0 &gpio0 15 0>, /* D4 */ 94 <11 0 &gpio0 16 0>, /* D5 */ 95 <12 0 &gpio0 17 0>, /* D6 */ 96 <13 0 &gpio0 18 0>, /* D7 */ 97 <14 0 &gpio0 19 0>, /* D8 */ 98 <15 0 &gpio0 20 0>, /* D9 */ 99 <16 0 &gpio0 22 0>, /* D10 */ 100 <17 0 &gpio0 23 0>, /* D11 */ 101 <18 0 &gpio0 24 0>, /* D12 */ 102 <19 0 &gpio0 25 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 bootloader-led0 = &led0; 130 mcuboot-button0 = &button0; 131 mcuboot-led0 = &led0; 132 watchdog0 = &wdt0; 133 }; 134}; 135 136&adc { 137 status = "okay"; 138}; 139 140&uicr { 141 gpio-as-nreset; 142}; 143 144&gpiote { 145 status = "okay"; 146}; 147 148&gpio0 { 149 status = "okay"; 150}; 151 152arduino_serial: &uart0 { 153 status = "okay"; 154 compatible = "nordic,nrf-uarte"; 155 current-speed = <115200>; 156 pinctrl-0 = <&uart0_default>; 157 pinctrl-1 = <&uart0_sleep>; 158 pinctrl-names = "default", "sleep"; 159}; 160 161arduino_i2c: &i2c0 { 162 compatible = "nordic,nrf-twi"; 163 status = "okay"; 164 pinctrl-0 = <&i2c0_default>; 165 pinctrl-1 = <&i2c0_sleep>; 166 pinctrl-names = "default", "sleep"; 167}; 168 169&i2c1 { 170 compatible = "nordic,nrf-twi"; 171 /* Cannot be used together with spi1. */ 172 /* status = "okay"; */ 173 pinctrl-0 = <&i2c1_default>; 174 pinctrl-1 = <&i2c1_sleep>; 175 pinctrl-names = "default", "sleep"; 176}; 177 178&pwm0 { 179 status = "okay"; 180 pinctrl-0 = <&pwm0_default>; 181 pinctrl-1 = <&pwm0_sleep>; 182 pinctrl-names = "default", "sleep"; 183}; 184 185&spi0 { 186 compatible = "nordic,nrf-spi"; 187 /* Cannot be used together with i2c0. */ 188 /* status = "okay"; */ 189 pinctrl-0 = <&spi0_default>; 190 pinctrl-1 = <&spi0_sleep>; 191 pinctrl-names = "default", "sleep"; 192}; 193 194&spi1 { 195 compatible = "nordic,nrf-spi"; 196 status = "okay"; 197 pinctrl-0 = <&spi1_default>; 198 pinctrl-1 = <&spi1_sleep>; 199 pinctrl-names = "default", "sleep"; 200}; 201 202arduino_spi: &spi2 { 203 compatible = "nordic,nrf-spi"; 204 status = "okay"; 205 cs-gpios = <&arduino_header 16 GPIO_ACTIVE_LOW>; /* D10 */ 206 pinctrl-0 = <&spi2_default>; 207 pinctrl-1 = <&spi2_sleep>; 208 pinctrl-names = "default", "sleep"; 209}; 210 211&flash0 { 212 213 partitions { 214 compatible = "fixed-partitions"; 215 #address-cells = <1>; 216 #size-cells = <1>; 217 218 boot_partition: partition@0 { 219 label = "mcuboot"; 220 reg = <0x00000000 0xc000>; 221 }; 222 slot0_partition: partition@c000 { 223 label = "image-0"; 224 reg = <0x0000C000 0x32000>; 225 }; 226 slot1_partition: partition@3e000 { 227 label = "image-1"; 228 reg = <0x0003E000 0x32000>; 229 }; 230 scratch_partition: partition@70000 { 231 label = "image-scratch"; 232 reg = <0x00070000 0xa000>; 233 }; 234 storage_partition: partition@7a000 { 235 label = "storage"; 236 reg = <0x0007a000 0x00006000>; 237 }; 238 }; 239}; 240