1/* 2 * Copyright (c) 2023 STMicroelectronics 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7/dts-v1/; 8#include <st/wba/stm32wba55Xg.dtsi> 9#include <st/wba/stm32wba55cgux-pinctrl.dtsi> 10#include "arduino_r3_connector.dtsi" 11#include <zephyr/dt-bindings/input/input-event-codes.h> 12 13/ { 14 model = "STMicroelectronics STM32WBA55CG-NUCLEO board"; 15 compatible = "st,stm32wba55cg-nucleo"; 16 17 #address-cells = <1>; 18 #size-cells = <1>; 19 20 chosen { 21 zephyr,bt-c2h-uart = &usart1; 22 zephyr,uart-pipe = &usart1; 23 zephyr,console = &usart1; 24 zephyr,shell-uart = &usart1; 25 zephyr,sram = &sram0; 26 zephyr,flash = &flash0; 27 zephyr,code-partition = &slot0_partition; 28 }; 29 30 leds: leds { 31 compatible = "gpio-leds"; 32 33 blue_led_1: led_0 { 34 gpios = <&gpiob 4 GPIO_ACTIVE_LOW>; 35 label = "User LD1"; 36 }; 37 38 green_led_2: led_1 { 39 gpios = <&gpioa 9 GPIO_ACTIVE_LOW>; 40 label = "User LD2"; 41 }; 42 43 red_led_3: led_2 { 44 gpios = <&gpiob 8 GPIO_ACTIVE_LOW>; 45 label = "User LD3"; 46 }; 47 }; 48 49 pwmleds: pwmleds { 50 compatible = "pwm-leds"; 51 52 green_pwm_led: green_pwm_led { 53 pwms = <&pwm3 2 PWM_MSEC(20) PWM_POLARITY_NORMAL>; 54 }; 55 }; 56 57 gpio_keys { 58 compatible = "gpio-keys"; 59 60 user_button_1: button_0 { 61 label = "User B1"; 62 gpios = <&gpioc 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; 63 zephyr,code = <INPUT_KEY_0>; 64 }; 65 66 user_button_2: button_1 { 67 label = "User B2"; 68 gpios = <&gpiob 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; 69 zephyr,code = <INPUT_KEY_1>; 70 }; 71 72 user_button_3: button_2 { 73 label = "User B3"; 74 gpios = <&gpiob 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; 75 zephyr,code = <INPUT_KEY_2>; 76 }; 77 }; 78 79 aliases { 80 led0 = &blue_led_1; 81 led1 = &green_led_2; 82 led2 = &red_led_3; 83 pwm-led0 = &green_pwm_led; 84 sw0 = &user_button_1; 85 sw1 = &user_button_2; 86 sw2 = &user_button_3; 87 mcuboot-led0 = &blue_led_1; 88 mcuboot-button0 = &user_button_1; 89 die-temp0 = &die_temp; 90 }; 91}; 92 93&clk_lsi { 94 status = "okay"; 95}; 96 97&clk_lse { 98 status = "okay"; 99}; 100 101&clk_hse { 102 status = "okay"; 103 hse-div2; 104}; 105 106&clk_hsi { 107 status = "okay"; 108}; 109 110&rcc { 111 clocks = <&clk_hse>; 112 clock-frequency = <DT_FREQ_M(16)>; 113 ahb-prescaler = <1>; 114 ahb5-prescaler = <2>; 115 apb1-prescaler = <1>; 116 apb2-prescaler = <2>; 117 apb7-prescaler = <1>; 118}; 119 120&iwdg { 121 status = "okay"; 122}; 123 124&rtc { 125 status = "okay"; 126 clocks = <&rcc STM32_CLOCK(APB7, 21)>, 127 <&rcc STM32_SRC_LSE RTC_SEL(1)>; 128 prescaler = <32768>; 129}; 130 131&usart1 { 132 clocks = <&rcc STM32_CLOCK(APB2, 14)>, 133 <&rcc STM32_SRC_HSI16 USART1_SEL(2)>; 134 pinctrl-0 = <&usart1_tx_pb12 &usart1_rx_pa8>; 135 pinctrl-1 = <&analog_pb12 &analog_pa8>; 136 pinctrl-names = "default", "sleep"; 137 current-speed = <115200>; 138 status = "okay"; 139}; 140 141&usart2 { 142 clocks = <&rcc STM32_CLOCK(APB1, 17)>, 143 <&rcc STM32_SRC_HSI16 USART2_SEL(2)>; 144 pinctrl-0 = <&usart2_tx_pa12 &usart2_rx_pb8>; 145 pinctrl-1 = <&analog_pa12 &analog_pb8>; 146 pinctrl-names = "default", "sleep"; 147 current-speed = <115200>; 148 status = "okay"; 149}; 150 151&lpuart1 { 152 pinctrl-0 = <&lpuart1_tx_pb5 &lpuart1_rx_pa10>; 153 pinctrl-names = "default"; 154 current-speed = <115200>; 155 status = "okay"; 156}; 157 158&spi1 { 159 pinctrl-0 = <&spi1_nss_pa12 &spi1_sck_pb4 160 &spi1_miso_pb3 &spi1_mosi_pa15>; 161 pinctrl-names = "default"; 162 status = "okay"; 163}; 164 165&i2c1 { 166 pinctrl-0 = <&i2c1_scl_pb2 &i2c1_sda_pb1>; 167 pinctrl-names = "default"; 168 status = "okay"; 169 clock-frequency = <I2C_BITRATE_FAST>; 170}; 171 172&adc4 { 173 pinctrl-0 = <&adc4_in8_pa1 &adc4_in9_pa0>; 174 pinctrl-names = "default"; 175 st,adc-clock-source = "ASYNC"; 176 st,adc-prescaler = <4>; 177 status = "okay"; 178}; 179 180&die_temp { 181 status = "okay"; 182}; 183 184&timers3 { 185 st,prescaler = <10000>; 186 status = "okay"; 187 188 pwm3: pwm { 189 status = "okay"; 190 pinctrl-0 = <&tim3_ch2_pa9>; 191 pinctrl-names = "default"; 192 }; 193}; 194 195stm32_lp_tick_source: &lptim1 { 196 clocks = <&rcc STM32_CLOCK(APB7, 11)>, 197 <&rcc STM32_SRC_LSE LPTIM1_SEL(3)>; 198 status = "okay"; 199}; 200 201&rng { 202 status = "okay"; 203}; 204 205&flash0 { 206 partitions { 207 compatible = "fixed-partitions"; 208 #address-cells = <1>; 209 #size-cells = <1>; 210 211 boot_partition: partition@0 { 212 label = "mcuboot"; 213 reg = <0x00000000 DT_SIZE_K(64)>; 214 }; 215 216 slot0_partition: partition@10000 { 217 label = "image-0"; 218 reg = <0x00010000 DT_SIZE_K(456)>; 219 }; 220 221 slot1_partition: partition@82000 { 222 label = "image-1"; 223 reg = <0x00082000 DT_SIZE_K(448)>; 224 }; 225 226 storage_partition: partition@f2000 { 227 label = "storage"; 228 reg = <0x000f2000 DT_SIZE_K(56)>; 229 }; 230 }; 231}; 232