1/*
2 * Copyright (c) 2024 STMicroelectronics
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/dts-v1/;
8#include <st/u0/stm32u031X8.dtsi>
9#include <st/u0/stm32u031r8tx-pinctrl.dtsi>
10#include "arduino_r3_connector.dtsi"
11#include <zephyr/dt-bindings/input/input-event-codes.h>
12
13/ {
14	model = "STMicroelectronics STM32U83RC-NUCLEO board";
15	compatible = "st,stm32u031r8-nucleo";
16
17	#address-cells = <1>;
18	#size-cells = <1>;
19
20	chosen {
21		zephyr,console = &usart2;
22		zephyr,shell-uart = &usart2;
23		zephyr,sram = &sram0;
24		zephyr,flash = &flash0;
25	};
26
27	leds: leds {
28		compatible = "gpio-leds";
29		green_led_1: led_1 {
30			gpios = <&gpioa 5 GPIO_ACTIVE_HIGH>;
31			label = "User LD4";
32		};
33	};
34
35	gpio_keys {
36		compatible = "gpio-keys";
37		user_button: button {
38			label = "User";
39			gpios = <&gpioc 13 GPIO_ACTIVE_HIGH>;
40			zephyr,code = <INPUT_KEY_0>;
41		};
42	};
43
44	aliases {
45		led0 = &green_led_1;
46		sw0 = &user_button;
47	};
48};
49
50&usart1 {
51	pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>;
52	pinctrl-names = "default";
53	current-speed = <115200>;
54	status = "okay";
55};
56
57&usart2 {
58	pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>;
59	pinctrl-names = "default";
60	current-speed = <115200>;
61	status = "okay";
62};
63
64&clk_hsi {
65	status = "okay";
66};
67
68&pll {
69	div-m = <1>;
70	mul-n = <6>;
71	div-p = <2>;
72	div-q = <2>;
73	div-r = <2>;
74	clocks = <&clk_hsi>;
75	status = "okay";
76};
77
78&rcc {
79	clocks = <&pll>;
80	clock-frequency = <DT_FREQ_M(48)>;
81	ahb-prescaler = <1>;
82	apb1-prescaler = <1>;
83};
84
85&dac1 {
86	status = "okay";
87	pinctrl-0 = <&dac1_out1_pa4>;
88	pinctrl-names = "default";
89};
90
91&i2c1 {
92	pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>;
93	pinctrl-names = "default";
94	status = "okay";
95	clock-frequency = <I2C_BITRATE_FAST>;
96};
97
98&i2c2 {
99	pinctrl-0 = <&i2c2_scl_pa7 &i2c2_sda_pa6>;
100	pinctrl-names = "default";
101	status = "okay";
102	clock-frequency = <I2C_BITRATE_FAST>;
103};
104
105&adc1 {
106	pinctrl-0 = <&adc1_in0_pc0 &adc1_in1_pc1>;
107	pinctrl-names = "default";
108	st,adc-clock-source = "SYNC";
109	st,adc-prescaler = <4>;
110	status = "okay";
111	vref-mv = <3300>;
112};
113
114&timers1 {
115	st,prescaler = <10000>;
116	status = "okay";
117
118	pwm1: pwm {
119		status = "okay";
120		pinctrl-0 = <&tim1_ch1_pa8>;
121		pinctrl-names = "default";
122	};
123};
124
125&timers2 {
126	st,prescaler = <10000>;
127	status = "okay";
128
129	pwm2: pwm {
130		pinctrl-0 = <&tim2_ch1_pa5>;
131		pinctrl-names = "default";
132		status = "okay";
133	};
134};
135