1/* 2 * Copyright (c) 2021, Teslabs Engineering S.L. 3 * SPDX-License-Identifier: Apache-2.0 4 */ 5 6/dts-v1/; 7 8#include <gd/gd32f4xx/gd32f450xk.dtsi> 9#include "gd32f450i_eval-pinctrl.dtsi" 10#include <zephyr/dt-bindings/input/input-event-codes.h> 11 12/ { 13 model = "GigaDevice GD32F450I-EVAL"; 14 compatible = "gd,gd32f450i-eval"; 15 16 chosen { 17 zephyr,sram = &sram0; 18 zephyr,flash = &flash0; 19 zephyr,console = &usart0; 20 zephyr,shell-uart = &usart0; 21 zephyr,flash-controller = &fmc; 22 }; 23 24 leds { 25 compatible = "gpio-leds"; 26 led1: led1 { 27 gpios = <&gpioe 2 GPIO_ACTIVE_HIGH>; 28 label = "LED1"; 29 }; 30 led2: led2 { 31 gpios = <&gpioe 3 GPIO_ACTIVE_HIGH>; 32 label = "LED2"; 33 }; 34 led3: led3 { 35 gpios = <&gpiof 10 GPIO_ACTIVE_HIGH>; 36 label = "LED3"; 37 }; 38 }; 39 40 gpio_keys { 41 compatible = "gpio-keys"; 42 wakeup_key: wakeup_key { 43 label = "WAKEUP_KEY"; 44 gpios = <&gpioa 0 GPIO_ACTIVE_LOW>; 45 zephyr,code = <INPUT_KEY_WAKEUP>; 46 }; 47 tamper_key: tamper_key { 48 label = "TAMPER_KEY"; 49 gpios = <&gpioc 13 GPIO_ACTIVE_LOW>; 50 zephyr,code = <INPUT_KEY_0>; 51 }; 52 user_key: user_key { 53 label = "USER_KEY"; 54 gpios = <&gpiob 14 GPIO_ACTIVE_LOW>; 55 zephyr,code = <INPUT_KEY_1>; 56 }; 57 }; 58 59 pwmleds { 60 compatible = "pwm-leds"; 61 62 /* NOTE: bridge TIMER1_CH2 (PB10) and LED1 (PE2) */ 63 pwm_led: pwm_led { 64 pwms = <&pwm1 2 PWM_MSEC(20) PWM_POLARITY_NORMAL>; 65 }; 66 }; 67 68 aliases { 69 led0 = &led1; 70 led1 = &led2; 71 sw0 = &user_key; 72 pwm-led0 = &pwm_led; 73 eeprom-0 = &eeprom0; 74 watchdog0 = &fwdgt; 75 }; 76}; 77 78&gpioa { 79 status = "okay"; 80}; 81 82&gpiob { 83 status = "okay"; 84}; 85 86&gpioc { 87 status = "okay"; 88}; 89 90&gpioe { 91 status = "okay"; 92}; 93 94&gpiof { 95 status = "okay"; 96}; 97 98&gpioi { 99 status = "okay"; 100}; 101 102&gpiog { 103 status = "okay"; 104}; 105 106&usart0 { 107 status = "okay"; 108 current-speed = <115200>; 109 pinctrl-0 = <&usart0_default>; 110 pinctrl-names = "default"; 111}; 112 113&adc0 { 114 status = "okay"; 115 pinctrl-0 = <&adc0_default>; 116 pinctrl-names = "default"; 117}; 118 119&dac { 120 status = "okay"; 121 pinctrl-0 = <&dac_default>; 122 pinctrl-names = "default"; 123}; 124 125&timer1 { 126 status = "okay"; 127 128 pwm1: pwm { 129 status = "okay"; 130 pinctrl-0 = <&pwm1_default>; 131 pinctrl-names = "default"; 132 }; 133}; 134 135&i2c0 { 136 status = "okay"; 137 pinctrl-0 = <&i2c0_default>; 138 pinctrl-names = "default"; 139 140 eeprom0: eeprom@50 { 141 compatible = "atmel,at24"; 142 reg = <0x50>; 143 status = "okay"; 144 size = <256>; 145 pagesize = <8>; 146 address-width = <8>; 147 timeout = <5>; 148 }; 149}; 150 151&dma1 { 152 status = "okay"; 153}; 154 155&spi5 { 156 status = "okay"; 157 pinctrl-0 = <&spi5_default>; 158 pinctrl-names = "default"; 159 cs-gpios = <&gpioi 8 GPIO_ACTIVE_LOW>; 160 dmas = <&dma1 5 1 0 0>, <&dma1 6 1 0 0>; 161 dma-names = "tx", "rx"; 162 163 nor_flash: gd25q16@0 { 164 compatible ="jedec,spi-nor"; 165 size = <0x1000000>; 166 reg = <0>; 167 spi-max-frequency = <4000000>; 168 status = "okay"; 169 jedec-id = [c8 40 15]; 170 }; 171}; 172 173&fwdgt { 174 status = "okay"; 175}; 176