1/* 2 * Copyright (c) 2017 Powersoft 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7/dts-v1/; 8#include <st/f4/stm32f412Xg.dtsi> 9#include <st/f4/stm32f412z(e-g)tx-pinctrl.dtsi> 10#include "arduino_r3_connector.dtsi" 11 12/ { 13 model = "STMicroelectronics STM32F412G-DISCO board"; 14 compatible = "st,stm32f412g-disco"; 15 16 chosen { 17 zephyr,console = &usart2; 18 zephyr,shell-uart = &usart2; 19 zephyr,sram = &sram0; 20 zephyr,flash = &flash0; 21 }; 22 23 leds { 24 compatible = "gpio-leds"; 25 green_led_1: led_1 { 26 gpios = <&gpioe 0 GPIO_ACTIVE_HIGH>; 27 label = "User LD1"; 28 }; 29 orange_led_2: led_2 { 30 gpios = <&gpioe 1 GPIO_ACTIVE_HIGH>; 31 label = "User LD2"; 32 }; 33 red_led_3: led_3 { 34 gpios = <&gpioe 2 GPIO_ACTIVE_HIGH>; 35 label = "User LD3"; 36 }; 37 blue_led_4: led_4 { 38 gpios = <&gpioe 4 GPIO_ACTIVE_HIGH>; 39 label = "User LD4"; 40 }; 41 }; 42 43 gpio_keys { 44 compatible = "gpio-keys"; 45 joy_sel: joystick_selection { 46 label = "joystick selection"; 47 gpios = <&gpioa 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; 48 }; 49 joy_down: joystick_down { 50 label = "joystick down"; 51 gpios = <&gpiog 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; 52 }; 53 joy_up: joystick_up { 54 label = "joystick up"; 55 gpios = <&gpiog 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; 56 }; 57 joy_left: joystick_left { 58 label = "joystick left"; 59 gpios = <&gpiof 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; 60 }; 61 joy_right: joystick_right { 62 label = "joystick right"; 63 gpios = <&gpiof 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; 64 }; 65 }; 66 67 aliases { 68 led0 = &green_led_1; 69 led1 = &orange_led_2; 70 led2 = &red_led_3; 71 led3 = &blue_led_4; 72 sw0 = &joy_sel; 73 }; 74}; 75 76&clk_lsi { 77 status = "okay"; 78}; 79 80&clk_hse { 81 hse-bypass; 82 clock-frequency = <DT_FREQ_M(8)>; /* STLink 8MHz clock */ 83 status = "okay"; 84}; 85 86&pll { 87 div-m = <4>; 88 mul-n = <100>; 89 div-p = <2>; 90 div-q = <8>; 91 clocks = <&clk_hse>; 92 status = "okay"; 93}; 94 95&rcc { 96 clocks = <&pll>; 97 clock-frequency = <DT_FREQ_M(100)>; 98 ahb-prescaler = <1>; 99 apb1-prescaler = <2>; 100 apb2-prescaler = <1>; 101}; 102 103&usart2 { 104 pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; 105 pinctrl-names = "default"; 106 current-speed = <115200>; 107 status = "okay"; 108}; 109 110&usart6 { 111 pinctrl-0 = <&usart6_tx_pg14 &usart6_rx_pg9>; 112 pinctrl-names = "default"; 113 current-speed = <115200>; 114 status = "okay"; 115}; 116 117&i2c2 { 118 pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb9>; 119 pinctrl-names = "default"; 120 clock-frequency = <I2C_BITRATE_FAST>; 121 status = "okay"; 122}; 123 124&spi1 { 125 pinctrl-0 = <&spi1_nss_pa15 &spi1_sck_pa5 126 &spi1_miso_pa6 &spi1_mosi_pa7>; 127 pinctrl-names = "default"; 128 status = "okay"; 129}; 130 131&rtc { 132 clocks = <&rcc STM32_CLOCK_BUS_APB1 0x10000000>, 133 <&rcc STM32_SRC_LSI RTC_SEL(2)>; 134 status = "okay"; 135}; 136 137&quadspi { 138 pinctrl-0 = <&quadspi_clk_pb2 &quadspi_bk1_ncs_pg6 139 &quadspi_bk1_io0_pf8 &quadspi_bk1_io1_pf9 140 &quadspi_bk1_io2_pf7 &quadspi_bk1_io3_pf6>; 141 pinctrl-names = "default"; 142 status = "okay"; 143 144 n25q128a1: qspi-nor-flash@0 { 145 compatible = "st,stm32-qspi-nor"; 146 reg = <0>; 147 qspi-max-frequency = <72000000>; 148 size = <DT_SIZE_M(16*8)>; 149 status = "okay"; 150 }; 151}; 152