| /* |
| * Copyright (c) 2017 Powersoft |
| * |
| * SPDX-License-Identifier: Apache-2.0 |
| */ |
| |
| /dts-v1/; |
| #include <st/stm32f412.dtsi> |
| |
| / { |
| model = "STMicroelectronics STM32F412G-DISCO board"; |
| compatible = "st,stm32f412g-disco", "st,stm32f412"; |
| |
| chosen { |
| zephyr,console = &usart2; |
| zephyr,sram = &sram0; |
| zephyr,flash = &flash0; |
| }; |
| |
| leds { |
| compatible = "gpio-leds"; |
| green_led_1: led@0 { |
| gpios = <&gpioe 0 GPIO_INT_ACTIVE_HIGH>; |
| label = "User LD1"; |
| }; |
| orange_led_2: led@1 { |
| gpios = <&gpioe 1 GPIO_INT_ACTIVE_HIGH>; |
| label = "User LD2"; |
| }; |
| red_led_3: led@2 { |
| gpios = <&gpioe 2 GPIO_INT_ACTIVE_HIGH>; |
| label = "User LD3"; |
| }; |
| blue_led_4: led@3 { |
| gpios = <&gpioe 4 GPIO_INT_ACTIVE_HIGH>; |
| label = "User LD4"; |
| }; |
| }; |
| |
| gpio_keys { |
| compatible = "gpio-keys"; |
| joy_sel: joystick@0 { |
| label = "joystick selection"; |
| gpios = <&gpioa 0 GPIO_INT_ACTIVE_LOW>; |
| }; |
| joy_down: joystick@1 { |
| label = "joystick down"; |
| gpios = <&gpiog 1 GPIO_INT_ACTIVE_LOW>; |
| }; |
| joy_up: joystick@2 { |
| label = "joystick up"; |
| gpios = <&gpiog 0 GPIO_INT_ACTIVE_LOW>; |
| }; |
| joy_left: joystick@3 { |
| label = "joystick left"; |
| gpios = <&gpiof 15 GPIO_INT_ACTIVE_LOW>; |
| }; |
| joy_right: joystick@4 { |
| label = "joystick right"; |
| gpios = <&gpiof 14 GPIO_INT_ACTIVE_LOW>; |
| }; |
| }; |
| |
| aliases { |
| led0 = &green_led_1; |
| led1 = &orange_led_2; |
| led2 = &red_led_3; |
| led3 = &blue_led_4; |
| sw0 = &joy_sel; |
| }; |
| }; |
| |
| &usart2 { |
| current-speed = <115200>; |
| pinctrl-0 = <&usart2_pins_a>; |
| pinctrl-names = "default"; |
| status = "ok"; |
| }; |