1/* 2 * Copyright (c) 2023 Panasonic Industrial Devices Europe GmbH 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6#include "pan1783_nrf5340_cpunet-pinctrl.dtsi" 7#include <zephyr/dt-bindings/input/input-event-codes.h> 8 9/ { 10 11 chosen { 12 zephyr,console = &uart0; 13 zephyr,shell-uart = &uart0; 14 zephyr,uart-mcumgr = &uart0; 15 zephyr,bt-mon-uart = &uart0; 16 zephyr,bt-c2h-uart = &uart0; 17 zephyr,bt-hci-ipc = &ipc0; 18 nordic,802154-spinel-ipc = &ipc0; 19 zephyr,ieee802154 = &ieee802154; 20 }; 21 22 leds { 23 compatible = "gpio-leds"; 24 evb_led1: evb_led_1 { 25 gpios = <&gpio0 28 GPIO_ACTIVE_LOW>; 26 label = "LED1 on EVB"; 27 }; 28 evb_led2: evb_led_2 { 29 gpios = <&gpio0 29 GPIO_ACTIVE_LOW>; 30 label = "LED2 on EVB"; 31 }; 32 evb_led3: evb_led_3 { 33 gpios = <&gpio0 30 GPIO_ACTIVE_LOW>; 34 label = "LED3 on EVB"; 35 }; 36 evb_led4: evb_led_4 { 37 gpios = <&gpio0 31 GPIO_ACTIVE_LOW>; 38 label = "LED4 on EVB"; 39 }; 40 }; 41 42 buttons { 43 compatible = "gpio-keys"; 44 evb_sw1: evb_sw_1 { 45 gpios = <&gpio0 23 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; 46 label = "SW1 on EVB"; 47 zephyr,code = <INPUT_KEY_0>; 48 }; 49 evb_sw2: evb_sw_2 { 50 gpios = <&gpio0 24 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; 51 label = "SW2 on EVB"; 52 zephyr,code = <INPUT_KEY_1>; 53 }; 54 evb_sw3: evb_sw_3 { 55 gpios = <&gpio0 8 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; 56 label = "SW3 on EVB"; 57 zephyr,code = <INPUT_KEY_2>; 58 }; 59 evb_sw4: evb_sw_4 { 60 gpios = <&gpio0 9 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; 61 label = "SW4 on EVB"; 62 zephyr,code = <INPUT_KEY_3>; 63 }; 64 }; 65 66 mikrobus_header: mikrobus-connector { 67 compatible = "mikro-bus"; 68 #gpio-cells = <2>; 69 gpio-map-mask = <0xffffffff 0xffffffc0>; 70 gpio-map-pass-thru = <0 0x3f>; 71 gpio-map = <0 0 &gpio0 4 0>, /* AN */ 72 /* Not a GPIO*/ /* RST */ 73 <2 0 &gpio1 12 0>, /* CS */ 74 <3 0 &gpio1 15 0>, /* SCK */ 75 <4 0 &gpio1 14 0>, /* MISO */ 76 <5 0 &gpio1 13 0>, /* MOSI */ 77 /* +3.3V */ 78 /* GND */ 79 <6 0 &gpio1 7 0>, /* PWM */ 80 <7 0 &gpio1 4 0>, /* INT */ 81 <8 0 &gpio1 0 0>, /* RX */ 82 <9 0 &gpio1 1 0>, /* TX */ 83 <10 0 &gpio1 3 0>, /* SCL */ 84 <11 0 &gpio1 2 0>; /* SDA */ 85 /* +5V */ 86 /* GND */ 87 }; 88 89 arduino_header: connector { 90 compatible = "arduino-header-r3"; 91 #gpio-cells = <2>; 92 gpio-map-mask = <0xffffffff 0xffffffc0>; 93 gpio-map-pass-thru = <0 0x3f>; 94 gpio-map = <0 0 &gpio0 4 0>, /* A0 */ 95 <1 0 &gpio0 5 0>, /* A1 */ 96 <2 0 &gpio0 6 0>, /* A2 */ 97 <3 0 &gpio0 7 0>, /* A3 */ 98 <4 0 &gpio0 25 0>, /* A4 */ 99 <5 0 &gpio0 26 0>, /* A5 */ 100 <6 0 &gpio1 0 0>, /* D0 */ 101 <7 0 &gpio1 1 0>, /* D1 */ 102 <8 0 &gpio1 4 0>, /* D2 */ 103 <9 0 &gpio1 5 0>, /* D3 */ 104 <10 0 &gpio1 6 0>, /* D4 */ 105 <11 0 &gpio1 7 0>, /* D5 */ 106 <12 0 &gpio1 8 0>, /* D6 */ 107 <13 0 &gpio1 9 0>, /* D7 */ 108 <14 0 &gpio1 10 0>, /* D8 */ 109 <15 0 &gpio1 11 0>, /* D9 */ 110 <16 0 &gpio1 12 0>, /* D10 */ 111 <17 0 &gpio1 13 0>, /* D11 */ 112 <18 0 &gpio1 14 0>, /* D12 */ 113 <19 0 &gpio1 15 0>, /* D13 */ 114 <20 0 &gpio1 2 0>, /* D14 */ 115 <21 0 &gpio1 3 0>; /* D15 */ 116 }; 117 118 /* These aliases are provided for compatibility with samples */ 119 aliases { 120 led0 = &evb_led1; 121 led1 = &evb_led2; 122 led2 = &evb_led3; 123 led3 = &evb_led4; 124 sw0 = &evb_sw1; 125 sw1 = &evb_sw2; 126 sw2 = &evb_sw3; 127 sw3 = &evb_sw4; 128 bootloader-led0 = &evb_led1; 129 mcuboot-button0 = &evb_sw1; 130 mcuboot-led0 = &evb_led1; 131 watchdog0 = &wdt0; 132 }; 133}; 134 135&gpiote { 136 status = "okay"; 137}; 138 139&gpio0 { 140 status = "okay"; 141}; 142 143&gpio1 { 144 status = "okay"; 145}; 146 147&uart0 { 148 status = "disabled"; 149 current-speed = <115200>; 150 pinctrl-0 = <&uart0_default>; 151 pinctrl-1 = <&uart0_sleep>; 152 pinctrl-names = "default", "sleep"; 153}; 154 155arduino_serial: &uart0 {}; 156 157arduino_i2c: &i2c0 { 158 compatible = "nordic,nrf-twim"; 159 /* Cannot be used together with uart0. */ 160 /* status = "okay"; */ 161 pinctrl-0 = <&i2c0_default>; 162 pinctrl-1 = <&i2c0_sleep>; 163 pinctrl-names = "default", "sleep"; 164}; 165 166arduino_spi: &spi0 { 167 compatible = "nordic,nrf-spim"; 168 /* Cannot be used together with uart0. */ 169 /* status = "okay"; */ 170 cs-gpios = <&arduino_header 16 GPIO_ACTIVE_LOW>; /* D10 */ 171 pinctrl-0 = <&spi0_default>; 172 pinctrl-1 = <&spi0_sleep>; 173 pinctrl-names = "default", "sleep"; 174}; 175 176&flash1 { 177 178 partitions { 179 compatible = "fixed-partitions"; 180 #address-cells = <1>; 181 #size-cells = <1>; 182 183 boot_partition: partition@0 { 184 label = "mcuboot"; 185 reg = <0x00000000 0xc000>; 186 }; 187 slot0_partition: partition@c000 { 188 label = "image-0"; 189 reg = <0x0000C000 0x17000>; 190 }; 191 slot1_partition: partition@23000 { 192 label = "image-1"; 193 reg = <0x00023000 0x17000>; 194 }; 195 storage_partition: partition@3a000 { 196 label = "storage"; 197 reg = <0x0003a000 0x6000>; 198 }; 199 }; 200}; 201 202&ieee802154 { 203 status = "okay"; 204}; 205 206/* Include default shared RAM configuration file */ 207#include <common/nordic/nrf5340_shared_sram_partition.dtsi> 208