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