1/* 2 * Copyright (c) 2022, TOKITA Hiroshi <tokita.hiroshi@gmail.com> 3 * SPDX-License-Identifier: Apache-2.0 4 */ 5 6/dts-v1/; 7 8#include <gd/gd32f4xx/gd32f407xk.dtsi> 9#include "gd32f407v_start-pinctrl.dtsi" 10#include <zephyr/dt-bindings/input/input-event-codes.h> 11 12/ { 13 model = "GigaDevice GD32F407V-START"; 14 compatible = "gd,gd32f407v-start"; 15 16 chosen { 17 zephyr,sram = &sram0; 18 zephyr,flash = &flash0; 19 zephyr,console = &usart0; 20 zephyr,shell-uart = &usart0; 21 }; 22 23 leds { 24 compatible = "gpio-leds"; 25 led2: led2 { 26 gpios = <&gpioc 6 GPIO_ACTIVE_HIGH>; 27 }; 28 }; 29 30 gpio_keys { 31 compatible = "gpio-keys"; 32 user_key: user_key { 33 label = "USER_KEY"; 34 gpios = <&gpioa 0 GPIO_ACTIVE_LOW>; 35 zephyr,code = <INPUT_KEY_0>; 36 }; 37 }; 38 39 pwmleds { 40 compatible = "pwm-leds"; 41 42 pwm_led: pwm_led { 43 pwms = <&pwm2 0 PWM_MSEC(20) PWM_POLARITY_NORMAL>; 44 }; 45 }; 46 47 aliases { 48 led0 = &led2; 49 sw0 = &user_key; 50 pwm-led0 = &pwm_led; 51 }; 52}; 53 54&gpioa { 55 status = "okay"; 56}; 57 58&gpioc { 59 status = "okay"; 60}; 61 62&usart0 { 63 status = "okay"; 64 current-speed = <115200>; 65 pinctrl-0 = <&usart0_default>; 66 pinctrl-names = "default"; 67}; 68 69&timer2 { 70 status = "okay"; 71 prescaler = <256>; 72 73 pwm2: pwm { 74 status = "okay"; 75 pinctrl-0 = <&pwm2_default>; 76 pinctrl-names = "default"; 77 }; 78}; 79