1/*
2 * Copyright (c) 2024 STMicroelectronics
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/dts-v1/;
8#include <st/h5/stm32h533Xe.dtsi>
9#include <st/h5/stm32h533retx-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 STM32H533RE-NUCLEO board";
16	compatible = "st,stm32h533re-nucleo";
17
18	chosen {
19		zephyr,console = &usart2;
20		zephyr,shell-uart = &usart2;
21		zephyr,sram = &sram1;
22		zephyr,flash = &flash0;
23	};
24
25	leds: leds {
26		compatible = "gpio-leds";
27		green_led_2: led_42 {
28			gpios = <&gpioa 5 GPIO_ACTIVE_LOW>;
29			label = "User LD2";
30		};
31	};
32
33
34	pwmleds {
35		compatible = "pwm-leds";
36
37		green_pwm_led: green_pwm_led {
38			pwms = <&pwm3 1 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
39		};
40	};
41
42	gpio_keys {
43		compatible = "gpio-keys";
44		user_button: button {
45			label = "User";
46			gpios = <&gpioc 13 GPIO_ACTIVE_HIGH>;
47			zephyr,code = <INPUT_KEY_0>;
48		};
49	};
50
51	aliases {
52		led0 = &green_led_2;
53		pwm-led0 = &green_pwm_led;
54		sw0 = &user_button;
55		watchdog0 = &iwdg;
56		die-temp0 = &die_temp;
57		volt-sensor0 = &vref;
58		volt-sensor1 = &vbat;
59	};
60};
61
62&clk_csi {
63	status = "okay";
64};
65
66&clk_hsi {
67	status = "okay";
68};
69
70&clk_hse {
71	clock-frequency = <DT_FREQ_M(24)>;
72	status = "okay";
73};
74
75&pll {
76	div-m = <2>;
77	mul-n = <40>;
78	div-p = <2>;
79	div-q = <2>;
80	div-r = <2>;
81	clocks = <&clk_hse>;
82	status = "okay";
83};
84
85&rcc {
86	clocks = <&pll>;
87	clock-frequency = <DT_FREQ_M(240)>;
88	ahb-prescaler = <1>;
89	apb1-prescaler = <1>;
90	apb2-prescaler = <1>;
91	apb3-prescaler = <1>;
92};
93
94&usart1 {
95	pinctrl-0 = <&usart1_tx_pb14 &usart1_rx_pb15>;
96	pinctrl-names = "default";
97	current-speed = <115200>;
98	status = "okay";
99};
100
101&usart2 {
102	pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>;
103	pinctrl-names = "default";
104	current-speed = <115200>;
105	status = "okay";
106};
107
108&iwdg {
109	status = "okay";
110};
111
112&timers3 {
113	st,prescaler = <1000>;
114	status = "okay";
115
116	pwm3: pwm {
117		pinctrl-0 = <&tim3_ch3_pb0>;
118		pinctrl-names = "default";
119		status = "okay";
120	};
121};
122
123&adc1 {
124	pinctrl-0 = <&adc1_inp0_pa0>; /* Arduino A0 */
125	pinctrl-names = "default";
126	st,adc-clock-source = <ASYNC>;
127	st,adc-prescaler = <8>;
128	status = "okay";
129};
130
131&die_temp {
132	status = "okay";
133};
134
135&vref {
136	status = "okay";
137};
138
139&vbat {
140	status = "okay";
141};
142
143&rng {
144	status = "okay";
145};
146
147&clk_lse {
148	status = "okay";
149};
150
151&rtc {
152	clocks = <&rcc STM32_CLOCK_BUS_APB3 0x00200000>,
153		 <&rcc STM32_SRC_LSE RTC_SEL(1)>;
154	status = "okay";
155};
156