1/* 2 * Copyright (c) 2022 Marcin Niestroj 3 * Copyright (c) 2022 Peter Johanson 4 * 5 * SPDX-License-Identifier: Apache-2.0 6 */ 7 8#include <nordic/nrf52840_qiaa.dtsi> 9#include "xiao_ble-pinctrl.dtsi" 10#include "seeed_xiao_connector.dtsi" 11 12/ { 13 chosen { 14 zephyr,console = &usb_cdc_acm_uart; 15 zephyr,shell-uart = &usb_cdc_acm_uart; 16 zephyr,uart-mcumgr = &usb_cdc_acm_uart; 17 zephyr,bt-mon-uart = &usb_cdc_acm_uart; 18 zephyr,bt-c2h-uart = &usb_cdc_acm_uart; 19 zephyr,sram = &sram0; 20 zephyr,flash = &flash0; 21 zephyr,code-partition = &code_partition; 22 zephyr,ieee802154 = &ieee802154; 23 }; 24 25 leds { 26 compatible = "gpio-leds"; 27 led0: led_0 { 28 gpios = <&gpio0 26 GPIO_ACTIVE_LOW>; 29 label = "Red LED"; 30 }; 31 led1: led_1 { 32 gpios = <&gpio0 30 GPIO_ACTIVE_LOW>; 33 label = "Green LED"; 34 }; 35 led2: led_2 { 36 gpios = <&gpio0 6 GPIO_ACTIVE_LOW>; 37 label = "Blue LED"; 38 }; 39 }; 40 41 pwmleds { 42 compatible = "pwm-leds"; 43 pwm_led0: pwm_led_0 { 44 pwms = <&pwm0 0 PWM_MSEC(20) PWM_POLARITY_INVERTED>; 45 }; 46 }; 47 48 /* These aliases are provided for compatibility with samples */ 49 aliases { 50 led0 = &led0; 51 led1 = &led1; 52 led2 = &led2; 53 pwm-led0 = &pwm_led0; 54 bootloader-led0 = &led0; 55 mcuboot-led0 = &led0; 56 watchdog0 = &wdt0; 57 spi-flash0 = &p25q16h; 58 }; 59}; 60 61&adc { 62 status = "okay"; 63}; 64 65&uicr { 66 gpio-as-nreset; 67}; 68 69&gpiote { 70 status = "okay"; 71}; 72 73&gpio0 { 74 status = "okay"; 75}; 76 77&gpio1 { 78 status = "okay"; 79}; 80 81&uart0 { 82 compatible = "nordic,nrf-uarte"; 83 status = "okay"; 84 current-speed = <115200>; 85 pinctrl-0 = <&uart0_default>; 86 pinctrl-1 = <&uart0_sleep>; 87 pinctrl-names = "default", "sleep"; 88}; 89 90&i2c1 { 91 compatible = "nordic,nrf-twi"; 92 /* Cannot be used together with spi1. */ 93 status = "okay"; 94 pinctrl-0 = <&i2c1_default>; 95 pinctrl-1 = <&i2c1_sleep>; 96 pinctrl-names = "default", "sleep"; 97}; 98 99&pwm0 { 100 status = "okay"; 101 pinctrl-0 = <&pwm0_default>; 102 pinctrl-1 = <&pwm0_sleep>; 103 pinctrl-names = "default", "sleep"; 104}; 105 106&spi2 { 107 compatible = "nordic,nrf-spi"; 108 status = "okay"; 109 pinctrl-0 = <&spi2_default>; 110 pinctrl-1 = <&spi2_sleep>; 111 pinctrl-names = "default", "sleep"; 112}; 113 114&qspi { 115 status = "okay"; 116 pinctrl-0 = <&qspi_default>; 117 pinctrl-1 = <&qspi_sleep>; 118 pinctrl-names = "default", "sleep"; 119 p25q16h: p25q16h@0 { 120 compatible = "nordic,qspi-nor"; 121 reg = <0>; 122 sck-frequency = <104000000>; 123 quad-enable-requirements = "S2B1v1"; 124 jedec-id = [85 60 15]; 125 sfdp-bfp = [ 126 e5 20 f1 ff ff ff ff 00 44 eb 08 6b 08 3b 80 bb 127 ee ff ff ff ff ff 00 ff ff ff 00 ff 0c 20 0f 52 128 10 d8 08 81 129 ]; 130 size = <16777216>; 131 has-dpd; 132 t-enter-dpd = <3000>; 133 t-exit-dpd = <8000>; 134 }; 135}; 136 137&ieee802154 { 138 status = "okay"; 139}; 140 141&flash0 { 142 partitions { 143 compatible = "fixed-partitions"; 144 #address-cells = <1>; 145 #size-cells = <1>; 146 147 sd_partition: partition@0 { 148 label = "softdevice"; 149 reg = <0x00000000 0x00027000>; 150 }; 151 152 code_partition: partition@27000 { 153 label = "code_partition"; 154 reg = <0x00027000 0x000c5000>; 155 }; 156 157 /* 158 * The flash starting at 0x000ec000 and ending at 159 * 0x000f3fff is reserved for use by the application. 160 * 161 * Storage partition will be used by FCB/LittleFS/NVS 162 * if enabled. 163 */ 164 storage_partition: partition@ec000 { 165 label = "storage"; 166 reg = <0x000ec000 0x00008000>; 167 }; 168 169 boot_partition: partition@f4000 { 170 label = "adafruit_boot"; 171 reg = <0x000f4000 0x0000c000>; 172 }; 173 }; 174}; 175 176zephyr_udc0: &usbd { 177 compatible = "nordic,nrf-usbd"; 178 status = "okay"; 179 180 usb_cdc_acm_uart: cdc-acm-uart { 181 compatible = "zephyr,cdc-acm-uart"; 182 }; 183}; 184