1/* 2 * Copyright (c) 2022, Rtone. 3 * SPDX-License-Identifier: Apache-2.0 4 */ 5 6/dts-v1/; 7 8#include <gd/gd32f4xx/gd32f450xk.dtsi> 9#include "gd32f450z_eval-pinctrl.dtsi" 10#include <zephyr/dt-bindings/input/input-event-codes.h> 11 12/ { 13 model = "GigaDevice GD32F450Z-EVAL"; 14 compatible = "gd,gd32f450z-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 = <&gpiod 4 GPIO_ACTIVE_HIGH>; 28 label = "LED1"; 29 }; 30 led2: led2 { 31 gpios = <&gpiod 5 GPIO_ACTIVE_HIGH>; 32 label = "LED2"; 33 }; 34 led3: led3 { 35 gpios = <&gpiog 3 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&gpiod { 91 status = "okay"; 92}; 93 94&gpiog { 95 status = "okay"; 96}; 97 98&usart0 { 99 status = "okay"; 100 current-speed = <115200>; 101 pinctrl-0 = <&usart0_default>; 102 pinctrl-names = "default"; 103}; 104 105&dac { 106 status = "okay"; 107 pinctrl-0 = <&dac_default>; 108 pinctrl-names = "default"; 109}; 110 111&timer1 { 112 status = "okay"; 113 114 pwm1: pwm { 115 status = "okay"; 116 pinctrl-0 = <&pwm1_default>; 117 pinctrl-names = "default"; 118 }; 119}; 120 121&i2c0 { 122 status = "okay"; 123 pinctrl-0 = <&i2c0_default>; 124 pinctrl-names = "default"; 125 126 eeprom0: eeprom@50 { 127 compatible = "atmel,at24"; 128 reg = <0x50>; 129 status = "okay"; 130 size = <256>; 131 pagesize = <8>; 132 address-width = <8>; 133 timeout = <5>; 134 }; 135}; 136 137&spi5 { 138 status = "okay"; 139 pinctrl-0 = <&spi5_default>; 140 pinctrl-names = "default"; 141 cs-gpios = <&gpiog 9 GPIO_ACTIVE_LOW>; 142 143 nor_flash: gd25q16@0 { 144 compatible ="jedec,spi-nor"; 145 size = <0x1000000>; 146 reg = <0>; 147 spi-max-frequency = <4000000>; 148 status = "okay"; 149 jedec-id = [c8 40 15]; 150 }; 151}; 152 153&fwdgt { 154 status = "okay"; 155}; 156