/* * Copyright (c) 2021, Teslabs Engineering S.L. * SPDX-License-Identifier: Apache-2.0 */ /dts-v1/; #include #include "gd32vf103v_eval-pinctrl.dtsi" #include / { model = "GigaDevice GD32VF103V-EVAL"; compatible = "gd,gd32vf103v-eval"; chosen { zephyr,sram = &sram0; zephyr,flash = &flash0; zephyr,console = &usart0; zephyr,shell-uart = &usart0; zephyr,flash-controller = &fmc; }; leds { compatible = "gpio-leds"; led1: led1 { gpios = <&gpioc 0 GPIO_ACTIVE_HIGH>; label = "LED1"; }; led2: led2 { gpios = <&gpioc 2 GPIO_ACTIVE_HIGH>; label = "LED2"; }; led3: led3 { gpios = <&gpioe 0 GPIO_ACTIVE_HIGH>; label = "LED3"; }; led4: led4 { gpios = <&gpioe 1 GPIO_ACTIVE_HIGH>; label = "LED4"; }; }; gpio_keys { compatible = "gpio-keys"; key_cet: key_cet { label = "KEY_CET"; gpios = <&gpioc 4 GPIO_ACTIVE_LOW>; zephyr,code = ; }; key_a: key_a { label = "KEY_A"; gpios = <&gpioa 0 GPIO_ACTIVE_LOW>; zephyr,code = ; }; key_b: key_b { label = "KEY_B"; gpios = <&gpioc 13 GPIO_ACTIVE_LOW>; zephyr,code = ; }; key_c: key_c { label = "KEY_C"; gpios = <&gpiob 14 GPIO_ACTIVE_LOW>; zephyr,code = ; }; key_d: key_d { label = "KEY_D"; gpios = <&gpioc 5 GPIO_ACTIVE_LOW>; zephyr,code = ; }; }; pwmleds { compatible = "pwm-leds"; /* NOTE: bridge TIMER0_CH0 (PA8) and LED1 (PC0) */ pwm_led: pwm_led { pwms = <&pwm0 0 PWM_MSEC(20) PWM_POLARITY_NORMAL>; }; }; aliases { led0 = &led1; led1 = &led2; sw0 = &key_cet; pwm-led0 = &pwm_led; watchdog0 = &fwdgt; }; }; &gpioa { status = "okay"; }; &gpiob { status = "okay"; }; &gpioc { status = "okay"; }; &gpioe { status = "okay"; }; &usart0 { status = "okay"; current-speed = <115200>; pinctrl-0 = <&usart0_default>; pinctrl-names = "default"; }; &usart1 { status = "okay"; current-speed = <115200>; pinctrl-0 = <&usart1_default>; pinctrl-names = "default"; }; &timer0 { status = "okay"; prescaler = <128>; pwm0: pwm { status = "okay"; pinctrl-0 = <&pwm0_default>; pinctrl-names = "default"; }; }; &spi0 { status = "okay"; pinctrl-0 = <&spi0_default>; pinctrl-names = "default"; cs-gpios = <&gpioe 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; nor_flash: gd25q16@0 { compatible ="jedec,spi-nor"; size = <0x1000000>; reg = <0>; spi-max-frequency = <4000000>; status = "okay"; jedec-id = [c8 40 15]; }; }; &adc0 { status = "okay"; pinctrl-0 = <&adc0_default>; pinctrl-names = "default"; }; &fwdgt { status = "okay"; };