| /* |
| * Copyright (c) 2022, Rtone. |
| * SPDX-License-Identifier: Apache-2.0 |
| */ |
| |
| /dts-v1/; |
| |
| #include <gigadevice/gd32f4xx/gd32f450xk.dtsi> |
| #include "gd32f450z_eval-pinctrl.dtsi" |
| |
| / { |
| model = "GigaDevice GD32F450Z-EVAL"; |
| compatible = "gd,gd32f450z-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 = <&gpiod 4 GPIO_ACTIVE_HIGH>; |
| label = "LED1"; |
| }; |
| led2: led2 { |
| gpios = <&gpiod 5 GPIO_ACTIVE_HIGH>; |
| label = "LED2"; |
| }; |
| led3: led3 { |
| gpios = <&gpiog 3 GPIO_ACTIVE_HIGH>; |
| label = "LED3"; |
| }; |
| }; |
| |
| gpio_keys { |
| compatible = "gpio-keys"; |
| wakeup_key: wakeup_key { |
| label = "WAKEUP_KEY"; |
| gpios = <&gpioa 0 GPIO_ACTIVE_LOW>; |
| }; |
| tamper_key: tamper_key { |
| label = "TAMPER_KEY"; |
| gpios = <&gpioc 13 GPIO_ACTIVE_LOW>; |
| }; |
| user_key: user_key { |
| label = "USER_KEY"; |
| gpios = <&gpiob 14 GPIO_ACTIVE_LOW>; |
| }; |
| }; |
| |
| pwmleds { |
| compatible = "pwm-leds"; |
| |
| /* NOTE: bridge TIMER1_CH2 (PB10) and LED1 (PE2) */ |
| pwm_led: pwm_led { |
| pwms = <&pwm1 2 PWM_MSEC(20) PWM_POLARITY_NORMAL>; |
| }; |
| }; |
| |
| aliases { |
| led0 = &led1; |
| led1 = &led2; |
| sw0 = &user_key; |
| pwm-led0 = &pwm_led; |
| eeprom-0 = &eeprom0; |
| spi-flash0 = &nor_flash; |
| watchdog0 = &fwdgt; |
| }; |
| }; |
| |
| &gpioa { |
| status = "okay"; |
| }; |
| |
| &gpiob { |
| status = "okay"; |
| }; |
| |
| &gpioc { |
| status = "okay"; |
| }; |
| |
| &gpiod { |
| status = "okay"; |
| }; |
| |
| &gpiog { |
| status = "okay"; |
| }; |
| |
| &usart0 { |
| status = "okay"; |
| current-speed = <115200>; |
| pinctrl-0 = <&usart0_default>; |
| pinctrl-names = "default"; |
| }; |
| |
| &dac { |
| status = "okay"; |
| pinctrl-0 = <&dac_default>; |
| pinctrl-names = "default"; |
| }; |
| |
| &timer1 { |
| status = "okay"; |
| |
| pwm1: pwm { |
| status = "okay"; |
| pinctrl-0 = <&pwm1_default>; |
| pinctrl-names = "default"; |
| }; |
| }; |
| |
| &i2c0 { |
| status = "okay"; |
| pinctrl-0 = <&i2c0_default>; |
| pinctrl-names = "default"; |
| |
| eeprom0: eeprom@50 { |
| compatible = "atmel,at24"; |
| reg = <0x50>; |
| status = "okay"; |
| size = <256>; |
| pagesize = <8>; |
| address-width = <8>; |
| timeout = <5>; |
| }; |
| }; |
| |
| &spi5 { |
| status = "okay"; |
| pinctrl-0 = <&spi5_default>; |
| pinctrl-names = "default"; |
| cs-gpios = <&gpiog 9 GPIO_ACTIVE_LOW>; |
| |
| nor_flash: gd25q16@0 { |
| compatible ="jedec,spi-nor"; |
| size = <0x1000000>; |
| reg = <0>; |
| spi-max-frequency = <4000000>; |
| status = "okay"; |
| jedec-id = [c8 40 15]; |
| }; |
| }; |
| |
| &fwdgt { |
| status = "okay"; |
| }; |