blob: 2b0672c506df4b744797d8b338491cf950c4bb05 [file] [log] [blame]
/*
* Copyright (c) 2022 YuLong Yao <feilongphone@gmail.com>
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <gigadevice/gd32vf103Xb.dtsi>
#include "gd32vf103c_starter-pinctrl.dtsi"
/ {
model = "GigaDevice GD32VF103C-STARTER";
compatible = "gd,gd32vf103c-starter";
chosen {
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,console = &usart0;
zephyr,shell-uart = &usart0;
zephyr,flash-controller = &fmc;
};
leds {
compatible = "gpio-leds";
led1: led1 {
gpios = <&gpioa 7 GPIO_ACTIVE_HIGH>;
label = "LED1";
};
};
gpio_keys {
compatible = "gpio-keys";
key_a: key_a {
label = "KEY_A";
gpios = <&gpioa 0 GPIO_ACTIVE_LOW>;
};
};
pwmleds {
compatible = "pwm-leds";
/* NOTE: pwm_led and led1 are share same pin (PA7). */
/* When CONFIG_PWM=y it can only be controlled using the PWM API. */
pwm_led: pwm_led {
pwms = <&pwm2 1 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
};
};
aliases {
led0 = &led1;
sw0 = &key_a;
pwm-led0 = &pwm_led;
watchdog0 = &fwdgt;
};
};
&gpioa {
status = "okay";
};
&gpiob {
status = "okay";
};
&gpioc {
status = "okay";
};
&gpioe {
status = "okay";
};
&usart0 {
status = "okay";
current-speed = <115200>;
pinctrl-0 = <&usart0_default>;
pinctrl-names = "default";
};
&timer2 {
status = "okay";
prescaler = <128>;
pwm2: pwm {
status = "okay";
pinctrl-0 = <&pwm2_default>;
pinctrl-names = "default";
};
};
&fwdgt {
status = "okay";
};