1/* 2 * Copyright (c) 2021 u-blox AG 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7/dts-v1/; 8#include <nordic/nrf52810_qfaa.dtsi> 9#include "ubx_bmd330eval_nrf52810-pinctrl.dtsi" 10#include <zephyr/dt-bindings/input/input-event-codes.h> 11 12/ { 13 model = "u-blox BMD-330-EVAL EVK nRF52810"; 14 compatible = "u-blox,ubx-bmd330eval-nrf52810"; 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 compatible = "nordic,nrf-uarte"; 154 status = "okay"; 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&pwm0 { 170 status = "okay"; 171 pinctrl-0 = <&pwm0_default>; 172 pinctrl-1 = <&pwm0_sleep>; 173 pinctrl-names = "default", "sleep"; 174}; 175 176arduino_spi: &spi0 { 177 compatible = "nordic,nrf-spi"; 178 status = "okay"; 179 cs-gpios = <&arduino_header 16 GPIO_ACTIVE_LOW>; /* D10 */ 180 pinctrl-0 = <&spi0_default>; 181 pinctrl-1 = <&spi0_sleep>; 182 pinctrl-names = "default", "sleep"; 183}; 184 185&flash0 { 186 187 partitions { 188 compatible = "fixed-partitions"; 189 #address-cells = <1>; 190 #size-cells = <1>; 191 192 boot_partition: partition@0 { 193 label = "mcuboot"; 194 reg = <0x00000000 0xc000>; 195 }; 196 slot0_partition: partition@c000 { 197 label = "image-0"; 198 reg = <0x0000C000 0xd000>; 199 }; 200 slot1_partition: partition@19000 { 201 label = "image-1"; 202 reg = <0x00019000 0xd000>; 203 }; 204 scratch_partition: partition@26000 { 205 label = "image-scratch"; 206 reg = <0x00026000 0x3000>; 207 }; 208 storage_partition: partition@29000 { 209 label = "storage"; 210 reg = <0x00029000 0x00007000>; 211 }; 212 }; 213}; 214