1/* 2 * Copyright (c) 2020 Rafael Dias Menezes <rdmeneze@gmail.com> 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7#include <zephyr/dt-bindings/input/input-event-codes.h> 8#include "slstk3401a-pinctrl.dtsi" 9 10/ { 11 model = "Silicon Labs EFM32PG SLSTK3401A board"; 12 13 chosen { 14 zephyr,console = &usart0; 15 zephyr,shell-uart = &usart0; 16 zephyr,sram = &sram0; 17 zephyr,flash = &flash0; 18 }; 19 20 /* These aliases are provided for compatibility with samples */ 21 aliases { 22 led0 = &led0; 23 led1 = &led1; 24 sw0 = &button0; 25 sw1 = &button1; 26 watchdog0 = &wdog0; 27 }; 28 29 leds { 30 compatible = "gpio-leds"; 31 led0: led_0 { 32 gpios = <&gpiof 4 0>; 33 label = "LED 0"; 34 }; 35 led1: led_1 { 36 gpios = <&gpiof 5 0>; 37 label = "LED 1"; 38 }; 39 }; 40 41 buttons { 42 compatible = "gpio-keys"; 43 button0: button_0 { 44 /* gpio flags need validation */ 45 gpios = <&gpiof 6 GPIO_ACTIVE_LOW>; 46 label = "User Push Button 0"; 47 zephyr,code = <INPUT_KEY_0>; 48 }; 49 button1: button_1 { 50 /* gpio flags need validation */ 51 gpios = <&gpiof 7 GPIO_ACTIVE_LOW>; 52 label = "User Push Button 1"; 53 zephyr,code = <INPUT_KEY_1>; 54 }; 55 }; 56}; 57 58&cpu0 { 59 clock-frequency = <40000000>; 60}; 61 62&usart0 { 63 current-speed = <115200>; 64 pinctrl-0 = <&usart0_default>; 65 pinctrl-names = "default"; 66 status = "okay"; 67}; 68 69&leuart0 { 70 current-speed = <9600>; 71 location-rx = <GECKO_LOCATION(18) GECKO_PORT_D GECKO_PIN(11)>; 72 location-tx = <GECKO_LOCATION(18) GECKO_PORT_D GECKO_PIN(10)>; 73 status = "okay"; 74}; 75 76&i2c0 { 77 pinctrl-0 = <&i2c0_default>; 78 pinctrl-names = "default"; 79 status = "okay"; 80}; 81 82&rtcc0 { 83 prescaler = <1>; 84 status = "okay"; 85}; 86 87&gpio { 88 location-swo = <0>; 89 status = "okay"; 90}; 91 92&gpioa { 93 status = "okay"; 94 95 board-controller-enable { 96 gpio-hog; 97 gpios = <5 GPIO_ACTIVE_HIGH>; 98 output-high; 99 }; 100}; 101 102&gpiob { 103 status = "okay"; 104}; 105 106&gpioc { 107 status = "okay"; 108}; 109 110&gpiod { 111 status = "okay"; 112}; 113 114&gpiof { 115 status = "okay"; 116}; 117 118&wdog0 { 119 status = "okay"; 120}; 121 122&flash0 { 123 124 partitions { 125 compatible = "fixed-partitions"; 126 #address-cells = <1>; 127 #size-cells = <1>; 128 129 /* Set 6Kb of storage at the end of the 256Kb of flash */ 130 storage_partition: partition@3e800 { 131 label = "storage"; 132 reg = <0x0003e800 0x00001800>; 133 }; 134 135 }; 136}; 137