1/* 2 * Copyright (c) 2021, ATL Electronics 3 * SPDX-License-Identifier: Apache-2.0 4 */ 5 6/dts-v1/; 7 8#include <gigadevice/gd32f403/gd32f403zet6.dtsi> 9#include "gd32f403z_eval-pinctrl.dtsi" 10#include <zephyr/dt-bindings/input/input-event-codes.h> 11 12/ { 13 model = "GigaDevice GD32F403Z Evaluation Kit"; 14 compatible = "gd,gd32f403z"; 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 led2: led2 { 27 gpios = <&gpiof 0 GPIO_ACTIVE_HIGH>; 28 label = "LED2"; 29 }; 30 led3: led3 { 31 gpios = <&gpiof 1 GPIO_ACTIVE_HIGH>; 32 label = "LED3"; 33 }; 34 led4: led4 { 35 gpios = <&gpiof 2 GPIO_ACTIVE_HIGH>; 36 label = "LED4"; 37 }; 38 led5: led5 { 39 gpios = <&gpiof 3 GPIO_ACTIVE_HIGH>; 40 label = "LED5"; 41 }; 42 }; 43 44 gpio_keys { 45 compatible = "gpio-keys"; 46 wakeup_key: wakeup_key { 47 label = "WAKEUP_KEY"; 48 gpios = <&gpioa 0 GPIO_ACTIVE_LOW>; 49 zephyr,code = <INPUT_KEY_WAKEUP>; 50 }; 51 tamper_key: tamper_key { 52 label = "TAMPER_KEY"; 53 gpios = <&gpioc 13 GPIO_ACTIVE_LOW>; 54 zephyr,code = <INPUT_KEY_0>; 55 }; 56 user_key1: user_key1 { 57 label = "USER_KEY1"; 58 gpios = <&gpiof 5 GPIO_ACTIVE_LOW>; 59 zephyr,code = <INPUT_KEY_1>; 60 }; 61 user_key2: user_key2 { 62 label = "USER_KEY2"; 63 gpios = <&gpiof 4 GPIO_ACTIVE_LOW>; 64 zephyr,code = <INPUT_KEY_2>; 65 }; 66 }; 67 68 pwmleds { 69 compatible = "pwm-leds"; 70 71 /* NOTE: bridge TIMER0_CH0 (PA8) and LED2 (PF0) */ 72 pwm_led: pwm_led { 73 pwms = <&pwm0 0 PWM_MSEC(20) PWM_POLARITY_NORMAL>; 74 }; 75 }; 76 77 aliases { 78 led0 = &led2; 79 led1 = &led3; 80 sw0 = &user_key1; 81 pwm-led0 = &pwm_led; 82 watchdog0 = &fwdgt; 83 }; 84}; 85 86&gpioa { 87 status = "okay"; 88}; 89 90&gpioc { 91 status = "okay"; 92}; 93 94&gpiof { 95 status = "okay"; 96}; 97 98&adc0 { 99 status = "okay"; 100 pinctrl-0 = <&adc0_default>; 101 pinctrl-names = "default"; 102}; 103 104&usart0 { 105 status = "okay"; 106 current-speed = <115200>; 107 pinctrl-0 = <&usart0_default>; 108 pinctrl-names = "default"; 109}; 110 111&timer0 { 112 status = "okay"; 113 prescaler = <256>; 114 115 pwm0: pwm { 116 status = "okay"; 117 pinctrl-0 = <&pwm0_default>; 118 pinctrl-names = "default"; 119 }; 120}; 121 122&fwdgt { 123 status = "okay"; 124}; 125