1/* 2 * PAN1780 EVB configuration 3 * 4 * Copyright (c) 2022 Panasonic Industrial Devices Europe GmbH 5 * SPDX-License-Identifier: Apache-2.0 6 */ 7 8/dts-v1/; 9#include <nordic/nrf52840_qiaa.dtsi> 10#include "pan1780_evb-pinctrl.dtsi" 11#include <zephyr/dt-bindings/input/input-event-codes.h> 12 13/ { 14 model = "pan1780-evb"; 15 compatible = "panasonic-industrial-devices-europe-gmbh,pan1780-evb"; 16 17 chosen { 18 zephyr,console = &uart0; 19 zephyr,shell-uart = &uart0; 20 zephyr,uart-mcumgr = &uart0; 21 zephyr,bt-mon-uart = &uart0; 22 zephyr,bt-c2h-uart = &uart0; 23 zephyr,sram = &sram0; 24 zephyr,flash = &flash0; 25 zephyr,code-partition = &slot0_partition; 26 zephyr,ieee802154 = &ieee802154; 27 }; 28 29 leds { 30 compatible = "gpio-leds"; 31 evb_led1: evb_led_1 { 32 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; 33 label = "LED1 on EVB"; 34 }; 35 evb_led2: evb_led_2 { 36 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; 37 label = "LED2 on EVB"; 38 }; 39 evb_led3: evb_led_3 { 40 gpios = <&gpio0 15 GPIO_ACTIVE_LOW>; 41 label = "LED3 on EVB"; 42 }; 43 evb_led4: evb_led_4 { 44 gpios = <&gpio0 16 GPIO_ACTIVE_LOW>; 45 label = "LED4 on EVB"; 46 }; 47 }; 48 49 pwmleds { 50 compatible = "pwm-leds"; 51 pwm_evb_led1: pwm_evb_led_1 { 52 pwms = <&pwm0 0 PWM_MSEC(20) PWM_POLARITY_INVERTED>; 53 }; 54 }; 55 56 buttons { 57 compatible = "gpio-keys"; 58 evb_sw1: evb_sw_1 { 59 gpios = <&gpio0 11 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; 60 label = "SW1 on EVB"; 61 zephyr,code = <INPUT_KEY_0>; 62 }; 63 evb_sw2: evb_sw_2 { 64 gpios = <&gpio0 12 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; 65 label = "SW2 on EVB"; 66 zephyr,code = <INPUT_KEY_1>; 67 }; 68 evb_sw3: evb_sw_3 { 69 gpios = <&gpio0 24 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; 70 label = "SW3 on EVB"; 71 zephyr,code = <INPUT_KEY_2>; 72 }; 73 evb_sw4: evb_sw_4 { 74 gpios = <&gpio0 25 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; 75 label = "SW4 on EVB"; 76 zephyr,code = <INPUT_KEY_3>; 77 }; 78 }; 79 80 arduino_header: connector { 81 compatible = "arduino-header-r3"; 82 #gpio-cells = <2>; 83 gpio-map-mask = <0xffffffff 0xffffffc0>; 84 gpio-map-pass-thru = <0 0x3f>; 85 gpio-map = <0 0 &gpio0 3 0>, /* A0 */ 86 <1 0 &gpio0 4 0>, /* A1 */ 87 <2 0 &gpio0 28 0>, /* A2 */ 88 <3 0 &gpio0 29 0>, /* A3 */ 89 <4 0 &gpio0 30 0>, /* A4 */ 90 <5 0 &gpio0 31 0>, /* A5 */ 91 <6 0 &gpio1 1 0>, /* D0 */ 92 <7 0 &gpio1 2 0>, /* D1 */ 93 <8 0 &gpio1 3 0>, /* D2 */ 94 <9 0 &gpio1 4 0>, /* D3 */ 95 <10 0 &gpio1 5 0>, /* D4 */ 96 <11 0 &gpio1 6 0>, /* D5 */ 97 <12 0 &gpio1 7 0>, /* D6 */ 98 <13 0 &gpio1 8 0>, /* D7 */ 99 <14 0 &gpio1 10 0>, /* D8 */ 100 <15 0 &gpio1 11 0>, /* D9 */ 101 <16 0 &gpio0 12 0>, /* D10 */ 102 <17 0 &gpio0 13 0>, /* D11 */ 103 <18 0 &gpio0 14 0>, /* D12 */ 104 <19 0 &gpio0 15 0>, /* D13 */ 105 <20 0 &gpio0 26 0>, /* D14 */ 106 <21 0 &gpio0 27 0>; /* D15 */ 107 }; 108 109 arduino_adc: analog-connector { 110 compatible = "arduino,uno-adc"; 111 #io-channel-cells = <1>; 112 io-channel-map = <0 &adc 1>, /* A0 = P0.3 = AIN1 */ 113 <1 &adc 2>, /* A1 = P0.4 = AIN2 */ 114 <2 &adc 4>, /* A2 = P0.28 = AIN4 */ 115 <3 &adc 5>, /* A3 = P0.29 = AIN5 */ 116 <4 &adc 6>, /* A4 = P0.30 = AIN6 */ 117 <5 &adc 7>; /* A5 = P0.31 = AIN7 */ 118 }; 119 120 /* These aliases are provided for compatibility with samples */ 121 aliases { 122 led0 = &evb_led1; 123 led1 = &evb_led2; 124 led2 = &evb_led3; 125 led3 = &evb_led4; 126 pwm-led0 = &pwm_evb_led1; 127 sw0 = &evb_sw1; 128 sw1 = &evb_sw2; 129 sw2 = &evb_sw3; 130 sw3 = &evb_sw4; 131 bootloader-led0 = &evb_led1; 132 watchdog0 = &wdt0; 133 }; 134}; 135 136®0 { 137 status = "okay"; 138}; 139 140®1 { 141 regulator-initial-mode = <NRF5X_REG_MODE_DCDC>; 142}; 143 144&adc { 145 status = "okay"; 146}; 147 148&uicr { 149 gpio-as-nreset; 150}; 151 152&gpiote { 153 status = "okay"; 154}; 155 156&gpio0 { 157 status = "okay"; 158}; 159 160&gpio1 { 161 status = "okay"; 162}; 163 164&uart0 { 165 compatible = "nordic,nrf-uarte"; 166 status = "okay"; 167 current-speed = <115200>; 168 pinctrl-0 = <&uart0_default>; 169 pinctrl-1 = <&uart0_sleep>; 170 pinctrl-names = "default", "sleep"; 171}; 172 173arduino_serial: &uart1 { 174 status = "okay"; 175 current-speed = <115200>; 176 pinctrl-0 = <&uart1_default>; 177 pinctrl-1 = <&uart1_sleep>; 178 pinctrl-names = "default", "sleep"; 179}; 180 181arduino_i2c: &i2c0 { 182 compatible = "nordic,nrf-twi"; 183 status = "okay"; 184 pinctrl-0 = <&i2c0_default>; 185 pinctrl-1 = <&i2c0_sleep>; 186 pinctrl-names = "default", "sleep"; 187}; 188 189&i2c1 { 190 compatible = "nordic,nrf-twi"; 191 /* Cannot be used together with spi1, so disabled by default. */ 192 pinctrl-0 = <&i2c1_default>; 193 pinctrl-1 = <&i2c1_sleep>; 194 pinctrl-names = "default", "sleep"; 195}; 196 197&pwm0 { 198 status = "okay"; 199 pinctrl-0 = <&pwm0_default>; 200 pinctrl-1 = <&pwm0_sleep>; 201 pinctrl-names = "default", "sleep"; 202}; 203 204&spi0 { 205 compatible = "nordic,nrf-spi"; 206 /* Cannot be used together with i2c0, so disabled by default. */ 207 pinctrl-0 = <&spi0_default>; 208 pinctrl-1 = <&spi0_sleep>; 209 pinctrl-names = "default", "sleep"; 210}; 211 212&spi1 { 213 compatible = "nordic,nrf-spi"; 214 status = "okay"; 215 pinctrl-0 = <&spi1_default>; 216 pinctrl-1 = <&spi1_sleep>; 217 pinctrl-names = "default", "sleep"; 218}; 219 220&spi2 { 221 compatible = "nordic,nrf-spi"; 222 /* Disabled by default in nrf52840.dtsi. */ 223 pinctrl-0 = <&spi2_default>; 224 pinctrl-1 = <&spi2_sleep>; 225 pinctrl-names = "default", "sleep"; 226}; 227 228&qspi { 229 /* Disabled by default in nrf52840.dtsi. */ 230 pinctrl-0 = <&qspi_default>; 231 pinctrl-1 = <&qspi_sleep>; 232 pinctrl-names = "default", "sleep"; 233}; 234 235arduino_spi: &spi3 { 236 status = "disabled"; 237 /* Cannot be used together with evb_led1, evb_led2, evb_led3, evb_sw2 238 * and pwm0 so disabled by default. 239 */ 240 cs-gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; /* D10 */ 241 pinctrl-0 = <&spi3_default>; 242 pinctrl-1 = <&spi3_sleep>; 243 pinctrl-names = "default", "sleep"; 244}; 245 246&ieee802154 { 247 status = "okay"; 248}; 249 250&flash0 { 251 252 partitions { 253 compatible = "fixed-partitions"; 254 #address-cells = <1>; 255 #size-cells = <1>; 256 257 boot_partition: partition@0 { 258 label = "mcuboot"; 259 reg = <0x000000000 0x0000C000>; 260 }; 261 slot0_partition: partition@c000 { 262 label = "image-0"; 263 reg = <0x0000C000 0x00067000>; 264 }; 265 slot1_partition: partition@73000 { 266 label = "image-1"; 267 reg = <0x00073000 0x00067000>; 268 }; 269 scratch_partition: partition@da000 { 270 label = "image-scratch"; 271 reg = <0x000da000 0x0001e000>; 272 }; 273 storage_partition: partition@f8000 { 274 label = "storage"; 275 reg = <0x000f8000 0x00008000>; 276 }; 277 }; 278}; 279 280zephyr_udc0: &usbd { 281 compatible = "nordic,nrf-usbd"; 282 status = "okay"; 283}; 284