1/*
2 * Copyright (c) 2024 STMicroelectronics
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/dts-v1/;
8#include <st/f4/stm32f413Xh.dtsi>
9#include <st/f4/stm32f413z(g-h)tx-pinctrl.dtsi>
10#include "arduino_r3_connector.dtsi"
11#include <zephyr/dt-bindings/input/input-event-codes.h>
12
13/ {
14	model = "STMicroelectronics STM32F413H-DISCO board";
15	compatible = "st,stm32f413h-disco";
16
17	chosen {
18		zephyr,console = &usart6;
19		zephyr,shell-uart = &usart6;
20		zephyr,sram = &sram0;
21		zephyr,flash = &flash0;
22	};
23
24	leds {
25		compatible = "gpio-leds";
26		green_led_1: led_1 {
27			gpios = <&gpioc 5 GPIO_ACTIVE_HIGH>;
28			label = "User LD1";
29		};
30		red_led_2: led_2 {
31			gpios = <&gpioe 3 GPIO_ACTIVE_HIGH>;
32			label = "User LD4";
33		};
34	};
35
36	aliases {
37		led0 = &green_led_1;
38		led1 = &red_led_2;
39
40	};
41};
42
43&clk_lsi {
44	status = "okay";
45};
46
47&clk_hse {
48	hse-bypass;
49	clock-frequency = <DT_FREQ_M(8)>; /* STLink 8MHz clock */
50	status = "okay";
51};
52
53&pll {
54	div-m = <4>;
55	mul-n = <100>;
56	div-p = <2>;
57	div-q = <8>;
58	clocks = <&clk_hse>;
59	status = "okay";
60};
61
62&rcc {
63	clocks = <&pll>;
64	clock-frequency = <DT_FREQ_M(100)>;
65	ahb-prescaler = <1>;
66	apb1-prescaler = <2>;
67	apb2-prescaler = <1>;
68};
69
70&usart6 {
71	pinctrl-0 = <&usart6_tx_pg14 &usart6_rx_pg9>;
72	pinctrl-names = "default";
73	current-speed = <115200>;
74	status = "okay";
75};
76
77&uart7 {
78	pinctrl-0 = <&uart7_tx_pf7 &uart7_rx_pf6>;
79	pinctrl-names = "default";
80	current-speed = <115200>;
81	status = "okay";
82};
83
84&i2c2 {
85	pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb11>;
86	pinctrl-names = "default";
87	clock-frequency = <I2C_BITRATE_FAST>;
88	status = "okay";
89};
90
91&spi3 {
92	pinctrl-0 = <&spi3_nss_pa15 &spi3_sck_pb12
93		     &spi3_miso_pb4 &spi3_mosi_pb5>;
94	pinctrl-names = "default";
95	status = "okay";
96};
97
98&rtc {
99	clocks = <&rcc STM32_CLOCK_BUS_APB1 0x10000000>,
100		 <&rcc STM32_SRC_LSI RTC_SEL(2)>;
101	status = "okay";
102};
103