|
| 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 &lpuart1_rts_pg6 &lpuart1_cts_pg5>; |
| 103 | + pinctrl-names = "default"; |
| 104 | + current-speed = <115200>; |
| 105 | + status = "okay"; |
| 106 | +}; |
| 107 | + |
| 108 | +&usart1 { |
| 109 | + status = "okay"; |
| 110 | + pinctrl-0 = <&usart1_tx_pb6 &usart1_rx_pb7>; |
| 111 | + pinctrl-names = "default"; |
| 112 | + current-speed = <115200>; |
| 113 | +}; |
| 114 | + |
| 115 | +&i2c2 { |
| 116 | + status = "okay"; |
| 117 | + pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb11>; |
| 118 | + pinctrl-names = "default"; |
| 119 | + clock-frequency = <I2C_BITRATE_FAST>; |
| 120 | +}; |
| 121 | + |
| 122 | +&i2c4 { |
| 123 | + status = "okay"; |
| 124 | + pinctrl-0 = <&i2c4_scl_pd12 &i2c4_sda_pd13>; |
| 125 | + /* use <&i2c4_scl_pf14 &i2c4_sda_pf15> for the JMISC connector */ |
| 126 | + pinctrl-names = "default"; |
| 127 | + clock-frequency = <I2C_BITRATE_FAST>; |
| 128 | +}; |
| 129 | + |
| 130 | +&spi2 { |
| 131 | + status = "okay"; |
| 132 | + pinctrl-0 = <&spi2_sck_pb13 &spi2_miso_pb14 &spi2_mosi_pb15 &spi2_nss_pb9>; |
| 133 | + /* use <&spi2_sck_pd1 &spi2_miso_pc2 &spi2_mosi_pc3> for the ICSP connector */ |
| 134 | + pinctrl-names = "default"; |
| 135 | +}; |
| 136 | + |
| 137 | +&spi3 { |
| 138 | + status = "okay"; |
| 139 | + pinctrl-0 = <&spi3_sck_pg9 &spi3_miso_pg10 &spi3_mosi_pb5 &spi3_nss_pg12>; |
| 140 | + pinctrl-names = "default"; |
| 141 | +}; |
| 142 | + |
| 143 | +&aes { |
| 144 | + status = "okay"; |
| 145 | +}; |
| 146 | + |
| 147 | +&rng { |
| 148 | + status = "okay"; |
| 149 | +}; |
| 150 | + |
| 151 | +zephyr_udc0: &usbotg_fs { |
| 152 | + pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>; |
| 153 | + pinctrl-names = "default"; |
| 154 | + status = "disabled"; |
| 155 | +}; |
| 156 | + |
| 157 | +&adc1 { |
| 158 | + pinctrl-0 = <&adc1_in9_pa4 |
| 159 | + &adc1_in10_pa5 |
| 160 | + &adc1_in11_pa6 |
| 161 | + &adc1_in12_pa7 |
| 162 | + &adc1_in2_pc1 |
| 163 | + &adc1_in1_pc0>; |
| 164 | + pinctrl-names = "default"; |
| 165 | + status = "okay"; |
| 166 | + |
| 167 | + #address-cells = <1>; |
| 168 | + #size-cells = <0>; |
| 169 | + |
| 170 | + channel@1 { |
| 171 | + reg = <1>; |
| 172 | + zephyr,gain = "ADC_GAIN_1"; |
| 173 | + zephyr,reference = "ADC_REF_INTERNAL"; |
| 174 | + zephyr,acquisition-time = <ADC_ACQ_TIME_MAX>; |
| 175 | + zephyr,resolution = <14>; |
| 176 | + }; |
| 177 | + |
| 178 | + channel@2 { |
| 179 | + reg = <2>; |
| 180 | + zephyr,gain = "ADC_GAIN_1"; |
| 181 | + zephyr,reference = "ADC_REF_INTERNAL"; |
| 182 | + zephyr,acquisition-time = <ADC_ACQ_TIME_MAX>; |
| 183 | + zephyr,resolution = <14>; |
| 184 | + }; |
| 185 | + |
| 186 | + channel@9 { |
| 187 | + reg = <9>; |
| 188 | + zephyr,gain = "ADC_GAIN_1"; |
| 189 | + zephyr,reference = "ADC_REF_INTERNAL"; |
| 190 | + zephyr,acquisition-time = <ADC_ACQ_TIME_MAX>; |
| 191 | + zephyr,resolution = <14>; |
| 192 | + }; |
| 193 | + |
| 194 | + channel@a { |
| 195 | + reg = <10>; |
| 196 | + zephyr,gain = "ADC_GAIN_1"; |
| 197 | + zephyr,reference = "ADC_REF_INTERNAL"; |
| 198 | + zephyr,acquisition-time = <ADC_ACQ_TIME_MAX>; |
| 199 | + zephyr,resolution = <14>; |
| 200 | + }; |
| 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 | + |
| 210 | + channel@c { |
| 211 | + reg = <12>; |
| 212 | + zephyr,gain = "ADC_GAIN_1"; |
| 213 | + zephyr,reference = "ADC_REF_INTERNAL"; |
| 214 | + zephyr,acquisition-time = <ADC_ACQ_TIME_MAX>; |
| 215 | + zephyr,resolution = <14>; |
| 216 | + }; |
| 217 | +}; |
| 218 | + |
| 219 | +&die_temp { |
| 220 | + status = "okay"; |
| 221 | +}; |
| 222 | + |
| 223 | +&dac1 { |
| 224 | + pinctrl-0 = <&dac1_out1_pa4 &dac1_out2_pa5>; |
| 225 | + pinctrl-names = "default"; |
| 226 | + status = "okay"; |
| 227 | +}; |
| 228 | + |
| 229 | +&rtc { |
| 230 | + clocks = <&rcc STM32_CLOCK_BUS_APB3 0x00200000>, |
| 231 | + <&rcc STM32_SRC_LSE RTC_SEL(1)>; |
| 232 | + status = "okay"; |
| 233 | +}; |
| 234 | + |
| 235 | +&iwdg { |
| 236 | + status = "okay"; |
| 237 | +}; |
| 238 | + |
| 239 | +&vref1 { |
| 240 | + status = "okay"; |
| 241 | +}; |
| 242 | + |
| 243 | +&vbat4 { |
| 244 | + status = "okay"; |
| 245 | +}; |
| 246 | + |
| 247 | +&gpiog { |
| 248 | + status = "okay"; |
| 249 | +}; |
0 commit comments