1/*
2 * Copyright (c) 2020-2022 Antony Pavlov <antonynpavlov@gmail.com>
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/dts-v1/;
8#include <st/f4/stm32f405Xg.dtsi>
9#include <st/f4/stm32f405rgtx-pinctrl.dtsi>
10#include <zephyr/dt-bindings/input/input-event-codes.h>
11
12/ {
13	model = "Olimex STM32-H405 board";
14	compatible = "olimex,stm32-h405", "st,stm32f405";
15
16	chosen {
17		zephyr,console = &usart2;
18		zephyr,shell-uart = &usart2;
19		zephyr,sram = &sram0;
20		zephyr,flash = &flash0;
21		zephyr,ccm = &ccm0;
22	};
23
24	leds {
25		compatible = "gpio-leds";
26		green_led_1: led_1 {
27			gpios = <&gpioc 12 GPIO_ACTIVE_LOW>;
28			label = "LED1";
29		};
30	};
31
32	gpio_keys {
33		compatible = "gpio-keys";
34		user_button: button {
35			label = "Key";
36			gpios = <&gpioa 0 GPIO_ACTIVE_LOW>;
37			zephyr,code = <INPUT_KEY_0>;
38		};
39	};
40
41	aliases {
42		led0 = &green_led_1;
43		sw0 = &user_button;
44		watchdog0 = &iwdg;
45	};
46};
47
48&clk_lsi {
49	status = "okay";
50};
51
52&clk_hse {
53	clock-frequency = <DT_FREQ_M(8)>;
54	status = "okay";
55};
56
57&pll {
58	div-m = <8>;
59	mul-n = <336>;
60	div-p = <2>;
61	div-q = <7>;
62	clocks = <&clk_hse>;
63	status = "okay";
64};
65
66&rcc {
67	clocks = <&pll>;
68	clock-frequency = <DT_FREQ_M(168)>;
69	ahb-prescaler = <1>;
70	apb1-prescaler = <4>;
71	apb2-prescaler = <2>;
72};
73
74&usart2 {
75	pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>;
76	pinctrl-names = "default";
77	current-speed = <115200>;
78	status = "okay";
79};
80
81&rtc {
82	clocks = <&rcc STM32_CLOCK_BUS_APB1 0x10000000>,
83		 <&rcc STM32_SRC_LSI RTC_SEL(2)>;
84	status = "okay";
85};
86
87&rng {
88	status = "okay";
89};
90
91&iwdg {
92	status = "okay";
93};
94
95zephyr_udc0: &usbotg_fs {
96	pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>;
97	pinctrl-names = "default";
98	status = "okay";
99};
100