1/* 2 * Copyright (c) 2020-2024 STMicroelectronics 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7/dts-v1/; 8#include <st/wl/stm32wl55Xc.dtsi> 9#include <st/wl/stm32wl55jcix-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 STM32WL55JC-NUCLEO board"; 16 compatible = "st,stm32wl55-nucleo"; 17 18 chosen { 19 zephyr,console = &lpuart1; 20 zephyr,shell-uart = &lpuart1; 21 zephyr,sram = &sram0; 22 zephyr,flash = &flash0; 23 zephyr,code-partition = &slot0_partition; 24 }; 25 26 leds: leds { 27 compatible = "gpio-leds"; 28 blue_led_1: led_0 { 29 gpios = <&gpiob 15 GPIO_ACTIVE_HIGH>; 30 label = "User LED1"; 31 }; 32 green_led_2: led_1 { 33 gpios = <&gpiob 9 GPIO_ACTIVE_HIGH>; 34 label = "User LED2"; 35 }; 36 green_led_3: led_2 { 37 gpios = <&gpiob 11 GPIO_ACTIVE_HIGH>; 38 label = "User LED3"; 39 }; 40 }; 41 42 gpio_keys { 43 compatible = "gpio-keys"; 44 user_button_1: button_0 { 45 label = "SW1"; 46 gpios = <&gpioa 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; 47 zephyr,code = <INPUT_KEY_0>; 48 }; 49 user_button_2: button_1 { 50 label = "SW2"; 51 gpios = <&gpioa 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; 52 zephyr,code = <INPUT_KEY_1>; 53 }; 54 user_button_3: button_2 { 55 label = "SW3"; 56 gpios = <&gpioc 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; 57 zephyr,code = <INPUT_KEY_2>; 58 }; 59 }; 60 61 aliases { 62 led0 = &green_led_2; 63 sw0 = &user_button_1; 64 sw1 = &user_button_2; 65 sw2 = &user_button_3; 66 lora0 = &lora; 67 watchdog0 = &iwdg; 68 die-temp0 = &die_temp; 69 volt-sensor0 = &vref; 70 volt-sensor1 = &vbat; 71 }; 72}; 73 74&clk_lsi { 75 status = "okay"; 76}; 77 78stm32_lp_tick_source: &lptim1 { 79 clocks = <&rcc STM32_CLOCK_BUS_APB1 0x80000000>, 80 <&rcc STM32_SRC_LSI LPTIM1_SEL(1)>; 81 status = "okay"; 82}; 83 84&clk_hsi { 85 status = "okay"; 86}; 87 88&clk_lse { 89 status = "okay"; 90}; 91 92&pll { 93 div-m = <1>; 94 mul-n = <6>; 95 div-r = <2>; 96 div-q = <2>; 97 clocks = <&clk_hsi>; 98 status = "okay"; 99}; 100 101&rcc { 102 clocks = <&pll>; 103 clock-frequency = <DT_FREQ_M(48)>; 104 cpu1-prescaler = <1>; 105 cpu2-prescaler = <1>; 106 ahb3-prescaler = <1>; 107 apb1-prescaler = <1>; 108 apb2-prescaler = <1>; 109}; 110 111&lpuart1 { 112 pinctrl-0 = <&lpuart1_tx_pa2 &lpuart1_rx_pa3>; 113 pinctrl-names = "default"; 114 current-speed = <115200>; 115 status = "okay"; 116}; 117 118&i2c2 { 119 pinctrl-0 = <&i2c2_scl_pa12 &i2c2_sda_pa11>; 120 pinctrl-names = "default"; 121 status = "okay"; 122 clock-frequency = <I2C_BITRATE_FAST>; 123}; 124 125&spi1 { 126 pinctrl-0 = <&spi1_nss_pa4 &spi1_sck_pa5 127 &spi1_miso_pa6 &spi1_mosi_pa7>; 128 pinctrl-names = "default"; 129 status = "okay"; 130}; 131 132 133&dac1 { 134 pinctrl-0 = <&dac_out1_pa10>; 135 pinctrl-names = "default"; 136 status = "okay"; 137}; 138 139&timers2 { 140 status = "okay"; 141 pwm2: pwm { 142 status = "okay"; 143 pinctrl-0 = <&tim2_ch4_pb11>; 144 pinctrl-names = "default"; 145 }; 146}; 147 148 149&adc1 { 150 pinctrl-0 = <&adc_in5_pb1>; 151 pinctrl-names = "default"; 152 st,adc-clock-source = <SYNC>; 153 st,adc-prescaler = <4>; 154 status = "okay"; 155}; 156 157&die_temp { 158 status = "okay"; 159}; 160 161&aes { 162 status = "okay"; 163}; 164 165&rng { 166 status = "okay"; 167}; 168 169&iwdg { 170 status = "okay"; 171}; 172 173&subghzspi { 174 status = "okay"; 175 lora: radio@0 { 176 status = "okay"; 177 tx-enable-gpios = <&gpioc 4 GPIO_ACTIVE_LOW>; /* FE_CTRL1 */ 178 rx-enable-gpios = <&gpioc 5 GPIO_ACTIVE_LOW>; /* FE_CTRL2 */ 179 dio3-tcxo-voltage = <SX126X_DIO3_TCXO_1V7>; 180 tcxo-power-startup-delay-ms = <5>; 181 /* High-power output is selected as a consequence of using 182 * tx/rx-enable-gpio to control FE_CTRL1 and FE_CTRL2. Low-power 183 * output would require both FE_CTRL1 and FE_CTRL2 to be high, 184 * which is not currently supported by the driver. 185 */ 186 power-amplifier-output = "rfo-hp"; 187 rfo-lp-max-power = <15>; 188 rfo-hp-max-power = <22>; 189 }; 190}; 191 192&flash0 { 193 partitions { 194 compatible = "fixed-partitions"; 195 #address-cells = <1>; 196 #size-cells = <1>; 197 198 boot_partition: partition@0 { 199 label = "mcuboot"; 200 reg = <0x00000000 DT_SIZE_K(32)>; 201 read-only; 202 }; 203 slot0_partition: partition@8000 { 204 label = "image-0"; 205 reg = <0x00008000 DT_SIZE_K(104)>; 206 }; 207 slot1_partition: partition@22000 { 208 label = "image-1"; 209 reg = <0x00022000 DT_SIZE_K(104)>; 210 }; 211 212 /* 213 * Set 16kB of storage (8x2kB pages) at the end of the 256kB of 214 * flash. 215 */ 216 storage_partition: partition@3c000 { 217 label = "storage"; 218 reg = <0x0003c000 DT_SIZE_K(16)>; 219 }; 220 }; 221}; 222 223&rtc { 224 clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00000400>, 225 <&rcc STM32_SRC_LSE RTC_SEL(1)>; 226 status = "okay"; 227}; 228 229&vref { 230 status = "okay"; 231}; 232 233&vbat { 234 status = "okay"; 235}; 236