1
+ /*
2
+ * Copyright (c) 2021 Linaro Limited
3
+ * Copyright (c) 2024 STMicroelectronics
4
+ * Copyright (c) 2025 Arduino SA
5
+ *
6
+ * SPDX-License-Identifier: Apache-2.0
7
+ */
8
+
9
+ #include <st/u5/stm32u585Xi.dtsi>
10
+ #include <st/u5/stm32u585aiixq-pinctrl.dtsi>
11
+ #include "arduino_r3_connector.dtsi"
12
+ #include <zephyr/dt-bindings/input/input-event-codes.h>
13
+
14
+ / {
15
+ leds {
16
+ compatible = "gpio-leds";
17
+
18
+ led3_red: led3_red {
19
+ gpios = <&gpioh 10 GPIO_ACTIVE_LOW>;
20
+ label = "RGB LED 3 Red";
21
+ };
22
+
23
+ led3_green: led3_green {
24
+ gpios = <&gpioh 11 GPIO_ACTIVE_LOW>;
25
+ label = "RGB LED 3 Green";
26
+ };
27
+
28
+ led3_blue: led3_blue {
29
+ gpios = <&gpioh 12 GPIO_ACTIVE_LOW>;
30
+ label = "RGB LED 3 Blue";
31
+ };
32
+
33
+ led4_red: led4_red {
34
+ gpios = <&gpioh 13 GPIO_ACTIVE_LOW>;
35
+ label = "RGB LED 4 Red";
36
+ };
37
+
38
+ led4_green: led4_green {
39
+ gpios = <&gpioh 14 GPIO_ACTIVE_LOW>;
40
+ label = "RGB LED 4 Green";
41
+ };
42
+
43
+ led4_blue: led4_blue {
44
+ gpios = <&gpioh 15 GPIO_ACTIVE_LOW>;
45
+ label = "RGB LED 4 Blue";
46
+ };
47
+ };
48
+
49
+ aliases {
50
+ watchdog0 = &iwdg;
51
+ die-temp0 = &die_temp;
52
+ volt-sensor0 = &vref1;
53
+ volt-sensor1 = &vbat4;
54
+ };
55
+ };
56
+
57
+ &clk_hsi48 {
58
+ status = "okay";
59
+ };
60
+
61
+ &clk_hse {
62
+ clock-frequency = <DT_FREQ_M(16)>;
63
+ status = "okay";
64
+ };
65
+
66
+ &clk_lse {
67
+ clock-frequency = <32768>;
68
+ status = "okay";
69
+ };
70
+
71
+ &clk_msis {
72
+ status = "okay";
73
+ msi-range = <4>;
74
+ msi-pll-mode;
75
+ };
76
+
77
+ &pll1 {
78
+ div-m = <1>;
79
+ mul-n = <80>;
80
+ div-q = <2>;
81
+ div-r = <2>;
82
+ clocks = <&clk_msis>;
83
+ status = "okay";
84
+ };
85
+
86
+ &rcc {
87
+ clocks = <&pll1>;
88
+ clock-frequency = <DT_FREQ_M(160)>;
89
+ ahb-prescaler = <1>;
90
+ apb1-prescaler = <1>;
91
+ apb2-prescaler = <1>;
92
+ apb3-prescaler = <1>;
93
+ };
94
+
95
+ stm32_lp_tick_source: &lptim1 {
96
+ clocks = <&rcc STM32_CLOCK_BUS_APB3 0x00000800>,
97
+ <&rcc STM32_SRC_LSE LPTIM1_SEL(3)>;
98
+ status = "okay";
99
+ };
100
+
101
+ &lpuart1 {
102
+ pinctrl-0 = <&lpuart1_tx_pg7 &lpuart1_rx_pg8
103
+ &lpuart1_rts_pg6 &lpuart1_cts_pg5>;
104
+ pinctrl-names = "default";
105
+ current-speed = <115200>;
106
+ status = "okay";
107
+ };
108
+
109
+ &usart1 {
110
+ status = "okay";
111
+ pinctrl-0 = <&usart1_tx_pb6 &usart1_rx_pb7>;
112
+ pinctrl-names = "default";
113
+ current-speed = <115200>;
114
+ };
115
+
116
+ &i2c2 {
117
+ status = "okay";
118
+ pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb11>;
119
+ pinctrl-names = "default";
120
+ clock-frequency = <I2C_BITRATE_FAST>;
121
+ };
122
+
123
+ &i2c4 {
124
+ status = "okay";
125
+ pinctrl-0 = <&i2c4_scl_pd12 &i2c4_sda_pd13>;
126
+ pinctrl-1 = <&i2c4_scl_pf14 &i2c4_sda_pf15>;
127
+ pinctrl-names = "default", "sleep"; /* TODO: sleep is jmisc mux */
128
+ clock-frequency = <I2C_BITRATE_FAST>;
129
+ };
130
+
131
+ &spi2 {
132
+ status = "okay";
133
+ pinctrl-0 = <&spi2_sck_pb13
134
+ &spi2_miso_pb14 &spi2_mosi_pb15 &spi2_nss_pb9>;
135
+ pinctrl-1 = <&spi2_sck_pd1
136
+ &spi2_miso_pc2 &spi2_mosi_pc3>;
137
+ pinctrl-names = "default", "sleep"; /* TODO: sleep is ICSP mux */
138
+ };
139
+
140
+ &spi3 {
141
+ status = "okay";
142
+ pinctrl-0 = <&spi3_sck_pg9
143
+ &spi3_miso_pg10 &spi3_mosi_pb5 &spi3_nss_pg12>;
144
+ pinctrl-names = "default";
145
+ };
146
+
147
+ &aes {
148
+ status = "okay";
149
+ };
150
+
151
+ &rng {
152
+ status = "okay";
153
+ };
154
+
155
+ zephyr_udc0: &usbotg_fs {
156
+ pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>;
157
+ pinctrl-names = "default";
158
+ status = "disabled";
159
+ };
160
+
161
+ &adc1 {
162
+ pinctrl-0 = <&adc1_in9_pa4
163
+ &adc1_in10_pa5
164
+ &adc1_in11_pa6
165
+ &adc1_in12_pa7
166
+ &adc1_in2_pc1
167
+ &adc1_in1_pc0>;
168
+ pinctrl-names = "default";
169
+ status = "okay";
170
+
171
+ #address-cells = <1>;
172
+ #size-cells = <0>;
173
+
174
+ channel@1 {
175
+ reg = <1>;
176
+ zephyr,gain = "ADC_GAIN_1";
177
+ zephyr,reference = "ADC_REF_INTERNAL";
178
+ zephyr,acquisition-time = <ADC_ACQ_TIME_MAX>;
179
+ zephyr,resolution = <14>;
180
+ };
181
+ channel@2 {
182
+ reg = <2>;
183
+ zephyr,gain = "ADC_GAIN_1";
184
+ zephyr,reference = "ADC_REF_INTERNAL";
185
+ zephyr,acquisition-time = <ADC_ACQ_TIME_MAX>;
186
+ zephyr,resolution = <14>;
187
+ };
188
+ channel@9 {
189
+ reg = <9>;
190
+ zephyr,gain = "ADC_GAIN_1";
191
+ zephyr,reference = "ADC_REF_INTERNAL";
192
+ zephyr,acquisition-time = <ADC_ACQ_TIME_MAX>;
193
+ zephyr,resolution = <14>;
194
+ };
195
+ channel@a {
196
+ reg = <10>;
197
+ zephyr,gain = "ADC_GAIN_1";
198
+ zephyr,reference = "ADC_REF_INTERNAL";
199
+ zephyr,acquisition-time = <ADC_ACQ_TIME_MAX>;
200
+ zephyr,resolution = <14>;
201
+ };
202
+ channel@b {
203
+ reg = <11>;
204
+ zephyr,gain = "ADC_GAIN_1";
205
+ zephyr,reference = "ADC_REF_INTERNAL";
206
+ zephyr,acquisition-time = <ADC_ACQ_TIME_MAX>;
207
+ zephyr,resolution = <14>;
208
+ };
209
+ channel@c {
210
+ reg = <12>;
211
+ zephyr,gain = "ADC_GAIN_1";
212
+ zephyr,reference = "ADC_REF_INTERNAL";
213
+ zephyr,acquisition-time = <ADC_ACQ_TIME_MAX>;
214
+ zephyr,resolution = <14>;
215
+ };
216
+ };
217
+
218
+ &die_temp {
219
+ status = "okay";
220
+ };
221
+
222
+ &dac1 {
223
+ pinctrl-0 = <&dac1_out1_pa4 &dac1_out2_pa5>;
224
+ pinctrl-names = "default";
225
+ status = "okay";
226
+ };
227
+
228
+ &rtc {
229
+ clocks = <&rcc STM32_CLOCK_BUS_APB3 0x00200000>,
230
+ <&rcc STM32_SRC_LSE RTC_SEL(1)>;
231
+ status = "okay";
232
+ };
233
+
234
+ &iwdg {
235
+ status = "okay";
236
+ };
237
+
238
+ &vref1 {
239
+ status = "okay";
240
+ };
241
+
242
+ &vbat4 {
243
+ status = "okay";
244
+ };
245
+
246
+ &gpiog {
247
+ status = "okay";
248
+ };
0 commit comments