blob: 4a9f9d4fb6a8832f2d83801e078675cb39f16a7d [file] [log] [blame]
/*
* Copyright (c) 2021, Teslabs Engineering S.L.
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <gd/gd32f4xx/gd32f450xk.dtsi>
#include "gd32f450i_eval-pinctrl.dtsi"
#include <zephyr/dt-bindings/input/input-event-codes.h>
/ {
model = "GigaDevice GD32F450I-EVAL";
compatible = "gd,gd32f450i-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";
};
&gpiof {
status = "okay";
};
&gpioi {
status = "okay";
};
&gpiog {
status = "okay";
};
&usart0 {
status = "okay";
current-speed = <115200>;
pinctrl-0 = <&usart0_default>;
pinctrl-names = "default";
};
&adc0 {
status = "okay";
pinctrl-0 = <&adc0_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>;
};
};
&dma1 {
status = "okay";
};
&spi5 {
status = "okay";
pinctrl-0 = <&spi5_default>;
pinctrl-names = "default";
cs-gpios = <&gpioi 8 GPIO_ACTIVE_LOW>;
dmas = <&dma1 5 1 0 0>, <&dma1 6 1 0 0>;
dma-names = "tx", "rx";
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";
};