1/* 2 * Copyright (c) 2018 Endre Karlson 3 * Copyright (c) 2018 Peter Bigot Consulting, LLC 4 * 5 * SPDX-License-Identifier: Apache-2.0 6 */ 7 8/* Assignments common to all Feather-based Particle mesh boards. 9 * 10 * NOTE: This file is replicated in particle_{argon,boron,xenon}. 11 * Changes should be made in all instances. */ 12#include "mesh_feather-pinctrl.dtsi" 13#include <zephyr/dt-bindings/input/input-event-codes.h> 14 15/ { 16 aliases { 17 led0 = &user_led; 18 led1 = &status_red; 19 led2 = &status_green; 20 led3 = &status_blue; 21 sw0 = &mode_button; 22 sw1 = &reset_button; 23 }; 24 25 chosen { 26 zephyr,console = &uart0; 27 zephyr,uart-mcumgr = &uart0; 28 zephyr,shell-uart = &uart0; 29 zephyr,sram = &sram0; 30 zephyr,flash = &flash0; 31 zephyr,code-partition = &slot0_partition; 32 zephyr,ieee802154 = &ieee802154; 33 }; 34 35 leds { 36 compatible = "gpio-leds"; 37 user_led: led_0 { 38 gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>; 39 label = "User LED"; 40 }; 41 status_red: led_1 { 42 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; 43 label = "Red LED"; 44 }; 45 status_green: led_2 { 46 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; 47 label = "Green LED"; 48 }; 49 status_blue: led_3 { 50 gpios = <&gpio0 15 GPIO_ACTIVE_LOW>; 51 label = "Blue LED"; 52 }; 53 }; 54 55 gpio_keys { 56 compatible = "gpio-keys"; 57 mode_button: button_0 { 58 gpios = <&gpio0 11 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; 59 label = "Mode Button"; 60 zephyr,code = <INPUT_BTN_MODE>; 61 }; 62 63 reset_button: button_1 { 64 gpios = <&gpio0 18 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; 65 label = "Reset Button"; 66 zephyr,code = <INPUT_KEY_1>; 67 }; 68 }; 69 70 mesh_header: connector { 71 compatible = "particle-gen3-header"; 72 #gpio-cells = <2>; 73 gpio-map-mask = <0xffffffff 0xffffffc0>; 74 gpio-map-pass-thru = <0 0x3f>; 75 gpio-map = <0 0 &gpio0 26 0>, /* SDA */ 76 <1 0 &gpio0 27 0>, /* SCL */ 77 <2 0 &gpio1 1 0>, /* PWM3 */ 78 <3 0 &gpio1 2 0>, /* PWM3 */ 79 <4 0 &gpio1 8 0>, /* PWM1 */ 80 <5 0 &gpio1 10 0>, /* PWM1 */ 81 <6 0 &gpio1 11 0>, /* PWM1 */ 82 <7 0 &gpio1 12 0>, /* PWM0 */ 83 <8 0 &gpio1 3 0>, /* PWM1 */ 84 <9 0 &gpio0 6 0>, /* TX */ 85 <10 0 &gpio0 8 0>, /* RX */ 86 <11 0 &gpio1 14 0>, /* MISO */ 87 <12 0 &gpio1 13 0>, /* MOSI */ 88 <13 0 &gpio1 15 0>, /* SCK */ 89 <14 0 &gpio0 31 0>, /* SS */ 90 <15 0 &gpio0 30 0>, /* ADC4 = AIN6 */ 91 <16 0 &gpio0 29 0>, /* ADC3 = AIN5 */ 92 <17 0 &gpio0 28 0>, /* ADC2 = AIN4 */ 93 <18 0 &gpio0 4 0>, /* ADC1 = AIN2 */ 94 <19 0 &gpio0 3 0>, /* ADC0 = AIN1 */ 95 <20 0 &gpio0 11 0>, /* MODEn */ 96 <21 0 &gpio0 18 0>; /* RESETn */ 97 }; 98 99 feather_header: feather_connector { 100 compatible = "adafruit-feather-header"; 101 #gpio-cells = <2>; 102 gpio-map-mask = <0xffffffff 0xffffffc0>; 103 gpio-map-pass-thru = <0 0x3f>; 104 gpio-map = <12 0 &gpio0 26 0>, /* SDA */ 105 <13 0 &gpio0 27 0>, /* SCL */ 106 <14 0 &gpio1 1 0>, /* PWM3 */ 107 <15 0 &gpio1 2 0>, /* PWM3 */ 108 <16 0 &gpio1 8 0>, /* PWM1 */ 109 <17 0 &gpio1 10 0>, /* PWM1 */ 110 <18 0 &gpio1 11 0>, /* PWM1 */ 111 <19 0 &gpio1 12 0>, /* PWM0 */ 112 <20 0 &gpio1 3 0>, /* PWM1 */ 113 /* 11 not connected */ 114 <10 0 &gpio0 6 0>, /* TX */ 115 <9 0 &gpio0 8 0>, /* RX */ 116 <8 0 &gpio1 14 0>, /* MISO */ 117 <7 0 &gpio1 13 0>, /* MOSI */ 118 <6 0 &gpio1 15 0>, /* SCK */ 119 <5 0 &gpio0 31 0>, /* SS */ 120 <4 0 &gpio0 30 0>, /* ADC4 = AIN6 */ 121 <3 0 &gpio0 29 0>, /* ADC3 = AIN5 */ 122 <2 0 &gpio0 28 0>, /* ADC2 = AIN4 */ 123 <1 0 &gpio0 4 0>, /* ADC1 = AIN2 */ 124 <0 0 &gpio0 3 0>; /* ADC0 = AIN1 */ 125 }; 126}; 127 128feather_adc: &adc { /* feather ADC */ 129 status = "okay"; 130}; 131 132&ieee802154 { 133 status = "okay"; 134}; 135 136&flash0 { 137 partitions { 138 compatible = "fixed-partitions"; 139 #address-cells = <1>; 140 #size-cells = <1>; 141 142 boot_partition: partition@0 { 143 label = "mcuboot"; 144 reg = <0x00000000 0x0000C000>; 145 }; 146 slot0_partition: partition@c000 { 147 label = "image-0"; 148 reg = <0x0000C000 0x00067000>; 149 }; 150 slot1_partition: partition@73000 { 151 label = "image-1"; 152 reg = <0x00073000 0x00067000>; 153 }; 154 scratch_partition: partition@da000 { 155 label = "image-scratch"; 156 reg = <0x000da000 0x0001e000>; 157 }; 158 159 /* 160 * The flash starting at 0x000f8000 and ending at 161 * 0x000fffff is reserved for use by the application. 162 */ 163 164 /* 165 * Storage partition will be used by FCB/LittleFS/NVS 166 * if enabled. 167 */ 168 storage_partition: partition@f8000 { 169 label = "storage"; 170 reg = <0x000f8000 0x00008000>; 171 }; 172 }; 173}; 174 175&gpio0 { 176 status = "okay"; 177}; 178 179&gpio1 { 180 status = "okay"; 181}; 182 183&gpiote { 184 status = "okay"; 185}; 186 187arduino_i2c: &i2c0 { /* feather I2C */ 188 compatible = "nordic,nrf-twi"; 189 status = "okay"; 190 clock-frequency = <I2C_BITRATE_FAST>; 191 pinctrl-0 = <&i2c0_default>; 192 pinctrl-1 = <&i2c0_sleep>; 193 pinctrl-names = "default", "sleep"; 194}; 195 196feather_i2c: &i2c0 { }; 197 198/* TWI1 used on Boron; also see mesh_feather_spi_spi1.dtsi */ 199 200&spi2 { /* dedicated MX25L */ 201 compatible = "nordic,nrf-spi"; 202 status = "okay"; 203 cs-gpios = <&gpio0 17 GPIO_ACTIVE_LOW>; 204 pinctrl-0 = <&spi2_default>; 205 pinctrl-1 = <&spi2_sleep>; 206 pinctrl-names = "default", "sleep"; 207 mx25l32: mx25l3233f@0 { 208 compatible = "jedec,spi-nor"; 209 reg = <0>; 210 spi-max-frequency = <80000000>; 211 wp-gpios = <&gpio0 22 GPIO_ACTIVE_LOW>; 212 hold-gpios = <&gpio0 23 GPIO_ACTIVE_LOW>; 213 size = <0x2000000>; 214 has-dpd; 215 t-enter-dpd = <10000>; 216 t-exit-dpd = <100000>; 217 jedec-id = [c2 20 16]; 218 sfdp-bfp = [ 219 e5 20 f1 ff ff ff ff 01 44 eb 08 6b 08 3b 04 bb 220 ee ff ff ff ff ff 00 ff ff ff 00 ff 0c 20 0f 52 221 10 d8 00 ff 222 ]; 223 }; 224}; 225 226/* see mesh_feather_spi1_spi3.dtsi */ 227 228feather_serial: &uart0 { /* feather UART1 */ 229 compatible = "nordic,nrf-uarte"; 230 current-speed = <115200>; 231 status = "okay"; 232 /* optional mesh_feather_uart1_rtscts.dtsi */ 233 pinctrl-0 = <&uart0_default>; 234 pinctrl-1 = <&uart0_sleep>; 235 pinctrl-names = "default", "sleep"; 236}; 237 238zephyr_udc0: &usbd { 239 compatible = "nordic,nrf-usbd"; 240 status = "okay"; 241}; 242