zephyr/boards/silabs/efm32pg_stk3401a/efm32pg_stk3401a_common.dtsi

137 lines
2.1 KiB
Plaintext

/*
* Copyright (c) 2020 Rafael Dias Menezes <rdmeneze@gmail.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/dt-bindings/input/input-event-codes.h>
#include "efm32pg_stk3401a-pinctrl.dtsi"
/ {
model = "Silicon Labs EFM32PG STK3401A board";
chosen {
zephyr,console = &usart0;
zephyr,shell-uart = &usart0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
};
/* These aliases are provided for compatibility with samples */
aliases {
led0 = &led0;
led1 = &led1;
sw0 = &button0;
sw1 = &button1;
watchdog0 = &wdog0;
};
leds {
compatible = "gpio-leds";
led0: led_0 {
gpios = <&gpiof 4 0>;
label = "LED 0";
};
led1: led_1 {
gpios = <&gpiof 5 0>;
label = "LED 1";
};
};
buttons {
compatible = "gpio-keys";
button0: button_0 {
/* gpio flags need validation */
gpios = <&gpiof 6 GPIO_ACTIVE_LOW>;
label = "User Push Button 0";
zephyr,code = <INPUT_KEY_0>;
};
button1: button_1 {
/* gpio flags need validation */
gpios = <&gpiof 7 GPIO_ACTIVE_LOW>;
label = "User Push Button 1";
zephyr,code = <INPUT_KEY_1>;
};
};
};
&cpu0 {
clock-frequency = <40000000>;
};
&usart0 {
current-speed = <115200>;
pinctrl-0 = <&usart0_default>;
pinctrl-names = "default";
status = "okay";
};
&leuart0 {
current-speed = <9600>;
location-rx = <GECKO_LOCATION(18) GECKO_PORT_D GECKO_PIN(11)>;
location-tx = <GECKO_LOCATION(18) GECKO_PORT_D GECKO_PIN(10)>;
status = "okay";
};
&i2c0 {
pinctrl-0 = <&i2c0_default>;
pinctrl-names = "default";
status = "okay";
};
&rtcc0 {
prescaler = <1>;
status = "okay";
};
&gpio {
location-swo = <0>;
status = "okay";
};
&gpioa {
status = "okay";
board-controller-enable {
gpio-hog;
gpios = <5 GPIO_ACTIVE_HIGH>;
output-high;
};
};
&gpiob {
status = "okay";
};
&gpioc {
status = "okay";
};
&gpiod {
status = "okay";
};
&gpiof {
status = "okay";
};
&wdog0 {
status = "okay";
};
&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
/* Set 6Kb of storage at the end of the 256Kb of flash */
storage_partition: partition@fe800 {
label = "storage";
reg = <0x0003e800 0x00001800>;
};
};
};