1/* 2 * Copyright (c) 2021 Florin Stancu 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7#include "boosterpack_connector.dtsi" 8#include "launchxl-pinctrl.dtsi" 9#include <zephyr/dt-bindings/input/input-event-codes.h> 10 11#define BTN_GPIO_FLAGS (GPIO_ACTIVE_LOW | GPIO_PULL_UP) 12 13/ { 14 aliases { 15 led0 = &led0; 16 led1 = &led1; 17 sw0 = &btn0; 18 sw1 = &btn1; 19 watchdog0 = &wdt0; 20 mcuboot-led0 = &led1; 21 mcuboot-button0 = &btn1; 22 }; 23 24 chosen { 25 zephyr,sram = &sram0; 26 zephyr,flash = &flash0; 27 zephyr,console = &uart0; 28 zephyr,shell-uart = &uart0; 29 zephyr,ieee802154 = &ieee802154; 30 zephyr,code-partition = &slot0_partition; 31 }; 32 33 leds { 34 compatible = "gpio-leds"; 35 led0: led_0 { 36 gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>; 37 label = "Green LED"; 38 }; 39 led1: led_1 { 40 gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>; 41 label = "Red LED"; 42 }; 43 }; 44 45 keys { 46 compatible = "gpio-keys"; 47 btn0: btn_0 { 48 gpios = <&gpio0 15 BTN_GPIO_FLAGS>; 49 label = "Push button 1"; 50 zephyr,code = <INPUT_KEY_0>; 51 }; 52 btn1: btn_1 { 53 gpios = <&gpio0 14 BTN_GPIO_FLAGS>; 54 label = "Push button 2"; 55 zephyr,code = <INPUT_KEY_1>; 56 }; 57 }; 58}; 59 60&cpu0 { 61 clock-frequency = <48000000>; 62}; 63 64&trng { 65 status = "okay"; 66}; 67 68&gpio0 { 69 status = "okay"; 70}; 71 72&uart0 { 73 status = "okay"; 74 current-speed = <115200>; 75 pinctrl-0 = <&uart0_rx_default &uart0_tx_default>; 76 pinctrl-names = "default"; 77}; 78 79&uart1 { 80 status = "disabled"; 81 current-speed = <115200>; 82 pinctrl-0 = <&uart1_rx_default &uart1_tx_default>; 83 pinctrl-names = "default"; 84}; 85 86&i2c0 { 87 status = "okay"; 88 pinctrl-0 = <&i2c0_scl_default &i2c0_sda_default>; 89 pinctrl-1 = <&i2c0_scl_sleep &i2c0_sda_sleep>; 90 pinctrl-names = "default", "sleep"; 91}; 92 93&spi0 { 94 status = "okay"; 95 pinctrl-0 = <&spi0_sck_default &spi0_mosi_default 96 &spi0_miso_default &spi0_cs_default>; 97 pinctrl-names = "default"; 98 cs-gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; 99}; 100 101&radio { 102 status = "okay"; 103}; 104 105&ieee802154 { 106 status = "okay"; 107}; 108 109&ieee802154g { 110 status = "disabled"; 111}; 112 113&wdt0 { 114 status = "okay"; 115}; 116