1/* 2 * Copyright (c) 2018 Roman Tataurov <diytronic@yandex.ru> 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7/dts-v1/; 8#include <nordic/nrf51822_qfac.dtsi> 9#include "nrf51_ble400-pinctrl.dtsi" 10#include <zephyr/dt-bindings/input/input-event-codes.h> 11 12/ { 13 model = "Waveshare BLE400"; 14 compatible = "waveshare,BLE400"; 15 16 chosen { 17 zephyr,console = &uart0; 18 zephyr,shell-uart = &uart0; 19 zephyr,bt-mon-uart = &uart0; 20 zephyr,bt-c2h-uart = &uart0; 21 zephyr,sram = &sram0; 22 zephyr,flash = &flash0; 23 }; 24 25 /* These aliases are provided for compatibility with samples */ 26 aliases { 27 led0 = &led0; 28 led1 = &led1; 29 led2 = &led2; 30 led3 = &led3; 31 led4 = &led4; 32 sw0 = &button0; 33 sw1 = &button1; 34 watchdog0 = &wdt0; 35 }; 36 37 leds { 38 compatible = "gpio-leds"; 39 led0: led_0 { 40 gpios = <&gpio0 18 0>; 41 label = "Red LED 0"; 42 }; 43 led1: led_1 { 44 gpios = <&gpio0 19 0>; 45 label = "Red LED 1"; 46 }; 47 led2: led_2 { 48 gpios = <&gpio0 20 0>; 49 label = "Red LED 2"; 50 }; 51 led3: led_3 { 52 gpios = <&gpio0 21 0>; 53 label = "Red LED 3"; 54 }; 55 led4: led_4 { 56 gpios = <&gpio0 22 0>; 57 label = "Red LED 4"; 58 }; 59 }; 60 61 buttons { 62 /* Push button switch 0 KEY1 */ 63 compatible = "gpio-keys"; 64 button0: button_0 { 65 gpios = <&gpio0 16 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; 66 label = "Push button switch 0"; 67 zephyr,code = <INPUT_KEY_0>; 68 }; 69 /* Push button switch 1 KEY2 */ 70 button1: button_1 { 71 gpios = <&gpio0 17 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; 72 label = "Push button switch 1"; 73 zephyr,code = <INPUT_KEY_1>; 74 }; 75 }; 76 77}; 78 79&gpiote { 80 status = "okay"; 81}; 82 83&gpio0 { 84 status = "okay"; 85}; 86 87&i2c0 { 88 status = "okay"; 89 /* smba-pin = <2>; */ 90 pinctrl-0 = <&i2c0_default>; 91 pinctrl-1 = <&i2c0_sleep>; 92 pinctrl-names = "default", "sleep"; 93}; 94 95&spi1 { 96 compatible = "nordic,nrf-spi"; 97 status = "okay"; 98 cs-gpios = <&gpio0 30 GPIO_ACTIVE_LOW>; 99 pinctrl-0 = <&spi1_default>; 100 pinctrl-1 = <&spi1_sleep>; 101 pinctrl-names = "default", "sleep"; 102}; 103 104&uart0 { 105 current-speed = <115200>; 106 status = "okay"; 107 pinctrl-0 = <&uart0_default>; 108 pinctrl-1 = <&uart0_sleep>; 109 pinctrl-names = "default", "sleep"; 110}; 111