zephyr/boards/gd/gd32e103v_eval/gd32e103v_eval.dts

145 lines
2.3 KiB
Plaintext

/*
* Copyright (c) 2021, YuLong Yao <feilongphone@gmail.com>
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <gd/gd32e10x/gd32e103vbt6.dtsi>
#include "gd32e103v_eval-pinctrl.dtsi"
#include <zephyr/dt-bindings/input/input-event-codes.h>
/ {
model = "GigaDevice gd32e103v Evaluation Kit";
compatible = "gd,gd32e103v";
chosen {
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,console = &usart0;
zephyr,shell-uart = &usart0;
zephyr,flash-controller = &fmc;
};
leds {
compatible = "gpio-leds";
led2: led2 {
gpios = <&gpioc 0 GPIO_ACTIVE_HIGH>;
label = "LED2";
};
led3: led3 {
gpios = <&gpioc 2 GPIO_ACTIVE_HIGH>;
label = "LED3";
};
led4: led4 {
gpios = <&gpioe 0 GPIO_ACTIVE_HIGH>;
label = "LED4";
};
led5: led5 {
gpios = <&gpioe 1 GPIO_ACTIVE_HIGH>;
label = "LED5";
};
};
gpio_keys {
compatible = "gpio-keys";
wakeup_key: wakeup_key {
label = "WAKEUP_KEY";
gpios = <&gpioa 0 GPIO_ACTIVE_LOW>;
zephyr,code = <INPUT_KEY_WAKEUP>;
};
tamper_key: tamper_key {
label = "TAMPER_KEY";
gpios = <&gpioc 13 GPIO_ACTIVE_LOW>;
zephyr,code = <INPUT_KEY_0>;
};
user_key: user_key {
label = "USER_KEY1";
gpios = <&gpiob 14 GPIO_ACTIVE_LOW>;
zephyr,code = <INPUT_KEY_1>;
};
};
pwmleds {
compatible = "pwm-leds";
/* NOTE: bridge TIMER0_CH0 (PA8) and LED1 (PC0) */
pwm_led: pwm_led {
pwms = <&pwm0 0 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
};
};
aliases {
led0 = &led2;
led1 = &led3;
sw0 = &user_key;
pwm-led0 = &pwm_led;
eeprom-0 = &eeprom0;
watchdog0 = &fwdgt;
};
};
&gpioa {
status = "okay";
};
&gpiob {
status = "okay";
};
&gpioc {
status = "okay";
};
&gpiod {
status = "okay";
};
&gpioe {
status = "okay";
};
&usart0 {
status = "okay";
current-speed = <115200>;
pinctrl-0 = <&usart0_default>;
pinctrl-names = "default";
};
&timer0 {
status = "okay";
prescaler = <128>;
pwm0: pwm {
status = "okay";
pinctrl-0 = <&pwm0_default>;
pinctrl-names = "default";
};
};
&i2c0 {
status = "okay";
pinctrl-0 = <&i2c0_default>;
pinctrl-names = "default";
eeprom0: eeprom@50 {
compatible = "atmel,at24";
reg = <0x50>;
status = "okay";
size = <256>;
pagesize = <8>;
address-width = <8>;
timeout = <5>;
};
};
&dac {
status = "okay";
pinctrl-0 = <&dac_default>;
pinctrl-names = "default";
};
&fwdgt {
status = "okay";
};