1/* 2 * Copyright (c) 2019 Nordic Semiconductor 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7/dts-v1/; 8#include <nordic/nrf52811_qfaa.dtsi> 9#include "nrf52840dk_nrf52811-pinctrl.dtsi" 10#include <zephyr/dt-bindings/input/input-event-codes.h> 11 12/ { 13 model = "Nordic nRF52840 DK NRF52811"; 14 compatible = "nordic,nrf52840-dk-nrf52811"; 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 13 GPIO_ACTIVE_LOW>; 31 label = "Green LED 0"; 32 }; 33 led1: led_1 { 34 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; 35 label = "Green 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 /* These aliases are provided for compatibility with samples */ 79 aliases { 80 led0 = &led0; 81 led1 = &led1; 82 led2 = &led2; 83 led3 = &led3; 84 pwm-led0 = &pwm_led0; 85 sw0 = &button0; 86 sw1 = &button1; 87 sw2 = &button2; 88 sw3 = &button3; 89 bootloader-led0 = &led0; 90 mcuboot-button0 = &button0; 91 mcuboot-led0 = &led0; 92 watchdog0 = &wdt0; 93 }; 94}; 95 96® { 97 regulator-initial-mode = <NRF5X_REG_MODE_DCDC>; 98}; 99 100&adc { 101 status = "okay"; 102}; 103 104&uicr { 105 gpio-as-nreset; 106}; 107 108&gpiote { 109 status = "okay"; 110}; 111 112&gpio0 { 113 status = "okay"; 114}; 115 116&uart0 { 117 compatible = "nordic,nrf-uarte"; 118 status = "okay"; 119 current-speed = <115200>; 120 pinctrl-0 = <&uart0_default>; 121 pinctrl-1 = <&uart0_sleep>; 122 pinctrl-names = "default", "sleep"; 123}; 124 125&i2c0 { 126 compatible = "nordic,nrf-twi"; 127 status = "okay"; 128 /* Arduino compatible PINs */ 129 pinctrl-0 = <&i2c0_default>; 130 pinctrl-1 = <&i2c0_sleep>; 131 pinctrl-names = "default", "sleep"; 132}; 133 134&pwm0 { 135 status = "okay"; 136 pinctrl-0 = <&pwm0_default>; 137 pinctrl-1 = <&pwm0_sleep>; 138 pinctrl-names = "default", "sleep"; 139}; 140 141&spi0 { 142 compatible = "nordic,nrf-spi"; 143 status = "okay"; 144 pinctrl-0 = <&spi0_default>; 145 pinctrl-1 = <&spi0_sleep>; 146 pinctrl-names = "default", "sleep"; 147}; 148 149&spi1 { 150 compatible = "nordic,nrf-spi"; 151 /* cannot be used with i2c0 */ 152 pinctrl-0 = <&spi1_default>; 153 pinctrl-1 = <&spi1_sleep>; 154 pinctrl-names = "default", "sleep"; 155}; 156 157&flash0 { 158 159 partitions { 160 compatible = "fixed-partitions"; 161 #address-cells = <1>; 162 #size-cells = <1>; 163 164 boot_partition: partition@0 { 165 label = "mcuboot"; 166 reg = <0x00000000 0xc000>; 167 }; 168 slot0_partition: partition@c000 { 169 label = "image-0"; 170 reg = <0x0000C000 0xe000>; 171 }; 172 slot1_partition: partition@1a000 { 173 label = "image-1"; 174 reg = <0x0001a000 0xe000>; 175 }; 176 storage_partition: partition@28000 { 177 label = "storage"; 178 reg = <0x00028000 0x00008000>; 179 }; 180 }; 181}; 182