1/* 2 * Copyright (c) 2021, Teslabs Engineering S.L. 3 * SPDX-License-Identifier: Apache-2.0 4 */ 5 6/dts-v1/; 7 8#include <gigadevice/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 spi-flash0 = &nor_flash; 75 watchdog0 = &fwdgt; 76 }; 77}; 78 79&gpioa { 80 status = "okay"; 81}; 82 83&gpiob { 84 status = "okay"; 85}; 86 87&gpioc { 88 status = "okay"; 89}; 90 91&gpioe { 92 status = "okay"; 93}; 94 95&gpiof { 96 status = "okay"; 97}; 98 99&gpioi { 100 status = "okay"; 101}; 102 103&gpiog { 104 status = "okay"; 105}; 106 107&usart0 { 108 status = "okay"; 109 current-speed = <115200>; 110 pinctrl-0 = <&usart0_default>; 111 pinctrl-names = "default"; 112}; 113 114&adc0 { 115 status = "okay"; 116 pinctrl-0 = <&adc0_default>; 117 pinctrl-names = "default"; 118}; 119 120&dac { 121 status = "okay"; 122 pinctrl-0 = <&dac_default>; 123 pinctrl-names = "default"; 124}; 125 126&timer1 { 127 status = "okay"; 128 129 pwm1: pwm { 130 status = "okay"; 131 pinctrl-0 = <&pwm1_default>; 132 pinctrl-names = "default"; 133 }; 134}; 135 136&i2c0 { 137 status = "okay"; 138 pinctrl-0 = <&i2c0_default>; 139 pinctrl-names = "default"; 140 141 eeprom0: eeprom@50 { 142 compatible = "atmel,at24"; 143 reg = <0x50>; 144 status = "okay"; 145 size = <256>; 146 pagesize = <8>; 147 address-width = <8>; 148 timeout = <5>; 149 }; 150}; 151 152&dma1 { 153 status = "okay"; 154}; 155 156&spi5 { 157 status = "okay"; 158 pinctrl-0 = <&spi5_default>; 159 pinctrl-names = "default"; 160 cs-gpios = <&gpioi 8 GPIO_ACTIVE_LOW>; 161 dmas = <&dma1 5 1 0 0>, <&dma1 6 1 0 0>; 162 dma-names = "tx", "rx"; 163 164 nor_flash: gd25q16@0 { 165 compatible ="jedec,spi-nor"; 166 size = <0x1000000>; 167 reg = <0>; 168 spi-max-frequency = <4000000>; 169 status = "okay"; 170 jedec-id = [c8 40 15]; 171 }; 172}; 173 174&fwdgt { 175 status = "okay"; 176}; 177