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&adc { 97 status = "okay"; 98}; 99 100&uicr { 101 gpio-as-nreset; 102}; 103 104&gpiote { 105 status = "okay"; 106}; 107 108&gpio0 { 109 status = "okay"; 110}; 111 112&uart0 { 113 compatible = "nordic,nrf-uarte"; 114 status = "okay"; 115 current-speed = <115200>; 116 pinctrl-0 = <&uart0_default>; 117 pinctrl-1 = <&uart0_sleep>; 118 pinctrl-names = "default", "sleep"; 119}; 120 121&i2c0 { 122 compatible = "nordic,nrf-twi"; 123 status = "okay"; 124 /* Arduino compatible PINs */ 125 pinctrl-0 = <&i2c0_default>; 126 pinctrl-1 = <&i2c0_sleep>; 127 pinctrl-names = "default", "sleep"; 128}; 129 130&pwm0 { 131 status = "okay"; 132 pinctrl-0 = <&pwm0_default>; 133 pinctrl-1 = <&pwm0_sleep>; 134 pinctrl-names = "default", "sleep"; 135}; 136 137&spi0 { 138 compatible = "nordic,nrf-spi"; 139 status = "okay"; 140 pinctrl-0 = <&spi0_default>; 141 pinctrl-1 = <&spi0_sleep>; 142 pinctrl-names = "default", "sleep"; 143}; 144 145&spi1 { 146 compatible = "nordic,nrf-spi"; 147 /* cannot be used with i2c0 */ 148 pinctrl-0 = <&spi1_default>; 149 pinctrl-1 = <&spi1_sleep>; 150 pinctrl-names = "default", "sleep"; 151}; 152 153&flash0 { 154 155 partitions { 156 compatible = "fixed-partitions"; 157 #address-cells = <1>; 158 #size-cells = <1>; 159 160 boot_partition: partition@0 { 161 label = "mcuboot"; 162 reg = <0x00000000 0xc000>; 163 }; 164 slot0_partition: partition@c000 { 165 label = "image-0"; 166 reg = <0x0000C000 0xe000>; 167 }; 168 slot1_partition: partition@1a000 { 169 label = "image-1"; 170 reg = <0x0001a000 0xe000>; 171 }; 172 storage_partition: partition@28000 { 173 label = "storage"; 174 reg = <0x00028000 0x00008000>; 175 }; 176 }; 177}; 178