1/*
2 * Copyright (c) 2017 Linaro Limited
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/dts-v1/;
8#include <st/f4/stm32f411Xe.dtsi>
9#include <st/f4/stm32f411r(c-e)tx-pinctrl.dtsi>
10#include "arduino_r3_connector.dtsi"
11#include "st_morpho_connector.dtsi"
12#include <zephyr/dt-bindings/input/input-event-codes.h>
13
14/ {
15	model = "STMicroelectronics STM32F411RE-NUCLEO board";
16	compatible = "st,stm32f411re-nucleo";
17
18	chosen {
19		zephyr,console = &usart2;
20		zephyr,shell-uart = &usart2;
21		zephyr,sram = &sram0;
22		zephyr,flash = &flash0;
23	};
24
25	leds: leds {
26		compatible = "gpio-leds";
27		green_led_2: led_2 {
28			gpios = <&gpioa 5 GPIO_ACTIVE_HIGH>;
29			label = "User LD2";
30		};
31	};
32
33	gpio_keys {
34		compatible = "gpio-keys";
35		user_button: button {
36			label = "User";
37			gpios = <&gpioc 13 GPIO_ACTIVE_LOW>;
38			zephyr,code = <INPUT_KEY_0>;
39		};
40	};
41
42	aliases {
43		led0 = &green_led_2;
44		sw0 = &user_button;
45	};
46};
47
48&clk_lsi {
49	status = "okay";
50};
51
52&clk_hse {
53	hse-bypass;
54	clock-frequency = <DT_FREQ_M(8)>; /* STLink 8MHz clock */
55	status = "okay";
56};
57
58&pll {
59	div-m = <8>;
60	mul-n = <384>;
61	div-p = <4>;
62	div-q = <8>;
63	clocks = <&clk_hse>;
64	status = "okay";
65};
66
67&rcc {
68	clocks = <&pll>;
69	clock-frequency = <DT_FREQ_M(96)>;
70	ahb-prescaler = <1>;
71	apb1-prescaler = <2>;
72	apb2-prescaler = <1>;
73};
74
75&usart1 {
76	pinctrl-0 = <&usart1_tx_pb6 &usart1_rx_pb7>;
77	pinctrl-names = "default";
78	current-speed = <115200>;
79	status = "okay";
80};
81
82&usart2 {
83	pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>;
84	pinctrl-names = "default";
85	current-speed = <115200>;
86	status = "okay";
87};
88
89&i2c1 {
90	pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>;
91	pinctrl-names = "default";
92	status = "okay";
93	clock-frequency = <I2C_BITRATE_FAST>;
94};
95
96&i2c2 {
97	pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb3>;
98	pinctrl-names = "default";
99	clock-frequency = <I2C_BITRATE_FAST>;
100};
101
102&i2c3 {
103	pinctrl-0 = <&i2c3_scl_pa8 &i2c3_sda_pb4>;
104	pinctrl-names = "default";
105	clock-frequency = <I2C_BITRATE_FAST>;
106};
107
108&i2s1 {
109	pinctrl-0 = <&i2s1_ck_pa5 &i2s1_sd_pa7>;
110	pinctrl-names = "default";
111};
112
113&spi1 {
114	pinctrl-0 = <&spi1_nss_pa4 &spi1_sck_pa5
115		     &spi1_miso_pa6 &spi1_mosi_pa7>;
116	pinctrl-names = "default";
117	status = "okay";
118};
119
120&rtc {
121	clocks = <&rcc STM32_CLOCK_BUS_APB1 0x10000000>,
122		 <&rcc STM32_SRC_LSI RTC_SEL(2)>;
123	status = "okay";
124};
125