zephyr/boards/gd/gd32f470i_eval/gd32f470i_eval.dts

164 lines
2.6 KiB
Plaintext

/*
* Copyright (c) 2022, Rtone.
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <gd/gd32f4xx/gd32f470ik.dtsi>
#include "gd32f470i_eval-pinctrl.dtsi"
#include <zephyr/dt-bindings/input/input-event-codes.h>
/ {
model = "GigaDevice GD32F470I-EVAL";
compatible = "gd,gd32f470i-eval";
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 = <&gpioe 2 GPIO_ACTIVE_HIGH>;
label = "LED1";
};
led2: led2 {
gpios = <&gpioe 3 GPIO_ACTIVE_HIGH>;
label = "LED2";
};
led3: led3 {
gpios = <&gpiof 10 GPIO_ACTIVE_HIGH>;
label = "LED3";
};
};
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_KEY";
gpios = <&gpiob 14 GPIO_ACTIVE_LOW>;
zephyr,code = <INPUT_KEY_1>;
};
};
pwmleds {
compatible = "pwm-leds";
/* NOTE: bridge TIMER1_CH2 (PB10) and LED1 (PE2) */
pwm_led: pwm_led {
pwms = <&pwm1 2 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
};
};
aliases {
led0 = &led1;
led1 = &led2;
sw0 = &user_key;
pwm-led0 = &pwm_led;
eeprom-0 = &eeprom0;
watchdog0 = &fwdgt;
};
};
&gpioa {
status = "okay";
};
&gpiob {
status = "okay";
};
&gpioc {
status = "okay";
};
&gpioe {
status = "okay";
};
&gpiog {
status = "okay";
};
&gpiof {
status = "okay";
};
&gpioi {
status = "okay";
};
&usart0 {
status = "okay";
current-speed = <115200>;
pinctrl-0 = <&usart0_default>;
pinctrl-names = "default";
};
&dac {
status = "okay";
pinctrl-0 = <&dac_default>;
pinctrl-names = "default";
};
&timer1 {
status = "okay";
pwm1: pwm {
status = "okay";
pinctrl-0 = <&pwm1_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>;
};
};
&spi5 {
status = "okay";
pinctrl-0 = <&spi5_default>;
pinctrl-names = "default";
cs-gpios = <&gpioi 8 GPIO_ACTIVE_LOW>;
nor_flash: gd25q16@0 {
compatible ="jedec,spi-nor";
size = <0x1000000>;
reg = <0>;
spi-max-frequency = <4000000>;
status = "okay";
jedec-id = [c8 40 15];
};
};
&fwdgt {
status = "okay";
};