1/* 2 * Copyright (c) 2018-2023 Nordic Semiconductor ASA 3 * Copyright (c) 2017 Linaro Limited 4 * 5 * SPDX-License-Identifier: Apache-2.0 6 */ 7 8/dts-v1/; 9#include <nordic/nrf52840_qiaa.dtsi> 10#include "nrf52840dongle_nrf52840-pinctrl.dtsi" 11#include <zephyr/dt-bindings/input/input-event-codes.h> 12 13/ { 14 model = "Nordic nRF52840 Dongle NRF52840"; 15 compatible = "nordic,nrf52840-dongle-nrf52840"; 16 17 chosen { 18 zephyr,sram = &sram0; 19 zephyr,flash = &flash0; 20 zephyr,code-partition = &slot0_partition; 21 zephyr,ieee802154 = &ieee802154; 22 }; 23 24 leds { 25 compatible = "gpio-leds"; 26 led0_green: led_0 { 27 gpios = <&gpio0 6 GPIO_ACTIVE_LOW>; 28 label = "Green LED 0"; 29 }; 30 led1_red: led_1 { 31 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; 32 label = "Red LED 1"; 33 }; 34 led1_green: led_2 { 35 gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; 36 label = "Green LED 1"; 37 }; 38 led1_blue: led_3 { 39 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; 40 label = "Blue LED 1"; 41 }; 42 }; 43 44 pwmleds { 45 compatible = "pwm-leds"; 46 red_pwm_led: pwm_led_0 { 47 pwms = <&pwm0 0 PWM_MSEC(20) PWM_POLARITY_INVERTED>; 48 }; 49 green_pwm_led: pwm_led_1 { 50 pwms = <&pwm0 1 PWM_MSEC(20) PWM_POLARITY_INVERTED>; 51 }; 52 blue_pwm_led: pwm_led_2 { 53 pwms = <&pwm0 2 PWM_MSEC(20) PWM_POLARITY_INVERTED>; 54 }; 55 }; 56 57 buttons { 58 compatible = "gpio-keys"; 59 button0: button_0 { 60 gpios = <&gpio1 6 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; 61 label = "Push button switch 0"; 62 zephyr,code = <INPUT_KEY_0>; 63 }; 64 }; 65 66 /* These aliases are provided for compatibility with samples */ 67 aliases { 68 sw0 = &button0; 69 led0 = &led0_green; 70 led1 = &led1_red; 71 led2 = &led1_green; 72 led3 = &led1_blue; 73 led0-green = &led0_green; 74 led1-red = &led1_red; 75 led1-green = &led1_green; 76 led1-blue = &led1_blue; 77 pwm-led0 = &red_pwm_led; 78 pwm-led1 = &green_pwm_led; 79 pwm-led2 = &blue_pwm_led; 80 red-pwm-led = &red_pwm_led; 81 green-pwm-led = &green_pwm_led; 82 blue-pwm-led = &blue_pwm_led; 83 mcuboot-button0 = &button0; 84 mcuboot-led0 = &led0_green; 85 watchdog0 = &wdt0; 86 }; 87}; 88 89®0 { 90 status = "okay"; 91}; 92 93®1 { 94 regulator-initial-mode = <NRF5X_REG_MODE_DCDC>; 95}; 96 97&adc { 98 status = "okay"; 99}; 100 101&gpiote { 102 status = "okay"; 103}; 104 105&uicr { 106 nfct-pins-as-gpios; 107 gpio-as-nreset; 108}; 109 110&gpio0 { 111 status = "okay"; 112}; 113 114&gpio1 { 115 status = "okay"; 116}; 117 118&uart0 { 119 compatible = "nordic,nrf-uarte"; 120 status = "okay"; 121 current-speed = <115200>; 122 pinctrl-0 = <&uart0_default>; 123 pinctrl-1 = <&uart0_sleep>; 124 pinctrl-names = "default", "sleep"; 125}; 126 127&i2c0 { 128 compatible = "nordic,nrf-twi"; 129 status = "okay"; 130 pinctrl-0 = <&i2c0_default>; 131 pinctrl-1 = <&i2c0_sleep>; 132 pinctrl-names = "default", "sleep"; 133}; 134 135&i2c1 { 136 compatible = "nordic,nrf-twi"; 137 /* Cannot be used together with spi1. */ 138 /* status = "okay"; */ 139 pinctrl-0 = <&i2c1_default>; 140 pinctrl-1 = <&i2c1_sleep>; 141 pinctrl-names = "default", "sleep"; 142}; 143 144&pwm0 { 145 status = "okay"; 146 pinctrl-0 = <&pwm0_default>; 147 pinctrl-1 = <&pwm0_sleep>; 148 pinctrl-names = "default", "sleep"; 149}; 150 151/* 152 * By default, not adding all available SPI instances (spi2, spi3) due to 153 * limited GPIOs available on dongle board. 154 */ 155&spi0 { 156 compatible = "nordic,nrf-spi"; 157 /* Cannot be used together with i2c0. */ 158 /* status = "okay"; */ 159 pinctrl-0 = <&spi0_default>; 160 pinctrl-1 = <&spi0_sleep>; 161 pinctrl-names = "default", "sleep"; 162}; 163 164&spi1 { 165 compatible = "nordic,nrf-spi"; 166 status = "okay"; 167 pinctrl-0 = <&spi1_default>; 168 pinctrl-1 = <&spi1_sleep>; 169 pinctrl-names = "default", "sleep"; 170}; 171 172&ieee802154 { 173 status = "okay"; 174}; 175 176/* Include flash partition table. 177 * Two partition tables are available: 178 * fstab-stock -compatible with Nordic nRF5 bootloader, default 179 * fstab-debugger -to use an external debugger, w/o the nRF5 bootloader 180 */ 181#include "fstab-stock.dtsi" 182 183zephyr_udc0: &usbd { 184 compatible = "nordic,nrf-usbd"; 185 status = "okay"; 186}; 187 188#include <../boards/common/usb/cdc_acm_serial.dtsi> 189